ai4l-library-dev 0.1.1 → 0.1.2
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/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -271,20 +271,20 @@ var pkg = (() => {
|
|
|
271
271
|
var INSTRUCTIONS = `ai4l-library builds a local library of the scientific papers cited by evidence reviews. Given a paper ID ("type:value", e.g. pmid:30955454; bare digits count as pmid) it fetches the paper's record and stores it as files under the library directory. Nothing flows through your context: the server writes to disk itself and returns only a small JSON status per call. One ID per call \u2014 no batches.
|
|
272
272
|
|
|
273
273
|
Tools:
|
|
274
|
-
- library_add(id
|
|
274
|
+
- library_add(id) \u2014 build the entry for one ID and return its status. Idempotent: an existing entry is returned without any network call.
|
|
275
275
|
- library_status(id) \u2014 read-only: the entry's status, or level "missing".
|
|
276
276
|
- get_version() \u2014 package name, version and the resolved library directory.
|
|
277
277
|
|
|
278
278
|
Status JSON fields: requested, type, id, entry, entry_dir, library_dir, pmid, pmcid, doi, title, first_author, year, publication_types, retracted, level, version, retrieved_by, retrieved_date, attempts, files, and error when the call could not produce an entry ("invalid id", "type not supported yet", "pmid not found", or a fetch failure).
|
|
279
279
|
|
|
280
|
-
v0.1: pmid: IDs only (other types return error "type not supported yet"); the pubmed tier only, so every entry is level "abstract" (efetch XML, abstract Markdown, meta)
|
|
280
|
+
v0.1: pmid: IDs only (other types return error "type not supported yet"); the pubmed tier only, so every entry is level "abstract" (efetch XML, abstract Markdown, meta).`;
|
|
281
281
|
var idSchema = z.string().describe('Paper ID as "type:value", e.g. "pmid:30955454"; bare digits count as pmid.');
|
|
282
282
|
var json = (s) => ({ content: [{ type: "text", text: JSON.stringify(s, null, 2) }] });
|
|
283
283
|
function registerTools(server2) {
|
|
284
284
|
server2.tool(
|
|
285
285
|
"library_add",
|
|
286
286
|
"Build the library entry for one paper ID and return its status JSON. v0.1: pmid: only, pubmed tier only (level abstract). Idempotent \u2014 an existing entry is returned without refetching.",
|
|
287
|
-
{ id: idSchema
|
|
287
|
+
{ id: idSchema },
|
|
288
288
|
async ({ id }) => {
|
|
289
289
|
const parsed = parseId(id);
|
|
290
290
|
const status = emptyStatus(parsed.requested, parsed.type, parsed.id, LIBRARY_DIR);
|