@delta-infra/cli 1.1.19 → 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 -520
  2. package/checksums.txt +5 -5
  3. package/package.json +1 -1
  4. package/scripts/install-wizard.js +689 -688
  5. package/scripts/install.js +442 -442
  6. package/scripts/run.js +65 -65
  7. package/skills/delta-protein/AGENTS.md +72 -72
  8. package/skills/delta-protein/SKILL.md +388 -388
  9. package/skills/delta-protein/agents/openai.yaml +3 -3
  10. package/skills/delta-protein/references/bfitter.md +63 -63
  11. package/skills/delta-protein/references/catapro_predict.md +62 -62
  12. package/skills/delta-protein/references/catpred_predict.md +64 -64
  13. package/skills/delta-protein/references/caver_tunnel_analyze.md +62 -62
  14. package/skills/delta-protein/references/consensus_mutation.md +60 -60
  15. package/skills/delta-protein/references/consurf_predict.md +66 -66
  16. package/skills/delta-protein/references/crop_sequence.md +68 -68
  17. package/skills/delta-protein/references/dock.md +81 -81
  18. package/skills/delta-protein/references/dock_score.md +69 -69
  19. package/skills/delta-protein/references/easifa_predict_active_site.md +69 -69
  20. package/skills/delta-protein/references/ephod_predict_mutation.md +65 -65
  21. package/skills/delta-protein/references/ephod_predict_protein.md +60 -60
  22. package/skills/delta-protein/references/esmfold2_predict.md +66 -66
  23. package/skills/delta-protein/references/evcouplings_mutation.md +63 -63
  24. package/skills/delta-protein/references/fasta_to_sequence.md +58 -58
  25. package/skills/delta-protein/references/foldseek.md +60 -60
  26. package/skills/delta-protein/references/generate_msa.md +60 -60
  27. package/skills/delta-protein/references/interpro_analyze.md +62 -62
  28. package/skills/delta-protein/references/mpnn_design_sequence.md +70 -70
  29. package/skills/delta-protein/references/multievolve.md +72 -72
  30. package/skills/delta-protein/references/pisa_query.md +69 -69
  31. package/skills/delta-protein/references/plip_analyze.md +64 -64
  32. package/skills/delta-protein/references/pocket_prediction.md +62 -62
  33. package/skills/delta-protein/references/protein_design.md +64 -64
  34. package/skills/delta-protein/references/protein_evolution.md +76 -76
  35. package/skills/delta-protein/references/protein_sol_predict_mutation.md +65 -65
  36. package/skills/delta-protein/references/protein_sol_predict_protein.md +60 -60
  37. package/skills/delta-protein/references/protenix.md +65 -65
  38. package/skills/delta-protein/references/protrek_search.md +89 -89
  39. package/skills/delta-protein/references/pubchem_search.md +67 -67
  40. package/skills/delta-protein/references/pubmed_search.md +78 -78
  41. package/skills/delta-protein/references/reap_design_primer.md +68 -68
  42. package/skills/delta-protein/references/rfd3_design.md +64 -64
  43. package/skills/delta-protein/references/structure_to_sequence.md +60 -60
  44. package/skills/delta-protein/references/summarize_result.md +67 -67
  45. package/skills/delta-protein/references/surface_charge.md +83 -83
  46. package/skills/delta-protein/references/uniprot_batch_query.md +62 -62
  47. package/skills/delta-protein/references/uniprot_query.md +63 -63
  48. package/skills/delta-protein/references/zero_shot_mutant_candidates.md +75 -75
  49. package/skills/delta-protein/scripts/gen_references.py +166 -166
  50. package/skills/delta-protein/scripts/output_metadata.json +274 -274
  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 +154 -170
  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 -20
package/scripts/run.js CHANGED
@@ -1,65 +1,65 @@
1
- #!/usr/bin/env node
2
- // Copyright (c) 2026 Delta Agent Cloud Authors
3
- // SPDX-License-Identifier: MIT
4
-
5
- const { execFileSync } = require("child_process");
6
- const fs = require("fs");
7
- const path = require("path");
8
-
9
- const ext = process.platform === "win32" ? ".exe" : "";
10
- const bin = path.join(__dirname, "..", "bin", "delta-cli" + ext);
11
-
12
- // On Windows, a crashed self-update may have left the binary renamed to .old.
13
- const oldBin = bin + ".old";
14
- function restoreOldBinary() {
15
- try {
16
- if (fs.existsSync(bin)) {
17
- fs.rmSync(bin, { force: true });
18
- }
19
- fs.renameSync(oldBin, bin);
20
- return true;
21
- } catch { return false; }
22
- }
23
-
24
- if (process.platform === "win32" && fs.existsSync(oldBin)) {
25
- if (!fs.existsSync(bin)) {
26
- restoreOldBinary();
27
- } else {
28
- try {
29
- execFileSync(bin, ["--version"], { stdio: "ignore", timeout: 10000 });
30
- try { fs.rmSync(oldBin, { force: true }); } catch {}
31
- } catch {
32
- restoreOldBinary();
33
- }
34
- }
35
- }
36
-
37
- const args = process.argv.slice(2);
38
-
39
- // Intercept install/uninstall — run wizard, bypass native binary
40
- if (args[0] === "install" || args[0] === "uninstall") {
41
- require("./install-wizard.js");
42
- } else {
43
- // Auto-download binary if missing (e.g. npx skipped postinstall)
44
- if (!fs.existsSync(bin)) {
45
- try {
46
- execFileSync(process.execPath, [path.join(__dirname, "install.js")], {
47
- stdio: "inherit",
48
- env: { ...process.env, DELTA_CLI_RUN: "true", DELTA_CLI_VERSION: process.env.DELTA_CLI_VERSION || "" },
49
- });
50
- } catch {
51
- console.error(
52
- `\nFailed to auto-install delta-cli binary.\n` +
53
- `To fix, run the install script manually:\n` +
54
- ` node "${path.join(__dirname, "install.js")}"\n`
55
- );
56
- process.exit(1);
57
- }
58
- }
59
-
60
- try {
61
- execFileSync(bin, args, { stdio: "inherit" });
62
- } catch (e) {
63
- process.exit(e.status || 1);
64
- }
65
- }
1
+ #!/usr/bin/env node
2
+ // Copyright (c) 2026 Delta Agent Cloud Authors
3
+ // SPDX-License-Identifier: MIT
4
+
5
+ const { execFileSync } = require("child_process");
6
+ const fs = require("fs");
7
+ const path = require("path");
8
+
9
+ const ext = process.platform === "win32" ? ".exe" : "";
10
+ const bin = path.join(__dirname, "..", "bin", "delta-cli" + ext);
11
+
12
+ // On Windows, a crashed self-update may have left the binary renamed to .old.
13
+ const oldBin = bin + ".old";
14
+ function restoreOldBinary() {
15
+ try {
16
+ if (fs.existsSync(bin)) {
17
+ fs.rmSync(bin, { force: true });
18
+ }
19
+ fs.renameSync(oldBin, bin);
20
+ return true;
21
+ } catch { return false; }
22
+ }
23
+
24
+ if (process.platform === "win32" && fs.existsSync(oldBin)) {
25
+ if (!fs.existsSync(bin)) {
26
+ restoreOldBinary();
27
+ } else {
28
+ try {
29
+ execFileSync(bin, ["--version"], { stdio: "ignore", timeout: 10000 });
30
+ try { fs.rmSync(oldBin, { force: true }); } catch {}
31
+ } catch {
32
+ restoreOldBinary();
33
+ }
34
+ }
35
+ }
36
+
37
+ const args = process.argv.slice(2);
38
+
39
+ // Intercept install/uninstall — run wizard, bypass native binary
40
+ if (args[0] === "install" || args[0] === "uninstall") {
41
+ require("./install-wizard.js");
42
+ } else {
43
+ // Auto-download binary if missing (e.g. npx skipped postinstall)
44
+ if (!fs.existsSync(bin)) {
45
+ try {
46
+ execFileSync(process.execPath, [path.join(__dirname, "install.js")], {
47
+ stdio: "inherit",
48
+ env: { ...process.env, DELTA_CLI_RUN: "true", DELTA_CLI_VERSION: process.env.DELTA_CLI_VERSION || "" },
49
+ });
50
+ } catch {
51
+ console.error(
52
+ `\nFailed to auto-install delta-cli binary.\n` +
53
+ `To fix, run the install script manually:\n` +
54
+ ` node "${path.join(__dirname, "install.js")}"\n`
55
+ );
56
+ process.exit(1);
57
+ }
58
+ }
59
+
60
+ try {
61
+ execFileSync(bin, args, { stdio: "inherit" });
62
+ } catch (e) {
63
+ process.exit(e.status || 1);
64
+ }
65
+ }
@@ -1,73 +1,73 @@
1
- # skills/delta-protein — Protein Analysis Skill Package
2
-
3
- **Parent:** `../AGENTS.md`
4
-
5
- ## OVERVIEW
6
-
7
- Single public `delta-protein` skill: the unified entry point for Huada protein and
8
- bioinformatics online analysis tools (mutation prediction, structure prediction, MSA,
9
- protein design, docking, pocket/active-site analysis, conservation/InterPro,
10
- enzyme kinetics, solubility/pH prediction, and PubMed/PubChem/UniProt/PISA/PLIP
11
- lookup). It is host-neutral and routed exclusively through the Delta CLI
12
- (`science invoke`) to the Science Server's `huada_protein_tools` tool. Per-endpoint
13
- operation contracts live in `references/` and are loaded on demand; there are no
14
- separate planner-visible per-tool skills and no workflow endpoints.
15
-
16
- ## STRUCTURE
17
-
18
- ```
19
- delta-protein/
20
- ├── SKILL.md # single entry point: routing, CLI-only execution, safety red lines
21
- ├── agents/
22
- │ └── openai.yaml # host agent registration
23
- └── references/
24
- └── <endpoint>.md # one registered endpoint's operation contract
25
- # (39 endpoints under tool `huada_protein_tools`)
26
- ```
27
-
28
- ## DATA SOURCE
29
-
30
- - Tool/endpoint identity and request fields come from the live Catalog
31
- (`delta-cli science list`, `delta-cli science endpoints list <tool>`) plus the
32
- authoritative parameter registry in
33
- `agent/protein_common/tool_registry/definitions.py` of the `delta-search-backend`
34
- project (per-tool `params`, `required_groups`, `default_params`, `timeout`).
35
- - Response envelope is the Huada contract `{"status","message","tool_type",
36
- "resultjson","download_url"}`; per-tool `resultjson` keys are derived from the
37
- tool implementations, not invented.
38
- - Each registered endpoint is a single tool call. Multi-step card workflows
39
- (cards/*.json) are NOT registered as endpoints and are not documented here; an
40
- agent may chain single endpoints in sequence when the task requires it.
41
-
42
- ## CONVENTIONS
43
-
44
- - JSON/query operations go through `delta-cli science invoke --tool huada_protein_tools --endpoint <name>`; binary artifacts from `download_url` go through `delta-cli science file download`
45
- - Endpoint names are exact server contracts, read from the Catalog — never invent fields/enums from memory
46
- - Success is reported only when the subprocess exit is 0 AND top-level JSON `ok` is `true`; `data` holds the service response
47
- - `references/` contains only registered real endpoints; routing and tool selection belong in `SKILL.md`
48
- - Host-neutral: `delta-cli` is the sole service boundary; no host-specific tool/env dependencies
49
- - Discover newly-deployed endpoints via `delta-cli science endpoints list huada_protein_tools`
50
-
51
- ## MAINTENANCE
52
-
53
- - `scripts/gen_references.py` regenerates the `## Output Projection` and
54
- `## Output Template` sections in every reference from
55
- `scripts/output_metadata.json` (single source of truth for field projection /
56
- presentation form / downstream reuse / provenance marker). Stdlib only, idempotent.
57
- - Workflow: update `output_metadata.json` → run
58
- `python scripts/gen_references.py` → run `python scripts/gen_references.py --check`.
59
- `--check` fails loudly on missing sections, drifting titles, broken SKILL links or
60
- references not covered by metadata.
61
- - `output_metadata.json` `provenance` is `tested` (verified by a real `delta-cli`
62
- invocation) or `derived` (from ToolSpec descriptions / agent templates, marked
63
- "pending live calibration"). Newly verified endpoints should be flipped to `tested`.
64
- - After changing references/SKILL, resync the opencode install dir:
65
- `python scripts/gen_references.py --sync "%USERPROFILE%\.config\opencode\skills\delta-protein"`.
66
-
67
- ## ANTI-PATTERNS
68
-
69
- - Do not call `curl`/`requests`/`httpx`/browser/PowerShell web directly against any Huada or Gateway URL
70
- - Do not bypass delta-cli or attach local MCP tool servers directly
71
- - Do not fabricate protein sequences, structures, activity data, or algorithm results, and do not pass local-library results off as Science results
72
- - Do not create extra JSON/CSV/report/image artifacts unless the user explicitly asks
1
+ # skills/delta-protein — Protein Analysis Skill Package
2
+
3
+ **Parent:** `../AGENTS.md`
4
+
5
+ ## OVERVIEW
6
+
7
+ Single public `delta-protein` skill: the unified entry point for Huada protein and
8
+ bioinformatics online analysis tools (mutation prediction, structure prediction, MSA,
9
+ protein design, docking, pocket/active-site analysis, conservation/InterPro,
10
+ enzyme kinetics, solubility/pH prediction, and PubMed/PubChem/UniProt/PISA/PLIP
11
+ lookup). It is host-neutral and routed exclusively through the Delta CLI
12
+ (`science invoke`) to the Science Server's `huada_protein_tools` tool. Per-endpoint
13
+ operation contracts live in `references/` and are loaded on demand; there are no
14
+ separate planner-visible per-tool skills and no workflow endpoints.
15
+
16
+ ## STRUCTURE
17
+
18
+ ```
19
+ delta-protein/
20
+ ├── SKILL.md # single entry point: routing, CLI-only execution, safety red lines
21
+ ├── agents/
22
+ │ └── openai.yaml # host agent registration
23
+ └── references/
24
+ └── <endpoint>.md # one registered endpoint's operation contract
25
+ # (39 endpoints under tool `huada_protein_tools`)
26
+ ```
27
+
28
+ ## DATA SOURCE
29
+
30
+ - Tool/endpoint identity and request fields come from the live Catalog
31
+ (`delta-cli science list`, `delta-cli science endpoints list <tool>`) plus the
32
+ authoritative parameter registry in
33
+ `agent/protein_common/tool_registry/definitions.py` of the `delta-search-backend`
34
+ project (per-tool `params`, `required_groups`, `default_params`, `timeout`).
35
+ - Response envelope is the Huada contract `{"status","message","tool_type",
36
+ "resultjson","download_url"}`; per-tool `resultjson` keys are derived from the
37
+ tool implementations, not invented.
38
+ - Each registered endpoint is a single tool call. Multi-step card workflows
39
+ (cards/*.json) are NOT registered as endpoints and are not documented here; an
40
+ agent may chain single endpoints in sequence when the task requires it.
41
+
42
+ ## CONVENTIONS
43
+
44
+ - JSON/query operations go through `delta-cli science invoke --tool huada_protein_tools --endpoint <name>`; binary artifacts from `download_url` go through `delta-cli science file download`
45
+ - Endpoint names are exact server contracts, read from the Catalog — never invent fields/enums from memory
46
+ - Success is reported only when the subprocess exit is 0 AND top-level JSON `ok` is `true`; `data` holds the service response
47
+ - `references/` contains only registered real endpoints; routing and tool selection belong in `SKILL.md`
48
+ - Host-neutral: `delta-cli` is the sole service boundary; no host-specific tool/env dependencies
49
+ - Discover newly-deployed endpoints via `delta-cli science endpoints list huada_protein_tools`
50
+
51
+ ## MAINTENANCE
52
+
53
+ - `scripts/gen_references.py` regenerates the `## Output Projection` and
54
+ `## Output Template` sections in every reference from
55
+ `scripts/output_metadata.json` (single source of truth for field projection /
56
+ presentation form / downstream reuse / provenance marker). Stdlib only, idempotent.
57
+ - Workflow: update `output_metadata.json` → run
58
+ `python scripts/gen_references.py` → run `python scripts/gen_references.py --check`.
59
+ `--check` fails loudly on missing sections, drifting titles, broken SKILL links or
60
+ references not covered by metadata.
61
+ - `output_metadata.json` `provenance` is `tested` (verified by a real `delta-cli`
62
+ invocation) or `derived` (from ToolSpec descriptions / agent templates, marked
63
+ "pending live calibration"). Newly verified endpoints should be flipped to `tested`.
64
+ - After changing references/SKILL, resync the opencode install dir:
65
+ `python scripts/gen_references.py --sync "%USERPROFILE%\.config\opencode\skills\delta-protein"`.
66
+
67
+ ## ANTI-PATTERNS
68
+
69
+ - Do not call `curl`/`requests`/`httpx`/browser/PowerShell web directly against any Huada or Gateway URL
70
+ - Do not bypass delta-cli or attach local MCP tool servers directly
71
+ - Do not fabricate protein sequences, structures, activity data, or algorithm results, and do not pass local-library results off as Science results
72
+ - Do not create extra JSON/CSV/report/image artifacts unless the user explicitly asks
73
73
  - Do not break relative links between SKILL.md and `references/`