@delta-infra/cli 1.0.98 → 1.1.0
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.
- package/README.md +469 -469
- package/checksums.txt +5 -5
- package/package.json +2 -2
- package/scripts/install-wizard.js +701 -701
- package/scripts/install.js +442 -442
- package/scripts/run.js +65 -65
- package/skills/delta-sandbox/SKILL.md +383 -344
- package/skills/delta-sandbox/agents/openai.yaml +4 -4
- package/skills/delta-sandbox/references/commands.md +58 -58
- package/skills/delta-sandbox/references/lifecycle.md +100 -100
- package/skills/delta-sandbox/references/recipes.md +138 -138
- package/skills/delta-science/AGENTS.md +41 -40
- package/skills/delta-science/SKILL.md +139 -139
- package/skills/delta-science/agents/openai.yaml +4 -4
- package/skills/delta-science/references/antbo.md +100 -100
- package/skills/delta-science/references/delta-bo.md +89 -89
- package/skills/delta-science/references/gsasii.md +116 -116
- package/skills/delta-science/references/lammps.md +66 -66
- package/skills/delta-science/references/ldm-bo.md +129 -129
- package/skills/delta-science/references/materials-design.md +109 -109
- package/skills/delta-science/references/pubchem.md +126 -126
- package/skills/delta-science/references/pymatgen.md +68 -68
- package/skills/delta-science/references/rdkit.md +138 -138
- package/skills/delta-science/references/strbo.md +87 -87
- package/skills/delta-science/references/synbo.md +198 -198
- package/skills/delta-science/scripts/catalog.py +92 -92
- package/skills/delta-science/scripts/generated_catalog.py +69 -69
- package/skills/delta-science/scripts/invoke.py +346 -346
- package/skills/delta-shared/SKILL.md +97 -97
- package/skills/delta-shared/agents/openai.yaml +4 -4
- package/skills/manifest.json +19 -19
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Read the authoritative Delta Science catalog through delta-cli."""
|
|
3
|
-
|
|
4
|
-
from __future__ import annotations
|
|
5
|
-
|
|
6
|
-
import argparse
|
|
7
|
-
import json
|
|
8
|
-
import os
|
|
9
|
-
import subprocess
|
|
10
|
-
import sys
|
|
11
|
-
import time
|
|
12
|
-
|
|
13
|
-
from invoke import _parse_cli_error, _resolve_cli, _runtime_config
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def _parser() -> argparse.ArgumentParser:
|
|
17
|
-
parser = argparse.ArgumentParser(description=__doc__)
|
|
18
|
-
action = parser.add_mutually_exclusive_group(required=True)
|
|
19
|
-
action.add_argument("--tools", action="store_true")
|
|
20
|
-
action.add_argument("--endpoints", metavar="TOOL")
|
|
21
|
-
parser.add_argument("--cli")
|
|
22
|
-
parser.add_argument("--science-base-url")
|
|
23
|
-
parser.add_argument("--timeout", type=float, default=30.0)
|
|
24
|
-
return parser
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def main() -> int:
|
|
28
|
-
args = _parser().parse_args()
|
|
29
|
-
started = time.perf_counter()
|
|
30
|
-
kind = "tools" if args.tools else "endpoints"
|
|
31
|
-
try:
|
|
32
|
-
runtime = _runtime_config()
|
|
33
|
-
cli = _resolve_cli(args.cli, runtime)
|
|
34
|
-
env = os.environ.copy()
|
|
35
|
-
base_url = args.science_base_url or runtime.get("science_base_url")
|
|
36
|
-
if base_url:
|
|
37
|
-
env["DELTA_INFRA_SCIENCE_BASE_URL"] = str(base_url)
|
|
38
|
-
|
|
39
|
-
command = [cli, "science", "list"]
|
|
40
|
-
if args.endpoints:
|
|
41
|
-
command = [cli, "science", "endpoints", "list", args.endpoints]
|
|
42
|
-
completed = subprocess.run(
|
|
43
|
-
command,
|
|
44
|
-
capture_output=True,
|
|
45
|
-
text=True,
|
|
46
|
-
encoding="utf-8",
|
|
47
|
-
errors="replace",
|
|
48
|
-
env=env,
|
|
49
|
-
timeout=args.timeout,
|
|
50
|
-
check=False,
|
|
51
|
-
)
|
|
52
|
-
if completed.returncode != 0:
|
|
53
|
-
error_type, detail = _parse_cli_error(completed)
|
|
54
|
-
raise RuntimeError(f"{error_type}: {detail}")
|
|
55
|
-
root = json.loads(completed.stdout)
|
|
56
|
-
if not isinstance(root, dict) or root.get("ok") is not True:
|
|
57
|
-
raise RuntimeError(json.dumps(root, ensure_ascii=False))
|
|
58
|
-
if "data" not in root:
|
|
59
|
-
raise RuntimeError("CLI success envelope is missing data")
|
|
60
|
-
print(json.dumps({
|
|
61
|
-
"ok": True,
|
|
62
|
-
"transport": "delta-cli",
|
|
63
|
-
"catalog": kind,
|
|
64
|
-
"tool": args.endpoints,
|
|
65
|
-
"elapsed_seconds": round(time.perf_counter() - started, 3),
|
|
66
|
-
"native": root["data"],
|
|
67
|
-
}, ensure_ascii=False))
|
|
68
|
-
return 0
|
|
69
|
-
except subprocess.TimeoutExpired:
|
|
70
|
-
error_type = "timeout"
|
|
71
|
-
error = f"timeout after {args.timeout}s"
|
|
72
|
-
except (OSError, ValueError, json.JSONDecodeError) as exc:
|
|
73
|
-
error_type = "catalog"
|
|
74
|
-
error = str(exc)
|
|
75
|
-
except RuntimeError as exc:
|
|
76
|
-
error_type = "cli"
|
|
77
|
-
error = str(exc)
|
|
78
|
-
|
|
79
|
-
print(json.dumps({
|
|
80
|
-
"ok": False,
|
|
81
|
-
"transport": "delta-cli",
|
|
82
|
-
"catalog": kind,
|
|
83
|
-
"tool": args.endpoints,
|
|
84
|
-
"error_type": error_type,
|
|
85
|
-
"elapsed_seconds": round(time.perf_counter() - started, 3),
|
|
86
|
-
"error": error[:2000],
|
|
87
|
-
}, ensure_ascii=False))
|
|
88
|
-
return 1
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if __name__ == "__main__":
|
|
92
|
-
sys.exit(main())
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Read the authoritative Delta Science catalog through delta-cli."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
import json
|
|
8
|
+
import os
|
|
9
|
+
import subprocess
|
|
10
|
+
import sys
|
|
11
|
+
import time
|
|
12
|
+
|
|
13
|
+
from invoke import _parse_cli_error, _resolve_cli, _runtime_config
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _parser() -> argparse.ArgumentParser:
|
|
17
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
18
|
+
action = parser.add_mutually_exclusive_group(required=True)
|
|
19
|
+
action.add_argument("--tools", action="store_true")
|
|
20
|
+
action.add_argument("--endpoints", metavar="TOOL")
|
|
21
|
+
parser.add_argument("--cli")
|
|
22
|
+
parser.add_argument("--science-base-url")
|
|
23
|
+
parser.add_argument("--timeout", type=float, default=30.0)
|
|
24
|
+
return parser
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def main() -> int:
|
|
28
|
+
args = _parser().parse_args()
|
|
29
|
+
started = time.perf_counter()
|
|
30
|
+
kind = "tools" if args.tools else "endpoints"
|
|
31
|
+
try:
|
|
32
|
+
runtime = _runtime_config()
|
|
33
|
+
cli = _resolve_cli(args.cli, runtime)
|
|
34
|
+
env = os.environ.copy()
|
|
35
|
+
base_url = args.science_base_url or runtime.get("science_base_url")
|
|
36
|
+
if base_url:
|
|
37
|
+
env["DELTA_INFRA_SCIENCE_BASE_URL"] = str(base_url)
|
|
38
|
+
|
|
39
|
+
command = [cli, "science", "list"]
|
|
40
|
+
if args.endpoints:
|
|
41
|
+
command = [cli, "science", "endpoints", "list", args.endpoints]
|
|
42
|
+
completed = subprocess.run(
|
|
43
|
+
command,
|
|
44
|
+
capture_output=True,
|
|
45
|
+
text=True,
|
|
46
|
+
encoding="utf-8",
|
|
47
|
+
errors="replace",
|
|
48
|
+
env=env,
|
|
49
|
+
timeout=args.timeout,
|
|
50
|
+
check=False,
|
|
51
|
+
)
|
|
52
|
+
if completed.returncode != 0:
|
|
53
|
+
error_type, detail = _parse_cli_error(completed)
|
|
54
|
+
raise RuntimeError(f"{error_type}: {detail}")
|
|
55
|
+
root = json.loads(completed.stdout)
|
|
56
|
+
if not isinstance(root, dict) or root.get("ok") is not True:
|
|
57
|
+
raise RuntimeError(json.dumps(root, ensure_ascii=False))
|
|
58
|
+
if "data" not in root:
|
|
59
|
+
raise RuntimeError("CLI success envelope is missing data")
|
|
60
|
+
print(json.dumps({
|
|
61
|
+
"ok": True,
|
|
62
|
+
"transport": "delta-cli",
|
|
63
|
+
"catalog": kind,
|
|
64
|
+
"tool": args.endpoints,
|
|
65
|
+
"elapsed_seconds": round(time.perf_counter() - started, 3),
|
|
66
|
+
"native": root["data"],
|
|
67
|
+
}, ensure_ascii=False))
|
|
68
|
+
return 0
|
|
69
|
+
except subprocess.TimeoutExpired:
|
|
70
|
+
error_type = "timeout"
|
|
71
|
+
error = f"timeout after {args.timeout}s"
|
|
72
|
+
except (OSError, ValueError, json.JSONDecodeError) as exc:
|
|
73
|
+
error_type = "catalog"
|
|
74
|
+
error = str(exc)
|
|
75
|
+
except RuntimeError as exc:
|
|
76
|
+
error_type = "cli"
|
|
77
|
+
error = str(exc)
|
|
78
|
+
|
|
79
|
+
print(json.dumps({
|
|
80
|
+
"ok": False,
|
|
81
|
+
"transport": "delta-cli",
|
|
82
|
+
"catalog": kind,
|
|
83
|
+
"tool": args.endpoints,
|
|
84
|
+
"error_type": error_type,
|
|
85
|
+
"elapsed_seconds": round(time.perf_counter() - started, 3),
|
|
86
|
+
"error": error[:2000],
|
|
87
|
+
}, ensure_ascii=False))
|
|
88
|
+
return 1
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
if __name__ == "__main__":
|
|
92
|
+
sys.exit(main())
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
"""Generated Science catalog aliases. Do not edit by hand."""
|
|
2
|
-
|
|
3
|
-
LEGACY_TOOL_ALIASES = {
|
|
4
|
-
"synbo": "synbo-service",
|
|
5
|
-
"antbo": "antbo-service",
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
LEGACY_ENDPOINTS = {
|
|
9
|
-
"pubchem": {
|
|
10
|
-
"health": "chem_pubchem_health",
|
|
11
|
-
"compound-resolve-cids": "chem_pubchem_compound_resolve-cids",
|
|
12
|
-
"compound-properties": "chem_pubchem_compound_properties",
|
|
13
|
-
"compound-synonyms": "chem_pubchem_compound_synonyms",
|
|
14
|
-
"compound-summary": "chem_pubchem_compound_summary",
|
|
15
|
-
"compound-batch-summary": "chem_pubchem_compound_batch-summary",
|
|
16
|
-
},
|
|
17
|
-
"rdkit": {
|
|
18
|
-
"health": "chem_rdkit_health",
|
|
19
|
-
"parse": "chem_rdkit_parse",
|
|
20
|
-
"descriptors": "chem_rdkit_descriptors",
|
|
21
|
-
"batch-descriptors": "chem_rdkit_batch-descriptors",
|
|
22
|
-
"batch-parse-describe": "chem_rdkit_batch-parse-describe",
|
|
23
|
-
"render": "chem_rdkit_render",
|
|
24
|
-
"fingerprint": "chem_rdkit_fingerprint",
|
|
25
|
-
"similarity": "chem_rdkit_similarity",
|
|
26
|
-
"similarity-matrix": "chem_rdkit_similarity-matrix",
|
|
27
|
-
"substructure": "chem_rdkit_substructure",
|
|
28
|
-
},
|
|
29
|
-
"pymatgen": {
|
|
30
|
-
"health": "chem_pymatgen_health",
|
|
31
|
-
"composition-parse": "chem_pymatgen_composition_parse",
|
|
32
|
-
"structure-parse": "chem_pymatgen_structure_parse",
|
|
33
|
-
"structure-summary": "chem_pymatgen_structure_summary",
|
|
34
|
-
"structure-convert": "chem_pymatgen_structure_convert",
|
|
35
|
-
"structure-symmetry": "chem_pymatgen_structure_symmetry",
|
|
36
|
-
},
|
|
37
|
-
"gsasii": {
|
|
38
|
-
"health": "chem_gsasii_health",
|
|
39
|
-
"powder-simulate": "chem_gsasii_powder_simulate",
|
|
40
|
-
"powder-refine": "chem_gsasii_powder_refine",
|
|
41
|
-
},
|
|
42
|
-
"lammps": {
|
|
43
|
-
"health": "chem_lammps_health",
|
|
44
|
-
"lj-melt-example": "chem_lammps_examples_lj-melt",
|
|
45
|
-
"run": "chem_lammps_run",
|
|
46
|
-
},
|
|
47
|
-
"delta-bo": {
|
|
48
|
-
"commands": "chem_delta-bo_commands",
|
|
49
|
-
"generate": "chem_delta-bo_generate",
|
|
50
|
-
},
|
|
51
|
-
"ldm-bo": {
|
|
52
|
-
"health": "chem_ldm-bo_health",
|
|
53
|
-
"recommend": "chem_ldm-bo_recommend",
|
|
54
|
-
"trajectory": "chem_ldm-bo_trajectory",
|
|
55
|
-
},
|
|
56
|
-
"synbo": {
|
|
57
|
-
"health": "chem_synbo_health",
|
|
58
|
-
"initialize": "chem_synbo_initialize",
|
|
59
|
-
"optimize": "chem_synbo_optimize",
|
|
60
|
-
},
|
|
61
|
-
"antbo": {
|
|
62
|
-
"health": "biology_antbo_health",
|
|
63
|
-
"run-default-job": "biology_antbo_run_default_job",
|
|
64
|
-
"run": "biology_antbo_run",
|
|
65
|
-
"log": "biology_antbo_log",
|
|
66
|
-
"jobs": "biology_antbo_jobs",
|
|
67
|
-
"stop": "biology_antbo_stop",
|
|
68
|
-
},
|
|
69
|
-
}
|
|
1
|
+
"""Generated Science catalog aliases. Do not edit by hand."""
|
|
2
|
+
|
|
3
|
+
LEGACY_TOOL_ALIASES = {
|
|
4
|
+
"synbo": "synbo-service",
|
|
5
|
+
"antbo": "antbo-service",
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
LEGACY_ENDPOINTS = {
|
|
9
|
+
"pubchem": {
|
|
10
|
+
"health": "chem_pubchem_health",
|
|
11
|
+
"compound-resolve-cids": "chem_pubchem_compound_resolve-cids",
|
|
12
|
+
"compound-properties": "chem_pubchem_compound_properties",
|
|
13
|
+
"compound-synonyms": "chem_pubchem_compound_synonyms",
|
|
14
|
+
"compound-summary": "chem_pubchem_compound_summary",
|
|
15
|
+
"compound-batch-summary": "chem_pubchem_compound_batch-summary",
|
|
16
|
+
},
|
|
17
|
+
"rdkit": {
|
|
18
|
+
"health": "chem_rdkit_health",
|
|
19
|
+
"parse": "chem_rdkit_parse",
|
|
20
|
+
"descriptors": "chem_rdkit_descriptors",
|
|
21
|
+
"batch-descriptors": "chem_rdkit_batch-descriptors",
|
|
22
|
+
"batch-parse-describe": "chem_rdkit_batch-parse-describe",
|
|
23
|
+
"render": "chem_rdkit_render",
|
|
24
|
+
"fingerprint": "chem_rdkit_fingerprint",
|
|
25
|
+
"similarity": "chem_rdkit_similarity",
|
|
26
|
+
"similarity-matrix": "chem_rdkit_similarity-matrix",
|
|
27
|
+
"substructure": "chem_rdkit_substructure",
|
|
28
|
+
},
|
|
29
|
+
"pymatgen": {
|
|
30
|
+
"health": "chem_pymatgen_health",
|
|
31
|
+
"composition-parse": "chem_pymatgen_composition_parse",
|
|
32
|
+
"structure-parse": "chem_pymatgen_structure_parse",
|
|
33
|
+
"structure-summary": "chem_pymatgen_structure_summary",
|
|
34
|
+
"structure-convert": "chem_pymatgen_structure_convert",
|
|
35
|
+
"structure-symmetry": "chem_pymatgen_structure_symmetry",
|
|
36
|
+
},
|
|
37
|
+
"gsasii": {
|
|
38
|
+
"health": "chem_gsasii_health",
|
|
39
|
+
"powder-simulate": "chem_gsasii_powder_simulate",
|
|
40
|
+
"powder-refine": "chem_gsasii_powder_refine",
|
|
41
|
+
},
|
|
42
|
+
"lammps": {
|
|
43
|
+
"health": "chem_lammps_health",
|
|
44
|
+
"lj-melt-example": "chem_lammps_examples_lj-melt",
|
|
45
|
+
"run": "chem_lammps_run",
|
|
46
|
+
},
|
|
47
|
+
"delta-bo": {
|
|
48
|
+
"commands": "chem_delta-bo_commands",
|
|
49
|
+
"generate": "chem_delta-bo_generate",
|
|
50
|
+
},
|
|
51
|
+
"ldm-bo": {
|
|
52
|
+
"health": "chem_ldm-bo_health",
|
|
53
|
+
"recommend": "chem_ldm-bo_recommend",
|
|
54
|
+
"trajectory": "chem_ldm-bo_trajectory",
|
|
55
|
+
},
|
|
56
|
+
"synbo": {
|
|
57
|
+
"health": "chem_synbo_health",
|
|
58
|
+
"initialize": "chem_synbo_initialize",
|
|
59
|
+
"optimize": "chem_synbo_optimize",
|
|
60
|
+
},
|
|
61
|
+
"antbo": {
|
|
62
|
+
"health": "biology_antbo_health",
|
|
63
|
+
"run-default-job": "biology_antbo_run_default_job",
|
|
64
|
+
"run": "biology_antbo_run",
|
|
65
|
+
"log": "biology_antbo_log",
|
|
66
|
+
"jobs": "biology_antbo_jobs",
|
|
67
|
+
"stop": "biology_antbo_stop",
|
|
68
|
+
},
|
|
69
|
+
}
|