@knocklabs/agent-toolkit 0.5.3 → 0.5.4

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.
@@ -1,9 +1,12 @@
1
1
  import { ToolSet, Tool } from 'ai';
2
2
  import { a as DeferredToolCall, b as DeferredToolCallConfig, K as KnockOutboundWebhookEvent, D as DeferredToolCallInteractionResult } from '../types-kR5zfaEk.js';
3
- import { ToolkitConfig, ToolCategory } from '../types.js';
3
+ import { T as ToolkitConfig, a as ToolCategory } from '../index-qFGypkX3.js';
4
4
  import { ToolInvocation } from '@ai-sdk/ui-utils';
5
5
  import '@knocklabs/mgmt/resources.js';
6
6
  import '@knocklabs/node/resources.js';
7
+ import 'zod';
8
+ import '@knocklabs/mgmt';
9
+ import '@knocklabs/node';
7
10
 
8
11
  /**
9
12
  * Convert a deferred tool call to a tool invocation. Useful when building an assistant
@@ -5,11 +5,11 @@ import {
5
5
  } from "../chunk-X3LAGKQW.js";
6
6
  import {
7
7
  createKnockClient
8
- } from "../chunk-BT6KDK3Z.js";
8
+ } from "../chunk-YOH7QKTM.js";
9
9
  import {
10
10
  getToolMap,
11
11
  getToolsByPermissionsInCategories
12
- } from "../chunk-CRW3ZMHM.js";
12
+ } from "../chunk-7U5HNTEY.js";
13
13
  import "../chunk-G3PMV62Z.js";
14
14
 
15
15
  // src/ai-sdk/tool-converter.ts
@@ -2251,11 +2251,13 @@ var toolPermissions = {
2251
2251
  };
2252
2252
 
2253
2253
  export {
2254
+ KnockTool,
2254
2255
  tools,
2255
2256
  allTools,
2257
+ toolPermissions,
2256
2258
  createWorkflowTools,
2257
2259
  filterTools,
2258
2260
  getToolsByPermissionsInCategories,
2259
2261
  getToolMap
2260
2262
  };
2261
- //# sourceMappingURL=chunk-CRW3ZMHM.js.map
2263
+ //# sourceMappingURL=chunk-7U5HNTEY.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  allTools,
3
3
  createWorkflowTools
4
- } from "./chunk-CRW3ZMHM.js";
4
+ } from "./chunk-7U5HNTEY.js";
5
5
 
6
6
  // src/modelcontextprotocol/adapter.ts
7
7
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
8
8
  import { z } from "zod";
9
9
  var KnockMcpServer = class extends McpServer {
10
10
  constructor(knockClient, config, tools) {
11
- super({ name: "Knock", version: "0.5.3" });
11
+ super({ name: "Knock", version: "0.5.4" });
12
12
  tools.forEach((tool) => {
13
13
  const toolParams = tool.parameters ?? z.object({});
14
14
  this.tool(
@@ -44,4 +44,4 @@ var createKnockMcpServer = async (params) => {
44
44
  export {
45
45
  createKnockMcpServer
46
46
  };
47
- //# sourceMappingURL=chunk-LLIVREQ2.js.map
47
+ //# sourceMappingURL=chunk-HIHS5S2N.js.map
@@ -5,7 +5,7 @@ import { Knock } from "@knocklabs/node";
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@knocklabs/agent-toolkit",
8
- version: "0.5.3",
8
+ version: "0.5.4",
9
9
  description: "A toolkit for working with Knock in Agent workflows.",
10
10
  main: "src/index.js",
11
11
  scripts: {
@@ -52,6 +52,10 @@ var package_default = {
52
52
  },
53
53
  "./types": {
54
54
  types: "./dist/types.d.ts"
55
+ },
56
+ "./core": {
57
+ types: "./dist/core/index.d.ts",
58
+ default: "./dist/core/index.js"
55
59
  }
56
60
  },
57
61
  bin: {
@@ -151,4 +155,4 @@ var createKnockClient = (config) => {
151
155
  export {
152
156
  createKnockClient
153
157
  };
154
- //# sourceMappingURL=chunk-BT6KDK3Z.js.map
158
+ //# sourceMappingURL=chunk-YOH7QKTM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/knock-client.ts","../package.json"],"sourcesContent":["import KnockMgmt from \"@knocklabs/mgmt\";\nimport { Knock } from \"@knocklabs/node\";\n\nimport pkg from \"../../package.json\";\nimport { Config } from \"../types.js\";\n\nconst serviceTokensToApiClients: Record<string, Record<string, Knock>> = {};\n\ntype KnockClient = ReturnType<typeof createKnockClient>;\n\n// Include a custom header to identify all client requests in the API logs\nconst knockClientHeaders = {\n \"X-Knock-Client\": `knock/agent-toolkit@${pkg.version}`,\n};\n\nconst createKnockClient = (config: Config) => {\n const serviceToken = config.serviceToken ?? process.env.KNOCK_SERVICE_TOKEN;\n\n if (!serviceToken) {\n throw new Error(\n \"Service token is required. Please set the `serviceToken` property in the config or the `KNOCK_SERVICE_TOKEN` environment variable.\"\n );\n }\n\n const client = new KnockMgmt({\n serviceToken,\n defaultHeaders: knockClientHeaders,\n });\n\n return Object.assign(client, {\n publicApi: async (environmentSlug?: string): Promise<Knock> => {\n const environment =\n environmentSlug ?? config.environment ?? \"development\";\n\n // If the client already exists for this service token and environment, return it\n if (serviceTokensToApiClients?.[serviceToken]?.[environment]) {\n return serviceTokensToApiClients[serviceToken][environment];\n }\n\n // Otherwise, fetch a public API key for this service token and environment\n const { api_key } = await client.apiKeys.exchange({ environment });\n\n // Create a new Knock client with the public API key\n const knock = new Knock({\n apiKey: api_key,\n defaultHeaders: knockClientHeaders,\n });\n\n // Store the client in the cache\n if (!serviceTokensToApiClients[serviceToken]) {\n serviceTokensToApiClients[serviceToken] = {};\n }\n\n serviceTokensToApiClients[serviceToken][environment] = knock;\n\n return knock;\n },\n });\n};\n\nexport { createKnockClient, type KnockClient };\n","{\n \"name\": \"@knocklabs/agent-toolkit\",\n \"version\": \"0.5.4\",\n \"description\": \"A toolkit for working with Knock in Agent workflows.\",\n \"main\": \"src/index.js\",\n \"scripts\": {\n \"build\": \"tsup --env.NODE_ENV production\",\n \"clean\": \"rimraf ./dist\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint src --ext .ts,.tsx\",\n \"lint:fix\": \"eslint src --ext .ts,.tsx --fix\",\n \"format\": \"prettier --write \\\"src/**/*.{ts,tsx}\\\"\",\n \"format:check\": \"prettier --check \\\"src/**/*.{ts,tsx}\\\"\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"release\": \"npm run build && npm run release:publish && changeset tag\",\n \"release:publish\": \"npm publish --access public --tolerate-republish\"\n },\n \"author\": \"Knock\",\n \"license\": \"MIT\",\n \"sideEffects\": false,\n \"type\": \"module\",\n \"exports\": {\n \"./openai\": {\n \"types\": \"./dist/openai/index.d.ts\",\n \"default\": \"./dist/openai/index.js\"\n },\n \"./ai-sdk\": {\n \"types\": \"./dist/ai-sdk/index.d.ts\",\n \"default\": \"./dist/ai-sdk/index.js\"\n },\n \"./langchain\": {\n \"types\": \"./dist/langchain/index.d.ts\",\n \"default\": \"./dist/langchain/index.js\"\n },\n \"./mastra\": {\n \"types\": \"./dist/mastra/index.d.ts\",\n \"default\": \"./dist/mastra/index.js\"\n },\n \"./modelcontextprotocol\": {\n \"types\": \"./dist/modelcontextprotocol/index.d.ts\",\n \"default\": \"./dist/modelcontextprotocol/index.js\"\n },\n \"./human-in-the-loop\": {\n \"types\": \"./dist/human-in-the-loop/index.d.ts\",\n \"default\": \"./dist/human-in-the-loop/index.js\"\n },\n \"./types\": {\n \"types\": \"./dist/types.d.ts\"\n },\n \"./core\": {\n \"types\": \"./dist/core/index.d.ts\",\n \"default\": \"./dist/core/index.js\"\n }\n },\n \"bin\": {\n \"local-mcp\": \"dist/modelcontextprotocol/local-server.js\"\n },\n \"files\": [\n \"dist\"\n ],\n \"dependencies\": {\n \"@knocklabs/mgmt\": \"^0.2.0\",\n \"@knocklabs/node\": \"^1.10.3\",\n \"@modelcontextprotocol/sdk\": \"^1.7.0\",\n \"@sentry/node\": \"^10.5.0\",\n \"json-schema-to-zod\": \"^2.6.1\",\n \"uuid\": \"^11.1.0\",\n \"yargs\": \"^17.7.2\",\n \"zod\": \"^3.24.2\",\n \"zod-to-json-schema\": \"^3.24.5\"\n },\n \"devDependencies\": {\n \"@changesets/cli\": \"^2.28.1\",\n \"@eslint/js\": \"^9.24.0\",\n \"@langchain/core\": \"^0.3.45\",\n \"@types/node\": \"^22.13.10\",\n \"@types/yargs\": \"^17.0.33\",\n \"@typescript-eslint/eslint-plugin\": \"^8.29.1\",\n \"@typescript-eslint/parser\": \"^8.29.1\",\n \"ai\": \"^4.2.8\",\n \"eslint\": \"^9.24.0\",\n \"eslint-config-prettier\": \"^10.1.2\",\n \"eslint-import-resolver-typescript\": \"^4.3.2\",\n \"eslint-plugin-import\": \"^2.31.0\",\n \"eslint-plugin-prettier\": \"^5.2.6\",\n \"openai\": \"^4.90.0\",\n \"prettier\": \"^3.5.3\",\n \"rimraf\": \"^6.0.1\",\n \"ts-node\": \"^10.9.2\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.8.2\",\n \"typescript-eslint\": \"^8.29.1\",\n \"vitest\": \"^1.3.1\"\n },\n \"peerDependencies\": {\n \"@mastra/core\": \"^0.10.3\",\n \"ai\": \"^4.0.0\",\n \"openai\": \"^4.0.0\"\n },\n \"peerDependenciesMeta\": {\n \"ai\": {\n \"optional\": true\n }\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"mappings":"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","names":[]}
@@ -0,0 +1,4 @@
1
+ export { C as Config, K as KnockClient, b as KnockTool, g as KnockToolDefinition, b as KnockToolType, T as ToolkitConfig, d as allTools, f as createKnockClient, e as toolPermissions, t as tools } from '../index-qFGypkX3.js';
2
+ import 'zod';
3
+ import '@knocklabs/mgmt';
4
+ import '@knocklabs/node';
@@ -0,0 +1,18 @@
1
+ import {
2
+ createKnockClient
3
+ } from "../chunk-YOH7QKTM.js";
4
+ import {
5
+ KnockTool,
6
+ allTools,
7
+ toolPermissions,
8
+ tools
9
+ } from "../chunk-7U5HNTEY.js";
10
+ import "../chunk-G3PMV62Z.js";
11
+ export {
12
+ KnockTool,
13
+ allTools,
14
+ createKnockClient,
15
+ toolPermissions,
16
+ tools
17
+ };
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,8 +1,8 @@
1
1
  import * as _knocklabs_node_resources_workflows_mjs from '@knocklabs/node/resources/workflows.mjs';
2
- import { Config } from './types.js';
3
- import { K as KnockClient } from './knock-client-BH7Juvis.js';
2
+ import { K as KnockClient, C as Config } from './index-qFGypkX3.js';
4
3
  import { K as KnockOutboundWebhookEvent, D as DeferredToolCallInteractionResult, a as DeferredToolCall, b as DeferredToolCallConfig } from './types-kR5zfaEk.js';
5
4
  export { c as DeferredToolCallWorkflowData } from './types-kR5zfaEk.js';
5
+ import 'zod';
6
6
  import '@knocklabs/mgmt';
7
7
  import '@knocklabs/node';
8
8
  import '@knocklabs/mgmt/resources.js';
@@ -0,0 +1,272 @@
1
+ import { ZodObject } from 'zod';
2
+ import KnockMgmt from '@knocklabs/mgmt';
3
+ import { Knock } from '@knocklabs/node';
4
+
5
+ type KnockClient = ReturnType<typeof createKnockClient>;
6
+ declare const createKnockClient: (config: Config) => KnockMgmt & {
7
+ publicApi: (environmentSlug?: string) => Promise<Knock>;
8
+ };
9
+
10
+ interface KnockToolDefinition {
11
+ /**
12
+ * The method name of the tool. This is a machine-readable string.
13
+ */
14
+ method: string;
15
+ /**
16
+ * The name of the tool. This can be used to reference the tool in the code.
17
+ * A descriptive LLM-readable string.
18
+ */
19
+ name: string;
20
+ /**
21
+ * A descriptive prompt explaining the tool's purpose, including examples where useful.
22
+ */
23
+ description: string;
24
+ /**
25
+ * A descriptive prompt explaining the tool's purpose, usage and input parameters.
26
+ * Ths is intended to be used by the underlying LLM.
27
+ */
28
+ fullDescription: string;
29
+ /**
30
+ * The Zod schema for the input parameters of the tool
31
+ */
32
+ parameters?: ZodObject<any>;
33
+ /**
34
+ * The actual implementation of the tool.
35
+ */
36
+ execute: (knockClient: KnockClient, config: Config) => (input: any) => Promise<unknown>;
37
+ }
38
+ interface KnockTool extends Omit<KnockToolDefinition, "execute"> {
39
+ bindExecute: (knockClient: KnockClient, config: Config) => (input: any) => Promise<unknown>;
40
+ }
41
+ declare const KnockTool: (args: Omit<KnockToolDefinition, "fullDescription">) => KnockTool;
42
+
43
+ declare const tools: {
44
+ channels: {
45
+ listChannels: KnockTool;
46
+ };
47
+ commits: {
48
+ listCommits: KnockTool;
49
+ commitAllChanges: KnockTool;
50
+ promoteAllCommits: KnockTool;
51
+ };
52
+ documentation: {
53
+ searchDocumentation: KnockTool;
54
+ };
55
+ emailLayouts: {
56
+ getEmailLayout: KnockTool;
57
+ listEmailLayouts: KnockTool;
58
+ createOrUpdateEmailLayout: KnockTool;
59
+ };
60
+ environments: {
61
+ listEnvironments: KnockTool;
62
+ };
63
+ guides: {
64
+ listGuides: KnockTool;
65
+ getGuide: KnockTool;
66
+ createOrUpdateGuide: KnockTool;
67
+ };
68
+ messages: {
69
+ getMessage: KnockTool;
70
+ getMessageContent: KnockTool;
71
+ getMessageDeliveryLogs: KnockTool;
72
+ getMessageEvents: KnockTool;
73
+ };
74
+ messageTypes: {
75
+ listMessageTypes: KnockTool;
76
+ createOrUpdateMessageType: KnockTool;
77
+ };
78
+ objects: {
79
+ listObjects: KnockTool;
80
+ getObject: KnockTool;
81
+ createOrUpdateObject: KnockTool;
82
+ subscribeUsersToObject: KnockTool;
83
+ unsubscribeUsersFromObject: KnockTool;
84
+ };
85
+ partials: {
86
+ getPartial: KnockTool;
87
+ listPartials: KnockTool;
88
+ createOrUpdatePartial: KnockTool;
89
+ };
90
+ tenants: {
91
+ getTenant: KnockTool;
92
+ listTenants: KnockTool;
93
+ createOrUpdateTenant: KnockTool;
94
+ };
95
+ users: {
96
+ getUser: KnockTool;
97
+ createOrUpdateUser: KnockTool;
98
+ getUserPreferences: KnockTool;
99
+ setUserPreferences: KnockTool;
100
+ getUserMessages: KnockTool;
101
+ };
102
+ workflows: {
103
+ createOneOffWorkflowSchedule: KnockTool;
104
+ createOrUpdateEmailStepInWorkflow: KnockTool;
105
+ createOrUpdateSmsStepInWorkflow: KnockTool;
106
+ createOrUpdatePushStepInWorkflow: KnockTool;
107
+ createOrUpdateInAppFeedStepInWorkflow: KnockTool;
108
+ createOrUpdateChatStepInWorkflow: KnockTool;
109
+ createOrUpdateDelayStepInWorkflow: KnockTool;
110
+ createOrUpdateBatchStepInWorkflow: KnockTool;
111
+ listWorkflows: KnockTool;
112
+ getWorkflow: KnockTool;
113
+ triggerWorkflow: KnockTool;
114
+ createWorkflow: KnockTool;
115
+ };
116
+ };
117
+ declare const allTools: {
118
+ createOneOffWorkflowSchedule: KnockTool;
119
+ createOrUpdateEmailStepInWorkflow: KnockTool;
120
+ createOrUpdateSmsStepInWorkflow: KnockTool;
121
+ createOrUpdatePushStepInWorkflow: KnockTool;
122
+ createOrUpdateInAppFeedStepInWorkflow: KnockTool;
123
+ createOrUpdateChatStepInWorkflow: KnockTool;
124
+ createOrUpdateDelayStepInWorkflow: KnockTool;
125
+ createOrUpdateBatchStepInWorkflow: KnockTool;
126
+ listWorkflows: KnockTool;
127
+ getWorkflow: KnockTool;
128
+ triggerWorkflow: KnockTool;
129
+ createWorkflow: KnockTool;
130
+ getUser: KnockTool;
131
+ createOrUpdateUser: KnockTool;
132
+ getUserPreferences: KnockTool;
133
+ setUserPreferences: KnockTool;
134
+ getUserMessages: KnockTool;
135
+ getTenant: KnockTool;
136
+ listTenants: KnockTool;
137
+ createOrUpdateTenant: KnockTool;
138
+ getPartial: KnockTool;
139
+ listPartials: KnockTool;
140
+ createOrUpdatePartial: KnockTool;
141
+ listObjects: KnockTool;
142
+ getObject: KnockTool;
143
+ createOrUpdateObject: KnockTool;
144
+ subscribeUsersToObject: KnockTool;
145
+ unsubscribeUsersFromObject: KnockTool;
146
+ getMessage: KnockTool;
147
+ getMessageContent: KnockTool;
148
+ getMessageDeliveryLogs: KnockTool;
149
+ getMessageEvents: KnockTool;
150
+ listMessageTypes: KnockTool;
151
+ createOrUpdateMessageType: KnockTool;
152
+ listGuides: KnockTool;
153
+ getGuide: KnockTool;
154
+ createOrUpdateGuide: KnockTool;
155
+ listEnvironments: KnockTool;
156
+ getEmailLayout: KnockTool;
157
+ listEmailLayouts: KnockTool;
158
+ createOrUpdateEmailLayout: KnockTool;
159
+ searchDocumentation: KnockTool;
160
+ listCommits: KnockTool;
161
+ commitAllChanges: KnockTool;
162
+ promoteAllCommits: KnockTool;
163
+ listChannels: KnockTool;
164
+ };
165
+ declare const toolPermissions: {
166
+ channels: {
167
+ read: string[];
168
+ };
169
+ commits: {
170
+ read: string[];
171
+ manage: string[];
172
+ };
173
+ documentation: {
174
+ read: string[];
175
+ };
176
+ emailLayouts: {
177
+ read: string[];
178
+ manage: string[];
179
+ };
180
+ environments: {
181
+ read: string[];
182
+ };
183
+ guides: {
184
+ read: string[];
185
+ manage: string[];
186
+ };
187
+ messages: {
188
+ read: string[];
189
+ };
190
+ messageTypes: {
191
+ read: string[];
192
+ manage: string[];
193
+ };
194
+ objects: {
195
+ read: string[];
196
+ manage: string[];
197
+ };
198
+ partials: {
199
+ read: string[];
200
+ manage: string[];
201
+ };
202
+ tenants: {
203
+ read: string[];
204
+ manage: string[];
205
+ };
206
+ users: {
207
+ read: string[];
208
+ manage: string[];
209
+ };
210
+ workflows: {
211
+ read: string[];
212
+ manage: string[];
213
+ trigger: never[];
214
+ };
215
+ };
216
+
217
+ interface Config {
218
+ /**
219
+ * The token to use to authenticate with the service. If not provided, the `serviceToken`
220
+ * will be resolved from `KNOCK_SERVICE_TOKEN` environment variable.
221
+ */
222
+ serviceToken?: string | undefined;
223
+ /**
224
+ * When set calls will be made as this user.
225
+ */
226
+ userId?: string | undefined;
227
+ /**
228
+ * When set calls will be made in this tenant context.
229
+ */
230
+ tenantId?: string | undefined;
231
+ /**
232
+ * The environment to use as the basis for the API calls. When not defined, will default to
233
+ * the `development` environment.
234
+ */
235
+ environment?: string | undefined;
236
+ /**
237
+ * Whether to hide user data from LLM responses. When true, the LLM will not have access to user
238
+ * data and only the ID will be returned. Defaults to `false`.
239
+ */
240
+ hideUserData?: boolean | undefined;
241
+ }
242
+ type TransformPermissions<T> = {
243
+ [K in keyof T]?: {
244
+ [P in keyof T[K]]?: boolean;
245
+ };
246
+ };
247
+ interface ToolkitConfig extends Config {
248
+ /**
249
+ * The permissions to use for the toolkit.
250
+ */
251
+ permissions: Omit<TransformPermissions<typeof toolPermissions>, "workflows"> & {
252
+ workflows?: {
253
+ /**
254
+ * Whether to allow reading workflows.
255
+ */
256
+ read?: boolean | undefined;
257
+ /**
258
+ * Whether to allow managing workflows.
259
+ */
260
+ manage?: boolean | undefined;
261
+ /**
262
+ * Optionally specify a list of workflow keys to turn into workflow trigger tools
263
+ *
264
+ * If true, all workflows will be allowed.
265
+ */
266
+ trigger?: string[] | undefined;
267
+ };
268
+ };
269
+ }
270
+ type ToolCategory = keyof typeof toolPermissions;
271
+
272
+ export { type Config as C, type KnockClient as K, type ToolkitConfig as T, type ToolCategory as a, KnockTool as b, type TransformPermissions as c, allTools as d, toolPermissions as e, createKnockClient as f, type KnockToolDefinition as g, tools as t };
@@ -1,5 +1,8 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
- import { ToolkitConfig, ToolCategory } from '../types.js';
2
+ import { T as ToolkitConfig, a as ToolCategory } from '../index-qFGypkX3.js';
3
+ import 'zod';
4
+ import '@knocklabs/mgmt';
5
+ import '@knocklabs/node';
3
6
 
4
7
  type KnockToolkit = {
5
8
  getAllTools: () => DynamicStructuredTool[];
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createKnockClient
3
- } from "../chunk-BT6KDK3Z.js";
3
+ } from "../chunk-YOH7QKTM.js";
4
4
  import {
5
5
  getToolMap,
6
6
  getToolsByPermissionsInCategories
7
- } from "../chunk-CRW3ZMHM.js";
7
+ } from "../chunk-7U5HNTEY.js";
8
8
  import {
9
9
  __commonJS,
10
10
  __export,
@@ -1,6 +1,8 @@
1
1
  import { Tool } from '@mastra/core/tools';
2
2
  import { z } from 'zod';
3
- import { ToolkitConfig, ToolCategory } from '../types.js';
3
+ import { T as ToolkitConfig, a as ToolCategory } from '../index-qFGypkX3.js';
4
+ import '@knocklabs/mgmt';
5
+ import '@knocklabs/node';
4
6
 
5
7
  type KnockToolkit = {
6
8
  getAllTools: () => Tool<z.ZodObject<any, any>>[];
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createKnockClient
3
- } from "../chunk-BT6KDK3Z.js";
3
+ } from "../chunk-YOH7QKTM.js";
4
4
  import {
5
5
  getToolMap,
6
6
  getToolsByPermissionsInCategories
7
- } from "../chunk-CRW3ZMHM.js";
7
+ } from "../chunk-7U5HNTEY.js";
8
8
  import "../chunk-G3PMV62Z.js";
9
9
 
10
10
  // src/mastra/tool-converter.ts
@@ -1,43 +1,9 @@
1
- import { K as KnockClient } from '../knock-client-BH7Juvis.js';
2
- import { ZodObject } from 'zod';
3
- import { Config } from '../types.js';
1
+ import { K as KnockClient, C as Config, b as KnockTool } from '../index-qFGypkX3.js';
4
2
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
+ import 'zod';
5
4
  import '@knocklabs/mgmt';
6
5
  import '@knocklabs/node';
7
6
 
8
- interface KnockToolDefinition {
9
- /**
10
- * The method name of the tool. This is a machine-readable string.
11
- */
12
- method: string;
13
- /**
14
- * The name of the tool. This can be used to reference the tool in the code.
15
- * A descriptive LLM-readable string.
16
- */
17
- name: string;
18
- /**
19
- * A descriptive prompt explaining the tool's purpose, including examples where useful.
20
- */
21
- description: string;
22
- /**
23
- * A descriptive prompt explaining the tool's purpose, usage and input parameters.
24
- * Ths is intended to be used by the underlying LLM.
25
- */
26
- fullDescription: string;
27
- /**
28
- * The Zod schema for the input parameters of the tool
29
- */
30
- parameters?: ZodObject<any>;
31
- /**
32
- * The actual implementation of the tool.
33
- */
34
- execute: (knockClient: KnockClient, config: Config) => (input: any) => Promise<unknown>;
35
- }
36
- interface KnockTool extends Omit<KnockToolDefinition, "execute"> {
37
- bindExecute: (knockClient: KnockClient, config: Config) => (input: any) => Promise<unknown>;
38
- }
39
- declare const KnockTool: (args: Omit<KnockToolDefinition, "fullDescription">) => KnockTool;
40
-
41
7
  declare class KnockMcpServer extends McpServer {
42
8
  constructor(knockClient: KnockClient, config: Config, tools: KnockTool[]);
43
9
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createKnockMcpServer
3
- } from "../chunk-LLIVREQ2.js";
4
- import "../chunk-CRW3ZMHM.js";
3
+ } from "../chunk-HIHS5S2N.js";
4
+ import "../chunk-7U5HNTEY.js";
5
5
  import "../chunk-G3PMV62Z.js";
6
6
  export {
7
7
  createKnockMcpServer
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- createKnockMcpServer
4
- } from "../chunk-LLIVREQ2.js";
5
2
  import {
6
3
  createKnockClient
7
- } from "../chunk-BT6KDK3Z.js";
4
+ } from "../chunk-YOH7QKTM.js";
5
+ import {
6
+ createKnockMcpServer
7
+ } from "../chunk-HIHS5S2N.js";
8
8
  import {
9
9
  filterTools,
10
10
  tools
11
- } from "../chunk-CRW3ZMHM.js";
11
+ } from "../chunk-7U5HNTEY.js";
12
12
  import "../chunk-G3PMV62Z.js";
13
13
 
14
14
  // src/modelcontextprotocol/local-server.ts
@@ -1,5 +1,8 @@
1
1
  import { ChatCompletionTool, ChatCompletionMessageToolCall, ChatCompletionToolMessageParam } from 'openai/resources.mjs';
2
- import { ToolkitConfig, ToolCategory } from '../types.js';
2
+ import { T as ToolkitConfig, a as ToolCategory } from '../index-qFGypkX3.js';
3
+ import 'zod';
4
+ import '@knocklabs/mgmt';
5
+ import '@knocklabs/node';
3
6
 
4
7
  type KnockToolkit = {
5
8
  getAllTools: () => ChatCompletionTool[];
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createKnockClient
3
- } from "../chunk-BT6KDK3Z.js";
3
+ } from "../chunk-YOH7QKTM.js";
4
4
  import {
5
5
  getToolMap,
6
6
  getToolsByPermissionsInCategories
7
- } from "../chunk-CRW3ZMHM.js";
7
+ } from "../chunk-7U5HNTEY.js";
8
8
  import "../chunk-G3PMV62Z.js";
9
9
 
10
10
  // src/openai/tool-converter.ts
package/dist/types.d.ts CHANGED
@@ -1,108 +1,4 @@
1
- declare const toolPermissions: {
2
- channels: {
3
- read: string[];
4
- };
5
- commits: {
6
- read: string[];
7
- manage: string[];
8
- };
9
- documentation: {
10
- read: string[];
11
- };
12
- emailLayouts: {
13
- read: string[];
14
- manage: string[];
15
- };
16
- environments: {
17
- read: string[];
18
- };
19
- guides: {
20
- read: string[];
21
- manage: string[];
22
- };
23
- messages: {
24
- read: string[];
25
- };
26
- messageTypes: {
27
- read: string[];
28
- manage: string[];
29
- };
30
- objects: {
31
- read: string[];
32
- manage: string[];
33
- };
34
- partials: {
35
- read: string[];
36
- manage: string[];
37
- };
38
- tenants: {
39
- read: string[];
40
- manage: string[];
41
- };
42
- users: {
43
- read: string[];
44
- manage: string[];
45
- };
46
- workflows: {
47
- read: string[];
48
- manage: string[];
49
- trigger: never[];
50
- };
51
- };
52
-
53
- interface Config {
54
- /**
55
- * The token to use to authenticate with the service. If not provided, the `serviceToken`
56
- * will be resolved from `KNOCK_SERVICE_TOKEN` environment variable.
57
- */
58
- serviceToken?: string | undefined;
59
- /**
60
- * When set calls will be made as this user.
61
- */
62
- userId?: string | undefined;
63
- /**
64
- * When set calls will be made in this tenant context.
65
- */
66
- tenantId?: string | undefined;
67
- /**
68
- * The environment to use as the basis for the API calls. When not defined, will default to
69
- * the `development` environment.
70
- */
71
- environment?: string | undefined;
72
- /**
73
- * Whether to hide user data from LLM responses. When true, the LLM will not have access to user
74
- * data and only the ID will be returned. Defaults to `false`.
75
- */
76
- hideUserData?: boolean | undefined;
77
- }
78
- type TransformPermissions<T> = {
79
- [K in keyof T]?: {
80
- [P in keyof T[K]]?: boolean;
81
- };
82
- };
83
- interface ToolkitConfig extends Config {
84
- /**
85
- * The permissions to use for the toolkit.
86
- */
87
- permissions: Omit<TransformPermissions<typeof toolPermissions>, "workflows"> & {
88
- workflows?: {
89
- /**
90
- * Whether to allow reading workflows.
91
- */
92
- read?: boolean | undefined;
93
- /**
94
- * Whether to allow managing workflows.
95
- */
96
- manage?: boolean | undefined;
97
- /**
98
- * Optionally specify a list of workflow keys to turn into workflow trigger tools
99
- *
100
- * If true, all workflows will be allowed.
101
- */
102
- trigger?: string[] | undefined;
103
- };
104
- };
105
- }
106
- type ToolCategory = keyof typeof toolPermissions;
107
-
108
- export type { Config, ToolCategory, ToolkitConfig, TransformPermissions };
1
+ export { C as Config, a as ToolCategory, T as ToolkitConfig, c as TransformPermissions } from './index-qFGypkX3.js';
2
+ import 'zod';
3
+ import '@knocklabs/mgmt';
4
+ import '@knocklabs/node';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knocklabs/agent-toolkit",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "A toolkit for working with Knock in Agent workflows.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -47,6 +47,10 @@
47
47
  },
48
48
  "./types": {
49
49
  "types": "./dist/types.d.ts"
50
+ },
51
+ "./core": {
52
+ "types": "./dist/core/index.d.ts",
53
+ "default": "./dist/core/index.js"
50
54
  }
51
55
  },
52
56
  "bin": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/lib/knock-client.ts","../package.json"],"sourcesContent":["import KnockMgmt from \"@knocklabs/mgmt\";\nimport { Knock } from \"@knocklabs/node\";\n\nimport pkg from \"../../package.json\";\nimport { Config } from \"../types.js\";\n\nconst serviceTokensToApiClients: Record<string, Record<string, Knock>> = {};\n\ntype KnockClient = ReturnType<typeof createKnockClient>;\n\n// Include a custom header to identify all client requests in the API logs\nconst knockClientHeaders = {\n \"X-Knock-Client\": `knock/agent-toolkit@${pkg.version}`,\n};\n\nconst createKnockClient = (config: Config) => {\n const serviceToken = config.serviceToken ?? process.env.KNOCK_SERVICE_TOKEN;\n\n if (!serviceToken) {\n throw new Error(\n \"Service token is required. Please set the `serviceToken` property in the config or the `KNOCK_SERVICE_TOKEN` environment variable.\"\n );\n }\n\n const client = new KnockMgmt({\n serviceToken,\n defaultHeaders: knockClientHeaders,\n });\n\n return Object.assign(client, {\n publicApi: async (environmentSlug?: string): Promise<Knock> => {\n const environment =\n environmentSlug ?? config.environment ?? \"development\";\n\n // If the client already exists for this service token and environment, return it\n if (serviceTokensToApiClients?.[serviceToken]?.[environment]) {\n return serviceTokensToApiClients[serviceToken][environment];\n }\n\n // Otherwise, fetch a public API key for this service token and environment\n const { api_key } = await client.apiKeys.exchange({ environment });\n\n // Create a new Knock client with the public API key\n const knock = new Knock({\n apiKey: api_key,\n defaultHeaders: knockClientHeaders,\n });\n\n // Store the client in the cache\n if (!serviceTokensToApiClients[serviceToken]) {\n serviceTokensToApiClients[serviceToken] = {};\n }\n\n serviceTokensToApiClients[serviceToken][environment] = knock;\n\n return knock;\n },\n });\n};\n\nexport { createKnockClient, type KnockClient };\n","{\n \"name\": \"@knocklabs/agent-toolkit\",\n \"version\": \"0.5.3\",\n \"description\": \"A toolkit for working with Knock in Agent workflows.\",\n \"main\": \"src/index.js\",\n \"scripts\": {\n \"build\": \"tsup --env.NODE_ENV production\",\n \"clean\": \"rimraf ./dist\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint src --ext .ts,.tsx\",\n \"lint:fix\": \"eslint src --ext .ts,.tsx --fix\",\n \"format\": \"prettier --write \\\"src/**/*.{ts,tsx}\\\"\",\n \"format:check\": \"prettier --check \\\"src/**/*.{ts,tsx}\\\"\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"release\": \"npm run build && npm run release:publish && changeset tag\",\n \"release:publish\": \"npm publish --access public --tolerate-republish\"\n },\n \"author\": \"Knock\",\n \"license\": \"MIT\",\n \"sideEffects\": false,\n \"type\": \"module\",\n \"exports\": {\n \"./openai\": {\n \"types\": \"./dist/openai/index.d.ts\",\n \"default\": \"./dist/openai/index.js\"\n },\n \"./ai-sdk\": {\n \"types\": \"./dist/ai-sdk/index.d.ts\",\n \"default\": \"./dist/ai-sdk/index.js\"\n },\n \"./langchain\": {\n \"types\": \"./dist/langchain/index.d.ts\",\n \"default\": \"./dist/langchain/index.js\"\n },\n \"./mastra\": {\n \"types\": \"./dist/mastra/index.d.ts\",\n \"default\": \"./dist/mastra/index.js\"\n },\n \"./modelcontextprotocol\": {\n \"types\": \"./dist/modelcontextprotocol/index.d.ts\",\n \"default\": \"./dist/modelcontextprotocol/index.js\"\n },\n \"./human-in-the-loop\": {\n \"types\": \"./dist/human-in-the-loop/index.d.ts\",\n \"default\": \"./dist/human-in-the-loop/index.js\"\n },\n \"./types\": {\n \"types\": \"./dist/types.d.ts\"\n }\n },\n \"bin\": {\n \"local-mcp\": \"dist/modelcontextprotocol/local-server.js\"\n },\n \"files\": [\n \"dist\"\n ],\n \"dependencies\": {\n \"@knocklabs/mgmt\": \"^0.2.0\",\n \"@knocklabs/node\": \"^1.10.3\",\n \"@modelcontextprotocol/sdk\": \"^1.7.0\",\n \"@sentry/node\": \"^10.5.0\",\n \"json-schema-to-zod\": \"^2.6.1\",\n \"uuid\": \"^11.1.0\",\n \"yargs\": \"^17.7.2\",\n \"zod\": \"^3.24.2\",\n \"zod-to-json-schema\": \"^3.24.5\"\n },\n \"devDependencies\": {\n \"@changesets/cli\": \"^2.28.1\",\n \"@eslint/js\": \"^9.24.0\",\n \"@langchain/core\": \"^0.3.45\",\n \"@types/node\": \"^22.13.10\",\n \"@types/yargs\": \"^17.0.33\",\n \"@typescript-eslint/eslint-plugin\": \"^8.29.1\",\n \"@typescript-eslint/parser\": \"^8.29.1\",\n \"ai\": \"^4.2.8\",\n \"eslint\": \"^9.24.0\",\n \"eslint-config-prettier\": \"^10.1.2\",\n \"eslint-import-resolver-typescript\": \"^4.3.2\",\n \"eslint-plugin-import\": \"^2.31.0\",\n \"eslint-plugin-prettier\": \"^5.2.6\",\n \"openai\": \"^4.90.0\",\n \"prettier\": \"^3.5.3\",\n \"rimraf\": \"^6.0.1\",\n \"ts-node\": \"^10.9.2\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.8.2\",\n \"typescript-eslint\": \"^8.29.1\",\n \"vitest\": \"^1.3.1\"\n },\n \"peerDependencies\": {\n \"@mastra/core\": \"^0.10.3\",\n \"ai\": \"^4.0.0\",\n \"openai\": \"^4.0.0\"\n },\n \"peerDependenciesMeta\": {\n \"ai\": {\n \"optional\": true\n }\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"mappings":"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","names":[]}
@@ -1,10 +0,0 @@
1
- import KnockMgmt from '@knocklabs/mgmt';
2
- import { Knock } from '@knocklabs/node';
3
- import { Config } from './types.js';
4
-
5
- type KnockClient = ReturnType<typeof createKnockClient>;
6
- declare const createKnockClient: (config: Config) => KnockMgmt & {
7
- publicApi: (environmentSlug?: string) => Promise<Knock>;
8
- };
9
-
10
- export type { KnockClient as K };