@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/index.d.ts
CHANGED
|
@@ -196,7 +196,8 @@ interface CreateServerOptions {
|
|
|
196
196
|
/**
|
|
197
197
|
* Keys of the probe-gated tool groups to register (`src/tools/tool-groups.ts`:
|
|
198
198
|
* `data_management`, `events`, `aggregate`, `admin`, `contract_desk`,
|
|
199
|
-
* `transport_folders`, `compliance`, `money_found`, `customs_declaration
|
|
199
|
+
* `transport_folders`, `compliance`, `money_found`, `customs_declaration`,
|
|
200
|
+
* `collections_config`).
|
|
200
201
|
* Callers pass only the keys whose probe passed for the session's
|
|
201
202
|
* credential (`probeToolGroups` at stdio boot, `toolGroupsAccessCached`
|
|
202
203
|
* hosted). Listing visibility only; the platform authorizes every call.
|
package/dist/index.js
CHANGED
|
@@ -8107,6 +8107,10 @@ var CHECK_DESCRIPTION = "What a draft still needs before it can go live (`stillN
|
|
|
8107
8107
|
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.";
|
|
8108
8108
|
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.";
|
|
8109
8109
|
var VERSIONS_DESCRIPTION = "The published versions of a process, newest first, with who published and why.";
|
|
8110
|
+
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`).";
|
|
8111
|
+
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.";
|
|
8112
|
+
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.";
|
|
8113
|
+
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.";
|
|
8110
8114
|
var ROLLBACK_DESCRIPTION = "Make an earlier published version live again. Changes what runs for real: call only when the user asks for it.";
|
|
8111
8115
|
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.";
|
|
8112
8116
|
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.";
|
|
@@ -8343,6 +8347,53 @@ function registerProcessesTools(server, getToken, baseUrl) {
|
|
|
8343
8347
|
readOnly9,
|
|
8344
8348
|
(a) => runTool(() => apiJson(getToken, baseUrl, "GET", `${BASE}/${pid(a)}/versions`))
|
|
8345
8349
|
],
|
|
8350
|
+
[
|
|
8351
|
+
"talonic_process_publish_approval",
|
|
8352
|
+
"Where a process change stands",
|
|
8353
|
+
PUBLISH_APPROVAL_DESCRIPTION,
|
|
8354
|
+
{ process_id: zUuid() },
|
|
8355
|
+
readOnly9,
|
|
8356
|
+
(a) => runTool(() => apiJson(getToken, baseUrl, "GET", `${BASE}/${pid(a)}/publish-approval`))
|
|
8357
|
+
],
|
|
8358
|
+
[
|
|
8359
|
+
"talonic_process_decide_change",
|
|
8360
|
+
"Approve or turn down a process change",
|
|
8361
|
+
DECIDE_CHANGE_DESCRIPTION,
|
|
8362
|
+
{
|
|
8363
|
+
process_id: zUuid(),
|
|
8364
|
+
decision: z.enum(["approved", "rejected"]).describe("The user's decision"),
|
|
8365
|
+
reason: z.string().max(2e3).optional().describe("Why; required when the decision is rejected")
|
|
8366
|
+
},
|
|
8367
|
+
destructive,
|
|
8368
|
+
(a) => runTool(
|
|
8369
|
+
() => apiJson(getToken, baseUrl, "POST", `${BASE}/${pid(a)}/publish-approval`, {
|
|
8370
|
+
body: a.reason ? { decision: a.decision, reason: a.reason } : { decision: a.decision }
|
|
8371
|
+
})
|
|
8372
|
+
)
|
|
8373
|
+
],
|
|
8374
|
+
[
|
|
8375
|
+
"talonic_process_hand_in_places",
|
|
8376
|
+
"Where I hand documents in",
|
|
8377
|
+
HAND_IN_PLACES_DESCRIPTION,
|
|
8378
|
+
{},
|
|
8379
|
+
readOnly9,
|
|
8380
|
+
() => runTool(() => apiJson(getToken, baseUrl, "GET", `${BASE}/hand-ins`))
|
|
8381
|
+
],
|
|
8382
|
+
[
|
|
8383
|
+
"talonic_process_copy",
|
|
8384
|
+
"Copy a process",
|
|
8385
|
+
COPY_DESCRIPTION,
|
|
8386
|
+
{
|
|
8387
|
+
process_id: zUuid(),
|
|
8388
|
+
name: z.string().min(1).max(200).optional().describe("What the copy is called")
|
|
8389
|
+
},
|
|
8390
|
+
write9,
|
|
8391
|
+
(a) => runTool(
|
|
8392
|
+
() => apiJson(getToken, baseUrl, "POST", `${BASE}/${pid(a)}/copy`, {
|
|
8393
|
+
body: a.name ? { name: a.name } : {}
|
|
8394
|
+
})
|
|
8395
|
+
)
|
|
8396
|
+
],
|
|
8346
8397
|
[
|
|
8347
8398
|
"talonic_process_rollback",
|
|
8348
8399
|
"Roll a process back",
|
|
@@ -13502,8 +13553,8 @@ async function handleToMarkdown(talonic, args, opts = {}) {
|
|
|
13502
13553
|
retryable: false
|
|
13503
13554
|
});
|
|
13504
13555
|
}
|
|
13505
|
-
let
|
|
13506
|
-
if (!
|
|
13556
|
+
let documentId4 = args.document_id;
|
|
13557
|
+
if (!documentId4) {
|
|
13507
13558
|
const ingest = await talonic.extract({
|
|
13508
13559
|
...args.file_data !== void 0 ? {
|
|
13509
13560
|
file: Buffer.from(args.file_data, "base64"),
|
|
@@ -13513,9 +13564,9 @@ async function handleToMarkdown(talonic, args, opts = {}) {
|
|
|
13513
13564
|
...args.file_url !== void 0 ? { file_url: args.file_url } : {},
|
|
13514
13565
|
schema: INGEST_ONLY_SCHEMA
|
|
13515
13566
|
});
|
|
13516
|
-
|
|
13567
|
+
documentId4 = ingest.document.id;
|
|
13517
13568
|
}
|
|
13518
|
-
const result = await talonic.documents.getMarkdown(
|
|
13569
|
+
const result = await talonic.documents.getMarkdown(documentId4);
|
|
13519
13570
|
return jsonOk(result);
|
|
13520
13571
|
} catch (err) {
|
|
13521
13572
|
return toolError(err);
|
|
@@ -15088,6 +15139,219 @@ var aggregateGroup = {
|
|
|
15088
15139
|
aggregateTool
|
|
15089
15140
|
]
|
|
15090
15141
|
};
|
|
15142
|
+
var documentId = zUuid().describe("The document id.");
|
|
15143
|
+
var labelList = z.array(z.string().min(1).max(200)).max(50).optional();
|
|
15144
|
+
var APPLY_BODY = ["document", "yaml"];
|
|
15145
|
+
var applyConfig = {
|
|
15146
|
+
name: "talonic_collections_apply_config",
|
|
15147
|
+
title: "Apply the collections configuration",
|
|
15148
|
+
description: describe({
|
|
15149
|
+
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.",
|
|
15150
|
+
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.",
|
|
15151
|
+
not: "one document's labels or place (talonic_collections_set_labels, talonic_collections_move_document); one directory correction (talonic_collections_save_directory).",
|
|
15152
|
+
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).",
|
|
15153
|
+
returns: "{ dry_run, created[], changed[], removed[] (items like `collection <path>`, `limit <path>`, `relationship <slug>`), limits[] { path, documents_hidden, people_losing_access }, counts[] { path, documents } }.",
|
|
15154
|
+
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."
|
|
15155
|
+
}),
|
|
15156
|
+
route: "PUT /v1/collections/config",
|
|
15157
|
+
inputSchema: {
|
|
15158
|
+
document: z.record(z.string(), z.unknown()).optional().describe("The configuration document as an object (`version: 1`, `collections`, \u2026)."),
|
|
15159
|
+
yaml: z.string().min(1).max(1e6).optional().describe("The configuration document as YAML or JSON text (instead of `document`)."),
|
|
15160
|
+
dry_run: z.boolean().optional().describe("Default true: check and preview only. false saves the change."),
|
|
15161
|
+
prune: z.boolean().optional().describe("true: remove keyed collections the document does not name.")
|
|
15162
|
+
},
|
|
15163
|
+
annotations: write21(true, true),
|
|
15164
|
+
query: ["dry_run", "prune"],
|
|
15165
|
+
body: [...APPLY_BODY],
|
|
15166
|
+
handler: (ctx, args) => {
|
|
15167
|
+
const given = APPLY_BODY.filter((k) => args[k] !== void 0);
|
|
15168
|
+
if (given.length !== 1) {
|
|
15169
|
+
return Promise.resolve(
|
|
15170
|
+
validationError(
|
|
15171
|
+
"pass the configuration as `document` (an object) or as `yaml` (text), exactly one."
|
|
15172
|
+
)
|
|
15173
|
+
);
|
|
15174
|
+
}
|
|
15175
|
+
return runGroupTool({ ...applyConfig, handler: void 0 }, ctx, {
|
|
15176
|
+
...args,
|
|
15177
|
+
dry_run: args["dry_run"] === false ? false : true
|
|
15178
|
+
});
|
|
15179
|
+
}
|
|
15180
|
+
};
|
|
15181
|
+
var setLabels = {
|
|
15182
|
+
name: "talonic_collections_set_labels",
|
|
15183
|
+
title: "Change a document's labels",
|
|
15184
|
+
description: describe({
|
|
15185
|
+
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.",
|
|
15186
|
+
use: "a document sits in the wrong collection because a label is wrong or missing, and the user says what it should be.",
|
|
15187
|
+
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).",
|
|
15188
|
+
args: "`document_id`; `add` and / or `remove` (each at most 50 labels, `<kind>:<value>`).",
|
|
15189
|
+
returns: "{ effective[] } the document's labels after the change.",
|
|
15190
|
+
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."
|
|
15191
|
+
}),
|
|
15192
|
+
route: "PATCH /v1/documents/{documentId}/traits",
|
|
15193
|
+
inputSchema: {
|
|
15194
|
+
document_id: documentId,
|
|
15195
|
+
add: labelList.describe("Labels to add, e.g. `relationship:client`."),
|
|
15196
|
+
remove: labelList.describe("Labels to remove.")
|
|
15197
|
+
},
|
|
15198
|
+
annotations: write21(true),
|
|
15199
|
+
body: ["add", "remove"],
|
|
15200
|
+
handler: (ctx, args) => {
|
|
15201
|
+
const n = (args["add"] ?? []).length + (args["remove"] ?? []).length;
|
|
15202
|
+
if (n === 0) return Promise.resolve(validationError("name labels to `add` or `remove`."));
|
|
15203
|
+
return runGroupTool({ ...setLabels, handler: void 0 }, ctx, args);
|
|
15204
|
+
}
|
|
15205
|
+
};
|
|
15206
|
+
var moveDocument = {
|
|
15207
|
+
name: "talonic_collections_move_document",
|
|
15208
|
+
title: "Move a document between collections",
|
|
15209
|
+
description: describe({
|
|
15210
|
+
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.",
|
|
15211
|
+
use: "the user says a document belongs in a different collection, or not in this one.",
|
|
15212
|
+
not: "changing why it was sorted there (talonic_collections_set_labels); adding many documents by hand (talonic_collections_add_documents).",
|
|
15213
|
+
args: "`document_id`; `from` and / or `to` (collection ids, from talonic_collections_list or talonic_collections_explain_document).",
|
|
15214
|
+
returns: "{ moved: true, from, to, still_matched_by_rule? } (still_matched_by_rule: another rule of `from` still holds the document).",
|
|
15215
|
+
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."
|
|
15216
|
+
}),
|
|
15217
|
+
route: "POST /v1/documents/{documentId}/move",
|
|
15218
|
+
inputSchema: {
|
|
15219
|
+
document_id: documentId,
|
|
15220
|
+
from: zUuid().optional().describe("The collection to take the document out of."),
|
|
15221
|
+
to: zUuid().optional().describe("The collection to put the document into.")
|
|
15222
|
+
},
|
|
15223
|
+
annotations: write21(false),
|
|
15224
|
+
body: ["from", "to"],
|
|
15225
|
+
handler: (ctx, args) => {
|
|
15226
|
+
if (!args["from"] && !args["to"]) {
|
|
15227
|
+
return Promise.resolve(validationError("name the collection to move `from`, `to`, or both."));
|
|
15228
|
+
}
|
|
15229
|
+
return runGroupTool({ ...moveDocument, handler: void 0 }, ctx, args);
|
|
15230
|
+
}
|
|
15231
|
+
};
|
|
15232
|
+
var saveDirectory = {
|
|
15233
|
+
name: "talonic_collections_save_directory",
|
|
15234
|
+
title: "Correct the relationship directory",
|
|
15235
|
+
description: describe({
|
|
15236
|
+
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.",
|
|
15237
|
+
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.",
|
|
15238
|
+
not: "one document only (talonic_collections_set_labels); the whole configuration (talonic_collections_apply_config).",
|
|
15239
|
+
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).",
|
|
15240
|
+
returns: "{ saved, removed, pending } (pending: documents still to be labelled again).",
|
|
15241
|
+
errors: "403 the person is not an Admin of the workspace; 404 an entry id to remove does not exist."
|
|
15242
|
+
}),
|
|
15243
|
+
route: "PUT /v1/collections/directory",
|
|
15244
|
+
inputSchema: {
|
|
15245
|
+
entries: z.array(
|
|
15246
|
+
z.object({
|
|
15247
|
+
match_value: z.string().min(1).max(320).describe("A typed identifier, e.g. `domain:acme.com`."),
|
|
15248
|
+
relationship: z.string().min(1).max(64).describe("A relationship kind's slug, or `own` / `other`.")
|
|
15249
|
+
})
|
|
15250
|
+
).max(200).optional().describe("Entries to set."),
|
|
15251
|
+
remove: z.array(zUuid()).max(200).optional().describe("Entry ids to remove."),
|
|
15252
|
+
wait: z.boolean().optional().describe("Wait up to 60 seconds for relabelling.")
|
|
15253
|
+
},
|
|
15254
|
+
annotations: write21(true, true),
|
|
15255
|
+
body: ["entries", "remove", "wait"],
|
|
15256
|
+
handler: (ctx, args) => {
|
|
15257
|
+
const n = (args["entries"] ?? []).length + (args["remove"] ?? []).length;
|
|
15258
|
+
if (n === 0) {
|
|
15259
|
+
return Promise.resolve(validationError("name `entries` to set or entry ids to `remove`."));
|
|
15260
|
+
}
|
|
15261
|
+
return runGroupTool({ ...saveDirectory, handler: void 0 }, ctx, args);
|
|
15262
|
+
}
|
|
15263
|
+
};
|
|
15264
|
+
var collectionsConfigGroup = {
|
|
15265
|
+
key: "collections_config",
|
|
15266
|
+
label: "Collections configuration and sorting",
|
|
15267
|
+
docsSlug: "collections-config-tools",
|
|
15268
|
+
probe: { path: "/v1/collections/config" },
|
|
15269
|
+
tools: [
|
|
15270
|
+
{
|
|
15271
|
+
name: "talonic_collections_get_config",
|
|
15272
|
+
title: "Collections configuration",
|
|
15273
|
+
description: describe({
|
|
15274
|
+
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.",
|
|
15275
|
+
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.",
|
|
15276
|
+
not: "the plain list of collections with counts (talonic_collections_list); a first draft for a workspace that has none (talonic_collections_propose).",
|
|
15277
|
+
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[]? }."
|
|
15278
|
+
}),
|
|
15279
|
+
route: "GET /v1/collections/config",
|
|
15280
|
+
inputSchema: {},
|
|
15281
|
+
annotations: READ
|
|
15282
|
+
},
|
|
15283
|
+
applyConfig,
|
|
15284
|
+
{
|
|
15285
|
+
name: "talonic_collections_propose",
|
|
15286
|
+
title: "Propose a collections configuration",
|
|
15287
|
+
description: describe({
|
|
15288
|
+
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.",
|
|
15289
|
+
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.",
|
|
15290
|
+
not: "the configuration in force now (talonic_collections_get_config).",
|
|
15291
|
+
returns: "The proposed document in the shape talonic_collections_get_config returns ({ version: 1, relationships[]?, collections[] }).",
|
|
15292
|
+
errors: "403 the person is not an Admin of the workspace."
|
|
15293
|
+
}),
|
|
15294
|
+
route: "POST /v1/collections/proposal",
|
|
15295
|
+
inputSchema: {},
|
|
15296
|
+
annotations: READ
|
|
15297
|
+
},
|
|
15298
|
+
{
|
|
15299
|
+
name: "talonic_collections_explain_document",
|
|
15300
|
+
title: "Why a document sits in its collections",
|
|
15301
|
+
description: describe({
|
|
15302
|
+
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).",
|
|
15303
|
+
use: "'why is this document in Clients', 'why can't Anna see this', or before correcting a label or moving the document.",
|
|
15304
|
+
not: "the documents of a collection (talonic_collections_preview).",
|
|
15305
|
+
args: "`document_id`.",
|
|
15306
|
+
returns: "{ document_id, pending, unresolved, labels[] { label, origin: derived|person, evidence[]? { party, source, relationship?, quote? } }, removed[], collections[] { id, name, path, why } }.",
|
|
15307
|
+
errors: "404 the person may not read the document."
|
|
15308
|
+
}),
|
|
15309
|
+
route: "GET /v1/documents/{documentId}/collections",
|
|
15310
|
+
inputSchema: { document_id: documentId },
|
|
15311
|
+
annotations: READ
|
|
15312
|
+
},
|
|
15313
|
+
setLabels,
|
|
15314
|
+
moveDocument,
|
|
15315
|
+
{
|
|
15316
|
+
name: "talonic_collections_set_parties",
|
|
15317
|
+
title: "Set a document's parties",
|
|
15318
|
+
description: describe({
|
|
15319
|
+
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.",
|
|
15320
|
+
use: "documents uploaded through the API whose sender and recipients are known to the caller, so they sort like mail.",
|
|
15321
|
+
not: "saying what a party is to the workspace (talonic_collections_save_directory); changing labels directly (talonic_collections_set_labels).",
|
|
15322
|
+
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).",
|
|
15323
|
+
returns: "{ document_id, parties[], pending }.",
|
|
15324
|
+
errors: "400 a malformed party; 404 the person may not read the document."
|
|
15325
|
+
}),
|
|
15326
|
+
route: "PUT /v1/documents/{documentId}/parties",
|
|
15327
|
+
inputSchema: {
|
|
15328
|
+
document_id: documentId,
|
|
15329
|
+
parties: z.array(
|
|
15330
|
+
z.object({
|
|
15331
|
+
id: z.string().min(1).max(320).describe("A typed identifier, e.g. `email:jane@acme.com`."),
|
|
15332
|
+
role: z.enum(["from", "to", "cc", "attendee", "author"]).optional()
|
|
15333
|
+
})
|
|
15334
|
+
).max(500).describe("The document's parties."),
|
|
15335
|
+
complete: z.boolean().optional().describe("true: the list names every party.")
|
|
15336
|
+
},
|
|
15337
|
+
annotations: write21(true),
|
|
15338
|
+
body: ["parties", "complete"]
|
|
15339
|
+
},
|
|
15340
|
+
{
|
|
15341
|
+
name: "talonic_collections_list_directory",
|
|
15342
|
+
title: "Relationship directory",
|
|
15343
|
+
description: describe({
|
|
15344
|
+
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.",
|
|
15345
|
+
use: "'why is acme.com treated as a supplier', or before correcting an entry.",
|
|
15346
|
+
returns: "{ entries[] { id, match_value, relationship, source, origin, labels[]?, evidence, created_at, updated_at } }."
|
|
15347
|
+
}),
|
|
15348
|
+
route: "GET /v1/collections/directory",
|
|
15349
|
+
inputSchema: {},
|
|
15350
|
+
annotations: READ
|
|
15351
|
+
},
|
|
15352
|
+
saveDirectory
|
|
15353
|
+
]
|
|
15354
|
+
};
|
|
15091
15355
|
var COMPLIANCE_EXPORT_MAX_BYTES = 8 * 1024 * 1024;
|
|
15092
15356
|
var docIds = (min, max, what) => z.array(zUuid()).min(min).max(max).describe(what);
|
|
15093
15357
|
var pageArgs3 = {
|
|
@@ -16150,7 +16414,7 @@ var DELETE_SCHEMA = describe({
|
|
|
16150
16414
|
returns: "{ deleted: true, id }.",
|
|
16151
16415
|
errors: "404 unknown schema; 409 the schema is managed by a Spec."
|
|
16152
16416
|
});
|
|
16153
|
-
var
|
|
16417
|
+
var documentId2 = { document_id: zUuid().describe("The document id.") };
|
|
16154
16418
|
var extractionId = {
|
|
16155
16419
|
extraction_id: zUuid().describe("The extraction id (the same as its document's id).")
|
|
16156
16420
|
};
|
|
@@ -16266,7 +16530,7 @@ var dataManagementGroup = {
|
|
|
16266
16530
|
title: "Re-extract a document",
|
|
16267
16531
|
description: REEXTRACT,
|
|
16268
16532
|
route: "POST /v1/documents/{documentId}/re-extract",
|
|
16269
|
-
inputSchema:
|
|
16533
|
+
inputSchema: documentId2,
|
|
16270
16534
|
annotations: write21(false)
|
|
16271
16535
|
},
|
|
16272
16536
|
{
|
|
@@ -16274,7 +16538,7 @@ var dataManagementGroup = {
|
|
|
16274
16538
|
title: "Delete a document",
|
|
16275
16539
|
description: DELETE_DOCUMENT,
|
|
16276
16540
|
route: "DELETE /v1/documents/{documentId}",
|
|
16277
|
-
inputSchema:
|
|
16541
|
+
inputSchema: documentId2,
|
|
16278
16542
|
annotations: write21(true, true)
|
|
16279
16543
|
},
|
|
16280
16544
|
{
|
|
@@ -16524,7 +16788,7 @@ var moneyFoundGroup = {
|
|
|
16524
16788
|
]
|
|
16525
16789
|
};
|
|
16526
16790
|
var folderId = zUuid().describe("The folder id (talonic_transport_folders_list or _worklist).");
|
|
16527
|
-
var
|
|
16791
|
+
var documentId3 = zUuid().describe("The document id, from the folder's documents.");
|
|
16528
16792
|
var loadKey = z.string().min(1).max(200).describe("The load key, from the folder's loads.");
|
|
16529
16793
|
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 }.";
|
|
16530
16794
|
var HANDOVER_MAX_BYTES = 8 * 1024 * 1024;
|
|
@@ -16639,7 +16903,7 @@ var transportFoldersGroup = {
|
|
|
16639
16903
|
returns: "{ document_id, pages[], boxes[] { field, value, page, x, y, w, h } }."
|
|
16640
16904
|
}),
|
|
16641
16905
|
route: "GET /v1/transport-folders/{folderId}/documents/{documentId}/boxes",
|
|
16642
|
-
inputSchema: { folder_id: folderId, document_id:
|
|
16906
|
+
inputSchema: { folder_id: folderId, document_id: documentId3 },
|
|
16643
16907
|
annotations: READ
|
|
16644
16908
|
},
|
|
16645
16909
|
{
|
|
@@ -16653,7 +16917,7 @@ var transportFoldersGroup = {
|
|
|
16653
16917
|
returns: "the document's boxes, as talonic_transport_folders_boxes returns them."
|
|
16654
16918
|
}),
|
|
16655
16919
|
route: "POST /v1/transport-folders/{folderId}/documents/{documentId}/locate",
|
|
16656
|
-
inputSchema: { folder_id: folderId, document_id:
|
|
16920
|
+
inputSchema: { folder_id: folderId, document_id: documentId3 },
|
|
16657
16921
|
annotations: write21(true)
|
|
16658
16922
|
},
|
|
16659
16923
|
{
|
|
@@ -16684,7 +16948,7 @@ var transportFoldersGroup = {
|
|
|
16684
16948
|
route: "POST /v1/transport-folders/{folderId}/documents/{documentId}/assign",
|
|
16685
16949
|
inputSchema: {
|
|
16686
16950
|
folder_id: folderId,
|
|
16687
|
-
document_id:
|
|
16951
|
+
document_id: documentId3,
|
|
16688
16952
|
load_key: z.string().max(200).nullable().describe("The load the document belongs to; null = it belongs to no load.")
|
|
16689
16953
|
},
|
|
16690
16954
|
annotations: write21(true),
|
|
@@ -16700,7 +16964,7 @@ var transportFoldersGroup = {
|
|
|
16700
16964
|
returns: DETAIL_RETURNS
|
|
16701
16965
|
}),
|
|
16702
16966
|
route: "DELETE /v1/transport-folders/{folderId}/documents/{documentId}/assign",
|
|
16703
|
-
inputSchema: { folder_id: folderId, document_id:
|
|
16967
|
+
inputSchema: { folder_id: folderId, document_id: documentId3 },
|
|
16704
16968
|
annotations: write21(true)
|
|
16705
16969
|
},
|
|
16706
16970
|
{
|
|
@@ -16776,7 +17040,8 @@ var TOOL_GROUPS = [
|
|
|
16776
17040
|
transportFoldersGroup,
|
|
16777
17041
|
complianceGroup,
|
|
16778
17042
|
moneyFoundGroup,
|
|
16779
|
-
customsDeclarationGroup
|
|
17043
|
+
customsDeclarationGroup,
|
|
17044
|
+
collectionsConfigGroup
|
|
16780
17045
|
];
|
|
16781
17046
|
TOOL_GROUPS.map((g) => g.key);
|
|
16782
17047
|
function registerToolGroups(server, keys, getToken, baseUrl) {
|
|
@@ -17829,7 +18094,7 @@ function registerOperationsTools(server, getToken, baseUrl, families) {
|
|
|
17829
18094
|
|
|
17830
18095
|
// package.json
|
|
17831
18096
|
var package_default = {
|
|
17832
|
-
version: "0.1.
|
|
18097
|
+
version: "0.1.109"};
|
|
17833
18098
|
|
|
17834
18099
|
// src/version.ts
|
|
17835
18100
|
var VERSION = package_default.version;
|