@delta-infra/cli 1.0.79 → 1.0.80
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 +17 -27
- package/checksums.txt +5 -5
- package/package.json +2 -13
- package/scripts/install-wizard.js +14 -5
- package/skills/delta-science/SKILL.md +128 -149
- package/skills/delta-science/agents/openai.yaml +3 -3
- package/skills/{antbo-service/references/operations.md → delta-science/references/antbo.md} +59 -4
- package/skills/delta-science/references/cli-contract.md +18 -19
- package/skills/delta-science/references/delta-bo.md +90 -0
- package/skills/{gsasii/references/endpoints.md → delta-science/references/gsasii.md} +13 -27
- package/skills/{lammps/references/endpoints.md → delta-science/references/lammps.md} +13 -8
- package/skills/{ldm-bo/references/endpoints.md → delta-science/references/ldm-bo.md} +12 -9
- package/skills/delta-science/references/ldm.md +72 -0
- package/skills/{pubchem/references/endpoints.md → delta-science/references/pubchem.md} +15 -10
- package/skills/{pymatgen/references/endpoints.md → delta-science/references/pymatgen.md} +9 -9
- package/skills/{rdkit/references/endpoints.md → delta-science/references/rdkit.md} +20 -14
- package/skills/delta-science/references/routing-index.md +36 -0
- package/skills/delta-science/references/strbo.md +87 -0
- package/skills/{synbo-service/references/endpoints.md → delta-science/references/synbo.md} +57 -17
- package/skills/delta-science/references/workflows.md +24 -7
- package/skills/delta-science/scripts/catalog.py +92 -0
- package/skills/delta-science/scripts/invoke.py +162 -79
- package/skills/manifest.json +3 -1
- package/skills/antbo-ldm-guard/SKILL.md +0 -58
- package/skills/antbo-ldm-guard/agents/openai.yaml +0 -4
- package/skills/antbo-service/SKILL.md +0 -79
- package/skills/antbo-service/agents/openai.yaml +0 -4
- package/skills/delta-bo/SKILL.md +0 -36
- package/skills/delta-bo/agents/openai.yaml +0 -4
- package/skills/delta-bo/references/endpoints.md +0 -263
- package/skills/delta-science/references/generated-catalog.md +0 -48
- package/skills/delta-science/references/operation-contracts.md +0 -137
- package/skills/delta-science/references/services.md +0 -112
- package/skills/delta-science/scripts/generated_catalog.py +0 -69
- package/skills/gsasii/SKILL.md +0 -42
- package/skills/gsasii/agents/openai.yaml +0 -4
- package/skills/lammps/SKILL.md +0 -39
- package/skills/lammps/agents/openai.yaml +0 -4
- package/skills/ldm-bo/SKILL.md +0 -35
- package/skills/ldm-bo/agents/openai.yaml +0 -4
- package/skills/pubchem/SKILL.md +0 -93
- package/skills/pubchem/agents/openai.yaml +0 -4
- package/skills/pubchem/references/operations.md +0 -41
- package/skills/pymatgen/SKILL.md +0 -54
- package/skills/pymatgen/agents/openai.yaml +0 -4
- package/skills/rdkit/SKILL.md +0 -112
- package/skills/rdkit/agents/openai.yaml +0 -4
- package/skills/rdkit/references/operations.md +0 -64
- package/skills/science-tools.json +0 -127
- package/skills/synbo-service/SKILL.md +0 -36
- package/skills/synbo-service/agents/openai.yaml +0 -4
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: antbo-ldm-guard
|
|
3
|
-
description: 任何同时涉及 AntBO/抗体/CDRH3 与 LDM/suggest/下一条候选序列的请求都必须优先于所有其他 AntBO Skill 立即使用本 Skill,即使历史序列或评分尚未提供。当前 Delta CLI catalog 未暴露 AntBO LDM initialize/evaluate/suggest;唯一正确结果是说明未发送远端请求,禁止询问数据、建文件、调用 health/Science/filesystem 或改用小分子 LDM-BO。
|
|
4
|
-
metadata:
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- python_repl
|
|
7
|
-
- step_finish
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# AntBO LDM 能力边界
|
|
11
|
-
|
|
12
|
-
本 Skill 没有可执行的 Science operation,也没有 wrapper、endpoint 或 payload 示例。
|
|
13
|
-
为了兼容 Kimi 对“无 artifact 的 step_finish”误判为 loop,先生成一个只记录能力边界的
|
|
14
|
-
本地证据文件;这不是 Science 调用,也不发送远端请求。
|
|
15
|
-
|
|
16
|
-
第一次工具调用必须是 `python_repl`,工具参数只能包含 `code`,执行以下等价逻辑:
|
|
17
|
-
|
|
18
|
-
```python
|
|
19
|
-
import json, os
|
|
20
|
-
from pathlib import Path
|
|
21
|
-
|
|
22
|
-
result = {
|
|
23
|
-
"supported": False,
|
|
24
|
-
"tool": "antbo",
|
|
25
|
-
"operation": "ldm-suggest",
|
|
26
|
-
"remote_request_sent": False,
|
|
27
|
-
"reason": "当前 Delta CLI catalog 未暴露 antbo LDM suggest operation",
|
|
28
|
-
}
|
|
29
|
-
output_path = Path(os.environ["WORKSPACE_ROOT"]) / "antbo_ldm_unsupported.json"
|
|
30
|
-
output_path.write_text(json.dumps(result, ensure_ascii=False, indent=2), encoding="utf-8")
|
|
31
|
-
print(str(output_path))
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
随后调用且只调用一次:
|
|
35
|
-
|
|
36
|
-
```text
|
|
37
|
-
step_finish(
|
|
38
|
-
status="done",
|
|
39
|
-
summary="当前 Delta CLI catalog 未暴露 antbo LDM suggest operation;未发送远端请求。",
|
|
40
|
-
output_ref=<刚生成的 antbo_ldm_unsupported.json 绝对路径>
|
|
41
|
-
)
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
必须逐字使用上述 summary 和真实 output_ref。调用后立即结束,不输出其他文字,不调用
|
|
45
|
-
任何工具。外层若核验,只能原子 `read_file(output_ref)` 一次,禁止其他操作。
|
|
46
|
-
|
|
47
|
-
禁止行为:
|
|
48
|
-
|
|
49
|
-
- 除上述一次本地文件写入外,禁止其他 `python_repl`;禁止 Bash、health、catalog、
|
|
50
|
-
filesystem、目录 read/list、ask_user;
|
|
51
|
-
- 禁止创建 history JSON,禁止先要求用户提供序列或评分;
|
|
52
|
-
- 禁止调用 `antbo-service`、`ldm-bo` 或通用子代理;
|
|
53
|
-
- 禁止生成、转换、评价或声称返回候选 CDRH3;
|
|
54
|
-
- 禁止把 AntBO health 公布的公司内部 endpoint 当成 Delta CLI operation。
|
|
55
|
-
|
|
56
|
-
公司服务能力与 Delta CLI catalog 是两层能力。当前 Memento 只能通过 CLI catalog
|
|
57
|
-
调用 `antbo` 的 `health/run-default-job/run/log/jobs/stop`;因此 AntBO LDM 请求必须在
|
|
58
|
-
本 Skill 内以固定能力边界答复结束。
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: antbo-service
|
|
3
|
-
description: 当用户明确要求检查 AntBO 服务健康状态、启动默认或自定义 AntBO 作业、读取 AntBO 日志、列出活动作业或停止指定作业时使用。当前 Delta CLI operation 为 health、run-default-job、run、log、jobs、stop。
|
|
4
|
-
metadata:
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- read_file
|
|
7
|
-
- python_repl
|
|
8
|
-
- step_finish
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# AntBO 服务
|
|
12
|
-
|
|
13
|
-
## 路由排除
|
|
14
|
-
|
|
15
|
-
AntBO/CDRH3 LDM、suggest、下一条候选序列请求不进入本 Skill,必须由
|
|
16
|
-
`antbo-ldm-guard` 处理。不得先调用本 Skill 的 health。
|
|
17
|
-
|
|
18
|
-
## 路由与能力边界
|
|
19
|
-
|
|
20
|
-
当前 Delta CLI catalog 暴露:
|
|
21
|
-
|
|
22
|
-
- `health`:健康检查,只读。
|
|
23
|
-
- `run-default-job`:启动默认后台任务,有副作用。
|
|
24
|
-
- `run`:自定义同步任务,有副作用且可能长时间运行。
|
|
25
|
-
- `log`:读取日志,只读。
|
|
26
|
-
- `jobs`:列出当前容器登记的活动任务,只读。
|
|
27
|
-
- `stop`:停止任务,有副作用。
|
|
28
|
-
|
|
29
|
-
当前没有 `ldm/suggest`、`ldm/initialize` 或 `ldm/evaluate`。这些请求严格执行最上方
|
|
30
|
-
终止分支;health 返回的公司内部 endpoint 不能覆盖 CLI catalog。
|
|
31
|
-
|
|
32
|
-
## 强制执行规则
|
|
33
|
-
|
|
34
|
-
1. 实时 Science 调用的第一个执行工具只能是 `python_repl`。
|
|
35
|
-
`python_repl` 工具参数只能包含 `code`,禁止 `deps/dependencies/packages`。
|
|
36
|
-
2. 只通过 `os.environ["SKILLS_ROOT"]` 定位
|
|
37
|
-
`delta-science/scripts/invoke.py`,使用 `subprocess.run(..., shell=False)`。
|
|
38
|
-
3. 禁止 Bash、`list_dir`、`read_file`、`which`、`where`、`ls`、wrapper/环境检查,
|
|
39
|
-
禁止执行字面命令 `CLI`、`cli` 或 `delta-cli`。
|
|
40
|
-
4. 禁止 `curl`、`requests`、`httpx`、浏览器、网关直连和本地 AntBO。
|
|
41
|
-
5. 业务结果直接位于 `result["native"]`;禁止读取 `native.data`。
|
|
42
|
-
6. 每个 operation 的场景、最小参数和投影必须按
|
|
43
|
-
`references/operations.md`,不得猜相近 endpoint。
|
|
44
|
-
|
|
45
|
-
## 唯一 wrapper 模板
|
|
46
|
-
|
|
47
|
-
```python
|
|
48
|
-
import json, os, subprocess, sys
|
|
49
|
-
wrapper = os.path.join(os.environ["SKILLS_ROOT"], "delta-science", "scripts", "invoke.py")
|
|
50
|
-
argv = [sys.executable, wrapper, "--tool", "antbo", "--endpoint", endpoint]
|
|
51
|
-
if data is not None:
|
|
52
|
-
argv += ["--data-json", json.dumps(data)]
|
|
53
|
-
if params is not None:
|
|
54
|
-
argv += ["--params-json", json.dumps(params)]
|
|
55
|
-
p = subprocess.run(argv, capture_output=True, text=True, shell=False)
|
|
56
|
-
if p.returncode != 0:
|
|
57
|
-
raise RuntimeError(p.stderr or p.stdout)
|
|
58
|
-
r = json.loads(p.stdout)
|
|
59
|
-
if r.get("ok") is not True or r.get("transport") != "delta-cli":
|
|
60
|
-
raise RuntimeError(r)
|
|
61
|
-
n = r["native"]
|
|
62
|
-
print(json.dumps({"transport": r["transport"], "endpoint": r["endpoint"], "native": n}, ensure_ascii=False))
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
执行前只按 `references/operations.md` 设置 `endpoint`、`data`、`params`。成功后将
|
|
66
|
-
结果投影为用户要求的最小字段,不打印完整日志或 envelope。
|
|
67
|
-
|
|
68
|
-
## 副作用与完成回执
|
|
69
|
-
|
|
70
|
-
- `run-default-job`、`run`、`stop` 只有用户明确授权时才能执行。
|
|
71
|
-
- 变更操作结果未知、超时或断连时禁止重试;客户端失败不表示远程操作未发生。
|
|
72
|
-
- 只有同一次 `run-default-job` native 同时含 `started=true`、非空 `pid` 以及
|
|
73
|
-
`log_name` 或 `log_path` 时,才能说任务已启动。
|
|
74
|
-
- `run` 仅用于用户明确提供并授权的受限脚本/config/antigen 路径,不生成任意路径。
|
|
75
|
-
- `stop` 优先使用用户确认的 PID;不得在多任务不明确时无参数停止。
|
|
76
|
-
|
|
77
|
-
成功后立即调用 `step_finish(status="done", summary=<有界结果 JSON>)` 恰好一次;
|
|
78
|
-
失败时调用 `step_finish(status="failed", summary=<原始错误短摘要>)`。调用后不得输出
|
|
79
|
-
自由文本或使用其他工具。
|
package/skills/delta-bo/SKILL.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: delta-bo
|
|
3
|
-
description: 当用户需要列出当前 Delta-BO 命令,或针对数值、整数、分类实验变量生成随机搜索/贝叶斯优化建议时使用。当前 Delta CLI catalog 只暴露 commands 与 generate;不得通过 Skill 猜测或直连旧的 stateful command API。
|
|
4
|
-
metadata:
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- read_file
|
|
7
|
-
- python_repl
|
|
8
|
-
- step_finish
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Delta-BO 服务
|
|
12
|
-
|
|
13
|
-
## 强制规则
|
|
14
|
-
|
|
15
|
-
- 只用 `python_repl` 执行 `$SKILLS_ROOT/delta-science/scripts/invoke.py`,
|
|
16
|
-
tool=`delta-bo`;禁止 Bash、路径探测、字面 CLI、直接 HTTP 和本地 BO。
|
|
17
|
-
- `python_repl` 工具参数只能包含 `code`,禁止 `deps/dependencies/packages`。
|
|
18
|
-
- 业务结果直接在 `r["native"]`,禁止 `native.data`。
|
|
19
|
-
- 当前 catalog 只有 `commands`(无 body)与 `generate`(JSON body)。旧文档中的
|
|
20
|
-
session/space/objective/policy/suggest/observe/loop 等不是当前 CLI operation,
|
|
21
|
-
不得执行或猜 endpoint。
|
|
22
|
-
|
|
23
|
-
## generate 最小规则
|
|
24
|
-
|
|
25
|
-
- 没有真实历史,或历史少于 5 条且用户未明确要求 BO:用
|
|
26
|
-
`algorithm:"random-search"`,给有界 `params`、`num_suggestions` 和 seed。
|
|
27
|
-
- 有真实历史且明确要求 BO:使用 `objectives`、object-form
|
|
28
|
-
`histories.decisions/observations`,必要时才加入 model/acquisition/solver。
|
|
29
|
-
- 参数类型仅 `numeric`、`integer`、`categorical`;不得编造观测或最优结果。
|
|
30
|
-
- 只报告 native 的 suggestions、metadata、warnings、diversity;空建议或失败不得用
|
|
31
|
-
本地 GP/UCB/随机数替代。
|
|
32
|
-
|
|
33
|
-
最小 payload 见 `references/endpoints.md` 的 Stateless Generate。通过 wrapper 一次
|
|
34
|
-
调用、校验并显式打印有界 JSON,然后立即
|
|
35
|
-
`step_finish(status="done", summary=<同一 JSON>)`;失败则 `status="failed"`。
|
|
36
|
-
调用后不得输出自由文本或使用其他工具。
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
# Delta-BO API Endpoint Reference
|
|
2
|
-
|
|
3
|
-
All paths are relative to `http://111.2.199.31:52317/api/v1`.
|
|
4
|
-
|
|
5
|
-
This reference is for using the exposed HTTP API. It is not a demo runner.
|
|
6
|
-
|
|
7
|
-
## Health And Command Discovery
|
|
8
|
-
|
|
9
|
-
`GET /chem/delta-bo/health`
|
|
10
|
-
|
|
11
|
-
`GET /chem/delta-bo/commands`
|
|
12
|
-
|
|
13
|
-
`/commands` returns the native route list exposed by the deployed service.
|
|
14
|
-
|
|
15
|
-
For a formatted catalog with gateway URLs against the deployed service, run the
|
|
16
|
-
bundled skill-local script (no local `delta_bo` package required):
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
python3 scripts/remote_list_eng_cmds.py --format markdown
|
|
20
|
-
python3 scripts/remote_list_eng_cmds.py --format json
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
For complete local route metadata including parameters, the offline equivalent
|
|
24
|
-
`list_eng_cmds.py` (requires a Delta-BO dev environment with dependencies
|
|
25
|
-
installed, not bundled) walks the same command registry used by the service
|
|
26
|
-
dispatcher and is the source of truth for possible native API usage.
|
|
27
|
-
|
|
28
|
-
## Stateless Generate
|
|
29
|
-
|
|
30
|
-
`POST /chem/delta-bo/generate`
|
|
31
|
-
|
|
32
|
-
Random search:
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
{
|
|
36
|
-
"params": [{"name": "x", "type": "numeric", "low": 0.0, "high": 1.0}],
|
|
37
|
-
"num_suggestions": 3,
|
|
38
|
-
"algorithm": "random-search",
|
|
39
|
-
"seed": 42
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
BO with history:
|
|
44
|
-
|
|
45
|
-
```json
|
|
46
|
-
{
|
|
47
|
-
"params": [
|
|
48
|
-
{"name": "temperature", "type": "numeric", "low": 20.0, "high": 120.0},
|
|
49
|
-
{"name": "catalyst", "type": "categorical", "choices": ["A", "B", "C"]}
|
|
50
|
-
],
|
|
51
|
-
"objectives": [{"name": "yield", "minimize": false}],
|
|
52
|
-
"num_suggestions": 2,
|
|
53
|
-
"algorithm": "bo",
|
|
54
|
-
"model": {"name": "gp", "min_samples": 2, "train_steps": 50},
|
|
55
|
-
"acq_target": {"name": "ucb", "beta": 2.0},
|
|
56
|
-
"solver": {"name": "ga", "pop_size": 40, "n_gen": 10},
|
|
57
|
-
"histories": {
|
|
58
|
-
"decisions": [[40.0, "A"], [80.0, "B"], [100.0, "C"]],
|
|
59
|
-
"observations": [0.42, 0.61, 0.53]
|
|
60
|
-
},
|
|
61
|
-
"seed": 7
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Parameter types: `numeric`, `integer`, `categorical`.
|
|
66
|
-
|
|
67
|
-
Histories may also use object-form rows, which are safer for agents:
|
|
68
|
-
|
|
69
|
-
```json
|
|
70
|
-
{
|
|
71
|
-
"histories": {
|
|
72
|
-
"decisions": [
|
|
73
|
-
{"temperature": 40.0, "catalyst": "A"},
|
|
74
|
-
{"temperature": 80.0, "catalyst": "B"}
|
|
75
|
-
],
|
|
76
|
-
"observations": [
|
|
77
|
-
{"yield": 0.42},
|
|
78
|
-
{"yield": 0.61}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Optional diversity controls:
|
|
85
|
-
|
|
86
|
-
```json
|
|
87
|
-
{
|
|
88
|
-
"diversity": {
|
|
89
|
-
"deduplicate": true,
|
|
90
|
-
"min_numeric_distance": {"temperature": 5.0},
|
|
91
|
-
"prefer_unique_categories": true
|
|
92
|
-
},
|
|
93
|
-
"constraints": [
|
|
94
|
-
{"type": "unique_batch"},
|
|
95
|
-
{"type": "avoid_seen_decisions"},
|
|
96
|
-
{
|
|
97
|
-
"type": "max_temperature_for_category",
|
|
98
|
-
"category_param": "solvent",
|
|
99
|
-
"temperature_param": "temperature",
|
|
100
|
-
"category": "dichloromethane",
|
|
101
|
-
"max": 40
|
|
102
|
-
}
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Response fields include:
|
|
108
|
-
|
|
109
|
-
```json
|
|
110
|
-
{
|
|
111
|
-
"suggestions": [[{"name": "temperature", "value": 72.0}]],
|
|
112
|
-
"suggestion_metadata": [
|
|
113
|
-
{
|
|
114
|
-
"acquisition_value": null,
|
|
115
|
-
"nearest_history": {
|
|
116
|
-
"decision": [{"name": "temperature", "value": 80.0}],
|
|
117
|
-
"distance": 0.08
|
|
118
|
-
},
|
|
119
|
-
"rationale": "exploitation"
|
|
120
|
-
}
|
|
121
|
-
],
|
|
122
|
-
"warnings": [
|
|
123
|
-
"Only 3 observations supplied; GP fit may be weak. Consider random-search or more initial points."
|
|
124
|
-
],
|
|
125
|
-
"generated_candidate_count": 15,
|
|
126
|
-
"diversity": {
|
|
127
|
-
"requested": true,
|
|
128
|
-
"deduplicated": true,
|
|
129
|
-
"duplicates_removed": 2
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Native Stateful Command API
|
|
135
|
-
|
|
136
|
-
Gateway path pattern:
|
|
137
|
-
|
|
138
|
-
```text
|
|
139
|
-
POST /chem/delta-bo/v1/{command_path}
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Native route `/v1/session/new` maps to gateway route:
|
|
143
|
-
|
|
144
|
-
```text
|
|
145
|
-
/api/v1/chem/delta-bo/v1/session/new
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Minimal random-search session:
|
|
149
|
-
|
|
150
|
-
```bash
|
|
151
|
-
curl -s "$DBO/v1/session/new" \
|
|
152
|
-
-H "Content-Type: application/json" \
|
|
153
|
-
-d '{"name":"api_session"}'
|
|
154
|
-
|
|
155
|
-
curl -s "$DBO/v1/space" \
|
|
156
|
-
-H "Content-Type: application/json" \
|
|
157
|
-
-d '{"decision_expression":"Joint({\"x\": Num(-5, 10), \"y\": Num(0, 15)})"}'
|
|
158
|
-
|
|
159
|
-
curl -s "$DBO/v1/objective" \
|
|
160
|
-
-H "Content-Type: application/json" \
|
|
161
|
-
-d '{"source":"objectives/branin_simple.py","minimize":true}'
|
|
162
|
-
|
|
163
|
-
curl -s "$DBO/v1/policy/random-search" \
|
|
164
|
-
-H "Content-Type: application/json" \
|
|
165
|
-
-d '{"policy_id":"random_init","replace":true}'
|
|
166
|
-
|
|
167
|
-
curl -s "$DBO/v1/suggest" \
|
|
168
|
-
-H "Content-Type: application/json" \
|
|
169
|
-
-d '{"num":3,"policy_id":"random_init"}'
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
Common native commands:
|
|
173
|
-
|
|
174
|
-
```text
|
|
175
|
-
session/new
|
|
176
|
-
session/save
|
|
177
|
-
space
|
|
178
|
-
objective
|
|
179
|
-
policy/random-search
|
|
180
|
-
policy/bo
|
|
181
|
-
policy/bo.model/gp
|
|
182
|
-
policy/bo.target/ucb
|
|
183
|
-
policy/bo.target/ei
|
|
184
|
-
policy/bo.solver/ga
|
|
185
|
-
policy/flags
|
|
186
|
-
suggest
|
|
187
|
-
observe
|
|
188
|
-
loop
|
|
189
|
-
status
|
|
190
|
-
best
|
|
191
|
-
plot/best-so-far
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Use `GET /chem/delta-bo/commands` for the deployed list; run the bundled
|
|
195
|
-
`scripts/remote_list_eng_cmds.py --format markdown/json` for a formatted catalog
|
|
196
|
-
against the deployed service, or the offline `list_eng_cmds.py` (local Delta-BO
|
|
197
|
-
dev environment, not bundled) for full parameter schemas.
|
|
198
|
-
|
|
199
|
-
## Native BO Policy Setup
|
|
200
|
-
|
|
201
|
-
A typical stateful BO configuration is:
|
|
202
|
-
|
|
203
|
-
```bash
|
|
204
|
-
curl -s "$DBO/v1/policy/bo" \
|
|
205
|
-
-H "Content-Type: application/json" \
|
|
206
|
-
-d '{"replace":true}'
|
|
207
|
-
|
|
208
|
-
curl -s "$DBO/v1/policy/bo.model/gp" \
|
|
209
|
-
-H "Content-Type: application/json" \
|
|
210
|
-
-d '{"train_steps":50,"min_samples":2}'
|
|
211
|
-
|
|
212
|
-
curl -s "$DBO/v1/policy/bo.target/ucb" \
|
|
213
|
-
-H "Content-Type: application/json" \
|
|
214
|
-
-d '{"beta":2.0}'
|
|
215
|
-
|
|
216
|
-
curl -s "$DBO/v1/policy/bo.solver/ga" \
|
|
217
|
-
-H "Content-Type: application/json" \
|
|
218
|
-
-d '{"pop_size":40,"n_gen":10}'
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
For random initialization policy creation:
|
|
222
|
-
|
|
223
|
-
```bash
|
|
224
|
-
curl -s "$DBO/v1/policy/random-search" \
|
|
225
|
-
-H "Content-Type: application/json" \
|
|
226
|
-
-d '{"policy_id":"random_init","replace":true}'
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Then run an optimization loop:
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
curl -s "$DBO/v1/loop" \
|
|
233
|
-
-H "Content-Type: application/json" \
|
|
234
|
-
-d '{"iterations":5,"batch_size":1,"policy_id":"main","timeout":300}'
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
Response shape is nested:
|
|
238
|
-
|
|
239
|
-
```json
|
|
240
|
-
{
|
|
241
|
-
"code": 0,
|
|
242
|
-
"message": "success",
|
|
243
|
-
"data": {
|
|
244
|
-
"ok": true,
|
|
245
|
-
"result": {
|
|
246
|
-
"data": {},
|
|
247
|
-
"summary": "...",
|
|
248
|
-
"meta": {"command_path": "/v1/..."}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
## Retry Safety
|
|
255
|
-
|
|
256
|
-
Setup/configuration requests such as `space`, `objective`, `policy/bo`, and
|
|
257
|
-
`policy/random-search` can be repeated with the same payload. Use
|
|
258
|
-
`{"replace": true}` for policy creation so repeated setup calls remain
|
|
259
|
-
idempotent.
|
|
260
|
-
|
|
261
|
-
Do not blindly retry state-changing optimization commands such as `loop`,
|
|
262
|
-
`suggest`, `observe`, `session/new`, or `session/save`, because a retry may
|
|
263
|
-
advance or duplicate remote experiment state.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Science catalog(自动生成)
|
|
2
|
-
|
|
3
|
-
本文件由 `skills/science-tools.json` 生成;不要手工修改。规范名称供 CLI/Skill 使用,legacy 名称仅用于兼容已部署的 `/science_tool` catalog。
|
|
4
|
-
|
|
5
|
-
| 规范 tool | Skill | 类别 | operation | legacy endpoint |
|
|
6
|
-
| --- | --- | --- | --- | --- |
|
|
7
|
-
| pubchem | pubchem | molecule-information | health | chem_pubchem_health |
|
|
8
|
-
| pubchem | pubchem | molecule-information | compound-resolve-cids | chem_pubchem_compound_resolve-cids |
|
|
9
|
-
| pubchem | pubchem | molecule-information | compound-properties | chem_pubchem_compound_properties |
|
|
10
|
-
| pubchem | pubchem | molecule-information | compound-synonyms | chem_pubchem_compound_synonyms |
|
|
11
|
-
| pubchem | pubchem | molecule-information | compound-summary | chem_pubchem_compound_summary |
|
|
12
|
-
| pubchem | pubchem | molecule-information | compound-batch-summary | chem_pubchem_compound_batch-summary |
|
|
13
|
-
| rdkit | rdkit | cheminformatics | health | chem_rdkit_health |
|
|
14
|
-
| rdkit | rdkit | cheminformatics | parse | chem_rdkit_parse |
|
|
15
|
-
| rdkit | rdkit | cheminformatics | descriptors | chem_rdkit_descriptors |
|
|
16
|
-
| rdkit | rdkit | cheminformatics | batch-descriptors | chem_rdkit_batch-descriptors |
|
|
17
|
-
| rdkit | rdkit | cheminformatics | batch-parse-describe | chem_rdkit_batch-parse-describe |
|
|
18
|
-
| rdkit | rdkit | cheminformatics | render | chem_rdkit_render |
|
|
19
|
-
| rdkit | rdkit | cheminformatics | fingerprint | chem_rdkit_fingerprint |
|
|
20
|
-
| rdkit | rdkit | cheminformatics | similarity | chem_rdkit_similarity |
|
|
21
|
-
| rdkit | rdkit | cheminformatics | similarity-matrix | chem_rdkit_similarity-matrix |
|
|
22
|
-
| rdkit | rdkit | cheminformatics | substructure | chem_rdkit_substructure |
|
|
23
|
-
| pymatgen | pymatgen | materials-informatics | health | chem_pymatgen_health |
|
|
24
|
-
| pymatgen | pymatgen | materials-informatics | composition-parse | chem_pymatgen_composition_parse |
|
|
25
|
-
| pymatgen | pymatgen | materials-informatics | structure-parse | chem_pymatgen_structure_parse |
|
|
26
|
-
| pymatgen | pymatgen | materials-informatics | structure-summary | chem_pymatgen_structure_summary |
|
|
27
|
-
| pymatgen | pymatgen | materials-informatics | structure-convert | chem_pymatgen_structure_convert |
|
|
28
|
-
| pymatgen | pymatgen | materials-informatics | structure-symmetry | chem_pymatgen_structure_symmetry |
|
|
29
|
-
| gsasii | gsasii | diffraction | health | chem_gsasii_health |
|
|
30
|
-
| gsasii | gsasii | diffraction | powder-simulate | chem_gsasii_powder_simulate |
|
|
31
|
-
| gsasii | gsasii | diffraction | powder-refine | chem_gsasii_powder_refine |
|
|
32
|
-
| lammps | lammps | molecular-dynamics | health | chem_lammps_health |
|
|
33
|
-
| lammps | lammps | molecular-dynamics | lj-melt-example | chem_lammps_examples_lj-melt |
|
|
34
|
-
| lammps | lammps | molecular-dynamics | run | chem_lammps_run |
|
|
35
|
-
| delta-bo | delta-bo | optimization | commands | chem_delta-bo_commands |
|
|
36
|
-
| delta-bo | delta-bo | optimization | generate | chem_delta-bo_generate |
|
|
37
|
-
| ldm-bo | ldm-bo | molecule-optimization | health | chem_ldm-bo_health |
|
|
38
|
-
| ldm-bo | ldm-bo | molecule-optimization | recommend | chem_ldm-bo_recommend |
|
|
39
|
-
| ldm-bo | ldm-bo | molecule-optimization | trajectory | chem_ldm-bo_trajectory |
|
|
40
|
-
| synbo | synbo-service | reaction-optimization | health | chem_synbo_health |
|
|
41
|
-
| synbo | synbo-service | reaction-optimization | initialize | chem_synbo_initialize |
|
|
42
|
-
| synbo | synbo-service | reaction-optimization | optimize | chem_synbo_optimize |
|
|
43
|
-
| antbo | antbo-service | antibody-optimization | health | biology_antbo_health |
|
|
44
|
-
| antbo | antbo-service | antibody-optimization | run-default-job | biology_antbo_run_default_job |
|
|
45
|
-
| antbo | antbo-service | antibody-optimization | run | biology_antbo_run |
|
|
46
|
-
| antbo | antbo-service | antibody-optimization | log | biology_antbo_log |
|
|
47
|
-
| antbo | antbo-service | antibody-optimization | jobs | biology_antbo_jobs |
|
|
48
|
-
| antbo | antbo-service | antibody-optimization | stop | biology_antbo_stop |
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
# Delta Science operation 最小契约
|
|
2
|
-
|
|
3
|
-
本文只记录当前 CLI catalog 已暴露的 9 个 tools、42 个 operations。选择 operation 后
|
|
4
|
-
只读取对应小节。代码示例均在同一个 `python_repl` 中先定义以下函数;禁止 Bash、
|
|
5
|
-
目录探测、直接 HTTP 和字面 CLI 命令。
|
|
6
|
-
|
|
7
|
-
调用 `python_repl` 时工具参数必须严格为 `{"code":"..."}`;禁止添加 `deps`、
|
|
8
|
-
`dependencies`、`packages` 或任何其他字段。
|
|
9
|
-
|
|
10
|
-
```python
|
|
11
|
-
import json, os, subprocess, sys
|
|
12
|
-
|
|
13
|
-
wrapper = os.path.join(os.environ["SKILLS_ROOT"], "delta-science", "scripts", "invoke.py")
|
|
14
|
-
|
|
15
|
-
def invoke(tool, endpoint, data=None, params=None):
|
|
16
|
-
argv = [sys.executable, wrapper, "--tool", tool, "--endpoint", endpoint]
|
|
17
|
-
if data is not None:
|
|
18
|
-
argv += ["--data-json", json.dumps(data)]
|
|
19
|
-
if params is not None:
|
|
20
|
-
argv += ["--params-json", json.dumps(params)]
|
|
21
|
-
p = subprocess.run(argv, capture_output=True, text=True, shell=False)
|
|
22
|
-
if p.returncode != 0:
|
|
23
|
-
raise RuntimeError(p.stderr or p.stdout)
|
|
24
|
-
r = json.loads(p.stdout)
|
|
25
|
-
if r.get("ok") is not True or r.get("transport") != "delta-cli":
|
|
26
|
-
raise RuntimeError(r)
|
|
27
|
-
return r["native"]
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
每个代码示例只调用一次。将返回值投影成用户要求的有界 JSON 并显式 `print`,然后
|
|
31
|
-
调用 `step_finish(status="done", summary=<同一 JSON>)` 恰好一次。失败则
|
|
32
|
-
`step_finish(status="failed", summary=<原始错误短摘要>)`,禁止重试或改走其他链路。
|
|
33
|
-
|
|
34
|
-
## PubChem(tool=`pubchem`)
|
|
35
|
-
|
|
36
|
-
| operation | 人类情景 | 最小代码 | native 投影 |
|
|
37
|
-
| --- | --- | --- | --- |
|
|
38
|
-
| `health` | “PubChem 服务现在能用吗?” | `n=invoke("pubchem","health")` | status、availability、metadata、limits、warnings |
|
|
39
|
-
| `compound-resolve-cids` | “把 aspirin 解析成 CID。” | `n=invoke("pubchem","compound-resolve-cids",data={"identifier":"aspirin","namespace":"name","max_records":20})` | identifier、valid、cids、error |
|
|
40
|
-
| `compound-properties` | “查 aspirin 的分子式和分子量。” | `n=invoke("pubchem","compound-properties",data={"identifier":"aspirin","namespace":"name","properties":["MolecularFormula","MolecularWeight"]})` | cid、valid、properties、aliases、error |
|
|
41
|
-
| `compound-synonyms` | “列出 aspirin 的前 5 个同义词。” | `n=invoke("pubchem","compound-synonyms",data={"identifier":"aspirin","namespace":"name","max_synonyms":5})` | cid、valid、synonyms、error |
|
|
42
|
-
| `compound-summary` | “查阿司匹林的基础身份信息。” | `n=invoke("pubchem","compound-summary",data={"identifier":"aspirin","namespace":"name"})` | valid、cid、properties 中用户要求的键 |
|
|
43
|
-
| `compound-batch-summary` | “一次比较 aspirin 和 caffeine 的基础属性。” | `n=invoke("pubchem","compound-batch-summary",data={"identifiers":["aspirin","caffeine"],"namespace":"name"})` | results[*].input、valid/error、properties |
|
|
44
|
-
|
|
45
|
-
## RDKit(tool=`rdkit`)
|
|
46
|
-
|
|
47
|
-
| operation | 人类情景 | 最小代码 | native 投影 |
|
|
48
|
-
| --- | --- | --- | --- |
|
|
49
|
-
| `health` | “RDKit 服务可用吗?” | `n=invoke("rdkit","health")` | status、availability、metadata、limits、warnings |
|
|
50
|
-
| `parse` | “这个 SMILES 合法吗?” | `n=invoke("rdkit","parse",data={"input":"CCO","format":"smiles","sanitize":True})` | valid、canonical_smiles、formula、inchi_key、warnings/error |
|
|
51
|
-
| `descriptors` | “计算乙醇的基础 RDKit 描述符。” | `n=invoke("rdkit","descriptors",data={"smiles":"CCO","descriptor_set":"basic","sanitize":True})` | valid、descriptors、warnings/error |
|
|
52
|
-
| `batch-descriptors` | “批量算几个 SMILES 的描述符。” | `n=invoke("rdkit","batch-descriptors",data={"smiles":["CCO","c1ccccc1"],"descriptor_set":"basic","sanitize":True})` | results 中输入、valid、descriptors、error |
|
|
53
|
-
| `batch-parse-describe` | “校验阿司匹林并给基础描述符。” | `n=invoke("rdkit","batch-parse-describe",data={"molecules":[{"id":"aspirin","smiles":"CC(=O)OC1=CC=CC=C1C(=O)O"}],"descriptor_set":"basic","sanitize":True})` | results[*].id、valid、canonical_smiles、descriptors、warnings/error |
|
|
54
|
-
| `render` | “画一张乙醇结构图。” | `n=invoke("rdkit","render",data={"smiles":"CCO","image_format":"png","width":500,"height":400})` | 指定图像字段;PNG 解码后验证 magic bytes |
|
|
55
|
-
| `fingerprint` | “生成乙醇 Morgan 指纹。” | `n=invoke("rdkit","fingerprint",data={"smiles":"CCO","radius":2,"n_bits":2048})` | valid、fingerprint_metadata、on_bits、warnings/error |
|
|
56
|
-
| `similarity` | “比较乙醇和乙胺的结构相似度。” | `n=invoke("rdkit","similarity",data={"query_smiles":"CCO","target_smiles":"CCN","radius":2,"n_bits":2048})` | similarity、metric、fingerprint metadata |
|
|
57
|
-
| `similarity-matrix` | “比较一组分子的两两相似度。” | `n=invoke("rdkit","similarity-matrix",data={"molecules":[{"id":"a","smiles":"CCO"},{"id":"b","smiles":"CCN"}],"fingerprint":{"type":"morgan","radius":2,"n_bits":2048},"sanitize":True})` | matrix、ranked_pairs[{a,b,similarity}] |
|
|
58
|
-
| `substructure` | “筛出含羧酸子结构的分子。” | `n=invoke("rdkit","substructure",data={"query_smarts":"C(=O)O","target_smiles":["CC(=O)O","CCO"]})` | query 与每个目标的 match/matches、valid/error |
|
|
59
|
-
|
|
60
|
-
## pymatgen(tool=`pymatgen`)
|
|
61
|
-
|
|
62
|
-
| operation | 人类情景 | 最小代码 | native 投影 |
|
|
63
|
-
| --- | --- | --- | --- |
|
|
64
|
-
| `health` | “pymatgen 服务是否正常?” | `n=invoke("pymatgen","health")` | status、availability、metadata、limits、warnings |
|
|
65
|
-
| `composition-parse` | “解析 LiFePO4 的组成和式量。” | `n=invoke("pymatgen","composition-parse",data={"formula":"LiFePO4","format":"formula"})` | valid、formula、reduced_formula、chemical_system、weight、element_amounts |
|
|
66
|
-
| `structure-parse` | “校验这段 CIF 能否解析。” | `n=invoke("pymatgen","structure-parse",data={"input":cif_text,"format":"cif","primitive":False})` | valid、formula、nsites、lattice、warnings/error |
|
|
67
|
-
| `structure-summary` | “总结这段 CIF 的结构信息。” | `n=invoke("pymatgen","structure-summary",data={"input":cif_text,"format":"cif","primitive":False})` | formula、reduced_formula、density、volume、lattice、species |
|
|
68
|
-
| `structure-convert` | “把 CIF 转成 POSCAR。” | `n=invoke("pymatgen","structure-convert",data={"input":cif_text,"input_format":"cif","output_format":"poscar","primitive":False})` | valid、output_format、转换后的结构文本、warnings/error |
|
|
69
|
-
| `structure-symmetry` | “分析这段 CIF 的空间群。” | `n=invoke("pymatgen","structure-symmetry",data={"input":cif_text,"format":"cif","primitive":False,"symprec":0.01,"angle_tolerance":5.0})` | space_group_symbol/number、crystal_system、point_group_symbol、hall、nsites |
|
|
70
|
-
|
|
71
|
-
## GSAS-II(tool=`gsasii`)
|
|
72
|
-
|
|
73
|
-
| operation | 人类情景 | 最小代码 | native 投影 |
|
|
74
|
-
| --- | --- | --- | --- |
|
|
75
|
-
| `health` | “GSAS-II 服务能做衍射计算吗?” | `n=invoke("gsasii","health")` | status、gsasii_available、metadata、limits、warnings |
|
|
76
|
-
| `powder-simulate` | “用这个 CIF 模拟 Cu Kα 粉末衍射。” | `n=invoke("gsasii","powder-simulate",data={"cif":cif_text,"phase_name":"phase","radiation":"CuKa","t_min":10.0,"t_max":80.0,"t_step":0.02,"include_profile":True,"max_profile_points":1000,"include_reflections":True,"max_reflections":1000,"return_refined_cif":False,"return_project":False})` | valid、profile、reflections、metadata、warnings |
|
|
77
|
-
| `powder-refine` | “用真实粉末数据和仪器文件做 Rietveld 精修。” | `n=invoke("gsasii","powder-refine",data={"powder_data":powder_text,"powder_format":"xy","instrument_parameters":instrument_text,"phases":[{"name":"phase","cif":cif_text}],"refinement_mode":"rietveld","refinement_steps":[],"max_cycles":3,"histogram_name":"powder","include_profile":True,"max_profile_points":1000,"include_reflections":True,"max_reflections":1000,"return_refined_cif":False,"return_project":False})` | valid、residuals、phase summaries、profile、reflections、warnings |
|
|
78
|
-
|
|
79
|
-
## LAMMPS(tool=`lammps`)
|
|
80
|
-
|
|
81
|
-
| operation | 人类情景 | 最小代码 | native 投影 |
|
|
82
|
-
| --- | --- | --- | --- |
|
|
83
|
-
| `health` | “LAMMPS 服务可用吗?” | `n=invoke("lammps","health")` | status、lammps_available、metadata、limits、warnings |
|
|
84
|
-
| `lj-melt-example` | “给我跑部署自带的最小 LJ 示例做检查。” | `n=invoke("lammps","lj-melt-example")` | 示例说明与精确 `request`;此调用本身不执行模拟 |
|
|
85
|
-
| `run` | “执行刚才返回的最小 LJ 请求。” | `example=invoke("lammps","lj-melt-example"); n=invoke("lammps","run",data=example["request"])` | valid、last_thermo、thermo rows、warnings、请求的输出文件;此场景固定两次依赖调用 |
|
|
86
|
-
|
|
87
|
-
`run` 也可接收用户明确提供的 `input_script`、相对路径 files、timeout 和有界输出配置;
|
|
88
|
-
不得从化学式猜力场。长任务需明确授权,失败后不得重试。
|
|
89
|
-
|
|
90
|
-
## Delta-BO(tool=`delta-bo`)
|
|
91
|
-
|
|
92
|
-
| operation | 人类情景 | 最小代码 | native 投影 |
|
|
93
|
-
| --- | --- | --- | --- |
|
|
94
|
-
| `commands` | “当前 Delta-BO 支持哪些命令?” | `n=invoke("delta-bo","commands")` | 当前部署返回的命令列表,不从旧文档补充 |
|
|
95
|
-
| `generate` | “在 0 到 1 之间给两个随机初始实验点。” | `n=invoke("delta-bo","generate",data={"params":[{"name":"x","type":"numeric","low":0.0,"high":1.0}],"num_suggestions":2,"algorithm":"random-search","seed":42})` | suggestions、suggestion_metadata、warnings、diversity |
|
|
96
|
-
|
|
97
|
-
有历史观测且用户明确要求 BO 时,`generate` 可加入 objectives、object-form histories、
|
|
98
|
-
model/acquisition/solver;历史少于 5 条默认 random-search,不编造观测。
|
|
99
|
-
|
|
100
|
-
## LDM-BO(tool=`ldm-bo`)
|
|
101
|
-
|
|
102
|
-
只用于小分子 SMILES/PDF2Dock,不用于抗体、CDRH3 或 AntBO。
|
|
103
|
-
|
|
104
|
-
| operation | 人类情景 | 最小代码 | native 投影 |
|
|
105
|
-
| --- | --- | --- | --- |
|
|
106
|
-
| `health` | “分子 LDM-BO 服务可用吗?” | `n=invoke("ldm-bo","health")` | availability、Vina/ReaSyn/模型/LLM 配置状态、warnings |
|
|
107
|
-
| `recommend` | “从候选池给下一条小分子 SMILES。” | `n=invoke("ldm-bo","recommend",data={"method":"bo-tanimoto","pool":["CCO","CCN","CCC"],"history":[{"smiles":"CCO","scores":[-7.1]},{"smiles":"CCN","scores":[-6.8]}],"batch_size":1})` | recommendations、acquisition_values、n_objectives、llm diagnostics |
|
|
108
|
-
| `trajectory` | “跑一个有界的小分子 BO 轨迹。” | `n=invoke("ldm-bo","trajectory",data={"method":"bo-tanimoto","seed":42,"seed-smiles":"CCO,CCN,CCC","num-evaluations":4,"batch-size":1,"objective":"vina+nn"})` | config、history、summary、llm_trajectory;保留连字符字段 |
|
|
109
|
-
|
|
110
|
-
## SynBO(tool=`synbo`)
|
|
111
|
-
|
|
112
|
-
| operation | 人类情景 | 最小代码 | native 投影 |
|
|
113
|
-
| --- | --- | --- | --- |
|
|
114
|
-
| `health` | “SynBO 服务当前可用吗?” | `n=invoke("synbo","health")` | status、synbo_available、metadata、limits、runtime、warnings |
|
|
115
|
-
| `initialize` | “没有实验历史,先选三组反应条件。” | `n=invoke("synbo","initialize",data={"condition_dict":{"catalyst":["Pd(OAc)2","Pd(PPh3)4"],"solvent":["THF","Toluene"],"base":["K2CO3","DBU"]},"opt_metrics":["yield"],"opt_metric_settings":[{"opt_direct":"max","opt_range":[0,100],"metric_weight":1.0}],"batch_size":3,"sampling_method":"random","desc_normalize":"minmax","random_seed":42})` | recommendations/initial conditions、warnings、metadata |
|
|
116
|
-
| `optimize` | “根据真实历史收率推荐下一批条件。” | `n=invoke("synbo","optimize",data={"condition_dict":{"catalyst":["Pd(OAc)2","Pd(PPh3)4","Pd2(dba)3"],"solvent":["THF","Dioxane","Toluene"],"base":["K2CO3","NaOEt","DBU"]},"opt_metrics":["yield"],"previous_results":[{"batch":0,"catalyst":"Pd(OAc)2","solvent":"THF","base":"K2CO3","yield":42.0},{"batch":0,"catalyst":"Pd(PPh3)4","solvent":"Dioxane","base":"NaOEt","yield":55.0},{"batch":0,"catalyst":"Pd2(dba)3","solvent":"Toluene","base":"DBU","yield":63.0}],"batch_size":2,"accuracy":"tiny","device":"cpu","random_seed":42})` | recommendations、model/acquisition metadata、warnings;失败/空结果不得本地替代 |
|
|
117
|
-
|
|
118
|
-
## AntBO(tool=`antbo`)
|
|
119
|
-
|
|
120
|
-
抗体/CDRH3 场景即使出现 “LDM” 也必须路由到 AntBO,不得改用分子 LDM-BO。
|
|
121
|
-
|
|
122
|
-
| operation | 人类情景 | 最小代码 | native 投影 |
|
|
123
|
-
| --- | --- | --- | --- |
|
|
124
|
-
| `health` | “AntBO 环境可用吗?” | `n=invoke("antbo","health")` | status、antbo_available、metadata、limits、warnings |
|
|
125
|
-
| `run-default-job` | “启动标准 AntBO 后台任务。” | `n=invoke("antbo","run-default-job",params={"log_name":"antbo_<唯一时间戳>.log","append":False,"timeout_seconds":86400})` | started、pid、log_name/log_path、timeout_seconds |
|
|
126
|
-
| `run` | “用明确的受限配置同步跑一次 AntBO。” | `n=invoke("antbo","run",data={"script_path":"./bo/main.py","config_path":"./bo/config.yaml","n_trials":1,"seed":42,"antigens_file":"<项目根内路径>","extra_args":[],"timeout_seconds":86400,"cuda_visible_devices":"0","conda_env":"DGM","log_name":"antbo_custom.log","append":False})` | ok、returncode、timed_out、log_path、log_truncated |
|
|
127
|
-
| `log` | “查看 antbo_run.log 的尾部。” | `n=invoke("antbo","log",params={"log_name":"antbo_run.log"})` | log_name、log、log_truncated |
|
|
128
|
-
| `jobs` | “查看当前活动 AntBO 作业。” | `n=invoke("antbo","jobs")` | jobs[*].pid/running/returncode/log_name/log_path |
|
|
129
|
-
| `stop` | “停止 PID 12345。” | `n=invoke("antbo","stop",params={"pid":12345})` | stopped、pid、message |
|
|
130
|
-
|
|
131
|
-
`run-default-job`、`run`、`stop` 是远程变更,必须有用户明确授权,未知结果不得重试。
|
|
132
|
-
AntBO `ldm/suggest`、`ldm/initialize`、`ldm/evaluate` 当前不在 catalog:不调用工具,
|
|
133
|
-
固定报告“未暴露该 operation;未发送远端请求”。
|
|
134
|
-
|
|
135
|
-
注意:AntBO `health` 可能公布公司服务内部的 `ldm_suggest` 等 endpoint,但它们并不
|
|
136
|
-
因此成为 Delta CLI operation;禁止调用不存在的 `antbo/catalog`,也禁止根据 health
|
|
137
|
-
为 Memento 推导新的 endpoint。
|