@talonic/mcp 0.1.110 → 0.1.112

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.d.ts CHANGED
@@ -158,6 +158,12 @@ interface CreateServerOptions {
158
158
  * every call as that person.
159
159
  */
160
160
  includeThreadTools?: boolean;
161
+ /**
162
+ * List `talonic_thread_reconnect` instead of the thread tools: the hosted
163
+ * entrypoint sets it for an OAuth grant made before the thread scopes were
164
+ * requested. Ignored when the thread tools are listed.
165
+ */
166
+ includeThreadReconnect?: boolean;
161
167
  includeAgentTurnTools?: boolean;
162
168
  includeMyDataTools?: boolean;
163
169
  /**
package/dist/index.js CHANGED
@@ -9834,6 +9834,21 @@ function handleDecideApproval(getToken, baseUrl, args) {
9834
9834
  )
9835
9835
  );
9836
9836
  }
9837
+ var OPEN_ASKS_DESCRIPTION = [
9838
+ "List what colleagues sent the person through their agents that still waits for them: requests, tasks and messages from the last 30 days, soonest due first. Read straight from the workspace, no agent turn and no credits.",
9839
+ "USE WHEN: the person asks what to work on, what is open for them, or what colleagues are waiting for.",
9840
+ "NOT FOR: answering a request (send the answer with talonic_thread_send); drafts waiting for approval (talonic_thread_list_drafts).",
9841
+ "",
9842
+ "ARGS: optional `limit` (1-100, default 50).",
9843
+ "RETURNS: { asks[] { id, kind message|task|request, from, text, answer_shape, choices[], due, sent_at, still_open[] } }. still_open: steps that tick off by themselves once done."
9844
+ ].join("\n");
9845
+ var openAsksInputSchema = {
9846
+ limit: z.number().int().min(1).max(100).optional().describe("Most requests to return (1-100, default 50).")
9847
+ };
9848
+ function handleOpenAsks(getToken, baseUrl, args = {}) {
9849
+ const q = args.limit ? `?limit=${args.limit}` : "";
9850
+ return runTool(() => apiJson(getToken, baseUrl, "GET", `/v1/thread/asks${q}`));
9851
+ }
9837
9852
  var DRAFTS_DESCRIPTION = [
9838
9853
  "List the drafts the thread prepared and is waiting for the person to approve: an email, a start of one of their processes, or sharing one of their documents. Each names what a decision must quote back.",
9839
9854
  "USE WHEN: before talonic_thread_decide_draft, to show the person exactly what would happen.",
@@ -9968,6 +9983,30 @@ function handleFigure(getToken, baseUrl, args) {
9968
9983
  })
9969
9984
  );
9970
9985
  }
9986
+ var THREAD_RECONNECT_TOOL = "talonic_thread_reconnect";
9987
+ var THREAD_RECONNECT_TEXT = "This Talonic connection was made before the personal agent was part of it, so it cannot reach the agent yet. Reconnect Talonic once: in Claude, open Settings > Connectors, remove Talonic and add it again (in Claude Code: /mcp, Talonic, re-authenticate), then accept the Talonic consent screen. Your agent then acts with exactly your own Talonic permissions.";
9988
+ function registerThreadReconnectTool(server) {
9989
+ server.registerTool(
9990
+ THREAD_RECONNECT_TOOL,
9991
+ {
9992
+ title: "Connect your Talonic agent",
9993
+ description: [
9994
+ "The person's Talonic personal agent (their thread, requests colleagues sent them, drafts waiting for approval) is not reachable over this connection yet. " + THREAD_RECONNECT_TEXT,
9995
+ "USE WHEN: the person asks for their Talonic agent, their thread, what to work on, or open requests from colleagues.",
9996
+ "ARGS: none.",
9997
+ "RETURNS: what the person has to do; tell them in one or two sentences."
9998
+ ].join("\n"),
9999
+ inputSchema: {},
10000
+ annotations: {
10001
+ readOnlyHint: true,
10002
+ destructiveHint: false,
10003
+ idempotentHint: true,
10004
+ openWorldHint: false
10005
+ }
10006
+ },
10007
+ async () => ({ content: [{ type: "text", text: THREAD_RECONNECT_TEXT }] })
10008
+ );
10009
+ }
9971
10010
  function registerThreadTools(server, getToken, baseUrl) {
9972
10011
  const tools2 = [
9973
10012
  [
@@ -10010,6 +10049,14 @@ function registerThreadTools(server, getToken, baseUrl) {
10010
10049
  write13(false, false, true),
10011
10050
  (a) => handleDecideApproval(getToken, baseUrl, a)
10012
10051
  ],
10052
+ [
10053
+ "talonic_thread_open_asks",
10054
+ "List requests waiting for you",
10055
+ OPEN_ASKS_DESCRIPTION,
10056
+ openAsksInputSchema,
10057
+ readOnly13,
10058
+ (a) => handleOpenAsks(getToken, baseUrl, a)
10059
+ ],
10013
10060
  [
10014
10061
  "talonic_thread_list_drafts",
10015
10062
  "List prepared drafts",
@@ -18094,7 +18141,7 @@ function registerOperationsTools(server, getToken, baseUrl, families) {
18094
18141
 
18095
18142
  // package.json
18096
18143
  var package_default = {
18097
- version: "0.1.110"};
18144
+ version: "0.1.112"};
18098
18145
 
18099
18146
  // src/version.ts
18100
18147
  var VERSION = package_default.version;
@@ -18348,6 +18395,9 @@ function createServer(options) {
18348
18395
  if (options.includeSchemaReviewTools) {
18349
18396
  registerSchemaReviewTools(server, rawToken, baseUrl);
18350
18397
  }
18398
+ if (!options.includeThreadTools && options.includeThreadReconnect) {
18399
+ registerThreadReconnectTool(server);
18400
+ }
18351
18401
  if (options.includeThreadTools) {
18352
18402
  registerThreadTools(server, rawToken, baseUrl);
18353
18403
  }