@talonic/mcp 0.1.107 → 0.1.109
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/content.js +422 -2
- package/dist/content.js.map +1 -1
- package/dist/http-server.js +279 -14
- package/dist/http-server.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +279 -14
- package/dist/index.js.map +1 -1
- package/dist/server.js +279 -14
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -8218,6 +8218,10 @@ var CHECK_DESCRIPTION = "What a draft still needs before it can go live (`stillN
|
|
|
8218
8218
|
var TEST_RUN_DESCRIPTION = "Run the DRAFT on real documents in a test copy: nothing is delivered, emailed or called. Steps not set up yet end the test (`endsAt`). Returns `processId` of the test copy and `runId`; follow with talonic_process_status on that processId.";
|
|
8219
8219
|
var PUBLISH_DESCRIPTION = "Make the draft the LIVE version. From then on the process runs for real: it starts on what its start says (arriving documents, mail, another system), sends its mail and calls its systems. Refused while talonic_process_check finds an error. Call only when the user said to publish; show them talonic_process_check first.";
|
|
8220
8220
|
var VERSIONS_DESCRIPTION = "The published versions of a process, newest first, with who published and why.";
|
|
8221
|
+
var PUBLISH_APPROVAL_DESCRIPTION = "Where a change to a process stands before it goes live: whether the process needs an approver, who the approvers are, who asked, what was decided, and the change in plain lines (`changes`). It always speaks of exactly what talonic_process_publish would make live now. `state` is not_needed, nothing_to_publish, not_requested, waiting, approved or rejected. Call after talonic_process_publish answered that the change needs approval, or to see what waits for the user's decision (`canDecide`).";
|
|
8222
|
+
var DECIDE_CHANGE_DESCRIPTION = "Approve or turn down the change to a process that is waiting for approval, as the user. Only one of the process's approvers may answer, and never the person who asked for the change. Call talonic_process_publish_approval first, show the user `changes` and who asked, and call this only after the user said which. A rejection needs the user's reason. The answer counts for exactly the waiting content: an edit afterwards needs a new approval. Approving does not publish; talonic_process_publish does.";
|
|
8223
|
+
var HAND_IN_PLACES_DESCRIPTION = "Where the user hands documents in: the live processes whose start names them, each with what it asks with a document (`fields`, keyed q1, q2, \u2026) and what the user handed in lately with its state (reading, started, failed). Handing a file in happens on the Hand in page of the app; this tool only lists the places.";
|
|
8224
|
+
var COPY_DESCRIPTION = "Copy a process as a new DRAFT in the same workspace, with the same steps, rules, people, destinations and approvers. Nothing runs until the copy is published. Use it for the same process at another site, team or document type, then change the copy with talonic_process_change.";
|
|
8221
8225
|
var ROLLBACK_DESCRIPTION = "Make an earlier published version live again. Changes what runs for real: call only when the user asks for it.";
|
|
8222
8226
|
var DELETE_DESCRIPTION2 = "Delete a process. Not possible while a run is open. Cannot be undone: call only when the user asked to delete this process by name.";
|
|
8223
8227
|
var ITEM_DESCRIPTION = "One item's way through a run, step by step (status, time, note such as why it stopped or where a mail went), and its values now. Item keys come from talonic_process_status.";
|
|
@@ -8454,6 +8458,53 @@ function registerProcessesTools(server, getToken, baseUrl) {
|
|
|
8454
8458
|
readOnly9,
|
|
8455
8459
|
(a) => runTool(() => apiJson(getToken, baseUrl, "GET", `${BASE}/${pid(a)}/versions`))
|
|
8456
8460
|
],
|
|
8461
|
+
[
|
|
8462
|
+
"talonic_process_publish_approval",
|
|
8463
|
+
"Where a process change stands",
|
|
8464
|
+
PUBLISH_APPROVAL_DESCRIPTION,
|
|
8465
|
+
{ process_id: zUuid() },
|
|
8466
|
+
readOnly9,
|
|
8467
|
+
(a) => runTool(() => apiJson(getToken, baseUrl, "GET", `${BASE}/${pid(a)}/publish-approval`))
|
|
8468
|
+
],
|
|
8469
|
+
[
|
|
8470
|
+
"talonic_process_decide_change",
|
|
8471
|
+
"Approve or turn down a process change",
|
|
8472
|
+
DECIDE_CHANGE_DESCRIPTION,
|
|
8473
|
+
{
|
|
8474
|
+
process_id: zUuid(),
|
|
8475
|
+
decision: z.enum(["approved", "rejected"]).describe("The user's decision"),
|
|
8476
|
+
reason: z.string().max(2e3).optional().describe("Why; required when the decision is rejected")
|
|
8477
|
+
},
|
|
8478
|
+
destructive,
|
|
8479
|
+
(a) => runTool(
|
|
8480
|
+
() => apiJson(getToken, baseUrl, "POST", `${BASE}/${pid(a)}/publish-approval`, {
|
|
8481
|
+
body: a.reason ? { decision: a.decision, reason: a.reason } : { decision: a.decision }
|
|
8482
|
+
})
|
|
8483
|
+
)
|
|
8484
|
+
],
|
|
8485
|
+
[
|
|
8486
|
+
"talonic_process_hand_in_places",
|
|
8487
|
+
"Where I hand documents in",
|
|
8488
|
+
HAND_IN_PLACES_DESCRIPTION,
|
|
8489
|
+
{},
|
|
8490
|
+
readOnly9,
|
|
8491
|
+
() => runTool(() => apiJson(getToken, baseUrl, "GET", `${BASE}/hand-ins`))
|
|
8492
|
+
],
|
|
8493
|
+
[
|
|
8494
|
+
"talonic_process_copy",
|
|
8495
|
+
"Copy a process",
|
|
8496
|
+
COPY_DESCRIPTION,
|
|
8497
|
+
{
|
|
8498
|
+
process_id: zUuid(),
|
|
8499
|
+
name: z.string().min(1).max(200).optional().describe("What the copy is called")
|
|
8500
|
+
},
|
|
8501
|
+
write9,
|
|
8502
|
+
(a) => runTool(
|
|
8503
|
+
() => apiJson(getToken, baseUrl, "POST", `${BASE}/${pid(a)}/copy`, {
|
|
8504
|
+
body: a.name ? { name: a.name } : {}
|
|
8505
|
+
})
|
|
8506
|
+
)
|
|
8507
|
+
],
|
|
8457
8508
|
[
|
|
8458
8509
|
"talonic_process_rollback",
|
|
8459
8510
|
"Roll a process back",
|
|
@@ -13736,8 +13787,8 @@ async function handleToMarkdown(talonic, args, opts = {}) {
|
|
|
13736
13787
|
retryable: false
|
|
13737
13788
|
});
|
|
13738
13789
|
}
|
|
13739
|
-
let
|
|
13740
|
-
if (!
|
|
13790
|
+
let documentId4 = args.document_id;
|
|
13791
|
+
if (!documentId4) {
|
|
13741
13792
|
const ingest = await talonic.extract({
|
|
13742
13793
|
...args.file_data !== void 0 ? {
|
|
13743
13794
|
file: Buffer.from(args.file_data, "base64"),
|
|
@@ -13747,9 +13798,9 @@ async function handleToMarkdown(talonic, args, opts = {}) {
|
|
|
13747
13798
|
...args.file_url !== void 0 ? { file_url: args.file_url } : {},
|
|
13748
13799
|
schema: INGEST_ONLY_SCHEMA
|
|
13749
13800
|
});
|
|
13750
|
-
|
|
13801
|
+
documentId4 = ingest.document.id;
|
|
13751
13802
|
}
|
|
13752
|
-
const result = await talonic.documents.getMarkdown(
|
|
13803
|
+
const result = await talonic.documents.getMarkdown(documentId4);
|
|
13753
13804
|
return jsonOk(result);
|
|
13754
13805
|
} catch (err) {
|
|
13755
13806
|
return toolError(err);
|
|
@@ -15336,6 +15387,219 @@ var aggregateGroup = {
|
|
|
15336
15387
|
aggregateTool
|
|
15337
15388
|
]
|
|
15338
15389
|
};
|
|
15390
|
+
var documentId = zUuid().describe("The document id.");
|
|
15391
|
+
var labelList = z.array(z.string().min(1).max(200)).max(50).optional();
|
|
15392
|
+
var APPLY_BODY = ["document", "yaml"];
|
|
15393
|
+
var applyConfig = {
|
|
15394
|
+
name: "talonic_collections_apply_config",
|
|
15395
|
+
title: "Apply the collections configuration",
|
|
15396
|
+
description: describe({
|
|
15397
|
+
what: "Apply a collections configuration document: collections by `key` with `name`, `match` (labels a document must all carry) or `any` (several label sets), `children` (one level), `only` (who may read the documents it holds), plus `relationships`, `own_domains`, `directory.entries`, `default_views` and `inference`. A top-level key left out leaves that part of the workspace as it is. Collections are matched by their path of keys, so applying the same document twice changes nothing. DRY RUN BY DEFAULT: nothing is saved unless `dry_run` is false.",
|
|
15398
|
+
use: "the user wants collections created, renamed, re-sorted or limited from one document. First call with the default dry run, show the user what would change and, for each limit, how many documents it hides from how many people; apply with `dry_run: false` only after they agree.",
|
|
15399
|
+
not: "one document's labels or place (talonic_collections_set_labels, talonic_collections_move_document); one directory correction (talonic_collections_save_directory).",
|
|
15400
|
+
args: "`document` (the configuration object, `version: 1`) OR `yaml` (the same as YAML or JSON text); `dry_run` (default true); `prune` (true: remove keyed collections the document does not name; confirm each with the user).",
|
|
15401
|
+
returns: "{ dry_run, created[], changed[], removed[] (items like `collection <path>`, `limit <path>`, `relationship <slug>`), limits[] { path, documents_hidden, people_losing_access }, counts[] { path, documents } }.",
|
|
15402
|
+
errors: "400 with details.problems listing every problem, nothing changed; 403 not an Admin, or a key with no person changing `only`; 409 prune would remove a collection that still has a limit or documents placed by hand."
|
|
15403
|
+
}),
|
|
15404
|
+
route: "PUT /v1/collections/config",
|
|
15405
|
+
inputSchema: {
|
|
15406
|
+
document: z.record(z.string(), z.unknown()).optional().describe("The configuration document as an object (`version: 1`, `collections`, \u2026)."),
|
|
15407
|
+
yaml: z.string().min(1).max(1e6).optional().describe("The configuration document as YAML or JSON text (instead of `document`)."),
|
|
15408
|
+
dry_run: z.boolean().optional().describe("Default true: check and preview only. false saves the change."),
|
|
15409
|
+
prune: z.boolean().optional().describe("true: remove keyed collections the document does not name.")
|
|
15410
|
+
},
|
|
15411
|
+
annotations: write21(true, true),
|
|
15412
|
+
query: ["dry_run", "prune"],
|
|
15413
|
+
body: [...APPLY_BODY],
|
|
15414
|
+
handler: (ctx, args) => {
|
|
15415
|
+
const given = APPLY_BODY.filter((k) => args[k] !== void 0);
|
|
15416
|
+
if (given.length !== 1) {
|
|
15417
|
+
return Promise.resolve(
|
|
15418
|
+
validationError(
|
|
15419
|
+
"pass the configuration as `document` (an object) or as `yaml` (text), exactly one."
|
|
15420
|
+
)
|
|
15421
|
+
);
|
|
15422
|
+
}
|
|
15423
|
+
return runGroupTool({ ...applyConfig, handler: void 0 }, ctx, {
|
|
15424
|
+
...args,
|
|
15425
|
+
dry_run: args["dry_run"] === false ? false : true
|
|
15426
|
+
});
|
|
15427
|
+
}
|
|
15428
|
+
};
|
|
15429
|
+
var setLabels = {
|
|
15430
|
+
name: "talonic_collections_set_labels",
|
|
15431
|
+
title: "Change a document's labels",
|
|
15432
|
+
description: describe({
|
|
15433
|
+
what: "Add and remove labels on one document by hand (such as `relationship:client` or `status:closed`). Labels set by a person are kept whenever the document's labels are derived again. The collections that sort by labels follow at once.",
|
|
15434
|
+
use: "a document sits in the wrong collection because a label is wrong or missing, and the user says what it should be.",
|
|
15435
|
+
not: "fixing who a party is for every document (talonic_collections_save_directory); taking a document out of one collection only (talonic_collections_move_document).",
|
|
15436
|
+
args: "`document_id`; `add` and / or `remove` (each at most 50 labels, `<kind>:<value>`).",
|
|
15437
|
+
returns: "{ effective[] } the document's labels after the change.",
|
|
15438
|
+
errors: "400 a label is not well-formed; 403 the change would move the document into or out of a limited collection the person may not manage; 404 the person may not read the document."
|
|
15439
|
+
}),
|
|
15440
|
+
route: "PATCH /v1/documents/{documentId}/traits",
|
|
15441
|
+
inputSchema: {
|
|
15442
|
+
document_id: documentId,
|
|
15443
|
+
add: labelList.describe("Labels to add, e.g. `relationship:client`."),
|
|
15444
|
+
remove: labelList.describe("Labels to remove.")
|
|
15445
|
+
},
|
|
15446
|
+
annotations: write21(true),
|
|
15447
|
+
body: ["add", "remove"],
|
|
15448
|
+
handler: (ctx, args) => {
|
|
15449
|
+
const n = (args["add"] ?? []).length + (args["remove"] ?? []).length;
|
|
15450
|
+
if (n === 0) return Promise.resolve(validationError("name labels to `add` or `remove`."));
|
|
15451
|
+
return runGroupTool({ ...setLabels, handler: void 0 }, ctx, args);
|
|
15452
|
+
}
|
|
15453
|
+
};
|
|
15454
|
+
var moveDocument = {
|
|
15455
|
+
name: "talonic_collections_move_document",
|
|
15456
|
+
title: "Move a document between collections",
|
|
15457
|
+
description: describe({
|
|
15458
|
+
what: "Take one document out of a collection (`from`), put it into one (`to`), or both. A collection that sorts by labels keeps the document out once it is moved out.",
|
|
15459
|
+
use: "the user says a document belongs in a different collection, or not in this one.",
|
|
15460
|
+
not: "changing why it was sorted there (talonic_collections_set_labels); adding many documents by hand (talonic_collections_add_documents).",
|
|
15461
|
+
args: "`document_id`; `from` and / or `to` (collection ids, from talonic_collections_list or talonic_collections_explain_document).",
|
|
15462
|
+
returns: "{ moved: true, from, to, still_matched_by_rule? } (still_matched_by_rule: another rule of `from` still holds the document).",
|
|
15463
|
+
errors: "403 a limited collection needs a person its limit admits or an owner, an enforced collection or an account needs an owner; 404 the person may not read the document, or it is not in `from`; 409 `from` holds it by another rule."
|
|
15464
|
+
}),
|
|
15465
|
+
route: "POST /v1/documents/{documentId}/move",
|
|
15466
|
+
inputSchema: {
|
|
15467
|
+
document_id: documentId,
|
|
15468
|
+
from: zUuid().optional().describe("The collection to take the document out of."),
|
|
15469
|
+
to: zUuid().optional().describe("The collection to put the document into.")
|
|
15470
|
+
},
|
|
15471
|
+
annotations: write21(false),
|
|
15472
|
+
body: ["from", "to"],
|
|
15473
|
+
handler: (ctx, args) => {
|
|
15474
|
+
if (!args["from"] && !args["to"]) {
|
|
15475
|
+
return Promise.resolve(validationError("name the collection to move `from`, `to`, or both."));
|
|
15476
|
+
}
|
|
15477
|
+
return runGroupTool({ ...moveDocument, handler: void 0 }, ctx, args);
|
|
15478
|
+
}
|
|
15479
|
+
};
|
|
15480
|
+
var saveDirectory = {
|
|
15481
|
+
name: "talonic_collections_save_directory",
|
|
15482
|
+
title: "Correct the relationship directory",
|
|
15483
|
+
description: describe({
|
|
15484
|
+
what: "Set directory entries as a person's correction (they outrank configuration, records and conversations for their identifier) and remove entries by id. The documents of every identifier touched are labelled again, which can move them into or out of limited collections.",
|
|
15485
|
+
use: "the user says what a party really is ('acme.com is a client, not a supplier'), or an entry is wrong and should go.",
|
|
15486
|
+
not: "one document only (talonic_collections_set_labels); the whole configuration (talonic_collections_apply_config).",
|
|
15487
|
+
args: "`entries[]` { match_value (`domain:acme.com`, `email:\u2026`, `phone:\u2026`, `handle:\u2026`, `entity:\u2026`), relationship (a kind's slug, or `own` / `other`) } (at most 200); `remove[]` (entry ids from talonic_collections_list_directory, at most 200); `wait` (true: wait up to 60 seconds for the documents to be labelled again).",
|
|
15488
|
+
returns: "{ saved, removed, pending } (pending: documents still to be labelled again).",
|
|
15489
|
+
errors: "403 the person is not an Admin of the workspace; 404 an entry id to remove does not exist."
|
|
15490
|
+
}),
|
|
15491
|
+
route: "PUT /v1/collections/directory",
|
|
15492
|
+
inputSchema: {
|
|
15493
|
+
entries: z.array(
|
|
15494
|
+
z.object({
|
|
15495
|
+
match_value: z.string().min(1).max(320).describe("A typed identifier, e.g. `domain:acme.com`."),
|
|
15496
|
+
relationship: z.string().min(1).max(64).describe("A relationship kind's slug, or `own` / `other`.")
|
|
15497
|
+
})
|
|
15498
|
+
).max(200).optional().describe("Entries to set."),
|
|
15499
|
+
remove: z.array(zUuid()).max(200).optional().describe("Entry ids to remove."),
|
|
15500
|
+
wait: z.boolean().optional().describe("Wait up to 60 seconds for relabelling.")
|
|
15501
|
+
},
|
|
15502
|
+
annotations: write21(true, true),
|
|
15503
|
+
body: ["entries", "remove", "wait"],
|
|
15504
|
+
handler: (ctx, args) => {
|
|
15505
|
+
const n = (args["entries"] ?? []).length + (args["remove"] ?? []).length;
|
|
15506
|
+
if (n === 0) {
|
|
15507
|
+
return Promise.resolve(validationError("name `entries` to set or entry ids to `remove`."));
|
|
15508
|
+
}
|
|
15509
|
+
return runGroupTool({ ...saveDirectory, handler: void 0 }, ctx, args);
|
|
15510
|
+
}
|
|
15511
|
+
};
|
|
15512
|
+
var collectionsConfigGroup = {
|
|
15513
|
+
key: "collections_config",
|
|
15514
|
+
label: "Collections configuration and sorting",
|
|
15515
|
+
docsSlug: "collections-config-tools",
|
|
15516
|
+
probe: { path: "/v1/collections/config" },
|
|
15517
|
+
tools: [
|
|
15518
|
+
{
|
|
15519
|
+
name: "talonic_collections_get_config",
|
|
15520
|
+
title: "Collections configuration",
|
|
15521
|
+
description: describe({
|
|
15522
|
+
what: "The workspace's collections as one configuration document: each collection that has a `key` with its name, the labels it sorts by (`match`, or `any` for several label sets) and its children, plus the relationship kinds, own domains and whether relationships may be inferred. Who may read a limited collection (`only`), the directory's configured entries and the default views appear for a workspace owner only.",
|
|
15523
|
+
use: "the user asks how documents are sorted into collections, or wants to change it: read this first, edit it, then talonic_collections_apply_config.",
|
|
15524
|
+
not: "the plain list of collections with counts (talonic_collections_list); a first draft for a workspace that has none (talonic_collections_propose).",
|
|
15525
|
+
returns: "{ version, inference?, own_domains[]?, relationships[] { slug, name, meaning?, scope?, source_values[]? }, directory? { entries[] { id, relationship } }, collections[] { key, name, description?, match[]? | any[][]?, only?, children[]? }, default_views[]? }."
|
|
15526
|
+
}),
|
|
15527
|
+
route: "GET /v1/collections/config",
|
|
15528
|
+
inputSchema: {},
|
|
15529
|
+
annotations: READ
|
|
15530
|
+
},
|
|
15531
|
+
applyConfig,
|
|
15532
|
+
{
|
|
15533
|
+
name: "talonic_collections_propose",
|
|
15534
|
+
title: "Propose a collections configuration",
|
|
15535
|
+
description: describe({
|
|
15536
|
+
what: "A configuration document built from the workspace's own documents, as far as the person may read them: one top-level collection per channel with documents, children for the labels common enough to be worth one, and suggested relationship kinds from the most frequent outside organisations when the workspace has conversations and fewer than two kinds. Saves nothing and never proposes a limit.",
|
|
15537
|
+
use: "setting up collections for the first time, or the user asks what a sensible structure would be. Show it, let the user edit it, then talonic_collections_apply_config.",
|
|
15538
|
+
not: "the configuration in force now (talonic_collections_get_config).",
|
|
15539
|
+
returns: "The proposed document in the shape talonic_collections_get_config returns ({ version: 1, relationships[]?, collections[] }).",
|
|
15540
|
+
errors: "403 the person is not an Admin of the workspace."
|
|
15541
|
+
}),
|
|
15542
|
+
route: "POST /v1/collections/proposal",
|
|
15543
|
+
inputSchema: {},
|
|
15544
|
+
annotations: READ
|
|
15545
|
+
},
|
|
15546
|
+
{
|
|
15547
|
+
name: "talonic_collections_explain_document",
|
|
15548
|
+
title: "Why a document sits in its collections",
|
|
15549
|
+
description: describe({
|
|
15550
|
+
what: "Why one document sits where it does: each of its labels, whether it was derived or set by a person, with the evidence the person may see behind it, the labels a person removed, and each collection it is in with why (`rule`, `hand`, or `held` by a limit while its labels settle).",
|
|
15551
|
+
use: "'why is this document in Clients', 'why can't Anna see this', or before correcting a label or moving the document.",
|
|
15552
|
+
not: "the documents of a collection (talonic_collections_preview).",
|
|
15553
|
+
args: "`document_id`.",
|
|
15554
|
+
returns: "{ document_id, pending, unresolved, labels[] { label, origin: derived|person, evidence[]? { party, source, relationship?, quote? } }, removed[], collections[] { id, name, path, why } }.",
|
|
15555
|
+
errors: "404 the person may not read the document."
|
|
15556
|
+
}),
|
|
15557
|
+
route: "GET /v1/documents/{documentId}/collections",
|
|
15558
|
+
inputSchema: { document_id: documentId },
|
|
15559
|
+
annotations: READ
|
|
15560
|
+
},
|
|
15561
|
+
setLabels,
|
|
15562
|
+
moveDocument,
|
|
15563
|
+
{
|
|
15564
|
+
name: "talonic_collections_set_parties",
|
|
15565
|
+
title: "Set a document's parties",
|
|
15566
|
+
description: describe({
|
|
15567
|
+
what: "Hand over one document's parties as your system has them, the way a connected mailbox does at import: typed identifiers with an optional role, and whether the list is complete. The document's labels are derived again at once. Only a complete list whose every party is the workspace's own makes a document internal. A party nobody in the directory knows yet may leave the document pending for a short while, and it stays under every limit meanwhile.",
|
|
15568
|
+
use: "documents uploaded through the API whose sender and recipients are known to the caller, so they sort like mail.",
|
|
15569
|
+
not: "saying what a party is to the workspace (talonic_collections_save_directory); changing labels directly (talonic_collections_set_labels).",
|
|
15570
|
+
args: "`document_id`; `parties[]` { id (`email:jane@acme.com`, `domain:acme.com`, `phone:+4930123456`, `handle:<scope>:<id>` or `entity:<id>`; a bare address reads as email), role? from|to|cc|attendee|author } (at most 500); `complete` (true: these are all the parties).",
|
|
15571
|
+
returns: "{ document_id, parties[], pending }.",
|
|
15572
|
+
errors: "400 a malformed party; 404 the person may not read the document."
|
|
15573
|
+
}),
|
|
15574
|
+
route: "PUT /v1/documents/{documentId}/parties",
|
|
15575
|
+
inputSchema: {
|
|
15576
|
+
document_id: documentId,
|
|
15577
|
+
parties: z.array(
|
|
15578
|
+
z.object({
|
|
15579
|
+
id: z.string().min(1).max(320).describe("A typed identifier, e.g. `email:jane@acme.com`."),
|
|
15580
|
+
role: z.enum(["from", "to", "cc", "attendee", "author"]).optional()
|
|
15581
|
+
})
|
|
15582
|
+
).max(500).describe("The document's parties."),
|
|
15583
|
+
complete: z.boolean().optional().describe("true: the list names every party.")
|
|
15584
|
+
},
|
|
15585
|
+
annotations: write21(true),
|
|
15586
|
+
body: ["parties", "complete"]
|
|
15587
|
+
},
|
|
15588
|
+
{
|
|
15589
|
+
name: "talonic_collections_list_directory",
|
|
15590
|
+
title: "Relationship directory",
|
|
15591
|
+
description: describe({
|
|
15592
|
+
what: "Who is who: each identifier (an address, a domain, a phone number, a handle) with what that party is to the workspace (a relationship kind such as `client`, or `own` / `other`) and where that came from (`person`, `config`, `record` or `read`). Each entry is shown only where the person may see its evidence.",
|
|
15593
|
+
use: "'why is acme.com treated as a supplier', or before correcting an entry.",
|
|
15594
|
+
returns: "{ entries[] { id, match_value, relationship, source, origin, labels[]?, evidence, created_at, updated_at } }."
|
|
15595
|
+
}),
|
|
15596
|
+
route: "GET /v1/collections/directory",
|
|
15597
|
+
inputSchema: {},
|
|
15598
|
+
annotations: READ
|
|
15599
|
+
},
|
|
15600
|
+
saveDirectory
|
|
15601
|
+
]
|
|
15602
|
+
};
|
|
15339
15603
|
var COMPLIANCE_EXPORT_MAX_BYTES = 8 * 1024 * 1024;
|
|
15340
15604
|
var docIds = (min, max, what) => z.array(zUuid()).min(min).max(max).describe(what);
|
|
15341
15605
|
var pageArgs3 = {
|
|
@@ -16398,7 +16662,7 @@ var DELETE_SCHEMA = describe({
|
|
|
16398
16662
|
returns: "{ deleted: true, id }.",
|
|
16399
16663
|
errors: "404 unknown schema; 409 the schema is managed by a Spec."
|
|
16400
16664
|
});
|
|
16401
|
-
var
|
|
16665
|
+
var documentId2 = { document_id: zUuid().describe("The document id.") };
|
|
16402
16666
|
var extractionId = {
|
|
16403
16667
|
extraction_id: zUuid().describe("The extraction id (the same as its document's id).")
|
|
16404
16668
|
};
|
|
@@ -16514,7 +16778,7 @@ var dataManagementGroup = {
|
|
|
16514
16778
|
title: "Re-extract a document",
|
|
16515
16779
|
description: REEXTRACT,
|
|
16516
16780
|
route: "POST /v1/documents/{documentId}/re-extract",
|
|
16517
|
-
inputSchema:
|
|
16781
|
+
inputSchema: documentId2,
|
|
16518
16782
|
annotations: write21(false)
|
|
16519
16783
|
},
|
|
16520
16784
|
{
|
|
@@ -16522,7 +16786,7 @@ var dataManagementGroup = {
|
|
|
16522
16786
|
title: "Delete a document",
|
|
16523
16787
|
description: DELETE_DOCUMENT,
|
|
16524
16788
|
route: "DELETE /v1/documents/{documentId}",
|
|
16525
|
-
inputSchema:
|
|
16789
|
+
inputSchema: documentId2,
|
|
16526
16790
|
annotations: write21(true, true)
|
|
16527
16791
|
},
|
|
16528
16792
|
{
|
|
@@ -16772,7 +17036,7 @@ var moneyFoundGroup = {
|
|
|
16772
17036
|
]
|
|
16773
17037
|
};
|
|
16774
17038
|
var folderId = zUuid().describe("The folder id (talonic_transport_folders_list or _worklist).");
|
|
16775
|
-
var
|
|
17039
|
+
var documentId3 = zUuid().describe("The document id, from the folder's documents.");
|
|
16776
17040
|
var loadKey = z.string().min(1).max(200).describe("The load key, from the folder's loads.");
|
|
16777
17041
|
var DETAIL_RETURNS = "the folder as talonic_transport_folders_get returns it, after the change: { id, folder_key, status, loads[] { key, verdict complete|check|missing, flags[], comparison[], handover[], confirmed }, documents[] { id, type, status auto|manual|folder|internal|review|pending, load_key, suggested_load_key, candidates[] }, \u2026 }.";
|
|
16778
17042
|
var HANDOVER_MAX_BYTES = 8 * 1024 * 1024;
|
|
@@ -16887,7 +17151,7 @@ var transportFoldersGroup = {
|
|
|
16887
17151
|
returns: "{ document_id, pages[], boxes[] { field, value, page, x, y, w, h } }."
|
|
16888
17152
|
}),
|
|
16889
17153
|
route: "GET /v1/transport-folders/{folderId}/documents/{documentId}/boxes",
|
|
16890
|
-
inputSchema: { folder_id: folderId, document_id:
|
|
17154
|
+
inputSchema: { folder_id: folderId, document_id: documentId3 },
|
|
16891
17155
|
annotations: READ
|
|
16892
17156
|
},
|
|
16893
17157
|
{
|
|
@@ -16901,7 +17165,7 @@ var transportFoldersGroup = {
|
|
|
16901
17165
|
returns: "the document's boxes, as talonic_transport_folders_boxes returns them."
|
|
16902
17166
|
}),
|
|
16903
17167
|
route: "POST /v1/transport-folders/{folderId}/documents/{documentId}/locate",
|
|
16904
|
-
inputSchema: { folder_id: folderId, document_id:
|
|
17168
|
+
inputSchema: { folder_id: folderId, document_id: documentId3 },
|
|
16905
17169
|
annotations: write21(true)
|
|
16906
17170
|
},
|
|
16907
17171
|
{
|
|
@@ -16932,7 +17196,7 @@ var transportFoldersGroup = {
|
|
|
16932
17196
|
route: "POST /v1/transport-folders/{folderId}/documents/{documentId}/assign",
|
|
16933
17197
|
inputSchema: {
|
|
16934
17198
|
folder_id: folderId,
|
|
16935
|
-
document_id:
|
|
17199
|
+
document_id: documentId3,
|
|
16936
17200
|
load_key: z.string().max(200).nullable().describe("The load the document belongs to; null = it belongs to no load.")
|
|
16937
17201
|
},
|
|
16938
17202
|
annotations: write21(true),
|
|
@@ -16948,7 +17212,7 @@ var transportFoldersGroup = {
|
|
|
16948
17212
|
returns: DETAIL_RETURNS
|
|
16949
17213
|
}),
|
|
16950
17214
|
route: "DELETE /v1/transport-folders/{folderId}/documents/{documentId}/assign",
|
|
16951
|
-
inputSchema: { folder_id: folderId, document_id:
|
|
17215
|
+
inputSchema: { folder_id: folderId, document_id: documentId3 },
|
|
16952
17216
|
annotations: write21(true)
|
|
16953
17217
|
},
|
|
16954
17218
|
{
|
|
@@ -17024,7 +17288,8 @@ var TOOL_GROUPS = [
|
|
|
17024
17288
|
transportFoldersGroup,
|
|
17025
17289
|
complianceGroup,
|
|
17026
17290
|
moneyFoundGroup,
|
|
17027
|
-
customsDeclarationGroup
|
|
17291
|
+
customsDeclarationGroup,
|
|
17292
|
+
collectionsConfigGroup
|
|
17028
17293
|
];
|
|
17029
17294
|
TOOL_GROUPS.map((g) => g.key);
|
|
17030
17295
|
async function probeToolGroups(token, baseUrl) {
|
|
@@ -18092,7 +18357,7 @@ function registerOperationsTools(server, getToken, baseUrl, families) {
|
|
|
18092
18357
|
|
|
18093
18358
|
// package.json
|
|
18094
18359
|
var package_default = {
|
|
18095
|
-
version: "0.1.
|
|
18360
|
+
version: "0.1.109"};
|
|
18096
18361
|
|
|
18097
18362
|
// src/version.ts
|
|
18098
18363
|
var VERSION = package_default.version;
|