@bridge-ds/mcp 0.4.1 → 0.5.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/dist/branches.d.ts +8 -0
- package/dist/{chunk-MXMMPO7F.js → chunk-MHCXMHCL.js} +952 -96
- package/dist/explorations.d.ts +6 -1
- package/dist/index.js +1 -1
- package/dist/lib.d.ts +1 -0
- package/dist/lib.js +3 -1
- package/dist/ops.d.ts +3 -0
- package/dist/pieces.d.ts +122 -0
- package/package.json +3 -3
package/dist/explorations.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { explorationRules, type ExplorationSource, type ExplorationTryIt } from '@bridge-ds/core';
|
|
1
|
+
import { explorationRules, type BridgeConfig, type ExplorationSource, type ExplorationTryIt } from '@bridge-ds/core';
|
|
2
2
|
import { BridgeContext } from './context.js';
|
|
3
|
+
export declare const settingsOf: (config: BridgeConfig) => {
|
|
4
|
+
base: string;
|
|
5
|
+
packages: string[];
|
|
6
|
+
apps: import("@bridge-ds/core").PreviewApps;
|
|
7
|
+
};
|
|
3
8
|
/** `explore/<slug>` from a branch, a slug or a name; throws with how to fix it when it cannot be one. */
|
|
4
9
|
export declare function toExplorationBranch(ref: string): string;
|
|
5
10
|
export interface StartExplorationInput {
|
package/dist/index.js
CHANGED
package/dist/lib.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * as explorations from './explorations.js';
|
|
|
13
13
|
export * as drafts from './drafts.js';
|
|
14
14
|
export * as branches from './branches.js';
|
|
15
15
|
export * as studio from './studio.js';
|
|
16
|
+
export * as pieces from './pieces.js';
|
|
16
17
|
export { DOCS_DRAFT_MODEL, anthropicReplyText, anthropicRequest, formatDocsJson, mergeDocsDraft, missingProse, parseDocsReply } from '@bridge-ds/core';
|
|
17
18
|
export interface ServeOptions extends ContextOptions {
|
|
18
19
|
}
|
package/dist/lib.js
CHANGED
|
@@ -22,10 +22,11 @@ import {
|
|
|
22
22
|
ops_exports,
|
|
23
23
|
optionsFromArgv,
|
|
24
24
|
parseDocsReply,
|
|
25
|
+
pieces_exports,
|
|
25
26
|
requests_exports,
|
|
26
27
|
serveStdio,
|
|
27
28
|
studio_exports
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-MHCXMHCL.js";
|
|
29
30
|
import {
|
|
30
31
|
CONFIG_FILE,
|
|
31
32
|
loadConfig,
|
|
@@ -57,6 +58,7 @@ export {
|
|
|
57
58
|
optionsFromArgv,
|
|
58
59
|
loadConfig as parseConfig,
|
|
59
60
|
parseDocsReply,
|
|
61
|
+
pieces_exports as pieces,
|
|
60
62
|
requests_exports as requests,
|
|
61
63
|
serveStdio,
|
|
62
64
|
studio_exports as studio,
|
package/dist/ops.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DesignSystemIndex } from '@bridge-ds/core/audit';
|
|
1
2
|
import { type ScaffoldInput } from './components.js';
|
|
2
3
|
import { type BridgeConfig, type GitHubClient } from '@bridge-ds/core';
|
|
3
4
|
import { type Combo, type PairInput, type TokenEdit, type TokenSet } from './core-adapter.js';
|
|
@@ -713,6 +714,8 @@ export declare function visualImpact(ctx: BridgeContext, a: {
|
|
|
713
714
|
manifest: string;
|
|
714
715
|
next: string;
|
|
715
716
|
}>;
|
|
717
|
+
/** The design system the audit measures against: tokens of this repo, its components and package names. */
|
|
718
|
+
export declare function designSystemIndex(ctx: BridgeContext): Promise<DesignSystemIndex>;
|
|
716
719
|
/** Audit a product folder or file (local only): adoption metrics, top files, top fixes, and findings for one file. */
|
|
717
720
|
export declare function auditOp(ctx: BridgeContext, a: {
|
|
718
721
|
path: string;
|
package/dist/pieces.d.ts
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { BridgeContext } from './context.js';
|
|
2
|
+
/** Who opens library branches from here: the MCP server speaks for an AI agent, the CLI for the person. */
|
|
3
|
+
export type PiecesSource = 'mcp' | 'cli';
|
|
4
|
+
/**
|
|
5
|
+
* bridge_missing_pieces / `bridge pieces <n>`: the audit on each product file the branch changes, at its start and at its
|
|
6
|
+
* head, keeping what the branch added that the library lacks. With `record`, saves the result in the branch body
|
|
7
|
+
* (Studio's product branch page reads it there), keeping the library branches already opened.
|
|
8
|
+
*/
|
|
9
|
+
export declare function missingPiecesOp(ctx: BridgeContext, a: {
|
|
10
|
+
pr: number | string;
|
|
11
|
+
record?: boolean | undefined;
|
|
12
|
+
}): Promise<{
|
|
13
|
+
pieces: {
|
|
14
|
+
linked?: number | undefined;
|
|
15
|
+
where: string[];
|
|
16
|
+
opens: string;
|
|
17
|
+
token?: string | undefined;
|
|
18
|
+
nearest?: string | undefined;
|
|
19
|
+
component?: string | undefined;
|
|
20
|
+
id: string;
|
|
21
|
+
kind: import("@bridge-ds/core").PieceKind;
|
|
22
|
+
title: string;
|
|
23
|
+
summary: string;
|
|
24
|
+
}[];
|
|
25
|
+
fixes: {
|
|
26
|
+
count: number;
|
|
27
|
+
sample: string[];
|
|
28
|
+
};
|
|
29
|
+
recorded: boolean;
|
|
30
|
+
next: string;
|
|
31
|
+
skipped?: string | undefined;
|
|
32
|
+
pr: number;
|
|
33
|
+
branch: string;
|
|
34
|
+
product: string;
|
|
35
|
+
files: number;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* bridge_open_library_branch / `bridge pieces open <n> <piece>`: the library side of one recorded piece, linked both
|
|
39
|
+
* ways. A token opens a token change (and the product branch takes its preview), a variant a library exploration with
|
|
40
|
+
* the brief to build it, a new component a request.
|
|
41
|
+
*/
|
|
42
|
+
export declare function openLibraryBranchOp(ctx: BridgeContext, a: {
|
|
43
|
+
pr: number | string;
|
|
44
|
+
piece: string;
|
|
45
|
+
usePreview?: boolean | undefined;
|
|
46
|
+
dryRun?: boolean | undefined;
|
|
47
|
+
source?: PiecesSource | undefined;
|
|
48
|
+
}): Promise<{
|
|
49
|
+
next: string;
|
|
50
|
+
warnings?: string[] | undefined;
|
|
51
|
+
preview?: import("@bridge-ds/core").PreviewMerge | undefined;
|
|
52
|
+
library?: {
|
|
53
|
+
branch?: string | undefined;
|
|
54
|
+
kind: import("@bridge-ds/core").LibraryLinkKind;
|
|
55
|
+
number: number;
|
|
56
|
+
url: string;
|
|
57
|
+
} | undefined;
|
|
58
|
+
neededBy: string;
|
|
59
|
+
request?: string | undefined;
|
|
60
|
+
exploration?: string | undefined;
|
|
61
|
+
brief?: string | undefined;
|
|
62
|
+
edits?: import("@bridge-ds/core").TokenEdit[] | undefined;
|
|
63
|
+
status: "opened" | "already-linked" | "dry-run";
|
|
64
|
+
pr: number;
|
|
65
|
+
piece: string;
|
|
66
|
+
opens: string;
|
|
67
|
+
title: string;
|
|
68
|
+
}>;
|
|
69
|
+
/** bridge_product_branch / `bridge pieces status <n>`: the product branch page, as Studio shows it. */
|
|
70
|
+
export declare function productBranchOp(ctx: BridgeContext, a: {
|
|
71
|
+
pr: number | string;
|
|
72
|
+
}): Promise<{
|
|
73
|
+
next?: string | undefined;
|
|
74
|
+
pr: number;
|
|
75
|
+
title: string;
|
|
76
|
+
product: string;
|
|
77
|
+
said: string;
|
|
78
|
+
checked: string | null;
|
|
79
|
+
linked: {
|
|
80
|
+
action?: string | undefined;
|
|
81
|
+
tool?: string | undefined;
|
|
82
|
+
piece: string;
|
|
83
|
+
library: {
|
|
84
|
+
kind: import("@bridge-ds/core").LibraryLinkKind;
|
|
85
|
+
number: number;
|
|
86
|
+
url: string;
|
|
87
|
+
};
|
|
88
|
+
status: string;
|
|
89
|
+
preview: string;
|
|
90
|
+
}[];
|
|
91
|
+
notLinked: {
|
|
92
|
+
where: string[];
|
|
93
|
+
opens: string;
|
|
94
|
+
token?: string | undefined;
|
|
95
|
+
nearest?: string | undefined;
|
|
96
|
+
component?: string | undefined;
|
|
97
|
+
id: string;
|
|
98
|
+
kind: import("@bridge-ds/core").PieceKind;
|
|
99
|
+
title: string;
|
|
100
|
+
summary: string;
|
|
101
|
+
}[];
|
|
102
|
+
}>;
|
|
103
|
+
/** bridge_use_library_preview: the product branch takes (again) the library branch of a piece, merged in. */
|
|
104
|
+
export declare function useLibraryPreviewOp(ctx: BridgeContext, a: {
|
|
105
|
+
pr: number | string;
|
|
106
|
+
piece: string;
|
|
107
|
+
}): Promise<{
|
|
108
|
+
status: "merged" | "up-to-date" | "conflict";
|
|
109
|
+
sha: string | null;
|
|
110
|
+
said: string;
|
|
111
|
+
pr: number;
|
|
112
|
+
piece: string;
|
|
113
|
+
library: number;
|
|
114
|
+
}>;
|
|
115
|
+
/** bridge_switch_to_published: main into the product branch once its library branches shipped. */
|
|
116
|
+
export declare function switchToPublishedOp(ctx: BridgeContext, a: {
|
|
117
|
+
pr: number | string;
|
|
118
|
+
}): Promise<{
|
|
119
|
+
status: "switched" | "up-to-date";
|
|
120
|
+
said: string;
|
|
121
|
+
pr: number;
|
|
122
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bridge-ds/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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.
|
|
58
|
-
"@bridge-ds/visual": "^0.3.
|
|
57
|
+
"@bridge-ds/core": "^0.9.0",
|
|
58
|
+
"@bridge-ds/visual": "^0.3.3",
|
|
59
59
|
"@modelcontextprotocol/sdk": "1.31.0",
|
|
60
60
|
"typescript": "5.9.3",
|
|
61
61
|
"zod": "3.25.76"
|