envloop-cli 2.1.0__tar.gz → 2.2.0__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 (81) hide show
  1. envloop_cli-2.1.0/README.pypi.md → envloop_cli-2.2.0/PKG-INFO +32 -25
  2. envloop_cli-2.1.0/PKG-INFO → envloop_cli-2.2.0/README.pypi.md +12 -45
  3. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/cli_errors.py +1 -1
  4. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/cli_output.py +2 -2
  5. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/client.py +24 -20
  6. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/recipe_packages.py +2 -2
  7. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/resource_cli.py +6 -16
  8. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/runner_packages.py +27 -4
  9. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/transfer.py +3 -1
  10. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/pyproject.toml +4 -4
  11. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/.gitignore +0 -0
  12. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/__init__.py +0 -0
  13. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/_optional.py +0 -0
  14. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/auth_cli.py +0 -0
  15. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/auth_login.py +0 -0
  16. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/auth_workspace.py +0 -0
  17. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/cli.py +0 -0
  18. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/cli_output.py +0 -0
  19. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/client.py +0 -0
  20. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/config.py +0 -0
  21. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/downloads.py +0 -0
  22. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/http.py +0 -0
  23. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/lifecycle_cli.py +0 -0
  24. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/navigation_resources.py +0 -0
  25. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/profile_secrets.py +0 -0
  26. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/resource_cli.py +0 -0
  27. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/resources.py +0 -0
  28. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/terminal.py +0 -0
  29. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/utils/__init__.py +0 -0
  30. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/envloop/utils/logging.py +0 -0
  31. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/__init__.py +0 -0
  32. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/assets.py +0 -0
  33. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/checkpoint_download.py +0 -0
  34. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/checkpoint_upload.py +0 -0
  35. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/cli.py +0 -0
  36. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/dataset_upload.py +0 -0
  37. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/direct_artifact.py +0 -0
  38. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/direct_checkpoint.py +0 -0
  39. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/direct_publication.py +0 -0
  40. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/direct_storage.py +0 -0
  41. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/direct_worker_artifact.py +0 -0
  42. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/execution_content.py +0 -0
  43. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/http.py +0 -0
  44. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/navigation_resources.py +0 -0
  45. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/profile_updates.py +0 -0
  46. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/publication_cli.py +0 -0
  47. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/publications.py +0 -0
  48. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/r2_upload.py +0 -0
  49. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/recipes.py +0 -0
  50. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/tags.py +0 -0
  51. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/asset/envloop_asset/upload_strategy.py +0 -0
  52. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/chat/envloop_chat/__init__.py +0 -0
  53. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/chat/envloop_chat/cli.py +0 -0
  54. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/chat/envloop_chat/client.py +0 -0
  55. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/__init__.py +0 -0
  56. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/cli.py +0 -0
  57. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/cli_output.py +0 -0
  58. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/client.py +0 -0
  59. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/decision.py +0 -0
  60. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/http.py +0 -0
  61. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/inference.py +0 -0
  62. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/job_cost.py +0 -0
  63. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/job_logs.py +0 -0
  64. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/job_spec_cli.py +0 -0
  65. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/named_profile.py +0 -0
  66. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/navigation_resources.py +0 -0
  67. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/resource_cli.py +0 -0
  68. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/resources.py +0 -0
  69. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/runtime_params.py +0 -0
  70. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/sandbox.py +0 -0
  71. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/train.py +0 -0
  72. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/train_log_cli.py +0 -0
  73. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/train_metrics_cli.py +0 -0
  74. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/train_progress.py +0 -0
  75. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/train_runner_cli.py +0 -0
  76. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/experiment/envloop_experiment/training/__init__.py +0 -0
  77. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/rsi-loop/envloop_rsi_loop/__init__.py +0 -0
  78. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/rsi-loop/envloop_rsi_loop/cli.py +0 -0
  79. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/rsi-loop/envloop_rsi_loop/cli_output.py +0 -0
  80. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/rsi-loop/envloop_rsi_loop/loop_cli.py +0 -0
  81. {envloop_cli-2.1.0 → envloop_cli-2.2.0}/packages/rsi-loop/envloop_rsi_loop/loops.py +0 -0
@@ -1,3 +1,23 @@
1
+ Metadata-Version: 2.5
2
+ Name: envloop-cli
3
+ Version: 2.2.0
4
+ Summary: EnvLoop CLI and Python SDK for jobs, training, checkpoints and inference
5
+ Project-URL: Homepage, https://envloop.ai
6
+ Project-URL: Documentation, https://docs.envloop.ai
7
+ Project-URL: Repository, https://github.com/EnvLoop/envloop-cli
8
+ Project-URL: Issues, https://github.com/EnvLoop/envloop-cli/issues
9
+ Project-URL: Agent instructions, https://docs.envloop.ai/skill.md
10
+ Requires-Python: >=3.12
11
+ Provides-Extra: asset
12
+ Requires-Dist: boto3==1.44.3; extra == 'asset'
13
+ Requires-Dist: envloop-envhub==2.2.0; extra == 'asset'
14
+ Provides-Extra: chat
15
+ Requires-Dist: openai==3.55.1; extra == 'chat'
16
+ Provides-Extra: default
17
+ Provides-Extra: experiment
18
+ Provides-Extra: rsi-loop
19
+ Description-Content-Type: text/markdown
20
+
1
21
  # envloop-cli: EnvLoop CLI and Python SDK
2
22
 
3
23
  Install the public client to run agent Jobs, inspect Trials, manage training and
@@ -6,30 +26,16 @@ commands are equivalent. The Python import package is `envloop`.
6
26
 
7
27
  ## Release compatibility
8
28
 
9
- This page describes the current client source. Published 1.33.0 includes
10
- `runner list|get|create|update|delete`, replacing the `list|register` commands in
11
- 1.32.0. The enhancements below are not in published 1.33.0 and await a new
12
- release. Check your installed `el --version` and `el COMMAND --help` before
13
- following an example; the source package version alone does not identify
14
- unreleased features.
15
-
16
- | Unreleased source enhancement | Published 1.33.0 |
17
- | --- | --- |
18
- | `el job chat JOB_ID [PROMPT]` and the `chat` extra | not available |
19
- | Explicit `--json` for `el runner get\|create\|update\|delete` | These commands already output JSON; omit `--json` |
20
- | `el dataset create --format harbor --update-digests` | not available; set `[[tasks]] digest` values by hand |
21
- | `el trial artifact download TRIAL_ID --output DIRECTORY` | positional `DIRECTORY` only |
22
-
23
- Execution also requires a matching platform, project permissions and published
24
- Runners; package installation alone does not establish those prerequisites. See the
29
+ Check your installed `el --version` and `el COMMAND --help` when following an
30
+ example. Upgrade an older installation with `uv tool upgrade envloop-cli`, or
31
+ `python -m pip install --upgrade envloop-cli` in your SDK environment. See the
25
32
  [PyPI release history](https://pypi.org/project/envloop-cli/#history) for published versions.
26
33
 
27
- Profile v4 requires platform support from [EnvPlatform #1489](https://github.com/EnvLoop/EnvPlatform/pull/1489).
28
- Running a v6 Runner in a Sandbox also requires the bootstrap fix in
29
- [EnvPlatform #1490](https://github.com/EnvLoop/EnvPlatform/pull/1490).
30
- Platform 1.71.0 contains neither change: upgrading the CLI alone does not enable
31
- these features on that server version. Existing historical Profile formats remain
32
- available while waiting for a compatible platform release.
34
+ Job execution needs project permissions, readable published Runners and a
35
+ platform that supports the selected Profile and Runner formats. If the platform
36
+ rejects a format, ask your project administrator which published versions it
37
+ supports. Use `envloop-cli[chat]` for the Job chat examples below and
38
+ `envloop-cli[asset]` for ANS parsing and verified content transfers.
33
39
 
34
40
  ## Install
35
41
 
@@ -230,7 +236,7 @@ Failures include a code, readable explanation, HTTP status when available, and
230
236
  recovery guidance without echoing arbitrary response bodies or credentials.
231
237
 
232
238
  Bench/Sandbox Harbor Recipes accept `--harbor_env docker|process` with a canonical
233
- JobSpec (`spec.schema = "envloop.job/v1"`) or a named `--profile`:
239
+ JobSpec (`spec.schema = "envloop.job/v2"`) or a named `--profile`:
234
240
 
235
241
  ```bash
236
242
  el job submit --type sandbox --spec REQUEST.json --harbor_env process
@@ -391,8 +397,9 @@ ID is never substituted for a real asset ID. Use `RESOURCE upload get OPERATION_
391
397
  only publication commit; there is no separate upload create command. Failed or timed-out operations
392
398
  exit nonzero while preserving their safe receipt. Storage credentials are not printed.
393
399
 
394
- Dataset downloads require an explicit split and accept config, content digest and paired task ID/tree
395
- digest selectors. Downloads verify manifests, sizes, SHA-256, safe paths and executable bits. Use
400
+ Dataset downloads require an explicit split and accept content digest and paired task ID/tree
401
+ digest selectors. Directory downloads with an explicit config selector are currently unsupported
402
+ by the pinned ANS dependency. Downloads verify manifests, sizes, SHA-256, safe paths and executable bits. Use
396
403
  `download REF --file-id FILE_ID --output FILE --resume` for a resumable single file. File selection
397
404
  is separate from `get`; Profile uses a redacted `export` instead of a content download.
398
405
 
@@ -1,23 +1,3 @@
1
- Metadata-Version: 2.5
2
- Name: envloop-cli
3
- Version: 2.1.0
4
- Summary: EnvLoop CLI and Python SDK for jobs, training, checkpoints and inference
5
- Project-URL: Homepage, https://envloop.ai
6
- Project-URL: Documentation, https://docs.envloop.ai
7
- Project-URL: Repository, https://github.com/EnvLoop/envloop-cli
8
- Project-URL: Issues, https://github.com/EnvLoop/envloop-cli/issues
9
- Project-URL: Agent instructions, https://docs.envloop.ai/skill.md
10
- Requires-Python: >=3.12
11
- Provides-Extra: asset
12
- Requires-Dist: boto3==1.44.3; extra == 'asset'
13
- Requires-Dist: envloop-envhub==1.23.0; extra == 'asset'
14
- Provides-Extra: chat
15
- Requires-Dist: openai==3.55.1; extra == 'chat'
16
- Provides-Extra: default
17
- Provides-Extra: experiment
18
- Provides-Extra: rsi-loop
19
- Description-Content-Type: text/markdown
20
-
21
1
  # envloop-cli: EnvLoop CLI and Python SDK
22
2
 
23
3
  Install the public client to run agent Jobs, inspect Trials, manage training and
@@ -26,30 +6,16 @@ commands are equivalent. The Python import package is `envloop`.
26
6
 
27
7
  ## Release compatibility
28
8
 
29
- This page describes the current client source. Published 1.33.0 includes
30
- `runner list|get|create|update|delete`, replacing the `list|register` commands in
31
- 1.32.0. The enhancements below are not in published 1.33.0 and await a new
32
- release. Check your installed `el --version` and `el COMMAND --help` before
33
- following an example; the source package version alone does not identify
34
- unreleased features.
35
-
36
- | Unreleased source enhancement | Published 1.33.0 |
37
- | --- | --- |
38
- | `el job chat JOB_ID [PROMPT]` and the `chat` extra | not available |
39
- | Explicit `--json` for `el runner get\|create\|update\|delete` | These commands already output JSON; omit `--json` |
40
- | `el dataset create --format harbor --update-digests` | not available; set `[[tasks]] digest` values by hand |
41
- | `el trial artifact download TRIAL_ID --output DIRECTORY` | positional `DIRECTORY` only |
42
-
43
- Execution also requires a matching platform, project permissions and published
44
- Runners; package installation alone does not establish those prerequisites. See the
9
+ Check your installed `el --version` and `el COMMAND --help` when following an
10
+ example. Upgrade an older installation with `uv tool upgrade envloop-cli`, or
11
+ `python -m pip install --upgrade envloop-cli` in your SDK environment. See the
45
12
  [PyPI release history](https://pypi.org/project/envloop-cli/#history) for published versions.
46
13
 
47
- Profile v4 requires platform support from [EnvPlatform #1489](https://github.com/EnvLoop/EnvPlatform/pull/1489).
48
- Running a v6 Runner in a Sandbox also requires the bootstrap fix in
49
- [EnvPlatform #1490](https://github.com/EnvLoop/EnvPlatform/pull/1490).
50
- Platform 1.71.0 contains neither change: upgrading the CLI alone does not enable
51
- these features on that server version. Existing historical Profile formats remain
52
- available while waiting for a compatible platform release.
14
+ Job execution needs project permissions, readable published Runners and a
15
+ platform that supports the selected Profile and Runner formats. If the platform
16
+ rejects a format, ask your project administrator which published versions it
17
+ supports. Use `envloop-cli[chat]` for the Job chat examples below and
18
+ `envloop-cli[asset]` for ANS parsing and verified content transfers.
53
19
 
54
20
  ## Install
55
21
 
@@ -250,7 +216,7 @@ Failures include a code, readable explanation, HTTP status when available, and
250
216
  recovery guidance without echoing arbitrary response bodies or credentials.
251
217
 
252
218
  Bench/Sandbox Harbor Recipes accept `--harbor_env docker|process` with a canonical
253
- JobSpec (`spec.schema = "envloop.job/v1"`) or a named `--profile`:
219
+ JobSpec (`spec.schema = "envloop.job/v2"`) or a named `--profile`:
254
220
 
255
221
  ```bash
256
222
  el job submit --type sandbox --spec REQUEST.json --harbor_env process
@@ -411,8 +377,9 @@ ID is never substituted for a real asset ID. Use `RESOURCE upload get OPERATION_
411
377
  only publication commit; there is no separate upload create command. Failed or timed-out operations
412
378
  exit nonzero while preserving their safe receipt. Storage credentials are not printed.
413
379
 
414
- Dataset downloads require an explicit split and accept config, content digest and paired task ID/tree
415
- digest selectors. Downloads verify manifests, sizes, SHA-256, safe paths and executable bits. Use
380
+ Dataset downloads require an explicit split and accept content digest and paired task ID/tree
381
+ digest selectors. Directory downloads with an explicit config selector are currently unsupported
382
+ by the pinned ANS dependency. Downloads verify manifests, sizes, SHA-256, safe paths and executable bits. Use
416
383
  `download REF --file-id FILE_ID --output FILE --resume` for a resumable single file. File selection
417
384
  is separate from `get`; Profile uses a redacted `export` instead of a content download.
418
385
 
@@ -56,7 +56,7 @@ _register("RUNNER_PACKAGE_INVALID", "The Runner package directory is invalid. It
56
56
  _register("RUNNER_REVISION_INVALID", "Use the full lowercase 40- or 64-character source commit, or a local branch or tag name, as --revision and a NAMESPACE/NAME Runner name.")
57
57
  _register("RUNNER_REVISION_UNRESOLVED", "--revision names no local branch or tag in the Git checkout that holds DIRECTORY, or Git is unavailable. Fetch or create the branch, or pass the full source commit.")
58
58
  _register("RUNNER_PACKAGE_UNCOMMITTED", "DIRECTORY differs from the --revision commit: it has uncommitted changes, untracked files or ignored files, all of which would be published. Commit or remove them, or pass a full commit you vouch for.")
59
- _register("RUNNER_SOURCE_REF_INVALID", "Use a branch or tag name such as main or v1 with --source-ref-kind branch, tag or commit; HEAD, latest, default, release, '..', spaces and ~^:?*[\\ are not allowed.")
59
+ _register("RUNNER_COMMIT_METADATA_INVALID", "Git author and message must be single-line text of at most 256 and 4096 characters, respectively.")
60
60
  _register("RUNNER_REVISION_CONFLICT", "The platform catalog holds different package or index hashes for this Runner revision. Publish a new revision instead of changing an existing one.")
61
61
  _register("RECIPE_PACKAGE_INVALID RECIPE_DECLARATION_INVALID RECIPE_INVALID", "--directory must hold recipe.toml with schema_version = \"envloop.recipe/v3\" and the tables [recipe] name, types; [runner] name, abi; [source] paths, optional exclude and optional repository (a https://github.com/OWNER/REPO URL if given; omit it for a local-only repository); optional [inputs], [params], [outputs] and [dependencies]. No other top-level tables or keys are allowed.")
62
62
  _register("RECIPE_PACKAGE_SCHEMA_RETIRED", "recipe.toml uses the retired envloop.recipe-publication/v3 format. Rewrite it as schema_version = \"envloop.recipe/v3\" with [recipe], [runner] and [source] tables and add entrypoint.sh next to it; published Recipes stay readable.")
@@ -46,8 +46,8 @@ def list_layout(items: list[dict[str, Any]], args: argparse.Namespace) -> tuple[
46
46
  # Like el dataset list: STATUS / UNAVAILABLE REASON appear when the page reports them, so a
47
47
  # Revision that differs between shared copies (RUNNER_REVISION_AMBIGUOUS) is visible in the table.
48
48
  states = tuple(field for field in ('status', 'unavailable_reason') if any(field in item for item in items))
49
- headers = ('NAME', 'REVISION', 'SOURCE REF', 'VISIBILITY', *(field.replace('_', ' ').upper() for field in states), *LIFECYCLE)
50
- render = lambda item: (item.get('name'), item.get('revision'), item.get('source_ref'),
49
+ headers = ('NAME', 'REVISION', 'AUTHOR', 'MESSAGE', 'VISIBILITY', *(field.replace('_', ' ').upper() for field in states), *LIFECYCLE)
50
+ render = lambda item: (item.get('name'), item.get('revision'), item.get('author'), item.get('message'),
51
51
  item.get('visibility'), *(item.get(field) for field in states), *lifecycle(item))
52
52
  empty = 'No runners found.'
53
53
  elif args.group == 'dataset' and args.action == 'list':
@@ -281,32 +281,29 @@ class Runners:
281
281
  from .execution_content import ExecutionContent
282
282
  return download_content(ExecutionContent(self._server,'runner'),ref,output,file_id=file_id,**selection)
283
283
 
284
- def create(self, directory: str | Path, *, revision: str, name: str | None = None,
285
- executables: Sequence[str] | None = None, source_ref: str | None = None,
286
- source_ref_kind: str = 'branch', dry_run: bool = False):
284
+ def create(self, directory: str | Path, *, revision: str = 'main', name: str | None = None,
285
+ executables: Sequence[str] | None = None, dry_run: bool = False):
287
286
  """Create an immutable Runner revision from a local package directory."""
288
287
  return self._publish(directory, revision=revision, name=name, executables=executables,
289
- source_ref=source_ref, source_ref_kind=source_ref_kind, dry_run=dry_run)
288
+ dry_run=dry_run)
290
289
 
291
- def update(self, asset_id: str, directory: str | Path, *, revision: str, name: str | None = None,
292
- executables: Sequence[str] | None = None, source_ref: str | None = None,
293
- source_ref_kind: str = 'branch', dry_run: bool = False):
290
+ def update(self, asset_id: str, directory: str | Path, *, revision: str = 'main', name: str | None = None,
291
+ executables: Sequence[str] | None = None, dry_run: bool = False):
294
292
  """Publish a new immutable revision of the same Runner, preserving historical bytes."""
295
293
  return self._publish(directory, revision=revision, name=name, executables=executables,
296
- source_ref=source_ref, source_ref_kind=source_ref_kind, dry_run=dry_run, asset_id=asset_id)
294
+ dry_run=dry_run, asset_id=asset_id)
297
295
 
298
296
  def _publish(self, directory: str | Path, *, revision: str, name: str | None = None,
299
- executables: Sequence[str] | None = None, source_ref: str | None = None,
300
- source_ref_kind: str = 'branch', dry_run: bool = False, asset_id: str | None = None):
297
+ executables: Sequence[str] | None = None, dry_run: bool = False, asset_id: str | None = None):
301
298
  """Publish a Runner package directory as the immutable revision NAME@REVISION.
302
299
 
303
300
  This is the Runner domain publication API with the native manifest built
304
301
  from `directory` (runner.toml plus its main.py or main.sh entrypoint): the
305
302
  platform stores the bytes, derives the package and index SHA-256, creates the
306
303
  Runner asset on first use and registers the revision. `revision` is the full
307
- source commit. `source_ref` (for example `main`) then points that name at the
308
- revision through POST /v1/runners/{name}/revisions, so `NAME@main` resolves to
309
- it. Returns `{'asset': publication, 'runner': catalog revision}`; a dry run
304
+ source commit or a local branch/tag, resolved once to its full commit. Branch
305
+ and tag names remain selectable after registration. Author and message
306
+ come from this commit; a detached package leaves unknown metadata empty. Returns `{'asset': publication, 'runner': catalog revision}`; a dry run
310
307
  returns the server's validation result without publishing.
311
308
  """
312
309
  from envloop.http import RemoteError
@@ -314,15 +311,22 @@ class Runners:
314
311
  from envloop_asset.runner_packages import (
315
312
  REFERENCE_KEYS,
316
313
  REVISION,
317
- SOURCE_REF_KINDS,
314
+ commit_metadata,
315
+ resolve_source_revision,
318
316
  runner_package,
319
- source_ref_valid,
320
317
  )
321
318
 
322
- if not isinstance(revision, str) or not REVISION.fullmatch(revision) or name is not None and not isinstance(name, str):
319
+ if not isinstance(revision, str) or name is not None and not isinstance(name, str):
323
320
  raise RemoteError('RUNNER_REVISION_INVALID')
324
- if source_ref is not None and (not source_ref_valid(source_ref) or source_ref_kind not in SOURCE_REF_KINDS):
325
- raise RemoteError('RUNNER_SOURCE_REF_INVALID')
321
+ requested_revision = None
322
+ if not REVISION.fullmatch(revision):
323
+ if len(revision) >= 40 and all(character in '0123456789abcdefABCDEF' for character in revision):
324
+ raise RemoteError('RUNNER_REVISION_INVALID')
325
+ selected = revision
326
+ revision, kind = resolve_source_revision(directory, selected)
327
+ prefix = 'refs/heads/' if kind == 'branch' else 'refs/tags/'
328
+ requested_revision = selected if selected.startswith(prefix) else prefix + selected
329
+ metadata = commit_metadata(directory, revision)
326
330
  name, manifest, files, executables = runner_package(directory, name=name, executables=executables)
327
331
  ref = f'envloop://runners/{name}@{revision}'
328
332
  data = ExecutionContent(self._server, 'runner')
@@ -339,11 +343,11 @@ class Runners:
339
343
  or any(not isinstance(pinned.get(key), str) for key in REFERENCE_KEYS)):
340
344
  raise RemoteError('INVALID_RESPONSE')
341
345
  reference = {key: pinned[key] for key in REFERENCE_KEYS}
342
- if source_ref is None:
346
+ if requested_revision is None and not metadata:
343
347
  runner = self._server.get_runner_revision(name, revision)
344
348
  else:
345
349
  runner = self._server.register_runner_revision(
346
- name, {**reference, 'source_ref': source_ref, 'source_ref_kind': source_ref_kind})
350
+ name, {**reference, **metadata, **({'requested_revision': requested_revision} if requested_revision else {})})
347
351
  # Both catalog views must name the same stored bytes.
348
352
  if not isinstance(runner, dict) or any(runner.get(key) != value for key, value in reference.items()):
349
353
  raise RemoteError('RUNNER_REVISION_CONFLICT')
@@ -12,7 +12,7 @@ from pathlib import Path
12
12
  from typing import Any
13
13
 
14
14
  from envloop.http import RemoteError
15
- from envloop_asset.runner_packages import REVISION, source_ref_valid
15
+ from envloop_asset.runner_packages import REVISION, revision_valid
16
16
 
17
17
  DECLARATION = 'recipe.toml'
18
18
  GIT_TIMEOUT = 60
@@ -56,7 +56,7 @@ class _Repository:
56
56
  if found.returncode == 0 and found.stdout.decode().strip() == ref:
57
57
  return ref, 'commit'
58
58
  raise RemoteError('RECIPE_REVISION_UNRESOLVED')
59
- if not source_ref_valid(ref):
59
+ if not revision_valid(ref):
60
60
  raise RemoteError('RECIPE_REVISION_INVALID')
61
61
  for kind, prefix in (('branch', 'refs/heads/'), ('tag', 'refs/tags/')):
62
62
  found = self.git('rev-parse', '--verify', '--quiet', f'{prefix}{ref}^{{commit}}')
@@ -300,10 +300,6 @@ def runner_package_arguments(command: argparse.ArgumentParser):
300
300
  command.add_argument('--name', help='NAMESPACE/NAME; must equal [runner] name in runner.toml (default: that name)')
301
301
  command.add_argument('--executable', action='append', dest='executables', metavar='PATH',
302
302
  help='Declare an executable file; repeat for each. Default: files with an execute bit')
303
- command.add_argument('--source-ref', metavar='REF', help='Also point this branch or tag name (for example main) at the revision, '
304
- 'so NAME@REF resolves to it (default: the branch or tag given as --revision)')
305
- command.add_argument('--source-ref-kind', choices=['branch', 'tag', 'commit'],
306
- help='Kind of --source-ref (default: branch, or the kind of the --revision branch or tag)')
307
303
  command.add_argument('--dry-run', action='store_true', help='Validate the package and authorization without publishing')
308
304
 
309
305
 
@@ -323,26 +319,20 @@ def publish_runner(client: Any, args: argparse.Namespace):
323
319
  import sys
324
320
 
325
321
  from envloop.http import RemoteError
326
- from envloop_asset.runner_packages import REVISION, resolve_source_revision
322
+ from envloop_asset.runner_packages import REVISION
327
323
 
328
- revision, source_ref, source_ref_kind = args.revision, args.source_ref, args.source_ref_kind
329
- if not REVISION.fullmatch(revision):
330
- revision, kind = resolve_source_revision(args.directory, args.revision)
331
- if source_ref is None:
332
- source_ref, source_ref_kind = args.revision, kind
333
- print(f'resolved {kind} {args.revision} to {revision}', file=sys.stderr)
334
324
  try:
335
325
  operation = client.runners.create if args.action == 'create' else client.runners.update
336
326
  positional = (args.directory,) if args.action == 'create' else (args.asset_id, args.directory)
337
- result = operation(*positional, revision=revision, name=args.name,
338
- executables=args.executables, source_ref=source_ref,
339
- source_ref_kind=source_ref_kind or 'branch', dry_run=args.dry_run)
327
+ result = operation(*positional, revision=args.revision, name=args.name,
328
+ executables=args.executables, dry_run=args.dry_run)
340
329
  except RemoteError as error:
341
330
  if error.code in {'ACCESS_DENIED', 'ASSET_ACCESS_REQUIRED'} and not error.hint:
342
331
  error.hint = RUNNER_WRITE_HINT
343
332
  raise
344
333
  if not args.dry_run:
345
334
  runner = result['runner']
346
- moved = f"; {runner['source_ref']} now resolves to it" if runner.get('source_ref') else ''
347
- print(f"{'created' if args.action == 'create' else 'updated'} {runner['uri']} (package sha256 {runner['sha256']}){moved}", file=sys.stderr)
335
+ if not REVISION.fullmatch(args.revision):
336
+ print(f'resolved revision {args.revision} to {runner["revision"]}', file=sys.stderr)
337
+ print(f"{'created' if args.action == 'create' else 'updated'} {runner['uri']} (package sha256 {runner['sha256']})", file=sys.stderr)
348
338
  return result
@@ -15,13 +15,12 @@ from envloop.http import RemoteError
15
15
  NAME = re.compile(r'[a-zA-Z0-9][a-zA-Z0-9._-]*/[a-zA-Z0-9][a-zA-Z0-9._-]*')
16
16
  REVISION = re.compile(r'[a-f0-9]{40}|[a-f0-9]{64}')
17
17
  SEGMENT = re.compile(r'[A-Za-z0-9_][A-Za-z0-9_.-]*')
18
- SOURCE_REF_KINDS = ('branch', 'tag', 'commit')
19
18
  MAX_FILES = 100
20
19
  MAX_BYTES = 8 * 1024 * 1024
21
20
  REFERENCE_KEYS = ('uri', 'name', 'revision', 'sha256', 'index_sha256')
22
21
 
23
22
 
24
- def source_ref_valid(value: Any) -> bool:
23
+ def revision_valid(value: Any) -> bool:
25
24
  return (isinstance(value, str) and bool(value) and value not in ('HEAD', 'latest', 'default', 'release')
26
25
  and not re.search(r'@\{|[~^:?*\[\\\s]', value) and '..' not in value and not value.startswith('-'))
27
26
 
@@ -88,7 +87,7 @@ def resolve_source_revision(directory: str | Path, ref: str) -> tuple[str, str]:
88
87
  the bytes of that commit: tracked changes, untracked files and ignored files
89
88
  are refused rather than published under the commit's name.
90
89
  """
91
- if not source_ref_valid(ref):
90
+ if not revision_valid(ref):
92
91
  raise RemoteError('RUNNER_REVISION_INVALID')
93
92
  root = Path(directory).absolute()
94
93
  if root.is_symlink() or not root.is_dir():
@@ -101,7 +100,10 @@ def resolve_source_revision(directory: str | Path, ref: str) -> tuple[str, str]:
101
100
  raise RemoteError('RUNNER_REVISION_UNRESOLVED') from None
102
101
 
103
102
  for kind, prefix in (('branch', 'refs/heads/'), ('tag', 'refs/tags/')):
104
- resolved = git('rev-parse', '--verify', '--quiet', f'{prefix}{ref}^{{commit}}')
103
+ if ref.startswith(('refs/heads/', 'refs/tags/')) and not ref.startswith(prefix):
104
+ continue
105
+ selector = ref if ref.startswith(prefix) else prefix + ref
106
+ resolved = git('rev-parse', '--verify', '--quiet', f'{selector}^{{commit}}')
105
107
  if resolved.returncode == 0 and REVISION.fullmatch(commit := resolved.stdout.strip()):
106
108
  break
107
109
  else:
@@ -111,3 +113,24 @@ def resolve_source_revision(directory: str | Path, ref: str) -> tuple[str, str]:
111
113
  if changed.returncode != 0 or extra.returncode != 0 or extra.stdout.strip():
112
114
  raise RemoteError('RUNNER_PACKAGE_UNCOMMITTED')
113
115
  return commit, kind
116
+
117
+
118
+ def commit_metadata(directory: str | Path, revision: str) -> dict[str, str]:
119
+ """Read display metadata from the selected commit; a detached package has none."""
120
+ try:
121
+ result = subprocess.run(['git', '-C', str(Path(directory).absolute()), 'show', '--no-patch',
122
+ '--no-notes', '--format=%an%x00%s', revision, '--'],
123
+ capture_output=True, text=True, errors='replace', timeout=30)
124
+ except (OSError, subprocess.TimeoutExpired):
125
+ return {}
126
+ if result.returncode != 0:
127
+ return {}
128
+ values = result.stdout.rstrip('\n').split('\x00', 1)
129
+ if len(values) != 2:
130
+ return {}
131
+ metadata = dict(zip(('author', 'message'), values, strict=True))
132
+ for key, limit in (('author', 256), ('message', 4096)):
133
+ value = metadata[key]
134
+ if len(value) > limit or re.search(r'[\x00-\x1f\x7f]', value):
135
+ raise RemoteError('RUNNER_COMMIT_METADATA_INVALID')
136
+ return {key: value for key, value in metadata.items() if value.strip()}
@@ -353,13 +353,15 @@ class AssetTransfer:
353
353
  # keep one materialization coordinator. Older Hub readers are serial.
354
354
  materialization_options: dict[str, Any] = (
355
355
  {'max_workers': 1} if 'max_workers' in inspect.signature(download_directory).parameters else {})
356
+ materialization_options.update({'config': config} if config is not None else {})
357
+ materialization_options.update(task_selection)
356
358
  materialize_started = time.perf_counter()
357
359
  materialize_cpu_started = time.thread_time()
358
360
  query_count = len(timings['queries'])
359
361
  validation_before_materialize = timings['plan_validation_seconds']
360
362
  try:
361
363
  target = download_directory(plan, Path(destination), uri=uri, split=split, content_digest=content_digest, read_url=read,
362
- **materialization_options, **({'config': config} if config is not None else {}), **task_selection)
364
+ **materialization_options)
363
365
  except (ANSError, InvalidManifest, ValueError, TypeError, KeyError):
364
366
  raise RemoteError('ASSET_INTEGRITY_FAILED', 409) from None
365
367
  finally:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "envloop-cli"
3
- version = "2.1.0"
3
+ version = "2.2.0"
4
4
  description = "EnvLoop CLI and Python SDK for jobs, training, checkpoints and inference"
5
5
  requires-python = ">=3.12"
6
6
  readme = "README.pypi.md"
@@ -8,7 +8,7 @@ dependencies = []
8
8
 
9
9
  [project.optional-dependencies]
10
10
  default = []
11
- asset = ["envloop-envhub==1.23.0", "boto3==1.44.3"]
11
+ asset = ["envloop-envhub==2.2.0", "boto3==1.44.3"]
12
12
  experiment = []
13
13
  rsi-loop = []
14
14
  chat = ["openai==3.55.1"]
@@ -25,7 +25,7 @@ Issues = "https://github.com/EnvLoop/envloop-cli/issues"
25
25
  "Agent instructions" = "https://docs.envloop.ai/skill.md"
26
26
 
27
27
  [dependency-groups]
28
- dev = ["ruff==0.17.3", "pre-commit>=4.6,<5", "pytest>=8", "envloop-envhub==1.23.0", "pyrefly==1.4.0", "openai==3.55.1"]
28
+ dev = ["ruff==0.17.3", "pre-commit>=4.6,<5", "pytest>=8", "envloop-envhub==2.2.0", "pyrefly==1.4.0", "openai==3.55.1"]
29
29
 
30
30
  [build-system]
31
31
  requires = ["hatchling"]
@@ -66,7 +66,7 @@ combine-as-imports = true
66
66
  known-first-party = ["envloop", "envloop_asset", "envloop_experiment", "envloop_rsi_loop", "envloop_chat"]
67
67
 
68
68
  [tool.uv.sources]
69
- envloop-envhub = { git = "ssh://git@github.com/EnvLoop/EnvHub.git", rev = "4cd3dacd8f02f0d8e9204484f1d3d7ab03eeff35" }
69
+ envloop-envhub = { git = "ssh://git@github.com/EnvLoop/EnvHub.git", rev = "535f53ecfb67391a45bc48ae15ccd1b3feb56b49" }
70
70
 
71
71
  [tool.pyrefly]
72
72
  preset = "strict"
File without changes
File without changes
File without changes