@lovable.dev/mcp-js 3.1.0 → 3.2.0

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.
Files changed (60) hide show
  1. package/README.md +43 -0
  2. package/dist/{authorize-Dt7ll7Ur.d.ts → authorize-DUEaDXjU.d.ts} +1 -1
  3. package/dist/{authorize-BS_In2AW.d.cts → authorize-bDiUiJco.d.cts} +1 -1
  4. package/dist/{base-B7D0KqaY.d.ts → base-CLO7XsxC.d.ts} +1 -1
  5. package/dist/{base-D3TT1Wup.d.cts → base-D2d7lJY5.d.cts} +1 -1
  6. package/dist/cli/extract-manifest.cjs +1 -1
  7. package/dist/cli/extract-manifest.js +1 -1
  8. package/dist/{cors-YjwGFsid.cjs → cors-Dk0jvKYK.cjs} +1 -1
  9. package/dist/{cors-Df2tqbzV.js → cors-tLp9UO0k.js} +1 -1
  10. package/dist/{errors-CWxgUZH3.cjs → errors-CLfxIB-l.cjs} +3 -2
  11. package/dist/{errors-ZmYYVYKN.js → errors-CljrUVby.js} +3 -2
  12. package/dist/format-DDzvc92Z.cjs +41 -0
  13. package/dist/format-DKEuO8Tn.js +30 -0
  14. package/dist/hooks-BOdDe251.js +353 -0
  15. package/dist/hooks-xQl3EkDa.cjs +382 -0
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.d.cts +2 -2
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.js +1 -1
  20. package/dist/{io-BvogiiQ1.d.ts → io-CFyHLyvs.d.ts} +1 -1
  21. package/dist/{io-Bn0ErYbG.d.cts → io-DfUvQ-SV.d.cts} +1 -1
  22. package/dist/{io-BoS6dhC0.js → io-U3Nv7y0k.js} +3 -2
  23. package/dist/{io-D_DKGquD.cjs → io-tWj7qb9q.cjs} +7 -6
  24. package/dist/{mcp-aNWgpVIF.cjs → mcp-BMNeCc_-.cjs} +160 -8
  25. package/dist/{mcp-Bm89K_uU.js → mcp-BYSubCtv.js} +161 -9
  26. package/dist/{package-Cl7NhnV4.cjs → package-B4OsCEhG.cjs} +1 -1
  27. package/dist/{package-C6IcwY5Z.js → package-DXBX-HJu.js} +1 -1
  28. package/dist/protocols/mcp/index.cjs +1 -1
  29. package/dist/protocols/mcp/index.d.cts +3 -3
  30. package/dist/protocols/mcp/index.d.ts +3 -3
  31. package/dist/protocols/mcp/index.js +1 -1
  32. package/dist/protocols/oauth-metadata.cjs +1 -1
  33. package/dist/protocols/oauth-metadata.d.cts +3 -3
  34. package/dist/protocols/oauth-metadata.d.ts +3 -3
  35. package/dist/protocols/oauth-metadata.js +1 -1
  36. package/dist/stacks/supabase/index.cjs +2 -2
  37. package/dist/stacks/supabase/index.d.cts +1 -1
  38. package/dist/stacks/supabase/index.d.ts +1 -1
  39. package/dist/stacks/supabase/index.js +2 -2
  40. package/dist/stacks/supabase/vite.cjs +40 -18
  41. package/dist/stacks/supabase/vite.d.cts +1 -1
  42. package/dist/stacks/supabase/vite.d.ts +1 -1
  43. package/dist/stacks/supabase/vite.js +34 -12
  44. package/dist/stacks/tanstack/index.cjs +2 -2
  45. package/dist/stacks/tanstack/index.d.cts +2 -2
  46. package/dist/stacks/tanstack/index.d.ts +2 -2
  47. package/dist/stacks/tanstack/index.js +2 -2
  48. package/dist/stacks/tanstack/vite.cjs +33 -24
  49. package/dist/stacks/tanstack/vite.d.cts +1 -1
  50. package/dist/stacks/tanstack/vite.d.ts +1 -1
  51. package/dist/stacks/tanstack/vite.js +26 -17
  52. package/dist/testing/index.d.cts +1 -1
  53. package/dist/testing/index.d.ts +1 -1
  54. package/dist/{types-BX8RawmT.d.ts → types-CAFCH0yK.d.cts} +7 -1
  55. package/dist/{types-BX8RawmT.d.cts → types-CAFCH0yK.d.ts} +7 -1
  56. package/package.json +16 -4
  57. package/skill-imports.d.cts +1 -0
  58. package/skill-imports.d.ts +9 -0
  59. package/dist/supabase-config-DITfH_bn.js +0 -30
  60. package/dist/supabase-config-Dz13d9ze.cjs +0 -41
@@ -180,6 +180,11 @@ interface MetricsOptions {
180
180
  /** Either the bare on/off toggle or the full options object. */
181
181
  type MetricsConfig = boolean | MetricsOptions;
182
182
  //#endregion
183
+ //#region src/skills/format.d.ts
184
+ interface Skill {
185
+ readonly __skill: never;
186
+ }
187
+ //#endregion
183
188
  //#region src/core/types.d.ts
184
189
  /**
185
190
  * Any zod schema. Aliased to zod's `ZodType` (no generics) — non-deprecated
@@ -396,6 +401,7 @@ type McpDefinitionInput<TAppContext = undefined> = {
396
401
  */
397
402
  readonly instructions: string;
398
403
  readonly tools: readonly (AnyAppContextToolDefinition<TAppContext> | StaticToolDefinition)[];
404
+ readonly skills?: readonly Skill[];
399
405
  /**
400
406
  * Usage-metrics emission (runtime telemetry), on by default. `false` opts out;
401
407
  * `{ endpoint, headers }` sends to your own OTLP collector. Self-disables at
@@ -410,4 +416,4 @@ type McpDefinition<TAppContext = unknown> = Omit<McpDefinitionInput<TAppContext>
410
416
  readonly [McpDefinitionBrand]: never;
411
417
  };
412
418
  //#endregion
413
- export { McpClientInfo as A, ToolVisibilityContext as C, MetricsConfig as D, ZodSchema as E, McpAuthConfig as F, ProgressUpdate as M, ToolContext as N, MetricsOptions as O, JwtClaims as P, ToolHandlerResult as S, ZodRawShape$1 as T, ResourceLinkIcon as _, ContentBlock as a, ToolContent as b, EmbeddedResource as c, JsonValue as d, JsonValueInput as f, ResourceLink as g, McpDefinitionInput as h, ContentAnnotations as i, McpProtocolEra as j, AuthContext as k, EmbeddedTextResource as l, McpDefinition as m, AppContextToolDefinitionInput as n, CreateAppContextInput as o, McpAllowedOrigins as p, AudioContent as r, EmbeddedBlobResource as s, AppContextToolDefinition as t, ImageContent as u, TextContent as v, ZodOutputSchema as w, ToolDefinition as x, ToolAnnotations as y };
419
+ export { AuthContext as A, ToolVisibilityContext as C, Skill as D, ZodSchema as E, JwtClaims as F, McpAuthConfig as I, McpProtocolEra as M, ProgressUpdate as N, MetricsConfig as O, ToolContext as P, ToolHandlerResult as S, ZodRawShape$1 as T, ResourceLinkIcon as _, ContentBlock as a, ToolContent as b, EmbeddedResource as c, JsonValue as d, JsonValueInput as f, ResourceLink as g, McpDefinitionInput as h, ContentAnnotations as i, McpClientInfo as j, MetricsOptions as k, EmbeddedTextResource as l, McpDefinition as m, AppContextToolDefinitionInput as n, CreateAppContextInput as o, McpAllowedOrigins as p, AudioContent as r, EmbeddedBlobResource as s, AppContextToolDefinition as t, ImageContent as u, TextContent as v, ZodOutputSchema as w, ToolDefinition as x, ToolAnnotations as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovable.dev/mcp-js",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },
@@ -22,6 +22,14 @@
22
22
  "module": "./dist/index.js",
23
23
  "types": "./dist/index.d.ts",
24
24
  "exports": {
25
+ "./skill-imports": {
26
+ "import": {
27
+ "types": "./skill-imports.d.ts"
28
+ },
29
+ "require": {
30
+ "types": "./skill-imports.d.cts"
31
+ }
32
+ },
25
33
  ".": {
26
34
  "import": {
27
35
  "types": "./dist/index.d.ts",
@@ -118,7 +126,9 @@
118
126
  "lovable-mcp-extract-manifest": "./dist/cli/extract-manifest.cjs"
119
127
  },
120
128
  "files": [
121
- "dist"
129
+ "dist",
130
+ "skill-imports.d.ts",
131
+ "skill-imports.d.cts"
122
132
  ],
123
133
  "keywords": [
124
134
  "mcp",
@@ -134,7 +144,8 @@
134
144
  "@modelcontextprotocol/server": "2.0.0",
135
145
  "@modelcontextprotocol/sdk": "1.28.0",
136
146
  "esbuild": "^0.27.0",
137
- "jose": "^6.2.2"
147
+ "jose": "^6.2.2",
148
+ "js-yaml": "^4.3.2"
138
149
  },
139
150
  "peerDependencies": {
140
151
  "vite": ">=5.0.0 <9.0.0",
@@ -147,7 +158,8 @@
147
158
  "typescript": "7.0.2",
148
159
  "vite": "^7.3.1",
149
160
  "vitest": "^4.1.5",
150
- "zod": "^4.1.13"
161
+ "zod": "^4.1.13",
162
+ "@types/js-yaml": "^4.0.9"
151
163
  },
152
164
  "scripts": {
153
165
  "build": "tsdown",
@@ -0,0 +1 @@
1
+ /// <reference path="./skill-imports.d.ts" />
@@ -0,0 +1,9 @@
1
+ declare module "*?skill" {
2
+ const skill: import("@lovable.dev/mcp-js").Skill;
3
+ export default skill;
4
+ }
5
+
6
+ declare module "*&skill" {
7
+ const skill: import("@lovable.dev/mcp-js").Skill;
8
+ export default skill;
9
+ }
@@ -1,30 +0,0 @@
1
- import { readFileSync } from "node:fs";
2
- import { join } from "node:path";
3
- //#region src/core/fs-errors.ts
4
- function isFileMissing(err) {
5
- return typeof err === "object" && err !== null && "code" in err && err.code === "ENOENT";
6
- }
7
- //#endregion
8
- //#region src/core/supabase-config.ts
9
- const SUPABASE_CONFIG_RELATIVE_PATH = "supabase/config.toml";
10
- function readSupabaseProjectRef(projectRoot) {
11
- let content;
12
- try {
13
- content = readFileSync(join(projectRoot, SUPABASE_CONFIG_RELATIVE_PATH), "utf8");
14
- } catch (err) {
15
- if (isFileMissing(err)) return void 0;
16
- throw err;
17
- }
18
- for (const raw of content.split(/\r?\n/)) {
19
- const line = raw.trim();
20
- if (line.length === 0 || line.startsWith("#")) continue;
21
- if (line.startsWith("[")) break;
22
- const match = /^project_id\s*=\s*(?:"([^"]*)"|'([^']*)')/.exec(line);
23
- if (match) {
24
- const value = match[1] ?? match[2] ?? "";
25
- return value.length > 0 ? value : void 0;
26
- }
27
- }
28
- }
29
- //#endregion
30
- export { isFileMissing as n, readSupabaseProjectRef as t };
@@ -1,41 +0,0 @@
1
- let node_fs = require("node:fs");
2
- let node_path = require("node:path");
3
- //#region src/core/fs-errors.ts
4
- function isFileMissing(err) {
5
- return typeof err === "object" && err !== null && "code" in err && err.code === "ENOENT";
6
- }
7
- //#endregion
8
- //#region src/core/supabase-config.ts
9
- const SUPABASE_CONFIG_RELATIVE_PATH = "supabase/config.toml";
10
- function readSupabaseProjectRef(projectRoot) {
11
- let content;
12
- try {
13
- content = (0, node_fs.readFileSync)((0, node_path.join)(projectRoot, SUPABASE_CONFIG_RELATIVE_PATH), "utf8");
14
- } catch (err) {
15
- if (isFileMissing(err)) return void 0;
16
- throw err;
17
- }
18
- for (const raw of content.split(/\r?\n/)) {
19
- const line = raw.trim();
20
- if (line.length === 0 || line.startsWith("#")) continue;
21
- if (line.startsWith("[")) break;
22
- const match = /^project_id\s*=\s*(?:"([^"]*)"|'([^']*)')/.exec(line);
23
- if (match) {
24
- const value = match[1] ?? match[2] ?? "";
25
- return value.length > 0 ? value : void 0;
26
- }
27
- }
28
- }
29
- //#endregion
30
- Object.defineProperty(exports, "isFileMissing", {
31
- enumerable: true,
32
- get: function() {
33
- return isFileMissing;
34
- }
35
- });
36
- Object.defineProperty(exports, "readSupabaseProjectRef", {
37
- enumerable: true,
38
- get: function() {
39
- return readSupabaseProjectRef;
40
- }
41
- });