@delta-infra/cli 1.1.0 → 1.1.1

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 (32) hide show
  1. package/README.md +12 -2
  2. package/checksums.txt +5 -5
  3. package/package.json +1 -1
  4. package/scripts/install-wizard.js +701 -701
  5. package/scripts/install.js +442 -442
  6. package/scripts/run.js +65 -65
  7. package/skills/delta-sandbox/SKILL.md +383 -383
  8. package/skills/delta-sandbox/agents/openai.yaml +4 -4
  9. package/skills/delta-sandbox/references/commands.md +58 -58
  10. package/skills/delta-sandbox/references/lifecycle.md +100 -100
  11. package/skills/delta-sandbox/references/recipes.md +138 -138
  12. package/skills/delta-science/AGENTS.md +47 -47
  13. package/skills/delta-science/SKILL.md +174 -151
  14. package/skills/delta-science/agents/openai.yaml +4 -4
  15. package/skills/delta-science/references/antbo.md +100 -100
  16. package/skills/delta-science/references/delta-bo.md +89 -89
  17. package/skills/delta-science/references/gsasii.md +116 -116
  18. package/skills/delta-science/references/lammps.md +66 -66
  19. package/skills/delta-science/references/ldm-bo.md +129 -129
  20. package/skills/delta-science/references/materials-design.md +118 -109
  21. package/skills/delta-science/references/pubchem.md +126 -126
  22. package/skills/delta-science/references/pymatgen.md +68 -68
  23. package/skills/delta-science/references/qe.md +125 -123
  24. package/skills/delta-science/references/rdkit.md +138 -138
  25. package/skills/delta-science/references/strbo.md +87 -87
  26. package/skills/delta-science/references/synbo.md +198 -198
  27. package/skills/delta-science/scripts/catalog.py +92 -92
  28. package/skills/delta-science/scripts/generated_catalog.py +69 -69
  29. package/skills/delta-science/scripts/invoke.py +346 -346
  30. package/skills/delta-shared/SKILL.md +97 -97
  31. package/skills/delta-shared/agents/openai.yaml +4 -4
  32. package/skills/manifest.json +19 -19
@@ -1,138 +1,138 @@
1
- # RDKit 详细规则
2
-
3
- 只能通过 `delta-cli science invoke` 调用。以下业务响应位于 CLI 顶层 `data`;只按本文件
4
- 说明读取字段,不得递归搜索。这里只记录 operation schema,不授权直接 HTTP。
5
-
6
- 一个请求只执行完成目标所需的最少调用。同时校验、规范化并计算基础描述符时使用一次
7
- `batch-parse-describe`,payload 使用 `molecules:[{id,smiles}]`,不得拆成 parse 和
8
- descriptors。多个分子的全对相似度使用一次 `similarity-matrix`;排名字段固定为
9
- `a`、`b`、`similarity`,不是 `i`、`j`、`score`。
10
-
11
- 只报告业务响应实际存在的描述符。渲染 PNG 时只解码文档指定字段,并验证字节以
12
- `89 50 4e 47 0d 0a 1a 0a` 开头;不得把 JSON envelope 保存成图片。
13
-
14
- ## Health
15
-
16
- operation:`health`,无 body。
17
-
18
- ## Parse
19
-
20
- operation:`parse`。
21
-
22
- ```json
23
- {"input": "CCO", "format": "smiles", "sanitize": true}
24
- ```
25
-
26
- Formats: `smiles`, `inchi`, `molblock`.
27
-
28
- Key response fields in `data`: `valid`, `canonical_smiles`, `formula`,
29
- `molecular_weight`, `exact_molecular_weight`, `inchi_key`, `atom_count`,
30
- `heavy_atom_count`, `bond_count`, `warnings`, `error`.
31
-
32
- ## Descriptors
33
-
34
- operation:`descriptors`。
35
-
36
- ```json
37
- {"smiles": "CCO", "descriptor_set": "basic", "sanitize": true}
38
- ```
39
-
40
- `descriptor_set` currently supports `basic`. Descriptor keys include `Formula`,
41
- `MolWt`, `ExactMolWt`, `HeavyAtomMolWt`, `TPSA`, `MolLogP`, `NumHDonors`,
42
- `NumHAcceptors`, `NumRotatableBonds`, `RingCount`, `FractionCSP3`,
43
- `HeavyAtomCount`, `AtomCount`, and `BondCount`.
44
-
45
- ## Batch Descriptors
46
-
47
- operation:`batch-descriptors`。
48
-
49
- ```json
50
- {"smiles": ["CCO", "c1ccccc1"], "descriptor_set": "basic", "sanitize": true}
51
- ```
52
-
53
- Limits: 1-500 SMILES.
54
-
55
- ## Batch Parse Describe
56
-
57
- operation:`batch-parse-describe`。
58
-
59
- ```json
60
- {
61
- "molecules": [
62
- {"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
63
- {"id": "caffeine", "smiles": "Cn1cnc2c1c(=O)n(C)c(=O)n2C"}
64
- ],
65
- "descriptor_set": "basic",
66
- "fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
67
- "sanitize": true
68
- }
69
- ```
70
-
71
- Limits: 1-500 molecules. Returns per-item `valid`, `canonical_smiles`, parse
72
- fields, `descriptors`, optional `fingerprint_metadata`, `on_bits`, `bit_count`,
73
- `warnings`, and `error`.
74
-
75
- ## Render
76
-
77
- operation:`render`。
78
-
79
- ```json
80
- {"smiles": "CCO", "image_format": "svg", "width": 450, "height": 320}
81
- ```
82
-
83
- Image formats: `svg`, `png`. SVG returns text; PNG returns base64.
84
- Width/height range: 150-2000.
85
-
86
- ## Fingerprint
87
-
88
- operation:`fingerprint`。
89
-
90
- ```json
91
- {"smiles": "CCO", "radius": 2, "n_bits": 2048}
92
- ```
93
-
94
- Morgan fingerprint parameters: `radius` 1-6, `n_bits` 128-8192.
95
-
96
- ## Similarity
97
-
98
- operation:`similarity`。
99
-
100
- ```json
101
- {"query_smiles": "CCO", "target_smiles": "CCCO", "radius": 2, "n_bits": 2048}
102
- ```
103
-
104
- Returns Tanimoto similarity.
105
-
106
- ## Similarity Matrix
107
-
108
- operation:`similarity-matrix`。
109
-
110
- ```json
111
- {
112
- "molecules": [
113
- {"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
114
- {"id": "ibuprofen", "smiles": "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"}
115
- ],
116
- "fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
117
- "sanitize": true
118
- }
119
- ```
120
-
121
- Returns `matrix` in input order and `ranked_pairs` sorted by descending
122
- Tanimoto similarity. Each ranked record is named, not index-based:
123
-
124
- ```json
125
- {"a":"aspirin","b":"ibuprofen","similarity":0.195122}
126
- ```
127
-
128
- Do not expect `i`, `j`, or `score` fields.
129
-
130
- ## Substructure
131
-
132
- operation:`substructure`。
133
-
134
- ```json
135
- {"query_smarts": "c1ccccc1", "target_smiles": ["c1ccccc1", "CCO"]}
136
- ```
137
-
138
- Limits: SMARTS max length 5000; target list size 1-500.
1
+ # RDKit 详细规则
2
+
3
+ 只能通过 `delta-cli science invoke` 调用。以下业务响应位于 CLI 顶层 `data`;只按本文件
4
+ 说明读取字段,不得递归搜索。这里只记录 operation schema,不授权直接 HTTP。
5
+
6
+ 一个请求只执行完成目标所需的最少调用。同时校验、规范化并计算基础描述符时使用一次
7
+ `batch-parse-describe`,payload 使用 `molecules:[{id,smiles}]`,不得拆成 parse 和
8
+ descriptors。多个分子的全对相似度使用一次 `similarity-matrix`;排名字段固定为
9
+ `a`、`b`、`similarity`,不是 `i`、`j`、`score`。
10
+
11
+ 只报告业务响应实际存在的描述符。渲染 PNG 时只解码文档指定字段,并验证字节以
12
+ `89 50 4e 47 0d 0a 1a 0a` 开头;不得把 JSON envelope 保存成图片。
13
+
14
+ ## Health
15
+
16
+ operation:`health`,无 body。
17
+
18
+ ## Parse
19
+
20
+ operation:`parse`。
21
+
22
+ ```json
23
+ {"input": "CCO", "format": "smiles", "sanitize": true}
24
+ ```
25
+
26
+ Formats: `smiles`, `inchi`, `molblock`.
27
+
28
+ Key response fields in `data`: `valid`, `canonical_smiles`, `formula`,
29
+ `molecular_weight`, `exact_molecular_weight`, `inchi_key`, `atom_count`,
30
+ `heavy_atom_count`, `bond_count`, `warnings`, `error`.
31
+
32
+ ## Descriptors
33
+
34
+ operation:`descriptors`。
35
+
36
+ ```json
37
+ {"smiles": "CCO", "descriptor_set": "basic", "sanitize": true}
38
+ ```
39
+
40
+ `descriptor_set` currently supports `basic`. Descriptor keys include `Formula`,
41
+ `MolWt`, `ExactMolWt`, `HeavyAtomMolWt`, `TPSA`, `MolLogP`, `NumHDonors`,
42
+ `NumHAcceptors`, `NumRotatableBonds`, `RingCount`, `FractionCSP3`,
43
+ `HeavyAtomCount`, `AtomCount`, and `BondCount`.
44
+
45
+ ## Batch Descriptors
46
+
47
+ operation:`batch-descriptors`。
48
+
49
+ ```json
50
+ {"smiles": ["CCO", "c1ccccc1"], "descriptor_set": "basic", "sanitize": true}
51
+ ```
52
+
53
+ Limits: 1-500 SMILES.
54
+
55
+ ## Batch Parse Describe
56
+
57
+ operation:`batch-parse-describe`。
58
+
59
+ ```json
60
+ {
61
+ "molecules": [
62
+ {"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
63
+ {"id": "caffeine", "smiles": "Cn1cnc2c1c(=O)n(C)c(=O)n2C"}
64
+ ],
65
+ "descriptor_set": "basic",
66
+ "fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
67
+ "sanitize": true
68
+ }
69
+ ```
70
+
71
+ Limits: 1-500 molecules. Returns per-item `valid`, `canonical_smiles`, parse
72
+ fields, `descriptors`, optional `fingerprint_metadata`, `on_bits`, `bit_count`,
73
+ `warnings`, and `error`.
74
+
75
+ ## Render
76
+
77
+ operation:`render`。
78
+
79
+ ```json
80
+ {"smiles": "CCO", "image_format": "svg", "width": 450, "height": 320}
81
+ ```
82
+
83
+ Image formats: `svg`, `png`. SVG returns text; PNG returns base64.
84
+ Width/height range: 150-2000.
85
+
86
+ ## Fingerprint
87
+
88
+ operation:`fingerprint`。
89
+
90
+ ```json
91
+ {"smiles": "CCO", "radius": 2, "n_bits": 2048}
92
+ ```
93
+
94
+ Morgan fingerprint parameters: `radius` 1-6, `n_bits` 128-8192.
95
+
96
+ ## Similarity
97
+
98
+ operation:`similarity`。
99
+
100
+ ```json
101
+ {"query_smiles": "CCO", "target_smiles": "CCCO", "radius": 2, "n_bits": 2048}
102
+ ```
103
+
104
+ Returns Tanimoto similarity.
105
+
106
+ ## Similarity Matrix
107
+
108
+ operation:`similarity-matrix`。
109
+
110
+ ```json
111
+ {
112
+ "molecules": [
113
+ {"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
114
+ {"id": "ibuprofen", "smiles": "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"}
115
+ ],
116
+ "fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
117
+ "sanitize": true
118
+ }
119
+ ```
120
+
121
+ Returns `matrix` in input order and `ranked_pairs` sorted by descending
122
+ Tanimoto similarity. Each ranked record is named, not index-based:
123
+
124
+ ```json
125
+ {"a":"aspirin","b":"ibuprofen","similarity":0.195122}
126
+ ```
127
+
128
+ Do not expect `i`, `j`, or `score` fields.
129
+
130
+ ## Substructure
131
+
132
+ operation:`substructure`。
133
+
134
+ ```json
135
+ {"query_smarts": "c1ccccc1", "target_smiles": ["c1ccccc1", "CCO"]}
136
+ ```
137
+
138
+ Limits: SMARTS max length 5000; target list size 1-500.
@@ -1,87 +1,87 @@
1
- # STRBO 详细规则
2
-
3
- STRBO 用于服务端固定 **KRAS G12D** 靶点的小分子生成式多目标优化。目标顺序固定为
4
- `[vina, activity]`:vina 越低越好,activity 越高越好。`task` 只引导候选生成,
5
- 不会更换靶点;不得声称支持用户自定义受体。
6
-
7
- 所有调用均使用 `tool="strbo"`。生成、建议、评估和提交 job 都会消耗远端资源,只在
8
- 用户确实要求执行相应科研任务时调用;请求结果未知或超时时不得重试。
9
-
10
- ## 初始化
11
-
12
- - 同步 operation:`molecules-init`
13
- - 异步 operation:`molecules-init-job`
14
- - 仅校验 operation:`molecules-init-validate`
15
-
16
- ```json
17
- {
18
- "task": "为 KRAS G12D 生成兼顾结合与活性的候选小分子",
19
- "num_initial": 3,
20
- "seed": 42
21
- }
22
- ```
23
-
24
- 只需检查参数时使用 validate;正式执行不要先 validate 再提交,避免无必要调用。
25
- 成功结果应包含与 `num_initial` 数量一致的候选 SMILES。
26
-
27
- ## 建议下一批候选
28
-
29
- - 同步 operation:`molecules-suggest`
30
- - 异步 operation:`molecules-suggest-job`(重型任务优先)
31
- - 仅校验 operation:`molecules-suggest-validate`
32
-
33
- ```json
34
- {
35
- "task": "继续改善 KRAS G12D 的结合与活性",
36
- "history_xs": ["CCO", "CCN", "CCC"],
37
- "history_ys": [
38
- [-6.8, 0.31],
39
- [-7.1, 0.42],
40
- [-6.5, 0.28]
41
- ],
42
- "num_suggestions": 2,
43
- "seed": 42
44
- }
45
- ```
46
-
47
- `history_xs` 与 `history_ys` 必须等长;每个 `history_ys` 元素必须是两个有限数值,
48
- 顺序严格为 `[vina, activity]`。不得把预测值伪装成湿实验结果。
49
-
50
- ## 评估候选
51
-
52
- - 同步 operation:`molecules-evaluate`
53
- - 异步 operation:`molecules-evaluate-job`
54
- - 仅校验 operation:`molecules-evaluate-validate`
55
-
56
- ```json
57
- {
58
- "designs": ["CCO", "CCN"]
59
- }
60
- ```
61
-
62
- 成功结果中的 score 数量必须与 designs 一致,每行必须恰好有两个有限数值。任一 item
63
- 明确失败时,本轮整体按失败处理,不得只报告成功子集。
64
-
65
- ## 异步作业
66
-
67
- 提交异步 operation 后,从当前业务响应读取非空 `job_id`,再轮询:
68
-
69
- ```text
70
- delta-cli science invoke --tool strbo --endpoint job-status --params JSON
71
- ```
72
-
73
- 只有状态变为 `succeeded` 后才读取:
74
-
75
- ```text
76
- delta-cli science invoke --tool strbo --endpoint job-result --params JSON
77
- ```
78
-
79
- `queued` 或 `running` 不是完成;`failed` 立即结束。状态查询可按 5 秒左右间隔重复,
80
- 但提交 operation 绝不重复。单次用户任务的总等待上限为 15 分钟;超限后报告作业仍
81
- 未完成并保留 job_id,不得声称远端已取消。
82
-
83
- ## 完整科研流程
84
-
85
- 用户明确要求完整迭代时按 `初始化 → 评估 → 建议 → 评估` 串行执行。每一步只使用本次
86
- 调用已验证的业务响应作为下一步输入。用户只要求生成初始候选或评估给定 SMILES 时,
87
- 不得擅自扩展为完整循环。
1
+ # STRBO 详细规则
2
+
3
+ STRBO 用于服务端固定 **KRAS G12D** 靶点的小分子生成式多目标优化。目标顺序固定为
4
+ `[vina, activity]`:vina 越低越好,activity 越高越好。`task` 只引导候选生成,
5
+ 不会更换靶点;不得声称支持用户自定义受体。
6
+
7
+ 所有调用均使用 `tool="strbo"`。生成、建议、评估和提交 job 都会消耗远端资源,只在
8
+ 用户确实要求执行相应科研任务时调用;请求结果未知或超时时不得重试。
9
+
10
+ ## 初始化
11
+
12
+ - 同步 operation:`molecules-init`
13
+ - 异步 operation:`molecules-init-job`
14
+ - 仅校验 operation:`molecules-init-validate`
15
+
16
+ ```json
17
+ {
18
+ "task": "为 KRAS G12D 生成兼顾结合与活性的候选小分子",
19
+ "num_initial": 3,
20
+ "seed": 42
21
+ }
22
+ ```
23
+
24
+ 只需检查参数时使用 validate;正式执行不要先 validate 再提交,避免无必要调用。
25
+ 成功结果应包含与 `num_initial` 数量一致的候选 SMILES。
26
+
27
+ ## 建议下一批候选
28
+
29
+ - 同步 operation:`molecules-suggest`
30
+ - 异步 operation:`molecules-suggest-job`(重型任务优先)
31
+ - 仅校验 operation:`molecules-suggest-validate`
32
+
33
+ ```json
34
+ {
35
+ "task": "继续改善 KRAS G12D 的结合与活性",
36
+ "history_xs": ["CCO", "CCN", "CCC"],
37
+ "history_ys": [
38
+ [-6.8, 0.31],
39
+ [-7.1, 0.42],
40
+ [-6.5, 0.28]
41
+ ],
42
+ "num_suggestions": 2,
43
+ "seed": 42
44
+ }
45
+ ```
46
+
47
+ `history_xs` 与 `history_ys` 必须等长;每个 `history_ys` 元素必须是两个有限数值,
48
+ 顺序严格为 `[vina, activity]`。不得把预测值伪装成湿实验结果。
49
+
50
+ ## 评估候选
51
+
52
+ - 同步 operation:`molecules-evaluate`
53
+ - 异步 operation:`molecules-evaluate-job`
54
+ - 仅校验 operation:`molecules-evaluate-validate`
55
+
56
+ ```json
57
+ {
58
+ "designs": ["CCO", "CCN"]
59
+ }
60
+ ```
61
+
62
+ 成功结果中的 score 数量必须与 designs 一致,每行必须恰好有两个有限数值。任一 item
63
+ 明确失败时,本轮整体按失败处理,不得只报告成功子集。
64
+
65
+ ## 异步作业
66
+
67
+ 提交异步 operation 后,从当前业务响应读取非空 `job_id`,再轮询:
68
+
69
+ ```text
70
+ delta-cli science invoke --tool strbo --endpoint job-status --params JSON
71
+ ```
72
+
73
+ 只有状态变为 `succeeded` 后才读取:
74
+
75
+ ```text
76
+ delta-cli science invoke --tool strbo --endpoint job-result --params JSON
77
+ ```
78
+
79
+ `queued` 或 `running` 不是完成;`failed` 立即结束。状态查询可按 5 秒左右间隔重复,
80
+ 但提交 operation 绝不重复。单次用户任务的总等待上限为 15 分钟;超限后报告作业仍
81
+ 未完成并保留 job_id,不得声称远端已取消。
82
+
83
+ ## 完整科研流程
84
+
85
+ 用户明确要求完整迭代时按 `初始化 → 评估 → 建议 → 评估` 串行执行。每一步只使用本次
86
+ 调用已验证的业务响应作为下一步输入。用户只要求生成初始候选或评估给定 SMILES 时,
87
+ 不得擅自扩展为完整循环。