@n8n/frontend-module-sdk 0.11.2 → 0.12.1

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/package.json CHANGED
@@ -1,28 +1,28 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@n8n/frontend-module-sdk",
4
- "version": "0.11.2",
4
+ "version": "0.12.1",
5
5
  "main": "src/index.ts",
6
6
  "import": "src/index.ts",
7
7
  "exports": {
8
8
  ".": "./src/index.ts"
9
9
  },
10
10
  "dependencies": {
11
- "@n8n/api-types": "1.41.2",
12
- "@n8n/design-system": "2.40.2",
13
- "@n8n/utils": "1.48.1",
14
- "n8n-workflow": "2.41.1",
11
+ "@n8n/api-types": "1.42.1",
12
+ "@n8n/design-system": "2.41.1",
13
+ "@n8n/utils": "1.49.0",
14
+ "n8n-workflow": "2.42.1",
15
15
  "vue": "^3.5.13",
16
16
  "vue-router": "^4.5.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@n8n/eslint-config": "0.0.1",
20
20
  "@n8n/typescript-config": "1.12.0",
21
- "@n8n/vitest-config": "1.22.0",
21
+ "@n8n/vitest-config": "1.23.0",
22
22
  "typescript": "6.0.2",
23
23
  "unplugin-icons": "^23.0.1",
24
24
  "vite": "^8.0.2",
25
- "vitest": "^4.1.9",
25
+ "vitest": "5.0.1",
26
26
  "vue-tsc": "^2.2.8"
27
27
  },
28
28
  "license": "SEE LICENSE IN LICENSE.md",
@@ -1,2 +1,3 @@
1
+ export { mcpExposeAllOffer } from './mcpExposeAllOffer';
1
2
  export { modalOpeners } from './modalOpeners';
2
3
  export { workflowMcpAccessSync } from './workflowMcpAccessSync';
@@ -0,0 +1,11 @@
1
+ import { declareCapability } from '../declareCapability';
2
+ import type { McpExposeAllOffer } from '../types/capability';
3
+
4
+ /**
5
+ * The expose-all-workflows experiment on the MCP settings page. Experiments read
6
+ * PostHog and open shell modals, so they stay in the shell.
7
+ *
8
+ * Optional: read it with `tryUse()`. No provider means the experiment is off.
9
+ * Provided by the shell in `capabilities.manifest.ts`.
10
+ */
11
+ export const mcpExposeAllOffer = declareCapability<McpExposeAllOffer>('mcp-expose-all-offer');
@@ -4,8 +4,7 @@ import { declareCapability } from '../declareCapability';
4
4
  * Writes an MCP access toggle back into the shell's workflow stores, so the list
5
5
  * and the open document agree with the server without a refetch.
6
6
  *
7
- * Declared ahead of its provider: the shell provides it when the MCP feature
8
- * moves into its own module package.
7
+ * Provided by the shell in `capabilities.manifest.ts`.
9
8
  */
10
9
  export const workflowMcpAccessSync = declareCapability<(ids: string[], enabled: boolean) => void>(
11
10
  'workflow-mcp-access-sync',
@@ -20,3 +20,13 @@ export interface ModalOpeners {
20
20
  openModal(name: string): void;
21
21
  openModalWithData(payload: { name: string; data: Record<string, unknown> }): void;
22
22
  }
23
+
24
+ export interface McpExposeAllOffer {
25
+ /** Whether the experiment is on for this user. Reads reactive state, so call it in a `computed`. */
26
+ isEnabled(): boolean;
27
+ /**
28
+ * Opens the expose-all modal when there is something to expose. Resolves `true`
29
+ * when the modal opened. `onExposed` runs after the user exposes everything.
30
+ */
31
+ offer(onExposed: () => Promise<void> | void): Promise<boolean>;
32
+ }