hte-cli 0.2.16__py3-none-any.whl → 0.2.17__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.
hte_cli/cli.py CHANGED
@@ -408,6 +408,21 @@ def session_join(ctx, session_id: str, force_setup: bool):
408
408
  answer=result.answer,
409
409
  )
410
410
 
411
+ # Extract agent_id from task files for CyberGym post-hoc verification
412
+ agent_id = None
413
+ if files_zip:
414
+ try:
415
+ from io import BytesIO
416
+ from zipfile import ZipFile
417
+ with ZipFile(BytesIO(files_zip)) as zf:
418
+ if "difficulty_levels.json" in zf.namelist():
419
+ with zf.open("difficulty_levels.json") as f:
420
+ import json
421
+ difficulty_info = json.load(f)
422
+ agent_id = difficulty_info.get("agent_id")
423
+ except Exception:
424
+ pass # Not a CyberGym task or malformed zip
425
+
411
426
  console.print()
412
427
  console.print("[green]Task completed![/green]")
413
428
  console.print(f"Answer: {result.answer}")
@@ -428,7 +443,7 @@ def session_join(ctx, session_id: str, force_setup: bool):
428
443
  eval_log_bytes=eval_log_bytes,
429
444
  score=result.score,
430
445
  score_binarized=result.score_binarized,
431
- agent_id=None, # TODO: extract from task files if needed
446
+ agent_id=agent_id,
432
447
  )
433
448
  except APIError as e:
434
449
  console.print(f"[red]Failed to upload result: {e}[/red]")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hte-cli
3
- Version: 0.2.16
3
+ Version: 0.2.17
4
4
  Summary: Human Time-to-Completion Evaluation CLI
5
5
  Project-URL: Homepage, https://github.com/sean-peters-au/lyptus-mono
6
6
  Author: Lyptus Research
@@ -1,7 +1,7 @@
1
1
  hte_cli/__init__.py,sha256=fDGXp-r8bIoLtlQnn5xJ_CpwMhonvk9bGjZQsjA2mDI,914
2
2
  hte_cli/__main__.py,sha256=63n0gNGfskidWDU0aAIF2N8lylVCLYKVIkrN9QiORoo,107
3
3
  hte_cli/api_client.py,sha256=m42kfFZS72Nu_VuDwxRsLNy4ziCcvgk7KNWBh9gwqy0,9257
4
- hte_cli/cli.py,sha256=XpV7x2HcHlVg-ynr-Ih8MxbHc74PT9mQzCICavtpV_0,41623
4
+ hte_cli/cli.py,sha256=lyCuhnSiViTKpWYAeVQ1C4D5idg4FRh_q39PXat7HXg,42261
5
5
  hte_cli/config.py,sha256=42Xv__YMSeRLs2zhGukJkIXFKtnBtYCHnONfViGyt2g,3387
6
6
  hte_cli/errors.py,sha256=1J5PpxcUKBu6XjigMMCPOq4Zc12tnv8LhAsiaVFWLQM,2762
7
7
  hte_cli/events.py,sha256=Zn-mroqaLHNzdT4DFf8st1Qclglshihdc09dBfCN070,5522
@@ -9,7 +9,7 @@ hte_cli/image_utils.py,sha256=TLwJdswUQrSD2bQcAXW03R8j8WG2pbHzd12TWcE7zy4,6418
9
9
  hte_cli/runner.py,sha256=DhC8FMjHwfLR193iP4thLDRZrNssYA9KH1WYKU2JKeg,13535
10
10
  hte_cli/scorers.py,sha256=sFoPJePRt-K191-Ga4cVmrldruJclYXTOLkU_C9nCDI,6025
11
11
  hte_cli/version_check.py,sha256=WVZyGy2XfAghQYdd2N9-0Qfg-7pgp9gt4761-PnmacI,1708
12
- hte_cli-0.2.16.dist-info/METADATA,sha256=pNGPVDfi_RV-IWuC3pGzrqJCUzXgA2rf9-jXI2tNk3s,3768
13
- hte_cli-0.2.16.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
14
- hte_cli-0.2.16.dist-info/entry_points.txt,sha256=XbyEEi1H14DFAt0Kdl22e_IRVEGzimSzYSh5HlhKlFA,41
15
- hte_cli-0.2.16.dist-info/RECORD,,
12
+ hte_cli-0.2.17.dist-info/METADATA,sha256=tVT3em2qTUXNMZeWKRk1vHp2fuO5SV3kl43dzPyCqEE,3768
13
+ hte_cli-0.2.17.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
14
+ hte_cli-0.2.17.dist-info/entry_points.txt,sha256=XbyEEi1H14DFAt0Kdl22e_IRVEGzimSzYSh5HlhKlFA,41
15
+ hte_cli-0.2.17.dist-info/RECORD,,