@bridge-ds/mcp 0.5.0 → 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.
@@ -0,0 +1,83 @@
1
+ import { type ComponentPushDiff } from '@bridge-ds/core';
2
+ import type { BridgeContext } from './context.js';
3
+ /** Who sends from here: the MCP server speaks for an AI agent, the CLI for the person. */
4
+ export type FigmaSource = 'mcp' | 'cli';
5
+ /** bridge_figma_changes / `bridge figma`: the library branches opened from Figma components, and where each stands. */
6
+ export declare function figmaChangesOp(ctx: BridgeContext, a?: {
7
+ state?: 'open' | 'closed' | 'all' | undefined;
8
+ }): Promise<{
9
+ changes: {
10
+ pr: number;
11
+ title: string;
12
+ url: string;
13
+ branch: string;
14
+ component: string;
15
+ route: string;
16
+ status: string;
17
+ said: string;
18
+ }[];
19
+ next: string;
20
+ }>;
21
+ /** bridge_get_figma_change / `bridge figma show <n>`: one library branch from Figma, its spec and the brief to draft it. */
22
+ export declare function getFigmaChangeOp(ctx: BridgeContext, a: {
23
+ pr: number | string;
24
+ }): Promise<{
25
+ next: string;
26
+ brief?: string | undefined;
27
+ spec?: {
28
+ path: string | undefined;
29
+ changes: import("@bridge-ds/core").RequestChange[];
30
+ variantAxes: Record<string, string[]>;
31
+ properties: {
32
+ name: string;
33
+ type: string;
34
+ default: string;
35
+ }[];
36
+ tokenEdits: import("@bridge-ds/core").TokenEdit[];
37
+ reasons: string[];
38
+ } | undefined;
39
+ pr: number;
40
+ title: string;
41
+ url: string;
42
+ branch: string;
43
+ component: string;
44
+ route: string;
45
+ status: string;
46
+ said: string;
47
+ }>;
48
+ /** bridge_mark_figma_change_drafted / `bridge figma drafted <n>`: the code is on the branch, labelled drafted by Claude AI. */
49
+ export declare function markFigmaDraftedOp(ctx: BridgeContext, a: {
50
+ pr: number | string;
51
+ }): Promise<{
52
+ pr: number;
53
+ status: string;
54
+ said: string;
55
+ files: string[];
56
+ next: string;
57
+ }>;
58
+ /**
59
+ * bridge_push_figma_component / `bridge figma push <diff.json>`: the plugin's push from a structured diff. An exact token
60
+ * swap opens a token change (same plan, contrast gate and body as bridge_propose_token_change, plus the component pairs
61
+ * the swap moves); anything that needs code opens a draft branch with the spec for Claude AI; what cannot be read is
62
+ * listed with what to do. dryRun shows the route.
63
+ */
64
+ export declare function pushFigmaComponentOp(ctx: BridgeContext, a: {
65
+ diff: ComponentPushDiff;
66
+ dryRun?: boolean | undefined;
67
+ source?: FigmaSource | undefined;
68
+ }): Promise<{
69
+ next: string;
70
+ library?: {
71
+ route: "token-change" | "claude-draft";
72
+ number: number;
73
+ url: string;
74
+ branch: string;
75
+ } | undefined;
76
+ fixInFigma?: import("@bridge-ds/core").PushIssue[] | undefined;
77
+ reasons?: string[] | undefined;
78
+ edits?: import("@bridge-ds/core").TokenEdit[] | undefined;
79
+ status: "opened" | "suggested" | "dry-run" | "not-sent";
80
+ component: string;
81
+ route: string;
82
+ said: string;
83
+ }>;
package/dist/index.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  VERSION,
4
4
  optionsFromArgv,
5
5
  serveStdio
6
- } from "./chunk-MHCXMHCL.js";
7
- import "./chunk-QTO4EP6V.js";
6
+ } from "./chunk-M7DUTFIQ.js";
7
+ import "./chunk-E4D5KPIQ.js";
8
8
 
9
9
  // src/index.ts
10
10
  var argv = process.argv.slice(2);
package/dist/lib.d.ts CHANGED
@@ -14,6 +14,7 @@ export * as drafts from './drafts.js';
14
14
  export * as branches from './branches.js';
15
15
  export * as studio from './studio.js';
16
16
  export * as pieces from './pieces.js';
17
+ export * as figma from './figma.js';
17
18
  export { DOCS_DRAFT_MODEL, anthropicReplyText, anthropicRequest, formatDocsJson, mergeDocsDraft, missingProse, parseDocsReply } from '@bridge-ds/core';
18
19
  export interface ServeOptions extends ContextOptions {
19
20
  }
package/dist/lib.js CHANGED
@@ -15,6 +15,7 @@ import {
15
15
  detectConfig,
16
16
  drafts_exports,
17
17
  explorations_exports,
18
+ figma_exports,
18
19
  formatDocsJson,
19
20
  history_exports,
20
21
  mergeDocsDraft,
@@ -26,12 +27,12 @@ import {
26
27
  requests_exports,
27
28
  serveStdio,
28
29
  studio_exports
29
- } from "./chunk-MHCXMHCL.js";
30
+ } from "./chunk-M7DUTFIQ.js";
30
31
  import {
31
32
  CONFIG_FILE,
32
33
  loadConfig,
33
34
  toConfigJson
34
- } from "./chunk-QTO4EP6V.js";
35
+ } from "./chunk-E4D5KPIQ.js";
35
36
  export {
36
37
  BridgeContext,
37
38
  CONFIG_FILE,
@@ -50,6 +51,7 @@ export {
50
51
  detectConfig,
51
52
  drafts_exports as drafts,
52
53
  explorations_exports as explorations,
54
+ figma_exports as figma,
53
55
  formatDocsJson,
54
56
  history_exports as history,
55
57
  mergeDocsDraft,
package/dist/pieces.d.ts CHANGED
@@ -60,7 +60,7 @@ export declare function openLibraryBranchOp(ctx: BridgeContext, a: {
60
60
  exploration?: string | undefined;
61
61
  brief?: string | undefined;
62
62
  edits?: import("@bridge-ds/core").TokenEdit[] | undefined;
63
- status: "opened" | "already-linked" | "dry-run";
63
+ status: "opened" | "suggested" | "already-linked" | "dry-run";
64
64
  pr: number;
65
65
  piece: string;
66
66
  opens: string;
@@ -11,7 +11,7 @@ import {
11
11
  referenceImagePath,
12
12
  selectTokenFiles,
13
13
  showFile
14
- } from "./chunk-QTO4EP6V.js";
14
+ } from "./chunk-E4D5KPIQ.js";
15
15
 
16
16
  // ../visual/src/run.ts
17
17
  import { existsSync as existsSync3 } from "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bridge-ds/mcp",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "description": "Bridge MCP server: lets Claude (Claude Code, Claude Desktop or any MCP client) read, check and propose changes to a DTCG design system repo through pull requests.",
6
6
  "license": "MIT",
@@ -54,8 +54,8 @@
54
54
  "build:package": "node ../../scripts/build-packages.mjs mcp"
55
55
  },
56
56
  "dependencies": {
57
- "@bridge-ds/core": "^0.9.0",
58
- "@bridge-ds/visual": "^0.3.3",
57
+ "@bridge-ds/core": "^0.10.0",
58
+ "@bridge-ds/visual": "^0.3.4",
59
59
  "@modelcontextprotocol/sdk": "1.31.0",
60
60
  "typescript": "5.9.3",
61
61
  "zod": "3.25.76"