@delta-infra/cli 1.0.76 → 1.0.78

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 (50) hide show
  1. package/README.md +405 -405
  2. package/checksums.txt +5 -5
  3. package/package.json +1 -1
  4. package/scripts/install-wizard.js +610 -596
  5. package/scripts/install.js +400 -400
  6. package/scripts/run.js +65 -65
  7. package/skills/antbo-ldm-guard/SKILL.md +51 -51
  8. package/skills/antbo-ldm-guard/agents/openai.yaml +4 -4
  9. package/skills/antbo-service/SKILL.md +71 -71
  10. package/skills/antbo-service/agents/openai.yaml +4 -4
  11. package/skills/antbo-service/references/operations.md +45 -45
  12. package/skills/delta-bo/SKILL.md +28 -28
  13. package/skills/delta-bo/agents/openai.yaml +4 -4
  14. package/skills/delta-bo/references/endpoints.md +263 -263
  15. package/skills/delta-sandbox/SKILL.md +356 -356
  16. package/skills/delta-sandbox/agents/openai.yaml +4 -4
  17. package/skills/delta-sandbox/references/commands.md +56 -56
  18. package/skills/delta-sandbox/references/lifecycle.md +92 -92
  19. package/skills/delta-sandbox/references/recipes.md +133 -133
  20. package/skills/delta-science/SKILL.md +163 -163
  21. package/skills/delta-science/agents/openai.yaml +4 -4
  22. package/skills/delta-science/references/cli-contract.md +84 -84
  23. package/skills/delta-science/references/services.md +112 -112
  24. package/skills/delta-science/references/workflows.md +44 -44
  25. package/skills/delta-science/scripts/invoke.py +257 -257
  26. package/skills/delta-shared/SKILL.md +95 -95
  27. package/skills/delta-shared/agents/openai.yaml +4 -4
  28. package/skills/gsasii/SKILL.md +34 -34
  29. package/skills/gsasii/agents/openai.yaml +4 -4
  30. package/skills/gsasii/references/endpoints.md +130 -130
  31. package/skills/lammps/SKILL.md +31 -31
  32. package/skills/lammps/agents/openai.yaml +4 -4
  33. package/skills/lammps/references/endpoints.md +61 -61
  34. package/skills/ldm-bo/SKILL.md +27 -27
  35. package/skills/ldm-bo/agents/openai.yaml +4 -4
  36. package/skills/ldm-bo/references/endpoints.md +127 -127
  37. package/skills/pubchem/SKILL.md +85 -85
  38. package/skills/pubchem/agents/openai.yaml +4 -4
  39. package/skills/pubchem/references/endpoints.md +122 -122
  40. package/skills/pubchem/references/operations.md +41 -41
  41. package/skills/pymatgen/SKILL.md +46 -46
  42. package/skills/pymatgen/agents/openai.yaml +4 -4
  43. package/skills/pymatgen/references/endpoints.md +66 -66
  44. package/skills/rdkit/SKILL.md +104 -104
  45. package/skills/rdkit/agents/openai.yaml +4 -4
  46. package/skills/rdkit/references/endpoints.md +133 -133
  47. package/skills/rdkit/references/operations.md +64 -64
  48. package/skills/synbo-service/SKILL.md +28 -28
  49. package/skills/synbo-service/agents/openai.yaml +4 -4
  50. package/skills/synbo-service/references/endpoints.md +157 -157
@@ -1,263 +1,263 @@
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
+ # 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.