@talonic/mcp 0.1.102 → 0.1.103

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 CHANGED
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ### Added
13
13
 
14
+ - **Build, check, publish and set up a process.** Fifteen more `talonic_process_*` tools over the new `/v1/processes` routes: `talonic_process_create` (a draft from a description or an n8n workflow), `talonic_process_change` (an instruction in plain words; a change that reduces governance returns `needs_confirmation` and saves nothing until the user agreed), `talonic_process_get`, `talonic_process_check`, `talonic_process_test_run`, `talonic_process_publish`, `talonic_process_versions`, `talonic_process_rollback`, `talonic_process_delete`, `talonic_process_item`, `talonic_process_retry`, `talonic_process_send_back`, `talonic_process_setup` (people, mailboxes, secret names, look-up data), `talonic_process_mailbox_ownership`, `talonic_process_address`. Publish, rollback, delete and address carry `destructiveHint`. No tool stores or reads a secret's value, and connecting a mailbox stays in the web app.
15
+
16
+ ## [0.1.102] - 2026-11-22
17
+
18
+ ### Added
19
+
14
20
  - `talonic_process_list`, `talonic_process_run`, `talonic_process_status`, `talonic_process_runs`, `talonic_process_waiting_for_me`, `talonic_process_sign`: the Process Plane over `/v1/processes` (list processes, start one for an item by field names and get its reply, where runs stand, what waits for the caller, sign a step). Listed only when the caller holds the Process Plane view permission; the platform checks run and sign permissions and assignment on every call.
15
21
 
16
22
  ## [0.1.101] - 2026-11-21
@@ -3700,9 +3700,9 @@ var readOnly = {
3700
3700
  idempotentHint: true,
3701
3701
  openWorldHint: false
3702
3702
  };
3703
- var write = (idempotent, destructive = false) => ({
3703
+ var write = (idempotent, destructive2 = false) => ({
3704
3704
  readOnlyHint: false,
3705
- destructiveHint: destructive,
3705
+ destructiveHint: destructive2,
3706
3706
  idempotentHint: idempotent,
3707
3707
  openWorldHint: false
3708
3708
  });
@@ -4205,9 +4205,9 @@ var readOnly2 = {
4205
4205
  idempotentHint: true,
4206
4206
  openWorldHint: false
4207
4207
  };
4208
- var write2 = (idempotent, destructive = false) => ({
4208
+ var write2 = (idempotent, destructive2 = false) => ({
4209
4209
  readOnlyHint: false,
4210
- destructiveHint: destructive,
4210
+ destructiveHint: destructive2,
4211
4211
  idempotentHint: idempotent,
4212
4212
  openWorldHint: false
4213
4213
  });
@@ -4435,9 +4435,9 @@ var readOnly3 = {
4435
4435
  idempotentHint: true,
4436
4436
  openWorldHint: false
4437
4437
  };
4438
- var write3 = (idempotent, destructive = false) => ({
4438
+ var write3 = (idempotent, destructive2 = false) => ({
4439
4439
  readOnlyHint: false,
4440
- destructiveHint: destructive,
4440
+ destructiveHint: destructive2,
4441
4441
  idempotentHint: idempotent,
4442
4442
  openWorldHint: false
4443
4443
  });
@@ -5142,9 +5142,9 @@ var readOnly4 = {
5142
5142
  idempotentHint: true,
5143
5143
  openWorldHint: false
5144
5144
  };
5145
- var write4 = (idempotent, destructive = false) => ({
5145
+ var write4 = (idempotent, destructive2 = false) => ({
5146
5146
  readOnlyHint: false,
5147
- destructiveHint: destructive,
5147
+ destructiveHint: destructive2,
5148
5148
  idempotentHint: idempotent,
5149
5149
  openWorldHint: false
5150
5150
  });
@@ -5768,12 +5768,35 @@ var write6 = {
5768
5768
  idempotentHint: false,
5769
5769
  openWorldHint: false
5770
5770
  };
5771
+ var destructive = {
5772
+ readOnlyHint: false,
5773
+ destructiveHint: true,
5774
+ idempotentHint: false,
5775
+ openWorldHint: false
5776
+ };
5777
+ var BASE = "/v1/processes";
5778
+ var pid = (a) => encodeURIComponent(a.process_id);
5771
5779
  var LIST_DESCRIPTION2 = "List the workspace's processes: name, live version (null = draft only), folder, tags and number of steps. Start here; use the id with the other talonic_process_* tools.";
5772
5780
  var RUN_DESCRIPTION = `Start a published process for one item with values by field name, e.g. {"Vendor": "Acme", "Amount": 1200}. Only for processes whose items are posted (started by hand, by another system or by a form). Returns the run id, and the process's reply when it has a reply step. Starting a process can send mail, call other systems and ask people to sign: call only when the user asks for it.`;
5773
5781
  var STATUS_DESCRIPTION4 = "Where a process run stands: per step, how many items are waiting, done or failed, and each item's state. Without run_id, the latest run.";
5774
5782
  var RUNS_DESCRIPTION2 = "Runs across all processes, newest first: state (running, completed, failed, stuck = open with a failed item), items done, waiting and failed. Filter by process or by runs waiting for the caller.";
5775
5783
  var WAITING_DESCRIPTION = "Sign-offs and forms waiting for the caller (the person behind the key): per process and step, how many items wait. Use talonic_process_status to see the items, then talonic_process_sign.";
5776
5784
  var SIGN_DESCRIPTION = "Sign a sign-off step of a run for the caller: approve all waiting items, or only `items`. A step that offers choices needs `decision` (one of its choices). Allowed only where the caller is assigned to the step. Signing moves real work on: call only when the user decides.";
5785
+ var GET_DESCRIPTION2 = "One process with its draft: fields, steps (id, kind, name, settings) and the arrows between them. Use it to see step ids before talonic_process_change with step_id, or to read what a process does.";
5786
+ var CREATE_DESCRIPTION2 = "Set up a new process as a DRAFT. Pass `description` in the user's own words (what comes in, what is read or checked, who decides, what goes out), or `workflow_json` with an exported n8n workflow to take it over. Nothing runs and nothing is sent until talonic_process_publish. The answer names what a person still has to choose (`stillOpen`, `questions`): tell the user those. Uses a model call for `description`.";
5787
+ var CHANGE_DESCRIPTION = "Change a process draft from an instruction in plain words: add, remove or reorder steps, change who decides, what is sent, any setting. With `step_id` only that step's settings change. Touches the draft only; the live version stays until talonic_process_publish. If the answer is `needs_confirmation`, NOTHING was saved: the change means fewer people or checks look at items. Tell the user exactly those points and ask; call again with `confirmed: true` only after they said yes, never on a first call.";
5788
+ var CHECK_DESCRIPTION = "What a draft still needs before it can go live (`stillNeeded`, per step), every problem the check finds, and what publishing would change against the live version. Call before talonic_process_publish and tell the user what is open.";
5789
+ 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.";
5790
+ 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.";
5791
+ var VERSIONS_DESCRIPTION = "The published versions of a process, newest first, with who published and why.";
5792
+ var ROLLBACK_DESCRIPTION = "Make an earlier published version live again. Changes what runs for real: call only when the user asks for it.";
5793
+ 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.";
5794
+ 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.";
5795
+ var RETRY_DESCRIPTION = "Try every failed step of a run again. Steps that send or call will send or call again: use when the cause of the failure is fixed.";
5796
+ var SEND_BACK_DESCRIPTION = "Send items back from a sign-off step with a reason, for the caller: the opposite of talonic_process_sign. Allowed only where the caller is assigned. Moves real work: call only when the user decides.";
5797
+ var SETUP_DESCRIPTION = "What processes of this workspace can use: who a step can wait for (roles, groups), the connected mailboxes and whether each may send, the names of stored secrets (never values), and the shared data a look-up step can read. Connecting a mailbox and storing a secret happen in the Talonic web app, not here.";
5798
+ var MAILBOX_OWNERSHIP_DESCRIPTION = "Say whether a connected mailbox is one person's own (`individual`: only that person may put it on a process) or the company's (`company`: everyone who builds processes may). A governance decision: call only when the user asks.";
5799
+ var ADDRESS_DESCRIPTION = "The address other systems send items to (a webhook). Without `make` it only says whether one exists; the address itself is shown once, when made. With `make: true` it makes one and returns `path` to post to. An existing address is replaced only with `replace: true`: the old one stops working AT ONCE and whatever sends to it stops getting through, so ask the user first. `test: true` is the address of the test copy.";
5777
5800
  function registerProcessesTools(server, getToken, baseUrl) {
5778
5801
  const tools = [
5779
5802
  [
@@ -5879,6 +5902,244 @@ function registerProcessesTools(server, getToken, baseUrl) {
5879
5902
  }
5880
5903
  )
5881
5904
  )
5905
+ ],
5906
+ [
5907
+ "talonic_process_get",
5908
+ "One process",
5909
+ GET_DESCRIPTION2,
5910
+ { process_id: zUuid().describe("The process id from talonic_process_list") },
5911
+ readOnly6,
5912
+ (a) => runTool(() => apiJson(getToken, baseUrl, "GET", `${BASE}/${pid(a)}`))
5913
+ ],
5914
+ [
5915
+ "talonic_process_create",
5916
+ "New process draft",
5917
+ CREATE_DESCRIPTION2,
5918
+ {
5919
+ description: z.string().min(10).max(2e3).optional().describe("What the process should do, complete and in the user's words"),
5920
+ workflow_json: z.string().min(2).max(4e5).optional().describe("An exported n8n workflow as JSON text, instead of description")
5921
+ },
5922
+ write6,
5923
+ (a) => runTool(() => {
5924
+ if (a.workflow_json) {
5925
+ let workflow;
5926
+ try {
5927
+ workflow = JSON.parse(a.workflow_json);
5928
+ } catch {
5929
+ throw new Error("workflow_json is not valid JSON.");
5930
+ }
5931
+ return apiJson(getToken, baseUrl, "POST", BASE, { body: { workflow } });
5932
+ }
5933
+ if (!a.description) throw new Error("Pass description or workflow_json.");
5934
+ return apiJson(getToken, baseUrl, "POST", BASE, { body: { description: a.description } });
5935
+ })
5936
+ ],
5937
+ [
5938
+ "talonic_process_change",
5939
+ "Change a process draft",
5940
+ CHANGE_DESCRIPTION,
5941
+ {
5942
+ process_id: zUuid(),
5943
+ change: z.string().min(1).max(2e3).describe("What should change, in plain words"),
5944
+ step_id: z.string().min(1).max(80).optional().describe("Only this step's settings (id from talonic_process_get)"),
5945
+ confirmed: z.boolean().optional().describe(
5946
+ "Leave out. true only after needs_confirmation was shown to the user and they agreed"
5947
+ )
5948
+ },
5949
+ write6,
5950
+ (a) => runTool(
5951
+ () => apiJson(getToken, baseUrl, "POST", `${BASE}/${pid(a)}/change`, {
5952
+ body: {
5953
+ change: a.change,
5954
+ ...a.step_id ? { stepId: a.step_id } : {},
5955
+ ...a.confirmed === true ? { confirmed: true } : {}
5956
+ }
5957
+ })
5958
+ )
5959
+ ],
5960
+ [
5961
+ "talonic_process_check",
5962
+ "Check a process draft",
5963
+ CHECK_DESCRIPTION,
5964
+ { process_id: zUuid() },
5965
+ readOnly6,
5966
+ async (a) => runTool(async () => {
5967
+ const [check, changes] = await Promise.all([
5968
+ apiJson(getToken, baseUrl, "GET", `${BASE}/${pid(a)}/check`),
5969
+ apiJson(getToken, baseUrl, "GET", `${BASE}/${pid(a)}/changes`)
5970
+ ]);
5971
+ return { check, changes };
5972
+ })
5973
+ ],
5974
+ [
5975
+ "talonic_process_test_run",
5976
+ "Test a process draft",
5977
+ TEST_RUN_DESCRIPTION,
5978
+ {
5979
+ process_id: zUuid(),
5980
+ document_ids: z.array(zUuid()).min(1).max(100).describe("Documents to run the draft on")
5981
+ },
5982
+ write6,
5983
+ (a) => runTool(
5984
+ () => apiJson(getToken, baseUrl, "POST", `${BASE}/${pid(a)}/test-run`, {
5985
+ body: { documentIds: a.document_ids }
5986
+ })
5987
+ )
5988
+ ],
5989
+ [
5990
+ "talonic_process_publish",
5991
+ "Publish a process",
5992
+ PUBLISH_DESCRIPTION,
5993
+ {
5994
+ process_id: zUuid(),
5995
+ reason: z.string().max(2e3).optional().describe("Why this change, for the record")
5996
+ },
5997
+ destructive,
5998
+ (a) => runTool(
5999
+ () => apiJson(getToken, baseUrl, "POST", `${BASE}/${pid(a)}/publish`, {
6000
+ body: a.reason ? { reason: a.reason } : {}
6001
+ })
6002
+ )
6003
+ ],
6004
+ [
6005
+ "talonic_process_versions",
6006
+ "Process versions",
6007
+ VERSIONS_DESCRIPTION,
6008
+ { process_id: zUuid() },
6009
+ readOnly6,
6010
+ (a) => runTool(() => apiJson(getToken, baseUrl, "GET", `${BASE}/${pid(a)}/versions`))
6011
+ ],
6012
+ [
6013
+ "talonic_process_rollback",
6014
+ "Roll a process back",
6015
+ ROLLBACK_DESCRIPTION,
6016
+ {
6017
+ process_id: zUuid(),
6018
+ version: z.number().int().min(1).describe("The version number to make live again")
6019
+ },
6020
+ destructive,
6021
+ (a) => runTool(
6022
+ () => apiJson(
6023
+ getToken,
6024
+ baseUrl,
6025
+ "POST",
6026
+ `${BASE}/${pid(a)}/versions/${encodeURIComponent(String(a.version))}/rollback`
6027
+ )
6028
+ )
6029
+ ],
6030
+ [
6031
+ "talonic_process_delete",
6032
+ "Delete a process",
6033
+ DELETE_DESCRIPTION2,
6034
+ { process_id: zUuid() },
6035
+ destructive,
6036
+ (a) => runTool(() => apiJson(getToken, baseUrl, "DELETE", `${BASE}/${pid(a)}`))
6037
+ ],
6038
+ [
6039
+ "talonic_process_item",
6040
+ "One item of a run",
6041
+ ITEM_DESCRIPTION,
6042
+ {
6043
+ process_id: zUuid(),
6044
+ run_id: zUuid(),
6045
+ item_key: z.string().min(1).max(200).describe("The item's key (documentId) from the run")
6046
+ },
6047
+ readOnly6,
6048
+ (a) => runTool(
6049
+ () => apiJson(
6050
+ getToken,
6051
+ baseUrl,
6052
+ "GET",
6053
+ `${BASE}/${pid(a)}/runs/${encodeURIComponent(a.run_id)}/items/${encodeURIComponent(a.item_key)}`
6054
+ )
6055
+ )
6056
+ ],
6057
+ [
6058
+ "talonic_process_retry",
6059
+ "Retry a run's failed steps",
6060
+ RETRY_DESCRIPTION,
6061
+ { run_id: zUuid() },
6062
+ write6,
6063
+ (a) => runTool(
6064
+ () => apiJson(getToken, baseUrl, "POST", `${BASE}/runs/${encodeURIComponent(a.run_id)}/retry`)
6065
+ )
6066
+ ],
6067
+ [
6068
+ "talonic_process_send_back",
6069
+ "Send items back from a sign-off",
6070
+ SEND_BACK_DESCRIPTION,
6071
+ {
6072
+ process_id: zUuid(),
6073
+ run_id: zUuid(),
6074
+ step_id: z.string().min(1).max(64),
6075
+ items: z.array(z.string().min(1).max(200)).min(1).max(200).describe("Item keys"),
6076
+ reason: z.string().min(1).max(2e3).describe("Why they go back, in the user's words")
6077
+ },
6078
+ write6,
6079
+ (a) => runTool(
6080
+ () => apiJson(
6081
+ getToken,
6082
+ baseUrl,
6083
+ "POST",
6084
+ `${BASE}/${pid(a)}/runs/${encodeURIComponent(a.run_id)}/holds/${encodeURIComponent(a.step_id)}/send-back`,
6085
+ { body: { items: a.items, reason: a.reason } }
6086
+ )
6087
+ )
6088
+ ],
6089
+ [
6090
+ "talonic_process_setup",
6091
+ "What processes can use",
6092
+ SETUP_DESCRIPTION,
6093
+ {},
6094
+ readOnly6,
6095
+ async () => runTool(async () => {
6096
+ const [people, mailboxes, secrets, lookupData] = await Promise.all([
6097
+ apiJson(getToken, baseUrl, "GET", `${BASE}/people`),
6098
+ apiJson(getToken, baseUrl, "GET", `${BASE}/mailboxes`),
6099
+ apiJson(getToken, baseUrl, "GET", `${BASE}/secrets`),
6100
+ apiJson(getToken, baseUrl, "GET", `${BASE}/lookup-data`)
6101
+ ]);
6102
+ return { people, mailboxes, secrets, lookupData };
6103
+ })
6104
+ ],
6105
+ [
6106
+ "talonic_process_mailbox_ownership",
6107
+ "Say whose a mailbox is",
6108
+ MAILBOX_OWNERSHIP_DESCRIPTION,
6109
+ {
6110
+ mailbox_id: zUuid().describe("The mailbox id from talonic_process_setup"),
6111
+ ownership: z.enum(["individual", "company"])
6112
+ },
6113
+ write6,
6114
+ (a) => runTool(
6115
+ () => apiJson(
6116
+ getToken,
6117
+ baseUrl,
6118
+ "PUT",
6119
+ `${BASE}/mailboxes/${encodeURIComponent(a.mailbox_id)}/ownership`,
6120
+ { body: { ownership: a.ownership } }
6121
+ )
6122
+ )
6123
+ ],
6124
+ [
6125
+ "talonic_process_address",
6126
+ "A process's address for other systems",
6127
+ ADDRESS_DESCRIPTION,
6128
+ {
6129
+ process_id: zUuid(),
6130
+ make: z.boolean().optional().describe("true: make the address. Default: only say whether one exists"),
6131
+ test: z.boolean().optional().describe("The address of the test copy"),
6132
+ replace: z.boolean().optional().describe("true only after the user agreed to switch the existing address off")
6133
+ },
6134
+ destructive,
6135
+ (a) => runTool(
6136
+ () => a.make === true ? apiJson(getToken, baseUrl, "PUT", `${BASE}/${pid(a)}/address`, {
6137
+ body: {
6138
+ ...a.test === true ? { test: true } : {},
6139
+ ...a.replace === true ? { replace: true } : {}
6140
+ }
6141
+ }) : apiJson(getToken, baseUrl, "GET", `${BASE}/${pid(a)}/address`)
6142
+ )
5882
6143
  ]
5883
6144
  ];
5884
6145
  for (const [name, title, description, inputSchema11, annotations, handler] of tools) {
@@ -5895,9 +6156,9 @@ var readOnly7 = {
5895
6156
  idempotentHint: true,
5896
6157
  openWorldHint: false
5897
6158
  };
5898
- var write7 = (idempotent, destructive = false) => ({
6159
+ var write7 = (idempotent, destructive2 = false) => ({
5899
6160
  readOnlyHint: false,
5900
- destructiveHint: destructive,
6161
+ destructiveHint: destructive2,
5901
6162
  idempotentHint: idempotent,
5902
6163
  openWorldHint: false
5903
6164
  });
@@ -6125,9 +6386,9 @@ var readOnly8 = {
6125
6386
  idempotentHint: true,
6126
6387
  openWorldHint: false
6127
6388
  };
6128
- var write8 = (idempotent, destructive = false) => ({
6389
+ var write8 = (idempotent, destructive2 = false) => ({
6129
6390
  readOnlyHint: false,
6130
- destructiveHint: destructive,
6391
+ destructiveHint: destructive2,
6131
6392
  idempotentHint: idempotent,
6132
6393
  openWorldHint: false
6133
6394
  });
@@ -8107,7 +8368,7 @@ async function handleListFields(getToken, baseUrl, args) {
8107
8368
  })
8108
8369
  );
8109
8370
  }
8110
- var GET_DESCRIPTION2 = [
8371
+ var GET_DESCRIPTION3 = [
8111
8372
  "Get the CONCEPT CARD for one Field Registry field: what it means (curated description + extraction instruction), its synonyms and aliases, maturity, where it occurs (document/occurrence counts, first/last seen, document-type spread), its value distribution (top values with counts, distinct count, examples), schema usage, and identity links (superseded_by, absorbed concepts).",
8112
8373
  "",
8113
8374
  "USE WHEN: you must decide whether a field is the right concept for a question, need example values or the value shape before writing a filter, or hold a field NAME from the user and need the live concept behind it.",
@@ -8209,7 +8470,7 @@ function registerFieldTools(server, getToken, baseUrl) {
8209
8470
  "talonic_get_field",
8210
8471
  {
8211
8472
  title: "Look up a field",
8212
- description: GET_DESCRIPTION2,
8473
+ description: GET_DESCRIPTION3,
8213
8474
  inputSchema: getFieldInputSchema,
8214
8475
  annotations: {
8215
8476
  title: "Look up a field",
@@ -8450,7 +8711,7 @@ var LIST_DESCRIPTION5 = [
8450
8711
  "ARGS: optional `search` (name contains, case-insensitive), `limit` (1\u2013100, default 20), `cursor` (from pagination.next_cursor), `order` (asc|desc by updated_at).",
8451
8712
  "RETURNS: { data[] of { id, name, description, schema_id, version, materialized_version, materialized_at, field_count, node_count, created_at, updated_at, links }, pagination { total, limit, has_more, next_cursor } }."
8452
8713
  ].join("\n");
8453
- var GET_DESCRIPTION3 = [
8714
+ var GET_DESCRIPTION4 = [
8454
8715
  "Get one Spec's structure: identity and version state, the schema its output rows follow, `nodes[]` (the processing steps as the user configured them, in editing order), `phases[]` (the steps as they actually run, in run order; one configured validation step can run as several phases, so the two lists can differ), and `fields[]` (Spec field \u2194 schema field).",
8455
8716
  "",
8456
8717
  "USE WHEN: you need to explain what a run will do, confirm a Spec is published (`version` non-null) before talonic_run_spec, or map field names to keys.",
@@ -8513,7 +8774,7 @@ function registerSpecTools(server, getToken, baseUrl) {
8513
8774
  "talonic_get_spec",
8514
8775
  {
8515
8776
  title: "Look up a pipeline",
8516
- description: GET_DESCRIPTION3,
8777
+ description: GET_DESCRIPTION4,
8517
8778
  inputSchema: getSpecInputSchema,
8518
8779
  annotations: { title: "Look up a pipeline", ...READ_ONLY4 },
8519
8780
  _meta: widgetToolMeta("getSpec")
@@ -8918,7 +9179,7 @@ function registerAskTools(server, getToken, baseUrl) {
8918
9179
 
8919
9180
  // package.json
8920
9181
  var package_default = {
8921
- version: "0.1.102"};
9182
+ version: "0.1.103"};
8922
9183
 
8923
9184
  // src/version.ts
8924
9185
  var VERSION = package_default.version;