@2kw/ai-mcp-server 8.1.2 → 8.2.0-dev.11

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,6 +1,6 @@
1
1
  /**
2
- * The connect pause, decoded one way for every client (#1086, spec §4, D4): an open
3
- * `backbone:connector_auth_request` (#807 R12) is a connector the run waits for the user to
2
+ * The connect pause, decoded one way for every client: an open
3
+ * `backbone:connector_auth_request` is a connector the run waits for the user to
4
4
  * connect, allow or reconnect in chat.2kw.ai.
5
5
  *
6
6
  * This file is canonical. `mcp/src/lib/connect-pause.ts` and
@@ -8,7 +8,7 @@
8
8
  * here, then run `npm run sync:connect-pause` in mcp/ and `npm run sync-connect-pause` in n8n/.
9
9
  * Its golden fixture, `cli/tests/fixtures/connect-pause-cases.json`, is copied the same way into
10
10
  * mcp/, n8n/ and surface/, and every client's decoder test runs every case of it. The input pause
11
- * (#1320, connectors spec §12) lives here too, with its own fixture `input-pause-cases.json`.
11
+ * lives here too, with its own fixture `input-pause-cases.json`.
12
12
  *
13
13
  * Plain TypeScript with no imports, no `process`, no Node types and no timers, so n8n's source
14
14
  * scanner and its empty `dependencies` accept the copy. The CLI and the MCP server keep their
@@ -16,7 +16,7 @@
16
16
  */
17
17
  /** Fallback chat.2kw.ai origin when the API host is not one we recognise. */
18
18
  export declare const DEFAULT_CHAT_URL = "https://chat.2kw.ai";
19
- /** Known API-host → chat web host mappings; a connect pause points the user there (#807 R11). */
19
+ /** Known API-host → chat web host mappings; a connect pause points the user there. */
20
20
  export declare const CHAT_URL_BY_API_HOST: Readonly<Record<string, string>>;
21
21
  /**
22
22
  * The chat web host that belongs to an API base URL, where a member connects a connector
@@ -38,7 +38,7 @@ export interface PendingConnection {
38
38
  /** The MCP server's host: what the user is asked to connect to. */
39
39
  host: string;
40
40
  reason: ConnectReason;
41
- /** The egress difference an allow is asked again for (#807 R9); absent otherwise, never empty. */
41
+ /** The egress difference an allow is asked again for; absent otherwise, never empty. */
42
42
  destinations?: string[];
43
43
  }
44
44
  /** Enough of a connection to name it in a sentence. */
@@ -47,7 +47,7 @@ export interface ConnectTarget {
47
47
  host: string;
48
48
  reason: string;
49
49
  }
50
- /** The synthetic tool a connector's connect pause is raised through (#806). */
50
+ /** The synthetic tool a connector's connect pause is raised through. */
51
51
  export declare function connectToolName(serverLabel: string): string;
52
52
  /**
53
53
  * The connectors a response's `output` still waits on: every `in_progress` connect request whose
@@ -75,7 +75,7 @@ export declare function connectionsPhrase(connections: readonly ConnectTarget[])
75
75
  */
76
76
  export type InputMode = "form" | "url" | "mixed" | "unknown";
77
77
  /**
78
- * One open `backbone:input_request` (#1320, connectors spec §12): a connector's question that only
78
+ * One open `backbone:input_request`: a connector's question that only
79
79
  * the requester can answer, and only in chat. `id` is the item's `inreq_…` id. Its message, schema
80
80
  * and URL are never read: no assistant may see them (D7).
81
81
  */
@@ -1,8 +1,8 @@
1
1
  // GENERATED COPY of cli/src/lib/connect-pause.ts (#1086). Do not edit here: edit the CLI's file,
2
2
  // then run `npm run sync:connect-pause` in mcp/. `npm run check:connect-pause` fails on any drift.
3
3
  /**
4
- * The connect pause, decoded one way for every client (#1086, spec §4, D4): an open
5
- * `backbone:connector_auth_request` (#807 R12) is a connector the run waits for the user to
4
+ * The connect pause, decoded one way for every client: an open
5
+ * `backbone:connector_auth_request` is a connector the run waits for the user to
6
6
  * connect, allow or reconnect in chat.2kw.ai.
7
7
  *
8
8
  * This file is canonical. `mcp/src/lib/connect-pause.ts` and
@@ -10,7 +10,7 @@
10
10
  * here, then run `npm run sync:connect-pause` in mcp/ and `npm run sync-connect-pause` in n8n/.
11
11
  * Its golden fixture, `cli/tests/fixtures/connect-pause-cases.json`, is copied the same way into
12
12
  * mcp/, n8n/ and surface/, and every client's decoder test runs every case of it. The input pause
13
- * (#1320, connectors spec §12) lives here too, with its own fixture `input-pause-cases.json`.
13
+ * lives here too, with its own fixture `input-pause-cases.json`.
14
14
  *
15
15
  * Plain TypeScript with no imports, no `process`, no Node types and no timers, so n8n's source
16
16
  * scanner and its empty `dependencies` accept the copy. The CLI and the MCP server keep their
@@ -18,7 +18,7 @@
18
18
  */
19
19
  /** Fallback chat.2kw.ai origin when the API host is not one we recognise. */
20
20
  export const DEFAULT_CHAT_URL = "https://chat.2kw.ai";
21
- /** Known API-host → chat web host mappings; a connect pause points the user there (#807 R11). */
21
+ /** Known API-host → chat web host mappings; a connect pause points the user there. */
22
22
  export const CHAT_URL_BY_API_HOST = {
23
23
  "api.2kw.ai": "https://chat.2kw.ai",
24
24
  "api-dev.2kw.ai": "https://chat-dev.2kw.ai",
@@ -50,7 +50,7 @@ function itemsOf(output) {
50
50
  function text(value) {
51
51
  return typeof value === "string" && value.length > 0 ? value : undefined;
52
52
  }
53
- /** The synthetic tool a connector's connect pause is raised through (#806). */
53
+ /** The synthetic tool a connector's connect pause is raised through. */
54
54
  export function connectToolName(serverLabel) {
55
55
  return `mcp__${serverLabel}__connect`;
56
56
  }
@@ -51,7 +51,7 @@ export function register(server, client) {
51
51
  };
52
52
  }
53
53
  });
54
- server.tool("2kw_create_provider", "Register a new BYOK provider with credentials. Requires an API key belonging to the external provider, except for OLLAMA.", {
54
+ server.tool("2kw_create_provider", "Register a new BYOK provider with credentials. Requires an API key belonging to the external provider, except for OLLAMA. Needs an admin or owner key.", {
55
55
  name: z.string(),
56
56
  provider: ProviderType.describe("Provider vendor type"),
57
57
  apiKey: z.string().optional().describe("Credential for the external provider (not needed for OLLAMA)"),
@@ -80,7 +80,7 @@ export function register(server, client) {
80
80
  };
81
81
  }
82
82
  });
83
- server.tool("2kw_update_provider", "Patch an existing provider. Only supplied fields are updated.", {
83
+ server.tool("2kw_update_provider", "Patch an existing provider. Only supplied fields are updated. Needs an admin or owner key.", {
84
84
  id: z.string(),
85
85
  name: z.string().optional(),
86
86
  provider: ProviderType.optional(),
@@ -109,7 +109,7 @@ export function register(server, client) {
109
109
  };
110
110
  }
111
111
  });
112
- server.tool("2kw_delete_provider", "Delete a provider. Existing extractions that used it keep their past records.", { id: z.string() }, async (params) => {
112
+ server.tool("2kw_delete_provider", "Delete a provider. Existing extractions that used it keep their past records. Needs an admin or owner key.", { id: z.string() }, async (params) => {
113
113
  try {
114
114
  await client.DELETE("/v1/providers/{id}", {
115
115
  params: { path: { id: params.id } },
@@ -141,7 +141,7 @@ export function register(server, client) {
141
141
  };
142
142
  }
143
143
  });
144
- server.tool("2kw_test_provider", "Test connectivity/credentials for an AI provider before (or without) saving it. Pass a fresh apiKey to test ad-hoc credentials, or providerId to re-test an existing provider's stored key.", {
144
+ server.tool("2kw_test_provider", "Test connectivity/credentials for an AI provider before (or without) saving it. Pass a fresh apiKey to test ad-hoc credentials, or providerId to re-test an existing provider's stored key. Needs an admin or owner key.", {
145
145
  provider: ProviderType.describe("Provider vendor type"),
146
146
  apiKey: z.string().optional().describe("Credential to test (omit to use providerId's stored key)"),
147
147
  providerId: z.string().optional().describe("Existing provider ID whose stored credentials should be used"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2kw/ai-mcp-server",
3
- "version": "8.1.2",
3
+ "version": "8.2.0-dev.11",
4
4
  "description": "MCP server for 2kw.ai — EU-hosted AI platform: OpenAI-compatible LLM gateway, schema-driven document extraction, transcription, agents with a knowledge base, and cost observability. 199 tools for Claude Code, Cursor, and Windsurf.",
5
5
  "mcpName": "ai.2kw/mcp-server",
6
6
  "keywords": [