apheris-foundry-cli 2.7.0__tar.gz → 2.7.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 (76) hide show
  1. {apheris_foundry_cli-2.7.0/src/apheris_foundry_cli.egg-info → apheris_foundry_cli-2.7.2}/PKG-INFO +140 -18
  2. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/README.md +139 -17
  3. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/pyproject.toml +1 -1
  4. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2/src/apheris_foundry_cli.egg-info}/PKG-INFO +140 -18
  5. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apheris_foundry_cli.egg-info/SOURCES.txt +5 -0
  6. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/commands/foundry.py +13 -11
  7. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/commands/login.py +3 -1
  8. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/commands/skills.py +8 -4
  9. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/commands/weights.py +316 -13
  10. apheris_foundry_cli-2.7.2/src/apherisfold_cli/core/archive_paths.py +9 -0
  11. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/auth.py +29 -5
  12. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/hub_requests.py +23 -0
  13. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/input_archive.py +6 -12
  14. apheris_foundry_cli-2.7.2/src/apherisfold_cli/core/io.py +69 -0
  15. apheris_foundry_cli-2.7.2/src/apherisfold_cli/core/weight_archive.py +124 -0
  16. apheris_foundry_cli-2.7.2/src/apherisfold_cli/core/weight_import.py +263 -0
  17. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/main.py +24 -4
  18. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/skills/apheris-foundry-hub/SKILL.md +90 -5
  19. apheris_foundry_cli-2.7.2/src/apherisfold_cli/version.py +1 -0
  20. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_auth.py +9 -3
  21. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_auth_lifecycle.py +64 -8
  22. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_cli.py +208 -1
  23. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_hub_requests.py +54 -0
  24. apheris_foundry_cli-2.7.2/tests/test_io.py +164 -0
  25. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_login_callback.py +16 -6
  26. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_skills.py +51 -1
  27. apheris_foundry_cli-2.7.2/tests/test_weight_archive.py +202 -0
  28. apheris_foundry_cli-2.7.2/tests/test_weight_import.py +848 -0
  29. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_weights.py +3 -1
  30. apheris_foundry_cli-2.7.0/src/apherisfold_cli/core/io.py +0 -115
  31. apheris_foundry_cli-2.7.0/src/apherisfold_cli/version.py +0 -1
  32. apheris_foundry_cli-2.7.0/tests/test_io.py +0 -335
  33. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/LICENSE +0 -0
  34. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/setup.cfg +0 -0
  35. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apheris_foundry_cli.egg-info/dependency_links.txt +0 -0
  36. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apheris_foundry_cli.egg-info/entry_points.txt +0 -0
  37. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apheris_foundry_cli.egg-info/requires.txt +0 -0
  38. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apheris_foundry_cli.egg-info/top_level.txt +0 -0
  39. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/__init__.py +0 -0
  40. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/commands/__init__.py +0 -0
  41. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/commands/compounds.py +0 -0
  42. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/commands/docs.py +0 -0
  43. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/commands/settings.py +0 -0
  44. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/__init__.py +0 -0
  45. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/browser.py +0 -0
  46. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/config.py +0 -0
  47. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/context.py +0 -0
  48. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/documents.py +0 -0
  49. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/errors.py +0 -0
  50. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/limits.py +0 -0
  51. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/login_profiles.py +0 -0
  52. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/msa.py +0 -0
  53. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/pubchem.py +0 -0
  54. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/render.py +0 -0
  55. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/result_artifacts.py +0 -0
  56. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/core/transient.py +0 -0
  57. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/src/apherisfold_cli/handlers.py +0 -0
  58. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_benchmark_examples.py +0 -0
  59. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_browser.py +0 -0
  60. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_config.py +0 -0
  61. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_docs.py +0 -0
  62. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_documents.py +0 -0
  63. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_dry_run_guard.py +0 -0
  64. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_foundry_execution.py +0 -0
  65. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_foundry_helpers.py +0 -0
  66. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_foundry_warnings.py +0 -0
  67. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_handlers.py +0 -0
  68. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_input_archive.py +0 -0
  69. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_jobs_metadata.py +0 -0
  70. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_jobs_update.py +0 -0
  71. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_main.py +0 -0
  72. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_model_discovery.py +0 -0
  73. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_msa.py +0 -0
  74. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_pubchem.py +0 -0
  75. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_render.py +0 -0
  76. {apheris_foundry_cli-2.7.0 → apheris_foundry_cli-2.7.2}/tests/test_result_artifacts.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apheris-foundry-cli
3
- Version: 2.7.0
3
+ Version: 2.7.2
4
4
  Summary: Command-line interface for Apheris Foundry workflows.
5
5
  Author: Apheris
6
6
  License-Expression: LicenseRef-Apheris-Foundry-Software-License
@@ -100,6 +100,7 @@ apheris-foundry login --url https://hub.example.com
100
100
 
101
101
  Follow the sign-in instructions. The CLI saves your session for later commands.
102
102
  Use `apheris-foundry logout` to sign out, or log in again to switch Hubs.
103
+ See [callback URL settings](docs/usage.md#login-and-saved-sessions) to pin a registered URL.
103
104
 
104
105
  If login reports that its local ports are already in use, follow the commands
105
106
  in the error message to identify the conflicting application. Close it if
@@ -120,7 +121,7 @@ workflow guidance directly from your Hub:
120
121
 
121
122
  ```bash
122
123
  apheris-foundry workflows list
123
- apheris-foundry skills install --workflow predict --agent codex
124
+ apheris-foundry skills install --workflow structure-predict --agent codex
124
125
  ```
125
126
 
126
127
  Use `--path ./.agents/skills` instead of `--agent` for another agent or a
@@ -133,8 +134,8 @@ workflow skills are quietly skipped. Display the selected skill without installi
133
134
 
134
135
  ```bash
135
136
  apheris-foundry skills show apheris-foundry-hub
136
- apheris-foundry skills show --workflow predict
137
- apheris-foundry skills show apheris-workflow-predict
137
+ apheris-foundry skills show --workflow structure-predict
138
+ apheris-foundry skills show apheris-workflow-structure-predict
138
139
  # Install every bundled and Hub workflow skill after login:
139
140
  apheris-foundry skills install --all --agent codex
140
141
  ```
@@ -175,9 +176,9 @@ for details about preference scope and scripting.
175
176
  After login, check that your Hub offers prediction:
176
177
 
177
178
  ```bash
178
- apheris-foundry workflows get --workflow predict
179
- apheris-foundry workflows docs --workflow predict
180
- apheris-foundry workflows models --workflow predict
179
+ apheris-foundry workflows get --workflow structure-predict
180
+ apheris-foundry workflows docs --workflow structure-predict
181
+ apheris-foundry workflows models --workflow structure-predict
181
182
  ```
182
183
 
183
184
  Save this small example as `request.json`:
@@ -197,13 +198,13 @@ Save this small example as `request.json`:
197
198
  Submit it using your Hub's default model settings:
198
199
 
199
200
  ```bash
200
- apheris-foundry workflows run --workflow predict --input request.json
201
+ apheris-foundry workflows run --workflow structure-predict --input request.json
201
202
  ```
202
203
 
203
204
  Optionally add a name and one or more tags when submitting:
204
205
 
205
206
  ```bash
206
- apheris-foundry workflows run --workflow predict --input request.json \
207
+ apheris-foundry workflows run --workflow structure-predict --input request.json \
207
208
  --name "Kinase pilot" --tag kinase --tag pilot
208
209
  ```
209
210
 
@@ -261,9 +262,9 @@ Override model parameters inline or from a JSON/YAML file. Select models and wei
261
262
  advertised by `workflows models`:
262
263
 
263
264
  ```bash
264
- apheris-foundry workflows run --workflow predict --input request.json \
265
+ apheris-foundry workflows run --workflow structure-predict --input request.json \
265
266
  --model-params '{"seeds":[7,9],"num_diffusion_samples":3}'
266
- apheris-foundry workflows run --workflow predict --input request.json \
267
+ apheris-foundry workflows run --workflow structure-predict --input request.json \
267
268
  --model <model-id> --weight <weight-version> \
268
269
  --model-params @./model-params.yaml
269
270
  ```
@@ -288,10 +289,10 @@ needed for the workflow's one-sample, seed-42 defaults.
288
289
 
289
290
  ```bash
290
291
  # 1. Discover: one row per model and weight (* = default); --weight shows one in detail
291
- apheris-foundry workflows models --workflow predict
292
- apheris-foundry workflows models --workflow predict --weight of3p2
292
+ apheris-foundry workflows models --workflow structure-predict
293
+ apheris-foundry workflows models --workflow structure-predict --weight of3p2
293
294
  # 2. Use a listed model and weight (rejected if not listed; never substituted)
294
- apheris-foundry workflows run --workflow predict --input request.json --model openfold3 --weight of3p2
295
+ apheris-foundry workflows run --workflow structure-predict --input request.json --model openfold3 --weight of3p2
295
296
  # 3. Make a fine-tuned checkpoint available: private, or --public for everyone on this Hub
296
297
  apheris-foundry weights enable --name my-kinase-ft --run-id <finetune-job-id> --path <checkpoint-path> --tag kinase
297
298
  # 4. It now appears as a weight in step 1; manage it by ID
@@ -355,7 +356,7 @@ the metadata change notification.
355
356
  | `apheris-foundry jobs update --id <job-id> [--name <name>] [--tag <tag> ... \| --clear-tags]` | Edit metadata; omitted fields stay unchanged, tags replace all existing tags, and `--name ""` / `--clear-tags` clear fields |
356
357
  | `apheris-foundry jobs logs --id <job-id>` | Print logs for a job |
357
358
  | `apheris-foundry jobs error --id <job-id>` | Print the saved error for a failed job |
358
- | `apheris-foundry jobs download --id <job-id>` | Download results for a completed job |
359
+ | `apheris-foundry jobs download --id <job-id>` | Download results for a completed job into `./job_<job-id>_results/`, or `--output <dir>` |
359
360
  | `apheris-foundry jobs cancel --id <job-id>` | Cancel a pending or running job (`--yes` skips confirmation) |
360
361
  | `apheris-foundry jobs delete --id <job-id>` | Permanently delete a terminal job and its stored data (`--yes` skips confirmation) |
361
362
 
@@ -459,7 +460,7 @@ Contact [support@apheris.com](mailto:support@apheris.com) for access and deploym
459
460
 
460
461
  ### Model weights (`weights`)
461
462
 
462
- `weights` manages weights enabled from completed jobs: enable, list, inspect,
463
+ `weights` manages weights enabled from completed jobs or imported from local files: enable, import, list, inspect,
463
464
  rename or relabel, share and delete. Every command accepts `--json`, which
464
465
  prints Hub's response unchanged.
465
466
 
@@ -514,7 +515,120 @@ This setting applies only to the enable request and cannot override a shorter se
514
515
  network timeout. If the outcome is uncertain, check `weights list --run-id`
515
516
  before retrying; the CLI does not automatically retry the write.
516
517
 
517
- **Sharing.** Enabled weights are private. `--public` shares a weight with every
518
+ #### Import external checkpoints
519
+
520
+ Start by listing the models and versions that the connected Hub accepts for import:
521
+
522
+ ```sh
523
+ apheris-foundry weights models
524
+ ```
525
+
526
+ Example discovery output (your Hub's entries may differ):
527
+
528
+ ```text
529
+ MODEL VERSION LABEL
530
+ openfold3 openfold3:of3ob Preview 2
531
+ ```
532
+
533
+ Copy `MODEL` into `--model` and `VERSION` into `--version` from the same row.
534
+ The version identifies the installed model build that will consume the checkpoint;
535
+ it is not a name for your checkpoint or the Hub release number. Use `--name` to name
536
+ your imported weights. You may omit `--version` when that model has exactly one
537
+ available version. If it has several, the CLI lists the choices and requires an
538
+ explicit `--version` before uploading.
539
+
540
+ For the example row above:
541
+
542
+ ```sh
543
+ # Raw checkpoint, with an explicit model version
544
+ apheris-foundry weights import --name kinase-ft --model openfold3 --version openfold3:of3ob --checkpoint ./model.pt
545
+
546
+ # Short form: only valid when openfold3 has exactly one available version
547
+ apheris-foundry weights import --name kinase-ft --model openfold3 --checkpoint ./model.pt
548
+
549
+ # ZIP: select weights/model.pt after removing the archive's common root directory
550
+ apheris-foundry weights import --name kinase-bundle --model openfold3 --version openfold3:of3ob --archive ./weights.zip --checkpoint-path weights/model.pt --strip-archive-root
551
+ ```
552
+
553
+ For scripts and agents, `weights models --json` returns the Hub's
554
+ catalog: `models[].id` supplies `--model`; that model's `targets[].version`
555
+ supplies `--version`; `targets[].label` is display text, not an accepted identifier.
556
+ Discovery does not upload anything and cannot be combined with import arguments.
557
+ Use the import catalog rather than `weights list`, which lists registered weights.
558
+
559
+ After a successful import, use the returned weight ID:
560
+
561
+ ```sh
562
+ apheris-foundry weights get --id <returned-weight-id>
563
+ apheris-foundry workflows models --workflow <workflow-id> --json
564
+ apheris-foundry workflows run --workflow <workflow-id> --input ./input --weight <returned-weight-id>
565
+ ```
566
+
567
+ Discovery and registration do not verify scientific compatibility. No producing
568
+ job, run ID, task or caller-supplied capabilities are needed. Hub derives
569
+ capabilities from the selected model version.
570
+
571
+ Use exactly one of `--checkpoint` or `--archive`. For ZIPs, `--checkpoint-path`
572
+ selects a file or directory; `.` selects the entire bundle. With
573
+ `--strip-archive-root`, the path is relative to the normalized archive after its
574
+ common root directory is removed. These two flags apply only to ZIPs. Local
575
+ directories and URLs are not accepted. The CLI checks ZIP metadata without
576
+ extracting files: it sums declared uncompressed sizes and confirms the selected
577
+ path exists. OS metadata such as `__MACOSX` and `.DS_Store` is ignored; ordinary
578
+ hidden companion files count. A single root folder is stripped only when every
579
+ retained file is nested under it. Empty directory entries do not create selectable
580
+ directories. A raw `--checkpoint` is not inspected as an archive, even when its
581
+ format internally uses ZIP (for example, a PyTorch checkpoint).
582
+
583
+ Imports accept repeated `--tag`, `--description` and `--public/--private`. On
584
+ authenticated Hubs, imports are private by default and visibility is fixed at
585
+ registration. On a Hub with authentication disabled, `--public` fails before
586
+ upload; omit it. Private/shared controls provide no privacy isolation there,
587
+ including with `--private`. Human import output shows `no auth`; JSON preserves
588
+ the Hub's `isPublic` field without redefining it.
589
+
590
+ `--dry-run true weights import ...` checks availability, target and local input,
591
+ including the same ZIP metadata checks, and previews without uploading or
592
+ registering anything. Every import uses a live preflight; it does not trust cached
593
+ availability to submit an upload. Real imports inspect ZIP metadata once on the
594
+ opened file before each upload attempt, including an authentication retry.
595
+
596
+ Uploads stream with bounded memory. The payload limit comes from
597
+ `weights models` (`maxUploadBytes`, normally 10 GiB); both the uploaded file and
598
+ the aggregate declared expanded ZIP size must independently fit that limit.
599
+ Selecting one checkpoint does not exclude companion files from the total.
600
+ The CLI also limits ZIP metadata reads to 8 MiB to bound local preflight resources.
601
+ If that budget is exceeded, repackage with fewer entries or shorter names/comments.
602
+ This is a separate CLI resource limit, not Hub's upload limit. Hub remains
603
+ responsible for actual expanded-byte limits, checksums, extraction safety and
604
+ storage capacity; a successful dry-run does not guarantee registration or
605
+ scientific compatibility.
606
+ `--timeout` defaults to 300 seconds and accepts a positive integer. Interactive
607
+ progress goes to stderr and is disabled for `--json` and `--quiet true`.
608
+ Reaching 100% uploaded is not success: the CLI waits for Hub to confirm
609
+ registration with HTTP 201 and the created weight ID. If the connection is lost
610
+ or the response is ambiguous, check `weights list --json` before retrying. Uploads
611
+ are not resumed or automatically replayed after these failures; an explicit 401
612
+ may refresh authentication once and restart the upload.
613
+
614
+ **Availability and offline help.** The CLI uses endpoint capabilities, not a
615
+ comparison of CLI and Hub release numbers. Successful discovery makes the `models` and `import`
616
+ commands visible in `weights --help` and shell completion. A 404 (older Hub or
617
+ disabled feature) hides them; directly invoking either command still checks the
618
+ Hub and explains how to resolve unavailability. Authentication, network, server
619
+ and malformed-response errors are distinct from confirmed lack of support.
620
+ An empty model list means import is supported but no eligible target is available.
621
+
622
+ Help, completion and `apheris-foundry --version` never make discovery requests. Help uses a
623
+ five-minute capability cache bound to the current Hub configuration and session;
624
+ switching either invalidates the result. Before discovery or after expiry,
625
+ `weights models` and `weights import` are hidden and help explains that availability is unknown. Run
626
+ `weights models` to refresh, including after enabling the feature or
627
+ upgrading Hub. An unwritable cache does not block imports.
628
+
629
+ #### Sharing and deletion
630
+
631
+ **Sharing.** Enabled and imported weights are private by default. `--public` shares a weight with every
518
632
  authenticated user of this Hub; they can list, inspect and run with it, but only
519
633
  the owner can update or delete it. Hub fixes visibility when enabling: to stop
520
634
  sharing a weight, delete it, and enable under a new name if you still need a
@@ -581,6 +695,14 @@ Responses are cached locally for 30 days; offline use marks stale entries. Use
581
695
  The shared chemical-identity and foundry-scientific-integrity skills also work
582
696
  without Hub through documented official APIs.
583
697
 
698
+ Without `--output`, `jobs download` extracts into `./job_<job-id>_results/`
699
+ in the current directory, matching the FCP CLI naming convention, and
700
+ `--artifact-id` saves the file under
701
+ `./job_<job-id>_results/artifacts/`. The CLI prints the absolute path and
702
+ refuses to write into a non-empty directory unless `--overwrite=true` is set.
703
+ CLI versions up to 2.7.0 used the hidden `./.apherisfold/runs/foundry-results/`
704
+ directory; those files stay there.
705
+
584
706
  `jobs download` preserves the workflow's `result.json`; the CLI's download
585
707
  manifest is `cli-result.json`. A conflicting artifact with that name is rejected
586
708
  rather than overwritten. `--result-view` controls that CLI manifest's detail.
@@ -591,7 +713,7 @@ Find jobs by name, ID, or tag:
591
713
 
592
714
  ```sh
593
715
  apheris-foundry jobs list --search 'screen_1'
594
- apheris-foundry jobs list --workflow predict --status succeeded --limit 10
716
+ apheris-foundry jobs list --workflow structure-predict --status succeeded --limit 10
595
717
  ```
596
718
 
597
719
  Search is literal (no wildcards). Workflow and status filters can be repeated.
@@ -74,6 +74,7 @@ apheris-foundry login --url https://hub.example.com
74
74
 
75
75
  Follow the sign-in instructions. The CLI saves your session for later commands.
76
76
  Use `apheris-foundry logout` to sign out, or log in again to switch Hubs.
77
+ See [callback URL settings](docs/usage.md#login-and-saved-sessions) to pin a registered URL.
77
78
 
78
79
  If login reports that its local ports are already in use, follow the commands
79
80
  in the error message to identify the conflicting application. Close it if
@@ -94,7 +95,7 @@ workflow guidance directly from your Hub:
94
95
 
95
96
  ```bash
96
97
  apheris-foundry workflows list
97
- apheris-foundry skills install --workflow predict --agent codex
98
+ apheris-foundry skills install --workflow structure-predict --agent codex
98
99
  ```
99
100
 
100
101
  Use `--path ./.agents/skills` instead of `--agent` for another agent or a
@@ -107,8 +108,8 @@ workflow skills are quietly skipped. Display the selected skill without installi
107
108
 
108
109
  ```bash
109
110
  apheris-foundry skills show apheris-foundry-hub
110
- apheris-foundry skills show --workflow predict
111
- apheris-foundry skills show apheris-workflow-predict
111
+ apheris-foundry skills show --workflow structure-predict
112
+ apheris-foundry skills show apheris-workflow-structure-predict
112
113
  # Install every bundled and Hub workflow skill after login:
113
114
  apheris-foundry skills install --all --agent codex
114
115
  ```
@@ -149,9 +150,9 @@ for details about preference scope and scripting.
149
150
  After login, check that your Hub offers prediction:
150
151
 
151
152
  ```bash
152
- apheris-foundry workflows get --workflow predict
153
- apheris-foundry workflows docs --workflow predict
154
- apheris-foundry workflows models --workflow predict
153
+ apheris-foundry workflows get --workflow structure-predict
154
+ apheris-foundry workflows docs --workflow structure-predict
155
+ apheris-foundry workflows models --workflow structure-predict
155
156
  ```
156
157
 
157
158
  Save this small example as `request.json`:
@@ -171,13 +172,13 @@ Save this small example as `request.json`:
171
172
  Submit it using your Hub's default model settings:
172
173
 
173
174
  ```bash
174
- apheris-foundry workflows run --workflow predict --input request.json
175
+ apheris-foundry workflows run --workflow structure-predict --input request.json
175
176
  ```
176
177
 
177
178
  Optionally add a name and one or more tags when submitting:
178
179
 
179
180
  ```bash
180
- apheris-foundry workflows run --workflow predict --input request.json \
181
+ apheris-foundry workflows run --workflow structure-predict --input request.json \
181
182
  --name "Kinase pilot" --tag kinase --tag pilot
182
183
  ```
183
184
 
@@ -235,9 +236,9 @@ Override model parameters inline or from a JSON/YAML file. Select models and wei
235
236
  advertised by `workflows models`:
236
237
 
237
238
  ```bash
238
- apheris-foundry workflows run --workflow predict --input request.json \
239
+ apheris-foundry workflows run --workflow structure-predict --input request.json \
239
240
  --model-params '{"seeds":[7,9],"num_diffusion_samples":3}'
240
- apheris-foundry workflows run --workflow predict --input request.json \
241
+ apheris-foundry workflows run --workflow structure-predict --input request.json \
241
242
  --model <model-id> --weight <weight-version> \
242
243
  --model-params @./model-params.yaml
243
244
  ```
@@ -262,10 +263,10 @@ needed for the workflow's one-sample, seed-42 defaults.
262
263
 
263
264
  ```bash
264
265
  # 1. Discover: one row per model and weight (* = default); --weight shows one in detail
265
- apheris-foundry workflows models --workflow predict
266
- apheris-foundry workflows models --workflow predict --weight of3p2
266
+ apheris-foundry workflows models --workflow structure-predict
267
+ apheris-foundry workflows models --workflow structure-predict --weight of3p2
267
268
  # 2. Use a listed model and weight (rejected if not listed; never substituted)
268
- apheris-foundry workflows run --workflow predict --input request.json --model openfold3 --weight of3p2
269
+ apheris-foundry workflows run --workflow structure-predict --input request.json --model openfold3 --weight of3p2
269
270
  # 3. Make a fine-tuned checkpoint available: private, or --public for everyone on this Hub
270
271
  apheris-foundry weights enable --name my-kinase-ft --run-id <finetune-job-id> --path <checkpoint-path> --tag kinase
271
272
  # 4. It now appears as a weight in step 1; manage it by ID
@@ -329,7 +330,7 @@ the metadata change notification.
329
330
  | `apheris-foundry jobs update --id <job-id> [--name <name>] [--tag <tag> ... \| --clear-tags]` | Edit metadata; omitted fields stay unchanged, tags replace all existing tags, and `--name ""` / `--clear-tags` clear fields |
330
331
  | `apheris-foundry jobs logs --id <job-id>` | Print logs for a job |
331
332
  | `apheris-foundry jobs error --id <job-id>` | Print the saved error for a failed job |
332
- | `apheris-foundry jobs download --id <job-id>` | Download results for a completed job |
333
+ | `apheris-foundry jobs download --id <job-id>` | Download results for a completed job into `./job_<job-id>_results/`, or `--output <dir>` |
333
334
  | `apheris-foundry jobs cancel --id <job-id>` | Cancel a pending or running job (`--yes` skips confirmation) |
334
335
  | `apheris-foundry jobs delete --id <job-id>` | Permanently delete a terminal job and its stored data (`--yes` skips confirmation) |
335
336
 
@@ -433,7 +434,7 @@ Contact [support@apheris.com](mailto:support@apheris.com) for access and deploym
433
434
 
434
435
  ### Model weights (`weights`)
435
436
 
436
- `weights` manages weights enabled from completed jobs: enable, list, inspect,
437
+ `weights` manages weights enabled from completed jobs or imported from local files: enable, import, list, inspect,
437
438
  rename or relabel, share and delete. Every command accepts `--json`, which
438
439
  prints Hub's response unchanged.
439
440
 
@@ -488,7 +489,120 @@ This setting applies only to the enable request and cannot override a shorter se
488
489
  network timeout. If the outcome is uncertain, check `weights list --run-id`
489
490
  before retrying; the CLI does not automatically retry the write.
490
491
 
491
- **Sharing.** Enabled weights are private. `--public` shares a weight with every
492
+ #### Import external checkpoints
493
+
494
+ Start by listing the models and versions that the connected Hub accepts for import:
495
+
496
+ ```sh
497
+ apheris-foundry weights models
498
+ ```
499
+
500
+ Example discovery output (your Hub's entries may differ):
501
+
502
+ ```text
503
+ MODEL VERSION LABEL
504
+ openfold3 openfold3:of3ob Preview 2
505
+ ```
506
+
507
+ Copy `MODEL` into `--model` and `VERSION` into `--version` from the same row.
508
+ The version identifies the installed model build that will consume the checkpoint;
509
+ it is not a name for your checkpoint or the Hub release number. Use `--name` to name
510
+ your imported weights. You may omit `--version` when that model has exactly one
511
+ available version. If it has several, the CLI lists the choices and requires an
512
+ explicit `--version` before uploading.
513
+
514
+ For the example row above:
515
+
516
+ ```sh
517
+ # Raw checkpoint, with an explicit model version
518
+ apheris-foundry weights import --name kinase-ft --model openfold3 --version openfold3:of3ob --checkpoint ./model.pt
519
+
520
+ # Short form: only valid when openfold3 has exactly one available version
521
+ apheris-foundry weights import --name kinase-ft --model openfold3 --checkpoint ./model.pt
522
+
523
+ # ZIP: select weights/model.pt after removing the archive's common root directory
524
+ apheris-foundry weights import --name kinase-bundle --model openfold3 --version openfold3:of3ob --archive ./weights.zip --checkpoint-path weights/model.pt --strip-archive-root
525
+ ```
526
+
527
+ For scripts and agents, `weights models --json` returns the Hub's
528
+ catalog: `models[].id` supplies `--model`; that model's `targets[].version`
529
+ supplies `--version`; `targets[].label` is display text, not an accepted identifier.
530
+ Discovery does not upload anything and cannot be combined with import arguments.
531
+ Use the import catalog rather than `weights list`, which lists registered weights.
532
+
533
+ After a successful import, use the returned weight ID:
534
+
535
+ ```sh
536
+ apheris-foundry weights get --id <returned-weight-id>
537
+ apheris-foundry workflows models --workflow <workflow-id> --json
538
+ apheris-foundry workflows run --workflow <workflow-id> --input ./input --weight <returned-weight-id>
539
+ ```
540
+
541
+ Discovery and registration do not verify scientific compatibility. No producing
542
+ job, run ID, task or caller-supplied capabilities are needed. Hub derives
543
+ capabilities from the selected model version.
544
+
545
+ Use exactly one of `--checkpoint` or `--archive`. For ZIPs, `--checkpoint-path`
546
+ selects a file or directory; `.` selects the entire bundle. With
547
+ `--strip-archive-root`, the path is relative to the normalized archive after its
548
+ common root directory is removed. These two flags apply only to ZIPs. Local
549
+ directories and URLs are not accepted. The CLI checks ZIP metadata without
550
+ extracting files: it sums declared uncompressed sizes and confirms the selected
551
+ path exists. OS metadata such as `__MACOSX` and `.DS_Store` is ignored; ordinary
552
+ hidden companion files count. A single root folder is stripped only when every
553
+ retained file is nested under it. Empty directory entries do not create selectable
554
+ directories. A raw `--checkpoint` is not inspected as an archive, even when its
555
+ format internally uses ZIP (for example, a PyTorch checkpoint).
556
+
557
+ Imports accept repeated `--tag`, `--description` and `--public/--private`. On
558
+ authenticated Hubs, imports are private by default and visibility is fixed at
559
+ registration. On a Hub with authentication disabled, `--public` fails before
560
+ upload; omit it. Private/shared controls provide no privacy isolation there,
561
+ including with `--private`. Human import output shows `no auth`; JSON preserves
562
+ the Hub's `isPublic` field without redefining it.
563
+
564
+ `--dry-run true weights import ...` checks availability, target and local input,
565
+ including the same ZIP metadata checks, and previews without uploading or
566
+ registering anything. Every import uses a live preflight; it does not trust cached
567
+ availability to submit an upload. Real imports inspect ZIP metadata once on the
568
+ opened file before each upload attempt, including an authentication retry.
569
+
570
+ Uploads stream with bounded memory. The payload limit comes from
571
+ `weights models` (`maxUploadBytes`, normally 10 GiB); both the uploaded file and
572
+ the aggregate declared expanded ZIP size must independently fit that limit.
573
+ Selecting one checkpoint does not exclude companion files from the total.
574
+ The CLI also limits ZIP metadata reads to 8 MiB to bound local preflight resources.
575
+ If that budget is exceeded, repackage with fewer entries or shorter names/comments.
576
+ This is a separate CLI resource limit, not Hub's upload limit. Hub remains
577
+ responsible for actual expanded-byte limits, checksums, extraction safety and
578
+ storage capacity; a successful dry-run does not guarantee registration or
579
+ scientific compatibility.
580
+ `--timeout` defaults to 300 seconds and accepts a positive integer. Interactive
581
+ progress goes to stderr and is disabled for `--json` and `--quiet true`.
582
+ Reaching 100% uploaded is not success: the CLI waits for Hub to confirm
583
+ registration with HTTP 201 and the created weight ID. If the connection is lost
584
+ or the response is ambiguous, check `weights list --json` before retrying. Uploads
585
+ are not resumed or automatically replayed after these failures; an explicit 401
586
+ may refresh authentication once and restart the upload.
587
+
588
+ **Availability and offline help.** The CLI uses endpoint capabilities, not a
589
+ comparison of CLI and Hub release numbers. Successful discovery makes the `models` and `import`
590
+ commands visible in `weights --help` and shell completion. A 404 (older Hub or
591
+ disabled feature) hides them; directly invoking either command still checks the
592
+ Hub and explains how to resolve unavailability. Authentication, network, server
593
+ and malformed-response errors are distinct from confirmed lack of support.
594
+ An empty model list means import is supported but no eligible target is available.
595
+
596
+ Help, completion and `apheris-foundry --version` never make discovery requests. Help uses a
597
+ five-minute capability cache bound to the current Hub configuration and session;
598
+ switching either invalidates the result. Before discovery or after expiry,
599
+ `weights models` and `weights import` are hidden and help explains that availability is unknown. Run
600
+ `weights models` to refresh, including after enabling the feature or
601
+ upgrading Hub. An unwritable cache does not block imports.
602
+
603
+ #### Sharing and deletion
604
+
605
+ **Sharing.** Enabled and imported weights are private by default. `--public` shares a weight with every
492
606
  authenticated user of this Hub; they can list, inspect and run with it, but only
493
607
  the owner can update or delete it. Hub fixes visibility when enabling: to stop
494
608
  sharing a weight, delete it, and enable under a new name if you still need a
@@ -555,6 +669,14 @@ Responses are cached locally for 30 days; offline use marks stale entries. Use
555
669
  The shared chemical-identity and foundry-scientific-integrity skills also work
556
670
  without Hub through documented official APIs.
557
671
 
672
+ Without `--output`, `jobs download` extracts into `./job_<job-id>_results/`
673
+ in the current directory, matching the FCP CLI naming convention, and
674
+ `--artifact-id` saves the file under
675
+ `./job_<job-id>_results/artifacts/`. The CLI prints the absolute path and
676
+ refuses to write into a non-empty directory unless `--overwrite=true` is set.
677
+ CLI versions up to 2.7.0 used the hidden `./.apherisfold/runs/foundry-results/`
678
+ directory; those files stay there.
679
+
558
680
  `jobs download` preserves the workflow's `result.json`; the CLI's download
559
681
  manifest is `cli-result.json`. A conflicting artifact with that name is rejected
560
682
  rather than overwritten. `--result-view` controls that CLI manifest's detail.
@@ -565,7 +687,7 @@ Find jobs by name, ID, or tag:
565
687
 
566
688
  ```sh
567
689
  apheris-foundry jobs list --search 'screen_1'
568
- apheris-foundry jobs list --workflow predict --status succeeded --limit 10
690
+ apheris-foundry jobs list --workflow structure-predict --status succeeded --limit 10
569
691
  ```
570
692
 
571
693
  Search is literal (no wildcards). Workflow and status filters can be repeated.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "apheris-foundry-cli"
7
- version = "2.7.0"
7
+ version = "2.7.2"
8
8
  description = "Command-line interface for Apheris Foundry workflows."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"