@delta-infra/cli 1.1.18 → 1.1.21

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 (77) hide show
  1. package/README.md +507 -513
  2. package/checksums.txt +5 -5
  3. package/package.json +3 -2
  4. package/scripts/install-wizard.js +689 -701
  5. package/scripts/install.js +442 -442
  6. package/scripts/run.js +65 -65
  7. package/skills/delta-protein/AGENTS.md +73 -0
  8. package/skills/delta-protein/SKILL.md +389 -0
  9. package/skills/delta-protein/agents/openai.yaml +4 -0
  10. package/skills/delta-protein/references/bfitter.md +64 -0
  11. package/skills/delta-protein/references/catapro_predict.md +63 -0
  12. package/skills/delta-protein/references/catpred_predict.md +65 -0
  13. package/skills/delta-protein/references/caver_tunnel_analyze.md +63 -0
  14. package/skills/delta-protein/references/consensus_mutation.md +61 -0
  15. package/skills/delta-protein/references/consurf_predict.md +67 -0
  16. package/skills/delta-protein/references/crop_sequence.md +69 -0
  17. package/skills/delta-protein/references/dock.md +82 -0
  18. package/skills/delta-protein/references/dock_score.md +70 -0
  19. package/skills/delta-protein/references/easifa_predict_active_site.md +70 -0
  20. package/skills/delta-protein/references/ephod_predict_mutation.md +66 -0
  21. package/skills/delta-protein/references/ephod_predict_protein.md +61 -0
  22. package/skills/delta-protein/references/esmfold2_predict.md +67 -0
  23. package/skills/delta-protein/references/evcouplings_mutation.md +64 -0
  24. package/skills/delta-protein/references/fasta_to_sequence.md +59 -0
  25. package/skills/delta-protein/references/foldseek.md +61 -0
  26. package/skills/delta-protein/references/generate_msa.md +61 -0
  27. package/skills/delta-protein/references/interpro_analyze.md +63 -0
  28. package/skills/delta-protein/references/mpnn_design_sequence.md +71 -0
  29. package/skills/delta-protein/references/multievolve.md +73 -0
  30. package/skills/delta-protein/references/pisa_query.md +70 -0
  31. package/skills/delta-protein/references/plip_analyze.md +65 -0
  32. package/skills/delta-protein/references/pocket_prediction.md +63 -0
  33. package/skills/delta-protein/references/protein_design.md +65 -0
  34. package/skills/delta-protein/references/protein_evolution.md +77 -0
  35. package/skills/delta-protein/references/protein_sol_predict_mutation.md +66 -0
  36. package/skills/delta-protein/references/protein_sol_predict_protein.md +61 -0
  37. package/skills/delta-protein/references/protenix.md +66 -0
  38. package/skills/delta-protein/references/protrek_search.md +90 -0
  39. package/skills/delta-protein/references/pubchem_search.md +68 -0
  40. package/skills/delta-protein/references/pubmed_search.md +79 -0
  41. package/skills/delta-protein/references/reap_design_primer.md +69 -0
  42. package/skills/delta-protein/references/rfd3_design.md +65 -0
  43. package/skills/delta-protein/references/structure_to_sequence.md +61 -0
  44. package/skills/delta-protein/references/summarize_result.md +68 -0
  45. package/skills/delta-protein/references/surface_charge.md +84 -0
  46. package/skills/delta-protein/references/uniprot_batch_query.md +63 -0
  47. package/skills/delta-protein/references/uniprot_query.md +64 -0
  48. package/skills/delta-protein/references/zero_shot_mutant_candidates.md +76 -0
  49. package/skills/delta-protein/scripts/gen_references.py +167 -0
  50. package/skills/delta-protein/scripts/output_metadata.json +275 -0
  51. package/skills/delta-sandbox/SKILL.md +388 -388
  52. package/skills/delta-sandbox/agents/openai.yaml +4 -4
  53. package/skills/delta-sandbox/references/commands.md +58 -58
  54. package/skills/delta-sandbox/references/lifecycle.md +100 -100
  55. package/skills/delta-sandbox/references/recipes.md +138 -138
  56. package/skills/delta-science/AGENTS.md +47 -47
  57. package/skills/delta-science/SKILL.md +227 -227
  58. package/skills/delta-science/agents/openai.yaml +4 -4
  59. package/skills/delta-science/references/antbo.md +105 -105
  60. package/skills/delta-science/references/delta-bo.md +92 -92
  61. package/skills/delta-science/references/gsasii.md +118 -118
  62. package/skills/delta-science/references/lammps.md +68 -68
  63. package/skills/delta-science/references/ldm-bo.md +132 -132
  64. package/skills/delta-science/references/materials-design.md +130 -130
  65. package/skills/delta-science/references/pubchem.md +128 -128
  66. package/skills/delta-science/references/pymatgen.md +69 -69
  67. package/skills/delta-science/references/qe.md +134 -134
  68. package/skills/delta-science/references/rdkit.md +141 -141
  69. package/skills/delta-science/references/strbo.md +95 -95
  70. package/skills/delta-science/references/synbo.md +201 -201
  71. package/skills/delta-science/references/xrd.md +688 -197
  72. package/skills/delta-science/scripts/catalog.py +92 -92
  73. package/skills/delta-science/scripts/generated_catalog.py +69 -69
  74. package/skills/delta-science/scripts/invoke.py +346 -346
  75. package/skills/delta-shared/SKILL.md +113 -113
  76. package/skills/delta-shared/agents/openai.yaml +4 -4
  77. package/skills/manifest.json +20 -19
@@ -1,113 +1,113 @@
1
- ---
2
- name: delta-shared
3
- description: "delta-cli shared global rules: configuration and authentication checks, security boundaries, error handling, and sandbox destruction."
4
- ---
5
-
6
- # delta-cli Shared Rules
7
-
8
- General guidance for AI agents using `delta-cli`. Core principles: **check, do not guess or expose credentials**.
9
-
10
- ## Before any operation
11
-
12
- 1. Verify the server address:
13
- ```bash
14
- delta-cli config show
15
- ```
16
- 2. Inspect the local authentication configuration:
17
- ```bash
18
- delta-cli auth status
19
- ```
20
-
21
- - If `auth status` reports `method: token` or `method: apikey`, a credential is configured locally; **run the requested command directly without logging in or initialising configuration again**.
22
- - `auth status` reads local configuration and environment overrides; it does not validate the credential with the remote server. If it reports `method: none`, follow “Complete configuration” below. If a requested command returns `error.type: auth` or `permission`, follow the matching recovery action below.
23
-
24
- ## Complete configuration
25
-
26
- If the server address or credentials are missing, **ask the user once**, then initialise with the flag that matches the credential type:
27
-
28
- ```bash
29
- delta-cli config init --base-url <server-url> --token <token>
30
- # For an API key:
31
- delta-cli config init --base-url <server-url> --apikey <api-key>
32
- ```
33
-
34
- Do not use interactive `config init` (without flags), as it may hang when stdin is unavailable.
35
-
36
- ### Priority of information sources
37
-
38
- 1. Environment variables: `DELTA_INFRA_BASE_URL`, `DELTA_INFRA_TOKEN`, `DELTA_INFRA_API_KEY`
39
- 2. `base_url`, `token`, and `apikey` in `~/.delta-infra/config.json` (environment values override file values)
40
- 3. Default value: only `base_url` has an internal default
41
- 4. If none of the above are available, **you must ask the user**; do not make anything up
42
-
43
- ### Runtime credentials
44
-
45
- The CLI sends the effective credential in the `Authorization: Bearer <credential>` header; an API key takes precedence over a token when both are configured. It adds `X-User-Uid` when it can parse a `uid` from the credential as an unverified JWT.
46
-
47
- ## Querying user information and remaining credits
48
-
49
- ```bash
50
- delta-cli usage
51
- ```
52
-
53
- This returns the current user's information and remaining credits (through the gateway `/infra/api/users/me`; the CLI automatically attaches the configured credentials). Keep only these three fields in the output:
54
-
55
- - `data.display_name`: display name (fall back to `user_id` if missing)
56
- - `data.user_id`: user ID
57
- - `data.resources.credit`: remaining balance in credits
58
-
59
- `username`/`id`/`email`/`role`/`quota`/`group`/`tier`/`status`/`created_at`/`is_admin`, `stats` and its `total_consumed_credits` (in the database's original quota units) are internal fields and must not be exposed externally.
60
-
61
- ## Security rules
62
-
63
- - **Never output credentials**: token and API key values must not appear in logs, messages or the terminal.
64
- - **Never construct URLs or make HTTP requests yourself**: route all requests through `delta-cli`.
65
- - **Do not install the CLI proactively**: if the user says it is not installed, direct them to the README or `install.sh`; do not choose an installation method yourself.
66
- - **Confirm intent before write or delete operations**: tell the user what commands such as `sandbox kill`, `sandbox finish` and `sandbox write` will affect.
67
- - `~/.delta-infra/config.json` must have `0600` permissions; do not loosen them manually.
68
- - **The sandbox must be destroyed**: after calling `sandbox create`, call `sandbox kill` before the current task ends. The server does not clean up automatically; failure to destroy a sandbox leaves GPU resources occupied indefinitely. Do not skip this, even if an error occurs.
69
-
70
- ## JSON output conventions
71
-
72
- ```json
73
- {"ok":true,"data":{...}}
74
- {"ok":false,"error":{"type":"auth","message":"...","hint":"..."}}
75
- ```
76
-
77
- AI agent parsing rules:
78
- - Always check `ok`; do not rely on the exit code alone.
79
- - `error.type` is the stable field for branching on: `auth`, `permission`, `not_found`, `validation`, `network`, `api`, `command_failed`, `internal`.
80
- - `error.hint` may be shown to the user.
81
-
82
- ## Exit code conventions
83
-
84
- | Type | Exit Code | Scenario |
85
- |------|-----------|----------|
86
- | validation | 2 | Invalid flag or argument |
87
- | auth | 3 | Not authenticated or authentication failed |
88
- | permission | 4 | Insufficient permissions |
89
- | not_found | 5 | Sandbox or file does not exist |
90
- | network | 6 | DNS, timeout or connection failure |
91
- | api | 7 | Server returned a non-2xx response |
92
- | command_failed | 8 | Command failed inside the sandbox (non-zero `exit_code` or an error); on the SSE path, an error envelope is appended after the `complete` frame, with the stderr tail in `message` for quick reference |
93
- | internal | 10 | Internal client error |
94
-
95
- ## Upgrade check
96
-
97
- After completing the user's request, if the JSON contains `_notice.update`, you may recommend:
98
-
99
- ```bash
100
- delta-cli upgrade
101
- ```
102
-
103
- ## Common recovery actions
104
-
105
- | Error / symptom | Recovery action |
106
- |-------------|----------|
107
- | `error.type: auth` / `method: none` | Check the server address and local credential configuration. If no credential is configured or the server rejects it, ask the user once for a credential; use `--apikey` for an API key or `--token` for a bearer token, or set the matching `DELTA_INFRA_API_KEY` / `DELTA_INFRA_TOKEN` environment variable. |
108
- | `error.type: permission` | Check whether the current credential has sufficient permissions; if needed, ask for a credential with the required permissions. |
109
- | `error.type: not_found` | Check `sandbox_id` / path |
110
- | `error.type: network` | Check `base_url` and network connectivity |
111
- | `error.type: validation` | Check required flags and argument formats |
112
- | `error.type: command_failed` | Command failed inside the sandbox: the envelope's `message` already includes the stderr tail to help locate the issue quickly; the full `stderr` / `result_summary` are in the `complete` frame. Retry or correct the command |
113
- | Configuration file parsing failed | Check that `~/.delta-infra/config.json` contains valid JSON |
1
+ ---
2
+ name: delta-shared
3
+ description: "delta-cli shared global rules: configuration and authentication checks, security boundaries, error handling, and sandbox destruction."
4
+ ---
5
+
6
+ # delta-cli Shared Rules
7
+
8
+ General guidance for AI agents using `delta-cli`. Core principles: **check, do not guess or expose credentials**.
9
+
10
+ ## Before any operation
11
+
12
+ 1. Verify the server address:
13
+ ```bash
14
+ delta-cli config show
15
+ ```
16
+ 2. Inspect the local authentication configuration:
17
+ ```bash
18
+ delta-cli auth status
19
+ ```
20
+
21
+ - If `auth status` reports `method: token` or `method: apikey`, a credential is configured locally; **run the requested command directly without logging in or initialising configuration again**.
22
+ - `auth status` reads local configuration and environment overrides; it does not validate the credential with the remote server. If it reports `method: none`, follow “Complete configuration” below. If a requested command returns `error.type: auth` or `permission`, follow the matching recovery action below.
23
+
24
+ ## Complete configuration
25
+
26
+ If the server address or credentials are missing, **ask the user once**, then initialise with the flag that matches the credential type:
27
+
28
+ ```bash
29
+ delta-cli config init --base-url <server-url> --token <token>
30
+ # For an API key:
31
+ delta-cli config init --base-url <server-url> --apikey <api-key>
32
+ ```
33
+
34
+ Do not use interactive `config init` (without flags), as it may hang when stdin is unavailable.
35
+
36
+ ### Priority of information sources
37
+
38
+ 1. Environment variables: `DELTA_INFRA_BASE_URL`, `DELTA_INFRA_TOKEN`, `DELTA_INFRA_API_KEY`
39
+ 2. `base_url`, `token`, and `apikey` in `~/.delta-infra/config.json` (environment values override file values)
40
+ 3. Default value: only `base_url` has an internal default
41
+ 4. If none of the above are available, **you must ask the user**; do not make anything up
42
+
43
+ ### Runtime credentials
44
+
45
+ The CLI sends the effective credential in the `Authorization: Bearer <credential>` header; an API key takes precedence over a token when both are configured. It adds `X-User-Uid` when it can parse a `uid` from the credential as an unverified JWT.
46
+
47
+ ## Querying user information and remaining credits
48
+
49
+ ```bash
50
+ delta-cli usage
51
+ ```
52
+
53
+ This returns the current user's information and remaining credits (through the gateway `/infra/api/users/me`; the CLI automatically attaches the configured credentials). Keep only these three fields in the output:
54
+
55
+ - `data.display_name`: display name (fall back to `user_id` if missing)
56
+ - `data.user_id`: user ID
57
+ - `data.resources.credit`: remaining balance in credits
58
+
59
+ `username`/`id`/`email`/`role`/`quota`/`group`/`tier`/`status`/`created_at`/`is_admin`, `stats` and its `total_consumed_credits` (in the database's original quota units) are internal fields and must not be exposed externally.
60
+
61
+ ## Security rules
62
+
63
+ - **Never output credentials**: token and API key values must not appear in logs, messages or the terminal.
64
+ - **Never construct URLs or make HTTP requests yourself**: route all requests through `delta-cli`.
65
+ - **Do not install the CLI proactively**: if the user says it is not installed, direct them to the README or `install.sh`; do not choose an installation method yourself.
66
+ - **Confirm intent before write or delete operations**: tell the user what commands such as `sandbox kill`, `sandbox finish` and `sandbox write` will affect.
67
+ - `~/.delta-infra/config.json` must have `0600` permissions; do not loosen them manually.
68
+ - **The sandbox must be destroyed**: after calling `sandbox create`, call `sandbox kill` before the current task ends. The server does not clean up automatically; failure to destroy a sandbox leaves GPU resources occupied indefinitely. Do not skip this, even if an error occurs.
69
+
70
+ ## JSON output conventions
71
+
72
+ ```json
73
+ {"ok":true,"data":{...}}
74
+ {"ok":false,"error":{"type":"auth","message":"...","hint":"..."}}
75
+ ```
76
+
77
+ AI agent parsing rules:
78
+ - Always check `ok`; do not rely on the exit code alone.
79
+ - `error.type` is the stable field for branching on: `auth`, `permission`, `not_found`, `validation`, `network`, `api`, `command_failed`, `internal`.
80
+ - `error.hint` may be shown to the user.
81
+
82
+ ## Exit code conventions
83
+
84
+ | Type | Exit Code | Scenario |
85
+ |------|-----------|----------|
86
+ | validation | 2 | Invalid flag or argument |
87
+ | auth | 3 | Not authenticated or authentication failed |
88
+ | permission | 4 | Insufficient permissions |
89
+ | not_found | 5 | Sandbox or file does not exist |
90
+ | network | 6 | DNS, timeout or connection failure |
91
+ | api | 7 | Server returned a non-2xx response |
92
+ | command_failed | 8 | Command failed inside the sandbox (non-zero `exit_code` or an error); on the SSE path, an error envelope is appended after the `complete` frame, with the stderr tail in `message` for quick reference |
93
+ | internal | 10 | Internal client error |
94
+
95
+ ## Upgrade check
96
+
97
+ After completing the user's request, if the JSON contains `_notice.update`, you may recommend:
98
+
99
+ ```bash
100
+ delta-cli upgrade
101
+ ```
102
+
103
+ ## Common recovery actions
104
+
105
+ | Error / symptom | Recovery action |
106
+ |-------------|----------|
107
+ | `error.type: auth` / `method: none` | Check the server address and local credential configuration. If no credential is configured or the server rejects it, ask the user once for a credential; use `--apikey` for an API key or `--token` for a bearer token, or set the matching `DELTA_INFRA_API_KEY` / `DELTA_INFRA_TOKEN` environment variable. |
108
+ | `error.type: permission` | Check whether the current credential has sufficient permissions; if needed, ask for a credential with the required permissions. |
109
+ | `error.type: not_found` | Check `sandbox_id` / path |
110
+ | `error.type: network` | Check `base_url` and network connectivity |
111
+ | `error.type: validation` | Check required flags and argument formats |
112
+ | `error.type: command_failed` | Command failed inside the sandbox: the envelope's `message` already includes the stderr tail to help locate the issue quickly; the full `stderr` / `result_summary` are in the `complete` frame. Retry or correct the command |
113
+ | Configuration file parsing failed | Check that `~/.delta-infra/config.json` contains valid JSON |
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Delta CLI Shared Rules"
3
- short_description: "Handle Delta CLI configuration, authentication, errors and security boundaries"
4
- default_prompt: "Use $delta-shared to check and resolve Delta CLI configuration or authentication issues."
1
+ interface:
2
+ display_name: "Delta CLI Shared Rules"
3
+ short_description: "Handle Delta CLI configuration, authentication, errors and security boundaries"
4
+ default_prompt: "Use $delta-shared to check and resolve Delta CLI configuration or authentication issues."
@@ -1,19 +1,20 @@
1
- {
2
- "skills": [
3
- "delta-sandbox",
4
- "delta-shared",
5
- "delta-science"
6
- ],
7
- "retired_skills": [
8
- "pubchem",
9
- "rdkit",
10
- "pymatgen",
11
- "gsasii",
12
- "lammps",
13
- "delta-bo",
14
- "ldm-bo",
15
- "synbo-service",
16
- "antbo-service",
17
- "antbo-ldm-guard"
18
- ]
19
- }
1
+ {
2
+ "skills": [
3
+ "delta-sandbox",
4
+ "delta-shared",
5
+ "delta-science",
6
+ "delta-protein"
7
+ ],
8
+ "retired_skills": [
9
+ "pubchem",
10
+ "rdkit",
11
+ "pymatgen",
12
+ "gsasii",
13
+ "lammps",
14
+ "delta-bo",
15
+ "ldm-bo",
16
+ "synbo-service",
17
+ "antbo-service",
18
+ "antbo-ldm-guard"
19
+ ]
20
+ }