@withpica/mcp-sdk 3.25.0 → 3.27.0
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/CHANGELOG.md +17 -0
- package/dist/index.d.ts +43 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -85,9 +85,10 @@ export function currentCatalogue() {
|
|
|
85
85
|
/**
|
|
86
86
|
* Run `fn` in the current client catalogue (its requests still name it), but
|
|
87
87
|
* leave its requests off the current call's report: for a check PICA makes
|
|
88
|
-
* for itself
|
|
89
|
-
*
|
|
90
|
-
*
|
|
88
|
+
* for itself, which must not read as the tool's own work having been
|
|
89
|
+
* answered (the MCP server judges a call "every part refused" by that
|
|
90
|
+
* report). No caller since the MCP billing gate was retired (ADR-335); kept
|
|
91
|
+
* because it is part of the published SDK.
|
|
91
92
|
*/
|
|
92
93
|
export function asideFromReport(fn) {
|
|
93
94
|
const current = catalogueContext.getStore();
|
|
@@ -987,6 +988,13 @@ class CreditsResource extends BaseResource {
|
|
|
987
988
|
async listForWork(workId) {
|
|
988
989
|
return this.request("GET", `/admin/works/${workId}/credits`);
|
|
989
990
|
}
|
|
991
|
+
/**
|
|
992
|
+
* Every credit row on a work, composition and master, one entry per row
|
|
993
|
+
* with its own id (listForWork groups per person and keeps one id).
|
|
994
|
+
*/
|
|
995
|
+
async listRowsForWork(workId) {
|
|
996
|
+
return this.request("GET", `/admin/works/${workId}/credits?view=rows`);
|
|
997
|
+
}
|
|
990
998
|
async updateForWork(workId, credits) {
|
|
991
999
|
return this.request("POST", `/admin/works/${workId}/credits`, credits);
|
|
992
1000
|
}
|
|
@@ -4405,6 +4413,24 @@ class StatementsResource extends BaseResource {
|
|
|
4405
4413
|
async ingestDocument(payload) {
|
|
4406
4414
|
return this.request("POST", "/admin/statements/ingest-agent", payload);
|
|
4407
4415
|
}
|
|
4416
|
+
/**
|
|
4417
|
+
* ADR-340: statement imports through the large-file path, as the owner's
|
|
4418
|
+
* statements page shows them (same view object).
|
|
4419
|
+
*/
|
|
4420
|
+
async listImports(q = {}) {
|
|
4421
|
+
const sp = new URLSearchParams();
|
|
4422
|
+
if (q.limit != null)
|
|
4423
|
+
sp.set("limit", String(q.limit));
|
|
4424
|
+
if (q.offset != null)
|
|
4425
|
+
sp.set("offset", String(q.offset));
|
|
4426
|
+
if (q.document_id)
|
|
4427
|
+
sp.set("document_id", q.document_id);
|
|
4428
|
+
const qs = sp.toString();
|
|
4429
|
+
return this.request("GET", `/admin/statements/imports${qs ? `?${qs}` : ""}`);
|
|
4430
|
+
}
|
|
4431
|
+
async getImport(id) {
|
|
4432
|
+
return this.request("GET", `/admin/statements/imports/${encodeURIComponent(id)}`);
|
|
4433
|
+
}
|
|
4408
4434
|
}
|
|
4409
4435
|
class SelectionsResource extends BaseResource {
|
|
4410
4436
|
async list(params) {
|