skillfree 0.1.65 → 0.1.66
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/SKILL.md +13 -5
- package/package.json +1 -1
- package/scripts/commands/pilot.js +46 -3
package/SKILL.md
CHANGED
|
@@ -156,8 +156,11 @@ skillfree pilot --type pharma --target "IL-4" --status "III期临床"
|
|
|
156
156
|
# 翻页(默认第1页)
|
|
157
157
|
skillfree pilot --type pharma --target "STAT6" --page 2
|
|
158
158
|
|
|
159
|
-
#
|
|
160
|
-
skillfree pilot --type pharma --model bcpm-drug-detail --
|
|
159
|
+
# 查询药物详情(自动查 keyid)
|
|
160
|
+
skillfree pilot --type pharma --model bcpm-drug-detail --drug "替雷利珠单抗"
|
|
161
|
+
|
|
162
|
+
# 查询全球临床试验结果(自动查 keyid)⭐ 新增
|
|
163
|
+
skillfree pilot --type pharma --model bcpm-clinical-result --drug "信迪利单抗"
|
|
161
164
|
|
|
162
165
|
# 查询中国临床试验
|
|
163
166
|
skillfree pilot --type pharma --model bcpm-cn-clinical --drug "度普利尤单抗"
|
|
@@ -175,18 +178,23 @@ skillfree pilot --type pharma --target "STAT6" --output result.json
|
|
|
175
178
|
| model | 说明 | 主要参数 |
|
|
176
179
|
|-------|------|---------|
|
|
177
180
|
| `bcpm-drug-dev`(默认)| 全球药物研发管线 | --target / --drug / --indication / --company / --status |
|
|
178
|
-
| `bcpm-drug-detail` | 药物详细信息(含销售额、适应症进展)| --keyid
|
|
181
|
+
| `bcpm-drug-detail` | 药物详细信息(含销售额、适应症进展)| --drug(自动查 keyid)或 --keyid |
|
|
182
|
+
| `bcpm-clinical-result` | 全球临床试验结果 ⭐ 新增 | --drug(自动查 keyid)或 --keyid |
|
|
179
183
|
| `bcpm-cn-clinical` | 中国临床试验注册 | --drug / --sponsor / --indication |
|
|
180
184
|
| `bcpm-cn-evaluation` | 中国药品申报/评审 | --drug / --company |
|
|
181
185
|
|
|
182
|
-
|
|
186
|
+
**典型工作流(已简化):**
|
|
183
187
|
|
|
184
188
|
```bash
|
|
189
|
+
# 方式一:直接用药品名(推荐)⭐
|
|
190
|
+
skillfree pilot --type pharma --model bcpm-clinical-result --drug "信迪利单抗"
|
|
191
|
+
|
|
192
|
+
# 方式二:手动两步(如果需要精确控制)
|
|
185
193
|
# 第一步:查管线,找到目标药物的 keyid
|
|
186
194
|
skillfree pilot --type pharma --target "STAT6"
|
|
187
195
|
# 输出中会显示每个药物的 keyid
|
|
188
196
|
|
|
189
|
-
# 第二步:用 keyid
|
|
197
|
+
# 第二步:用 keyid 查详情
|
|
190
198
|
skillfree pilot --type pharma --model bcpm-drug-detail --keyid 0b0566619e92554c97b384c0e4c9ddfd
|
|
191
199
|
```
|
|
192
200
|
|
package/package.json
CHANGED
|
@@ -224,9 +224,38 @@ async function pilot(flags) {
|
|
|
224
224
|
if (flags.title) search.title = flags.title
|
|
225
225
|
if (flags.sponsor) search.sponsor = flags.sponsor
|
|
226
226
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
let inputs
|
|
228
|
+
let keyid = flags.keyid ?? prompt
|
|
229
|
+
|
|
230
|
+
// bcpm-clinical-result / bcpm-drug-detail 特殊处理:如果没有 keyid 但有 drug,自动查询获取 keyid
|
|
231
|
+
if ((pharmaModel === 'bcpm-clinical-result' || pharmaModel === 'bcpm-drug-detail') && !keyid && search.drug_name) {
|
|
232
|
+
console.log(`🔍 自动查询 "${search.drug_name}" 的 keyid...`)
|
|
233
|
+
const drugRes = await post('/pharma', {
|
|
234
|
+
model: 'bcpm-drug-dev',
|
|
235
|
+
inputs: { search: { drug_name: search.drug_name }, page: 1 }
|
|
236
|
+
})
|
|
237
|
+
if (drugRes.error) {
|
|
238
|
+
console.error(`❌ 查询药物失败: ${drugRes.error.message}`)
|
|
239
|
+
return
|
|
240
|
+
}
|
|
241
|
+
const list = drugRes.data?.list || []
|
|
242
|
+
if (list.length === 0) {
|
|
243
|
+
console.error(`❌ 未找到药物: ${search.drug_name}`)
|
|
244
|
+
return
|
|
245
|
+
}
|
|
246
|
+
keyid = list[0].keyid
|
|
247
|
+
console.log(`✅ 找到药物: ${list[0].drug_name_cn || list[0].drug_name} (keyid: ${keyid})\n`)
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (pharmaModel === 'bcpm-drug-detail' || pharmaModel === 'bcpm-clinical-result') {
|
|
251
|
+
if (!keyid) {
|
|
252
|
+
console.error(`❌ ${pharmaModel} 需要 --keyid 或 --drug 参数`)
|
|
253
|
+
return
|
|
254
|
+
}
|
|
255
|
+
inputs = { keyid, page: Number(flags.page ?? 1) }
|
|
256
|
+
} else {
|
|
257
|
+
inputs = { search, page: Number(flags.page ?? 1) }
|
|
258
|
+
}
|
|
230
259
|
|
|
231
260
|
const res = await post('/pharma', { model: pharmaModel, inputs })
|
|
232
261
|
|
|
@@ -267,6 +296,20 @@ async function pilot(flags) {
|
|
|
267
296
|
console.log(` • ${s.year} ${s.company}: ${s.sales}`)
|
|
268
297
|
})
|
|
269
298
|
}
|
|
299
|
+
} else if (pharmaModel === 'bcpm-clinical-result') {
|
|
300
|
+
// 临床试验结果
|
|
301
|
+
const list = data.list || []
|
|
302
|
+
const total = data.total || list.length
|
|
303
|
+
console.log(`共 ${total} 条结果,当前显示 ${list.length} 条\n`)
|
|
304
|
+
list.slice(0, 10).forEach((item, i) => {
|
|
305
|
+
console.log(`${i + 1}. [${item.registration_number}] ${item.title}`)
|
|
306
|
+
console.log(` 适应症: ${(item.indication || []).join(', ')}`)
|
|
307
|
+
console.log(` 分期: ${item.phase}`)
|
|
308
|
+
if (item.representative_data) console.log(` 代表性数据: ${item.representative_data}`)
|
|
309
|
+
if (item.result_tendency) console.log(` 结果趋势: ${item.result_tendency}`)
|
|
310
|
+
if (item.abstract?.length) console.log(` 摘要: ${item.abstract[0].slice(0, 150)}...`)
|
|
311
|
+
console.log('')
|
|
312
|
+
})
|
|
270
313
|
} else {
|
|
271
314
|
const list = data.list || []
|
|
272
315
|
const total = data.total || list.length
|