@skyelight/mcp 0.5.3 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -11,7 +11,19 @@ keeps working. A **patch** is a fix or a wording change. A **major** would be
11
11
  removing a tool or an argument, or changing what an existing field means, and
12
12
  there has not been one.
13
13
 
14
- ## 0.5.3 — unreleased
14
+ ## 0.6.0 — unreleased
15
+
16
+ ### Added
17
+
18
+ - **`publish_prototype`.** Hosts a prototype on Skyelight: pass the complete
19
+ code of one file (an HTML page, or one React component with an export
20
+ default) and Skyelight serves it at its own link with the review badge on
21
+ it, in a project of your choosing or a new one. Returns the share link and
22
+ the project link. Publishing again with the same `prototypeId`, or the same
23
+ name in the same project, makes a new version at the same link. Owners,
24
+ admins and collaborators; on a person's own connection.
25
+
26
+ ## 0.5.3 — 2026-10-02
15
27
 
16
28
  ### Changed
17
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyelight/mcp",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "MCP server for Skyelight — read feedback items from your project as an agent",
5
5
  "type": "module",
6
6
  "bin": {
package/src/brand.js CHANGED
@@ -61,4 +61,8 @@ export const STATUS = {
61
61
  merge_items: ["Merging duplicates", "Merged the duplicates"],
62
62
  decision_log: ["Reading the decisions", "Read the decisions"],
63
63
  save_rule: ["Saving the rule", "Saved the rule"],
64
+ publish_prototype: [
65
+ "Publishing the prototype to Skyelight",
66
+ "Published the prototype",
67
+ ],
64
68
  };
package/src/client.js CHANGED
@@ -110,5 +110,6 @@ export function createClient({ apiUrl, token, fetchImpl = fetch }) {
110
110
  mergeItems: (body) => post("/api/v1/items/merge", body),
111
111
  decisionLog: (params) => request("/api/v1/decisions", params),
112
112
  saveRule: (body) => post("/api/v1/rules", body),
113
+ publishPrototype: (body) => post("/api/v1/prototypes/publish", body),
113
114
  };
114
115
  }
package/src/tools.d.ts CHANGED
@@ -41,6 +41,7 @@ export declare function renderProjects(result: unknown): string;
41
41
  export declare function renderMembers(result: unknown): string;
42
42
  export declare function renderAssigned(result: unknown): string;
43
43
 
44
+ export declare function renderPublished(result: unknown): string;
44
45
  export declare function renderPosted(
45
46
  result: unknown,
46
47
  opts: { kind: "update" | "item" },
package/src/tools.js CHANGED
@@ -203,6 +203,52 @@ export function toolDefinitions(opts = {}) {
203
203
  required: ["url", "body"],
204
204
  },
205
205
  },
206
+ {
207
+ name: "publish_prototype",
208
+ description:
209
+ "Host a prototype on Skyelight so people can review it: Skyelight serves the code at " +
210
+ "its own link with the review badge on it, and their pins land in a Skyelight project. " +
211
+ "Pass the complete code of one file: a whole HTML page, or one React component with " +
212
+ "an export default (Tailwind classes and npm imports work; local imports such as " +
213
+ "@/components do not). Returns the share link and the project link; give both to the " +
214
+ "person. Publishing again with the same prototypeId, or the same name in the same " +
215
+ "project, makes a new version at the same link. The link is public to anyone who has it.",
216
+ inputSchema: {
217
+ type: "object",
218
+ properties: {
219
+ name: {
220
+ type: "string",
221
+ description:
222
+ "What it is, in a few words. Names the link and, when no project is given, a new project.",
223
+ },
224
+ code: {
225
+ type: "string",
226
+ description: "The complete file. Never a summary or an excerpt.",
227
+ },
228
+ kind: {
229
+ type: "string",
230
+ enum: ["html", "react"],
231
+ description: "Optional; worked out from the code when left out.",
232
+ },
233
+ projectId: {
234
+ type: "string",
235
+ description:
236
+ "Optional: the project to put it in. Left out, a new project is made for it.",
237
+ },
238
+ prototypeId: {
239
+ type: "string",
240
+ description:
241
+ "To publish a new version of a prototype published before.",
242
+ },
243
+ workspaceId: {
244
+ type: "string",
245
+ description:
246
+ "When you are in more than one workspace and give no project, from list_workspaces.",
247
+ },
248
+ },
249
+ required: ["code"],
250
+ },
251
+ },
206
252
  {
207
253
  name: "list_members",
208
254
  description:
@@ -340,6 +386,8 @@ const TOOL_ANNOTATIONS = {
340
386
  save_rule: { ...WRITE, idempotentHint: true },
341
387
  // Hides items from every list (reversible in the app, but not here).
342
388
  merge_items: { ...WRITE, destructiveHint: true },
389
+ // Puts code at a public link: something the person should agree to.
390
+ publish_prototype: { ...WRITE, openWorldHint: true },
343
391
  };
344
392
 
345
393
  function plural(n, one, many) {
@@ -749,6 +797,19 @@ export function renderPosted(result, { kind }) {
749
797
  );
750
798
  }
751
799
 
800
+ export function renderPublished(result) {
801
+ const lines = [
802
+ result.newPrototype
803
+ ? `Published "${result.name}" in ${result.projectName}.`
804
+ : `Published version ${result.version}. The link is the same, and shows this version now.`,
805
+ `Share link: ${result.shareUrl}`,
806
+ `Project: ${result.projectUrl}${result.createdProject ? " (new project)" : ""}`,
807
+ `prototypeId ${result.prototypeId}: pass it to publish the next version at the same link.`,
808
+ "Anyone with the share link can open it; people sign in to Skyelight to leave pins.",
809
+ ];
810
+ return lines.join("\n");
811
+ }
812
+
752
813
  export function renderMembers(result) {
753
814
  const members = result?.members ?? [];
754
815
  const where = result?.workspace?.name ? ` in ${result.workspace.name}` : "";
@@ -836,6 +897,26 @@ export async function callTool(name, args, { client, config }) {
836
897
  return { text: renderPosted(result, { kind: "item" }), data: result };
837
898
  }
838
899
 
900
+ if (name === "publish_prototype") {
901
+ if (!args.code?.trim()) {
902
+ throw new Error(
903
+ "publish_prototype needs code: the whole page, or one React component",
904
+ );
905
+ }
906
+ if (!args.prototypeId && !args.name?.trim()) {
907
+ throw new Error("publish_prototype needs a name");
908
+ }
909
+ const result = await client.publishPrototype({
910
+ name: args.name ?? "",
911
+ code: args.code,
912
+ ...(args.kind ? { kind: args.kind } : {}),
913
+ ...(args.projectId ? { projectId: args.projectId } : {}),
914
+ ...(args.prototypeId ? { prototypeId: args.prototypeId } : {}),
915
+ ...(args.workspaceId ? { workspaceId: args.workspaceId } : {}),
916
+ });
917
+ return { text: renderPublished(result), data: result };
918
+ }
919
+
839
920
  if (name === "list_members") {
840
921
  const result = await client.listMembers({
841
922
  projectId,
package/src/version.js CHANGED
@@ -12,4 +12,4 @@
12
12
  * filesystem there. `test/server.test.js` asserts the two agree, so the pair
13
13
  * cannot drift again without a test going red.
14
14
  */
15
- export const VERSION = "0.5.3";
15
+ export const VERSION = "0.6.0";