@xtalpi/agentic-lab-skills 0.0.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 (57) hide show
  1. package/README.md +1 -0
  2. package/package.json +14 -0
  3. package/skills/lab-flow-designer/SKILL.md +360 -0
  4. package/skills/lab-flow-designer/embedded-template/SKILL.md +84 -0
  5. package/skills/lab-flow-designer/embedded-template/pools//345/205/245/345/217/243/346/261/240.md +12 -0
  6. package/skills/lab-flow-designer/embedded-template/pools//345/207/272/345/217/243/346/261/240.md +12 -0
  7. package/skills/lab-flow-designer/embedded-template/scripts//347/244/272/344/276/213/346/225/260/346/215/256/344/270/216/346/240/241/351/252/214/351/227/250/346/216/247.js +149 -0
  8. package/skills/lab-flow-designer/embedded-template/valves//347/244/272/344/276/213/346/225/260/346/215/256/344/270/216/346/240/241/351/252/214/351/227/250/346/216/247.md +100 -0
  9. package/skills/lab-flow-designer/references/agentic-lab-processer.md +101 -0
  10. package/skills/lab-flow-designer/references/agentic-lab-sdk.md +440 -0
  11. package/skills/lab-flow-designer/references/rhea-api/README.md +7 -0
  12. package/skills/lab-flow-designer/references/rhea-api/execute_process_batch.md +58 -0
  13. package/skills/lab-flow-designer/references/skill-package-layout.md +199 -0
  14. package/skills/lab-flow-designer/references//344/270/232/345/212/241/346/265/201/347/250/213/346/226/207/346/241/243/346/240/207/345/207/206.md +208 -0
  15. package/skills/lab-orbit-component-builder/SKILL.md +305 -0
  16. package/skills/lab-orbit-component-builder/examples/xnb-component-template/.env.local.example +27 -0
  17. package/skills/lab-orbit-component-builder/examples/xnb-component-template/.eslintignore +7 -0
  18. package/skills/lab-orbit-component-builder/examples/xnb-component-template/.eslintrc.cjs +88 -0
  19. package/skills/lab-orbit-component-builder/examples/xnb-component-template/.nvmrc +1 -0
  20. package/skills/lab-orbit-component-builder/examples/xnb-component-template/AgenticAppAPI.md +268 -0
  21. package/skills/lab-orbit-component-builder/examples/xnb-component-template/Jenkinsfile +106 -0
  22. package/skills/lab-orbit-component-builder/examples/xnb-component-template/OrbitAPI.md +453 -0
  23. package/skills/lab-orbit-component-builder/examples/xnb-component-template/README.md +176 -0
  24. package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/public/index.html +12 -0
  25. package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/App.vue +151 -0
  26. package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/components/DevOpenerLauncher.vue +143 -0
  27. package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/global.d.ts +74 -0
  28. package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/main.ts +305 -0
  29. package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/mockXNBBitable.ts +119 -0
  30. package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/shims-vue.d.ts +6 -0
  31. package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/utils/devOpenerHost.ts +75 -0
  32. package/skills/lab-orbit-component-builder/examples/xnb-component-template/index.html +13 -0
  33. package/skills/lab-orbit-component-builder/examples/xnb-component-template/package.json +57 -0
  34. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/api/agenticlabTickets.ts +110 -0
  35. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/entries/bitable.ts +4 -0
  36. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/entries/custom-page.ts +4 -0
  37. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/index.ts +1 -0
  38. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/styles/orbit-quasar-host.scss +19 -0
  39. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/types/context.ts +15 -0
  40. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/types/xnb-context.ts +70 -0
  41. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/use/useBitablePage.ts +180 -0
  42. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/use/useSuperCellDemo.ts +257 -0
  43. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/use/useSuperTableBitableLifecycle.ts +547 -0
  44. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/utils/openerInitParams.ts +158 -0
  45. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/utils/openerTicketIds.ts +32 -0
  46. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/utils/orbitHttpClient.ts +110 -0
  47. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/utils/request.ts +92 -0
  48. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/views/bitable.vue +65 -0
  49. package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/views/custom-page.vue +140 -0
  50. package/skills/lab-orbit-component-builder/examples/xnb-component-template/tsconfig.json +48 -0
  51. package/skills/lab-orbit-component-builder/examples/xnb-component-template/vite.config.ts +165 -0
  52. package/skills/lab-orbit-component-builder/examples/xnb-component-template/vite.dev.config.ts +51 -0
  53. package/skills/lab-orbit-component-builder/references/flow-document-human-ui.md +65 -0
  54. package/skills/lab-orbit-component-builder/references/pool-schema-to-columns.md +67 -0
  55. package/skills/lab-orbit-component-builder/references/vue-template-checklist.md +113 -0
  56. package/skills/lab-orbit-component-builder/references/xnb-context-vue-props.md +49 -0
  57. package/skills/lab-orbit-component-builder/references/xnbitable-vue-parity.md +32 -0
@@ -0,0 +1,440 @@
1
+ # Agentic Lab SDK
2
+
3
+ # API 文档
4
+
5
+ 本节为 **`this.context` 门控/SDK 能力**约定。**`process.execute`** 须传入任务数组 **`items`** 与服务根 **`baseURL`**(Rhea 或等价 Process 服务地址);单次请求的 **path、HTTP 方法** 仍与 Wire 文档一致并由 **SDK 封装**,门控不拼完整 URL。其余常见查询类能力仍以 SDK 封装为主。`items` 单项形状与 **[`rhea-api/execute_process_batch.md`](rhea-api/execute_process_batch.md)** 中请求体 `items[]` 一项对齐。
6
+
7
+ ## 门控脚本生成约定(flow-package-from-design)
8
+
9
+ 对 **`ticket.list`**、**`process.list`**、**`compound.getStock`**、**`compound.getChemicalRecord`** 等支持 **`limit` / `offset`** 的查询:若流程说明**未**明确要求分页或条数,生成门控脚本时应显式传入 **`limit: 999999`**、**`offset: 0`**,避免引擎默认小页长截断。若流程说明写了分页或「查全部」的**具体数值**,以流程说明为准。
10
+
11
+ ---
12
+
13
+ ## pool.getNext
14
+
15
+ - **别名**:`context.pool.getNext`
16
+ - **描述**:获取指定门控节点的出口池(返回出口池数组)
17
+
18
+ ```typescript
19
+ interface Pool {
20
+ id: number;
21
+ name: string;
22
+ description: string;
23
+ schema: {
24
+ fields: Array<Record<string, any>>;
25
+ };
26
+ type: PoolType;
27
+ }
28
+ async function pool.getNext(valveId: number): Promise<Pool[]>
29
+ ```
30
+
31
+ ---
32
+
33
+ ## ticket.list
34
+
35
+ - **别名**:`context.ticket.list`
36
+ - **描述**:按 `ListTicketParams` 筛选并分页返回 **`TicketListResponse`**(`{ list: Ticket[] }`)。业务上取 **`response.list`** 得到 ticket 数组。`limit` **默认 20**、`offset` **默认 0**(以引擎实现为准)。可选组合:`flow_id__in`、`order_id__in`、`pool_id__in`、`status__in`、单条主键 `id`。**`id` 仅筛选一条**;若需按多条主键召回而类型中尚无 `id__in` 等批量字段,以运行环境为准(可分次传入 `id` 调用,或改用 `pool_id__in` + `status__in` 等缩小集合)。
37
+
38
+ ```typescript
39
+ interface ListTicketParams {
40
+ flow_id__in?: number[];
41
+ order_id__in?: number[];
42
+ pool_id__in?: number[]; // 按 pool 筛选
43
+ status__in?: string[];
44
+ id?: number; // 按 ticket 筛选(单条主键)
45
+ limit: number; // 默认为 20
46
+ offset: number; // 默认为 0
47
+ }
48
+
49
+ interface Ticket {
50
+ id: number;
51
+ flow_id: number;
52
+ pool_id: number;
53
+ order_id: number;
54
+ parent_ticket_id: number;
55
+ detail: Record<string, any>;
56
+ status: string;
57
+ uuid: string;
58
+ createdAt?: Date | number;
59
+ }
60
+
61
+ /** `ticket.list` 返回体;列表字段为 `list` */
62
+ interface TicketListResponse {
63
+ list: Ticket[];
64
+ }
65
+
66
+ async function ticket.list(
67
+ params: ListTicketParams,
68
+ ): Promise<TicketListResponse>
69
+ ```
70
+
71
+ ---
72
+
73
+ ## ticket.update
74
+
75
+ - **别名**:`context.ticket.update`
76
+ - **描述**:批量更新 ticket
77
+
78
+ ```typescript
79
+ async function ticket.update(tickets: Ticket[]): Promise<void>
80
+ ```
81
+
82
+ ---
83
+
84
+ ## ticket.append
85
+
86
+ - **别名**:`context.ticket.append`
87
+ - **描述**:批量追加 ticket。`status` 未传时由引擎采用默认状态(以实现为准);`parent_ticket_id` 用于挂接父 ticket,无父子关系时可省略。
88
+
89
+ ```typescript
90
+ enum TicketStatus {
91
+ Created = 'created',
92
+ Running = 'running',
93
+ Finished = 'finished',
94
+ Failed = 'failed',
95
+ }
96
+
97
+ interface CreateTicketParams {
98
+ flow_id: number;
99
+ pool_id: number;
100
+ order_id: number;
101
+ detail: Record<string, any>;
102
+ status?: TicketStatus | string;
103
+ parent_ticket_id?: number;
104
+ }
105
+
106
+ async function ticket.append(tickets: CreateTicketParams[]): Promise<Ticket[]>
107
+ ```
108
+
109
+ ---
110
+
111
+ ## process.list
112
+
113
+ - **别名**:`context.process.list`
114
+ - **描述**:查询 Bluprint process(process/list_process)
115
+
116
+ ```typescript
117
+ interface ListProcessParams {
118
+ processIds?: string[]; // 按 exp_id 筛选
119
+ limit: number; // 默认为20
120
+ offset: number; // 默认为0
121
+ }
122
+
123
+ async function process.list(params: ListProcessParams): Promise<any>
124
+ ```
125
+
126
+ ---
127
+
128
+ ## process.execute
129
+
130
+ - **别名**:`context.process.execute`
131
+ - **描述**:流程说明中需要 **Process 执行 / 设备侧批量提交任务** 时调用。传入 **`items`**(与 Rhea 请求体 **`items` 数组**同形;每项**必填** **`process`(流程模板名)**、**`params`**;**`table_objects`** 等可选字段的拼装须由流程文档写清)及 **`baseURL`**(服务根地址,如 `https://rhea.example.com`)。**path、HTTP 方法** 由 SDK 按 Wire 固定,门控不传。返回数据形如 **`{ results: { … } }`**,具体键名以实现为准。
132
+
133
+ ```typescript
134
+ // baseURL: 服务地址
135
+ // 返回数据形如 { results: { ... } }
136
+
137
+ /** 单条任务:与 Rhea `items[]` 一项对齐;必填性以 rhea-api/execute_process_batch.md 为准 */
138
+ interface ExecuteProcessItem {
139
+ exp_name?: string;
140
+ /** 流程模板名称(流程文档中的 process / process_name) */
141
+ process: string;
142
+ priority?: number;
143
+ /** 流程参数,键值以流程文档为准 */
144
+ params: Record<string, unknown>;
145
+ /** 表对象,如 `{ 表名: { id: value } }`,以流程文档为准;无表绑定时可省略 */
146
+ table_objects?: Record<string, Record<string, unknown>>;
147
+ }
148
+
149
+ /** 典型成功响应;`results` 内字段以实现为准(如 `exp_id_list`) */
150
+ interface ExecuteProcessResult {
151
+ results?: {
152
+ exp_id_list?: string[];
153
+ [key: string]: unknown;
154
+ };
155
+ }
156
+
157
+ async function process.execute(
158
+ items: ExecuteProcessItem[],
159
+ baseURL: string,
160
+ ): Promise<ExecuteProcessResult>
161
+ ```
162
+
163
+ - **Wire 与实现参考**(供 SDK 实现者):URL 路径、方法、示例请求体见 [rhea-api/execute_process_batch.md](rhea-api/execute_process_batch.md)。
164
+ - **流程文档侧**:写明**何时调用**、**`baseURL` 语义来源**(配置键、环境变量名、或 ticket/订单字段等,由集成解析为字符串 URL)、每条 **`process`**、**`params` 键与取值来源**;若需表绑定再写 **`table_objects`**。**不要求**写 path / HTTP 方法。生成 `valves/*.md` 与 `scripts/*.js` 须能追溯到上述说明;脚本调用形态为 **`this.context.process.execute(items, baseURL)`**。
165
+
166
+ ---
167
+
168
+ ## station.list
169
+
170
+ - **别名**:`context.station.list`
171
+ - **描述**:列出所有工站
172
+
173
+ ```typescript
174
+ async function station.list(): Promise<Station[]>
175
+ ```
176
+
177
+ ---
178
+
179
+ ## compound.getStock
180
+
181
+ - **别名**:`context.compound.getStock`
182
+ - **描述**:按 NocoBase Repository 风格的 **`filter`** 查询化合物库 **库存/瓶位**(collection 如 `compound`)。`filter` 支持 `$eq`、`$in`、`$and`、`$or` 等算子,字段名与库一致,便于流程自定义任意组合条件。算子说明见 NocoBase 文档:[Filter Operators](https://docs.nocobase.com/api/database/operators)。
183
+
184
+ ```typescript
185
+ /**
186
+ * NocoBase `Repository.find` / `findOne` / `count` 等方法的 `filter` 参数形状(`$eq`、`$in`、`$and`、`$or` 等)。
187
+ * 官方算子列表:<https://docs.nocobase.com/api/database/operators>
188
+ */
189
+ type NocoBaseFilter = Record<string, unknown>;
190
+
191
+ /** 查询参数:以 `filter` 表达条件(空对象是否合法以实现为准,建议至少包含一条有效条件)。 */
192
+ interface GetCompoundStockParams {
193
+ /**
194
+ * 作用于库存 collection 的筛选;键为库字段名,例如:
195
+ * - `{ cmpd_id: { $in: ['CA1078', 'CA1079'] } }`(批量化合物编号)
196
+ * - `{ cas: { $in: ['28022-43-7'] } }`(按 CAS)
197
+ * - `{ $or: [{ cmpd_id: 'CA1' }, { barcode: { $startsWith: 'BC' } }] }`
198
+ */
199
+ filter: NocoBaseFilter;
200
+ /** 最大返回条数;默认以实现为准 */
201
+ limit?: number;
202
+ /** 分页偏移;默认以实现为准 */
203
+ offset?: number;
204
+ }
205
+
206
+ /**
207
+ * 嵌套:项目(`project` 关联对象,节选)
208
+ * 注释体例:库字段 `name`;别名:`uiSchema.title`;备注:`description`
209
+ */
210
+ interface CompoundStockProjectRef {
211
+ /** 库字段 `id`;别名:id;备注:关联主键 */
212
+ id: number;
213
+ /** 库字段 `createdAt`;别名:Created at;备注:无 */
214
+ createdAt?: string;
215
+ /** 库字段 `updatedAt`;别名:Last updated at;备注:无 */
216
+ updatedAt?: string;
217
+ /** 库字段 `project_code`;别名:项目编码;备注:以运行时为准 */
218
+ project_code?: string;
219
+ /** 库字段 `project_name`;别名:项目名称;备注:以运行时为准 */
220
+ project_name?: string;
221
+ /** 库字段 `project_link`;别名:项目链接;备注:以运行时为准 */
222
+ project_link?: string;
223
+ /** 库字段 `is_sync`;别名:是否同步;备注:以运行时为准 */
224
+ is_sync?: boolean;
225
+ /** 库字段 `createdById`;别名:Created by;备注:外键 users */
226
+ createdById?: number | null;
227
+ /** 库字段 `updatedById`;别名:Last updated by;备注:外键 users */
228
+ updatedById?: number | null;
229
+ }
230
+
231
+ /**
232
+ * 嵌套:账户(`account` 关联对象,节选)
233
+ */
234
+ interface CompoundStockAccountRef {
235
+ /** 库字段 `id`;别名:id;备注:关联主键 */
236
+ id: number;
237
+ createdAt?: string;
238
+ updatedAt?: string;
239
+ /** 库字段 `account`;别名:Account;备注:账户编码等 */
240
+ account?: string;
241
+ /** 库字段 `name`;别名:name;备注:账户名称 */
242
+ name?: string;
243
+ createdById?: number | null;
244
+ updatedById?: number | null;
245
+ }
246
+
247
+ /**
248
+ * 嵌套:品类(`category` 关联对象,节选)
249
+ */
250
+ interface CompoundStockCategoryRef {
251
+ /** 库字段 `id`;别名:id;备注:关联主键 */
252
+ id: number;
253
+ createdAt?: string;
254
+ updatedAt?: string;
255
+ /** 库字段 `status`;别名:状态;备注:以运行时为准 */
256
+ status?: string;
257
+ /** 库字段 `category_name`;别名:Category Name;备注:品类名称 */
258
+ category_name?: string;
259
+ createdById?: number | null;
260
+ updatedById?: number | null;
261
+ }
262
+
263
+ /**
264
+ * 嵌套:最近申领人(`latest_request_user` 关联对象,节选)
265
+ * 对应 compound 上 `latest_request_user` 关联,`foreignKey` 为 `f_latest_request_user`
266
+ */
267
+ interface CompoundStockUserRef {
268
+ id: number;
269
+ createdAt?: string;
270
+ updatedAt?: string;
271
+ nickname?: string;
272
+ username?: string;
273
+ email?: string | null;
274
+ phone?: string | null;
275
+ passwordChangeTz?: string | null;
276
+ appLang?: string | null;
277
+ systemSettings?: Record<string, unknown>;
278
+ createdById?: number | null;
279
+ updatedById?: number | null;
280
+ }
281
+
282
+ /**
283
+ * 单条 compound 库存/瓶记录(与 collection `compound` 及典型 API 返回对齐)
284
+ * 字段注释:`name` = 接口/库字段 key;**别名** = `uiSchema.title`(含 i18n 模板时已展开为可读文案);**备注** = `description`(无则写「无」)
285
+ * 时间字段一般为 ISO8601 字符串
286
+ */
287
+ interface CompoundStockRecord {
288
+ /** 库字段 `id`;别名:ID;备注:无 */
289
+ id: number;
290
+ /** 库字段 `createdAt`;别名:Created at;备注:无 */
291
+ createdAt: string;
292
+ /** 库字段 `updatedAt`;别名:Last updated at;备注:无 */
293
+ updatedAt: string;
294
+ /** 库字段 `initial_checkin_time`;别名:Initial Check-in Time;备注:第一次进入系统的时间 */
295
+ initial_checkin_time?: string;
296
+ /** 库字段 `latest_checkin_time`;别名:Latest Check-in Time;备注:最近一次Check-in时间 */
297
+ latest_checkin_time?: string;
298
+ /** 库字段 `latest_checkout_time`;别名:Latest Check-out Time;备注:最近一次Check-out时间 */
299
+ latest_checkout_time?: string | null;
300
+ /** 库字段 `cas`;别名:CAS;备注:无 */
301
+ cas: string;
302
+ /** 库字段 `po_num`;别名:PO Num;备注:无 */
303
+ po_num?: string;
304
+ /** 库字段 `f_account`;别名:f_account;备注:外键 → account(化合物关联的客户) */
305
+ f_account?: number;
306
+ /** 库字段 `f_project`;别名:f_project;备注:外键 → project(化合物关联的项目) */
307
+ f_project?: number;
308
+ /** 库字段 `source`;别名:Source;备注:BB来源的供应商 */
309
+ source?: string;
310
+ /** 库字段 `barcode`;别名:Barcode;备注:全局唯一 */
311
+ barcode: string;
312
+ /** 库字段 `cmpd_id`;别名:CMPD-ID;备注:对应于自主实验室申请的Compound ID,示例:CA1078 */
313
+ cmpd_id: string;
314
+ /** 库字段 `owner`;别名:Owner;备注:化合物的归属人,邮箱 */
315
+ owner?: string;
316
+ /** 库字段 `f_category`;别名:f_category;备注:外键 → category(化合物种类) */
317
+ f_category?: number;
318
+ /** 库字段 `hazard_class_adr`;别名:HazardClassAdr;备注:危险品等级 */
319
+ hazard_class_adr?: string | null;
320
+ /** 库字段 `odor`;别名:Odor;备注:气味 */
321
+ odor?: string;
322
+ /** 库字段 `initial_amount`;别名:Initial Amount;备注:第一次进入系统的原料重量(新瓶子),单位mg */
323
+ initial_amount?: number;
324
+ /** 库字段 `initial_weight`;别名:Initial Weight;备注:第一次进入系统的瓶子重量(新瓶子),单位g */
325
+ initial_weight?: number;
326
+ /** 库字段 `latest_weight`;别名:Latest Weight;备注:当前瓶重,每一次重新回到系统后更新,单位g */
327
+ latest_weight?: number;
328
+ /** 库字段 `latest_amount_mg`;别名:Latest Amount(mg);备注:原料的当前实际重量,每次Check-in时重新计算 */
329
+ latest_amount_mg?: number;
330
+ /** 库字段 `latest_amount_ml`;别名:Latest Amount(mL);备注:当前实际重量,单位mL,手填 */
331
+ latest_amount_ml?: number | null;
332
+ /** 库字段 `latest_location`;别名:Latest Location;备注:当前位置 */
333
+ latest_location?: string;
334
+ /** 库字段 `location_detail`;别名:Location Detail;备注:详细位置信息 */
335
+ location_detail?: Record<string, unknown>;
336
+ /** 库字段 `f_latest_request_user`;别名:f_latest_request_user;备注:外键 → users(申请出库使用者) */
337
+ f_latest_request_user?: number;
338
+ /** 库字段 `status`;别名:Status;备注:无(可选值如:可用、已预约、已出库、已核销) */
339
+ status?: string;
340
+ /** 库字段 `checkin_user`;别名:Check-in User;备注:初始入库用户的邮箱, 由orbit提交 */
341
+ checkin_user?: string;
342
+ /** 库字段 `checkout_user`;别名:Check-out User;备注:出库用户的邮箱, 由orbit提交 */
343
+ checkout_user?: string;
344
+ /** 库字段 `chemical_name`;别名:Chemical Name;备注:无 */
345
+ chemical_name?: string | null;
346
+ /** 库字段 `createdById`;别名:Created by(外键);备注:无 */
347
+ createdById?: number | null;
348
+ /** 库字段 `updatedById`;别名:Last updated by(外键);备注:无 */
349
+ updatedById?: number | null;
350
+ /** 库字段 `project`(关联);别名:Project;备注:化合物关联的项目 */
351
+ project?: CompoundStockProjectRef;
352
+ /** 库字段 `account`(关联);别名:Account;备注:化合物关联的客户 */
353
+ account?: CompoundStockAccountRef;
354
+ /** 库字段 `category`(关联);别名:Category;备注:化合物种类 */
355
+ category?: CompoundStockCategoryRef;
356
+ /** 库字段 `latest_request_user`(关联);别名:Latest Request User;备注:申请出库使用者 */
357
+ latest_request_user?: CompoundStockUserRef;
358
+ }
359
+
360
+ async function compound.getStock(
361
+ params: GetCompoundStockParams
362
+ ): Promise<CompoundStockRecord[]>
363
+ ```
364
+
365
+ ---
366
+
367
+ ## compound.getChemicalRecord
368
+
369
+ - **别名**:`context.compound.getChemicalRecord`
370
+ - **描述**:按 NocoBase **`filter`** 查询 **化合物知识库** `chemical_record`(可分装性、化性状、备注等),与库存 `compound.getStock` 区分;算子与 `GetCompoundStockParams.filter` 相同,见 [Filter Operators](https://docs.nocobase.com/api/database/operators)。
371
+
372
+ ```typescript
373
+ type NocoBaseFilter = Record<string, unknown>;
374
+
375
+ /** 查询参数:以 `filter` 描述对 `chemical_record` 的筛选。 */
376
+ interface GetChemicalRecordParams {
377
+ /**
378
+ * 示例:`{ cmpd_id: { $in: ['CA1078'] } }`;
379
+ * `{ compound_id: { $in: ['28022-43-7'] } }`(业务将 CAS 存于 `compound_id` 时);
380
+ * `{ dispensable: { $isTruly: true } }`(布尔字段算子见 NocoBase 文档)。
381
+ */
382
+ filter: NocoBaseFilter;
383
+ limit?: number;
384
+ offset?: number;
385
+ }
386
+
387
+ /**
388
+ * 单条 `chemical_record` 化合物知识库记录(与 collection 元数据及典型 API 返回对齐)
389
+ * 字段注释:库字段 `name`;**别名** = `uiSchema.title`;**备注** = `description`(无则写「无」)
390
+ */
391
+ interface ChemicalRecord {
392
+ /** 库字段 `id`;别名:ID;备注:无 */
393
+ id: number;
394
+ /** 库字段 `createdAt`;别名:Created at;备注:无 */
395
+ createdAt: string;
396
+ /** 库字段 `updatedAt`;别名:Last updated at;备注:无 */
397
+ updatedAt: string;
398
+ /** 库字段 `compound_id`;别名:Compound ID (CAS#);备注:无 */
399
+ compound_id: string;
400
+ /** 库字段 `cmpd_id`;别名:CMPD-ID;备注:无 */
401
+ cmpd_id: string;
402
+ /** 库字段 `business_type`;别名:Business Type;备注:无(可选值如:Fragment、VAST、D2B) */
403
+ business_type?: string;
404
+ /** 库字段 `chemist_property`;别名:Chemist Property;备注:性状(Chemist) */
405
+ chemist_property?: string[];
406
+ /** 库字段 `dispensable`;别名:Dispensable;备注:可分装判断(Chemist) */
407
+ dispensable: boolean;
408
+ /** 库字段 `dispensing_remark`;别名:Dispensing Remark;备注:不可分装备注(Chemist) */
409
+ dispensing_remark?: string[];
410
+ /** 库字段 `large_particle`;别名:Large Particle;备注:固体颗粒过大(Large Particle) */
411
+ large_particle?: boolean | null;
412
+ /**
413
+ * 库字段 `poor_flowability`;别名:Poor Flowability;备注:流动性差(Poor Flowability)
414
+ * 库类型为 string;若历史数据为 boolean,以实现为准
415
+ */
416
+ poor_flowability?: string | null;
417
+ /** 库字段 `hygroscopicity`;别名:Hygroscopicity;备注:强吸水性(Hygroscopicity) */
418
+ hygroscopicity?: boolean | null;
419
+ /** 库字段 `agglomeration_tendency`;别名:Agglomeration Tendency;备注:易结块(Agglomeration Tendency) */
420
+ agglomeration_tendency?: boolean | null;
421
+ /** 库字段 `sticky`;别名:Sticky;备注:易粘黏(Sticky) */
422
+ sticky?: boolean | null;
423
+ /** 库字段 `strong_electrostatic_adsorption`;别名:Strong Electrostatic Adsorption;备注:强静电吸附(Strong Electrostatic Adsorption) */
424
+ strong_electrostatic_adsorption?: boolean | null;
425
+ /** 库字段 `remark`;别名:Remark;备注:无(schema 默认文案见数据源配置) */
426
+ remark?: string;
427
+ /** 库字段 `duplicate_check`;别名:Duplicate Check;备注:重复判断 */
428
+ duplicate_check?: string;
429
+ /** 库字段 `lark_record_id`;别名:Lark Record ID;备注:无 */
430
+ lark_record_id?: string;
431
+ /** 库字段 `createdById`;别名:Created by(外键);备注:无 */
432
+ createdById?: number | null;
433
+ /** 库字段 `updatedById`;别名:Last updated by(外键);备注:无 */
434
+ updatedById?: number | null;
435
+ }
436
+
437
+ async function compound.getChemicalRecord(
438
+ params: GetChemicalRecordParams
439
+ ): Promise<ChemicalRecord[]>
440
+ ```
@@ -0,0 +1,7 @@
1
+ # Rhea HTTP 参考(补充)
2
+
3
+ 本目录为 **Rhea 等服务端点** 的 Wire 级说明,供 **SDK 实现与预检对照**;[`../agentic-lab-sdk.md`](../agentic-lab-sdk.md) 中的 **`process.execute`** 由门控传入 **`items`** 与 **`baseURL`**(服务根),**path、HTTP 方法** 仍由 SDK 按本目录文档固定封装。
4
+
5
+ | 文件 | 说明 |
6
+ |------|------|
7
+ | [execute_process_batch.md](execute_process_batch.md) | `execute_process_batch`:URL、请求体 `items` / `process` / `params` / `table_objects`、响应 `exp_id_list` 等 |
@@ -0,0 +1,58 @@
1
+ | 批量提交任务 | |
2
+ | ------ | --------------------------------------------------------- |
3
+ | url | http://127.0.0.1:8080/api/process/execute\_process\_batch |
4
+ | 方法 | post |
5
+
6
+ ## **参数**
7
+
8
+ | 参数名称 | 参数说明 | 参数类型 | 是否必填 | 示例 |
9
+ |----------------------|--------------|----------|-------------------|------------------------------------------|
10
+ | items | 耗材属性<br>list<br>必填 | list | 是 | - |
11
+ | ├─ exp_name | 实验名称 | string | 否 | |
12
+ | ├─ process | 流程模板名称 | string | 是 | "One_to_one" |
13
+ | ├─ priority | 流程优先级 | int | 否,默认为2,数值越高,优先级越高 | |
14
+ | ├─ params | 流程参数 | dict | 是 | 如下所示(JSON):<br>{<br>&nbsp;&nbsp;"@spoon_calib": "",<br>&nbsp;&nbsp;"@second_spoon_calib": "calib",<br>&nbsp;&nbsp;"@calib_retry_times": 0,<br>&nbsp;&nbsp;"@setting_calib_retry_times": 3,<br>&nbsp;&nbsp;"@add_times": 0<br>} |
15
+ | └─ table_objects | 表对象 | dict | 否(可选) | {表名: {id: value}};无表绑定时可省略或 `{}` |
16
+
17
+ ```python
18
+ url = f"{base_url}/process/execute_process_batch"
19
+ # process_name = "One_to_more"
20
+ process_name = "workflow_demo_s1"
21
+
22
+ data = {
23
+ "items": [
24
+ {
25
+ "exp_name": "",
26
+ "process": process_name,
27
+ "params": {
28
+ "@spoon_calib": False,
29
+ "@second_spoon_calib": True,
30
+ "@calib_retry_times": 0,
31
+ "@setting_calib_retry_times": 3,
32
+ "@add_times": 0},
33
+ "table_objects": {}
34
+ },
35
+ {
36
+ "exp_name": "",
37
+ "process": process_name,
38
+ "params": {
39
+ "@spoon_calib": False,
40
+ "@second_spoon_calib": True,
41
+ "@calib_retry_times": 0,
42
+ "@setting_calib_retry_times": 3,
43
+ "@add_times": 0},
44
+ "table_objects": {}
45
+ },
46
+ ]
47
+ }
48
+
49
+ response = requests.post(url, json=data)
50
+ print(response)
51
+ print(response.json())
52
+ ```
53
+
54
+ ## **返回值**
55
+
56
+ | 参数名称 | 参数说明 | 参数类型 | 示例 |
57
+ |------------|-------------------|----------|------|
58
+ | results | 批量提交任务的exp_id | json | {<br>&nbsp;&nbsp;"results": {<br>&nbsp;&nbsp;&nbsp;&nbsp;"exp_id_list": [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"86cc6fcc-6066-48be-a87a-66f5c370bba5",<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"6c0719d1-cee8-49ed-bdd5-4c89d83c03da"<br>&nbsp;&nbsp;&nbsp;&nbsp;]<br>&nbsp;&nbsp;}<br>} |