@bridge-ds/mcp 0.6.0 → 0.7.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/dist/figma.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type ComponentPushDiff } from '@bridge-ds/core';
1
+ import { type ChangesMode, type ComponentPushDiff } from '@bridge-ds/core';
2
2
  import type { BridgeContext } from './context.js';
3
3
  /** Who sends from here: the MCP server speaks for an AI agent, the CLI for the person. */
4
4
  export type FigmaSource = 'mcp' | 'cli';
@@ -65,14 +65,21 @@ export declare function pushFigmaComponentOp(ctx: BridgeContext, a: {
65
65
  diff: ComponentPushDiff;
66
66
  dryRun?: boolean | undefined;
67
67
  source?: FigmaSource | undefined;
68
+ changes?: ChangesMode | undefined;
68
69
  }): Promise<{
69
70
  next: string;
71
+ suggestion?: {
72
+ route: "token-change" | "claude-draft";
73
+ number: number;
74
+ url: string;
75
+ } | undefined;
70
76
  library?: {
71
77
  route: "token-change" | "claude-draft";
72
78
  number: number;
73
79
  url: string;
74
80
  branch: string;
75
81
  } | undefined;
82
+ changesMode: ChangesMode;
76
83
  fixInFigma?: import("@bridge-ds/core").PushIssue[] | undefined;
77
84
  reasons?: string[] | undefined;
78
85
  edits?: import("@bridge-ds/core").TokenEdit[] | undefined;
package/dist/history.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type HistoryEntry, type HistoryReport, type RevertResolution } from '@bridge-ds/core';
1
+ import { type ChangesMode, type HistoryEntry, type HistoryReport, type RevertResolution } from '@bridge-ds/core';
2
2
  import type { BridgeContext } from './context.js';
3
3
  /** The history report for this context: local git (first parent of HEAD) or GitHub (the ref, PRs folded). */
4
4
  export declare function loadHistory(ctx: BridgeContext, limit?: number): Promise<HistoryReport>;
@@ -187,6 +187,8 @@ export declare function planRevertOp(ctx: BridgeContext, a: PlanArgs & {
187
187
  /** Plans, then commits to a new local bridge/* branch or opens a PR on a new bridge/* branch. Never main. */
188
188
  export declare function proposeRevert(ctx: BridgeContext, a: PlanArgs & {
189
189
  dryRun?: boolean;
190
+ changes?: ChangesMode | undefined;
191
+ source?: 'mcp' | 'cli' | undefined;
190
192
  }): Promise<{
191
193
  hint: string;
192
194
  tier: 1 | 2 | 3;
@@ -232,6 +234,162 @@ export declare function proposeRevert(ctx: BridgeContext, a: PlanArgs & {
232
234
  title: string;
233
235
  why?: string | undefined;
234
236
  status: "ready" | "blocked" | "nothing-to-do";
237
+ } | {
238
+ status: string;
239
+ changesMode: string;
240
+ suggestion: {
241
+ title: string;
242
+ labels: string[];
243
+ body: string;
244
+ parts: number;
245
+ };
246
+ fileContents: {
247
+ path: string;
248
+ content: string;
249
+ }[];
250
+ tier: 1 | 2 | 3;
251
+ bump: import("@bridge-ds/core").SemverBump;
252
+ reasons: string[];
253
+ edits: string[];
254
+ conflicts: {
255
+ before?: string | undefined;
256
+ now?: unknown;
257
+ key: string;
258
+ path: string;
259
+ file: string;
260
+ reason: import("@bridge-ds/core").ConflictReason;
261
+ message: string;
262
+ later: string[];
263
+ resolution: RevertResolution;
264
+ }[];
265
+ skipped: string[];
266
+ changes: {
267
+ kind: "added" | "changed" | "renamed" | "removed";
268
+ path: string;
269
+ file: string;
270
+ before: string | undefined;
271
+ after: string | undefined;
272
+ }[];
273
+ contrast: {
274
+ moved: number;
275
+ newFailures: import("@bridge-ds/core").ContrastDelta[];
276
+ sample: import("@bridge-ds/core").ContrastDelta[];
277
+ };
278
+ newErrors: import("@bridge-ds/core").LayerIssue[];
279
+ branch: string;
280
+ files: string[];
281
+ notes: string[];
282
+ reverts?: {
283
+ pr?: number | undefined;
284
+ id: string;
285
+ title: string;
286
+ date: string;
287
+ author: string;
288
+ } | undefined;
289
+ kind: "revert" | "restore";
290
+ title: string;
291
+ why?: string | undefined;
292
+ } | {
293
+ status: string;
294
+ message: string;
295
+ changesMode: string;
296
+ fileContents: {
297
+ path: string;
298
+ content: string;
299
+ }[];
300
+ tier: 1 | 2 | 3;
301
+ bump: import("@bridge-ds/core").SemverBump;
302
+ reasons: string[];
303
+ edits: string[];
304
+ conflicts: {
305
+ before?: string | undefined;
306
+ now?: unknown;
307
+ key: string;
308
+ path: string;
309
+ file: string;
310
+ reason: import("@bridge-ds/core").ConflictReason;
311
+ message: string;
312
+ later: string[];
313
+ resolution: RevertResolution;
314
+ }[];
315
+ skipped: string[];
316
+ changes: {
317
+ kind: "added" | "changed" | "renamed" | "removed";
318
+ path: string;
319
+ file: string;
320
+ before: string | undefined;
321
+ after: string | undefined;
322
+ }[];
323
+ contrast: {
324
+ moved: number;
325
+ newFailures: import("@bridge-ds/core").ContrastDelta[];
326
+ sample: import("@bridge-ds/core").ContrastDelta[];
327
+ };
328
+ newErrors: import("@bridge-ds/core").LayerIssue[];
329
+ branch: string;
330
+ files: string[];
331
+ notes: string[];
332
+ reverts?: {
333
+ pr?: number | undefined;
334
+ id: string;
335
+ title: string;
336
+ date: string;
337
+ author: string;
338
+ } | undefined;
339
+ kind: "revert" | "restore";
340
+ title: string;
341
+ why?: string | undefined;
342
+ } | {
343
+ next: string;
344
+ warnings?: string[] | undefined;
345
+ status: string;
346
+ changesMode: string;
347
+ number: number;
348
+ url: string;
349
+ version: string;
350
+ labels: string[];
351
+ tier: 1 | 2 | 3;
352
+ bump: import("@bridge-ds/core").SemverBump;
353
+ reasons: string[];
354
+ edits: string[];
355
+ conflicts: {
356
+ before?: string | undefined;
357
+ now?: unknown;
358
+ key: string;
359
+ path: string;
360
+ file: string;
361
+ reason: import("@bridge-ds/core").ConflictReason;
362
+ message: string;
363
+ later: string[];
364
+ resolution: RevertResolution;
365
+ }[];
366
+ skipped: string[];
367
+ changes: {
368
+ kind: "added" | "changed" | "renamed" | "removed";
369
+ path: string;
370
+ file: string;
371
+ before: string | undefined;
372
+ after: string | undefined;
373
+ }[];
374
+ contrast: {
375
+ moved: number;
376
+ newFailures: import("@bridge-ds/core").ContrastDelta[];
377
+ sample: import("@bridge-ds/core").ContrastDelta[];
378
+ };
379
+ newErrors: import("@bridge-ds/core").LayerIssue[];
380
+ branch: string;
381
+ files: string[];
382
+ notes: string[];
383
+ reverts?: {
384
+ pr?: number | undefined;
385
+ id: string;
386
+ title: string;
387
+ date: string;
388
+ author: string;
389
+ } | undefined;
390
+ kind: "revert" | "restore";
391
+ title: string;
392
+ why?: string | undefined;
235
393
  } | {
236
394
  status: string;
237
395
  prBody: string;
package/dist/index.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  VERSION,
4
4
  optionsFromArgv,
5
5
  serveStdio
6
- } from "./chunk-M7DUTFIQ.js";
7
- import "./chunk-E4D5KPIQ.js";
6
+ } from "./chunk-YCKNSKPW.js";
7
+ import "./chunk-BZ3KXXMM.js";
8
8
 
9
9
  // src/index.ts
10
10
  var argv = process.argv.slice(2);
package/dist/lib.d.ts CHANGED
@@ -15,6 +15,7 @@ export * as branches from './branches.js';
15
15
  export * as studio from './studio.js';
16
16
  export * as pieces from './pieces.js';
17
17
  export * as figma from './figma.js';
18
+ export * as suggestions from './suggestions.js';
18
19
  export { DOCS_DRAFT_MODEL, anthropicReplyText, anthropicRequest, formatDocsJson, mergeDocsDraft, missingProse, parseDocsReply } from '@bridge-ds/core';
19
20
  export interface ServeOptions extends ContextOptions {
20
21
  }
package/dist/lib.js CHANGED
@@ -26,13 +26,14 @@ import {
26
26
  pieces_exports,
27
27
  requests_exports,
28
28
  serveStdio,
29
- studio_exports
30
- } from "./chunk-M7DUTFIQ.js";
29
+ studio_exports,
30
+ suggestions_exports
31
+ } from "./chunk-YCKNSKPW.js";
31
32
  import {
32
33
  CONFIG_FILE,
33
34
  loadConfig,
34
35
  toConfigJson
35
- } from "./chunk-E4D5KPIQ.js";
36
+ } from "./chunk-BZ3KXXMM.js";
36
37
  export {
37
38
  BridgeContext,
38
39
  CONFIG_FILE,
@@ -64,5 +65,6 @@ export {
64
65
  requests_exports as requests,
65
66
  serveStdio,
66
67
  studio_exports as studio,
68
+ suggestions_exports as suggestions,
67
69
  toConfigJson
68
70
  };
package/dist/ops.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { DesignSystemIndex } from '@bridge-ds/core/audit';
2
2
  import { type ScaffoldInput } from './components.js';
3
- import { type BridgeConfig, type GitHubClient } from '@bridge-ds/core';
3
+ import { type ChangesMode, type BridgeConfig, type GitHubClient } from '@bridge-ds/core';
4
4
  import { type Combo, type PairInput, type TokenEdit, type TokenSet } from './core-adapter.js';
5
5
  import { BridgeContext } from './context.js';
6
6
  /** Accepts `color.text.muted`, `--color-text-muted` or `var(--color-text-muted)`. */
@@ -9,6 +9,7 @@ export declare function getConfig(ctx: BridgeContext): Promise<{
9
9
  source: string;
10
10
  configOrigin: string;
11
11
  write: string;
12
+ changes: string;
12
13
  repo: string | null;
13
14
  tokenFiles: number;
14
15
  tokens: number;
@@ -278,6 +279,10 @@ export declare function proposeTokenChange(ctx: BridgeContext, a: {
278
279
  pr?: number | string | undefined;
279
280
  jira?: string | undefined;
280
281
  product?: string | undefined;
282
+ /** "suggest" or "direct" for this call; default: `changes` in bridge.config.json, else "suggest". */
283
+ changes?: ChangesMode | undefined;
284
+ /** Who sends it: the MCP server (an AI agent) or the CLI (the person). */
285
+ source?: 'mcp' | 'cli' | undefined;
281
286
  }): Promise<{
282
287
  status: string;
283
288
  pr: number;
@@ -374,6 +379,106 @@ export declare function proposeTokenChange(ctx: BridgeContext, a: {
374
379
  why: string;
375
380
  newErrors: import("@bridge-ds/core").LayerIssue[];
376
381
  message?: undefined;
382
+ } | {
383
+ suggestion: {
384
+ title: string;
385
+ body: string;
386
+ };
387
+ fileContents: {
388
+ path: string;
389
+ content: string | null;
390
+ }[];
391
+ changesMode: "suggest";
392
+ files: string[];
393
+ title: string;
394
+ tier: 1 | 2 | 3;
395
+ bump: import("@bridge-ds/core").SemverBump;
396
+ reasons: string[];
397
+ changes: {
398
+ fields?: ("value" | "description" | "type" | "extensions")[] | undefined;
399
+ file: string;
400
+ before: string | undefined;
401
+ after: string | undefined;
402
+ from?: string | undefined;
403
+ kind: "added" | "changed" | "renamed" | "removed";
404
+ path: string;
405
+ }[];
406
+ contrast: {
407
+ moved: number;
408
+ newFailures: import("@bridge-ds/core").ContrastDelta[];
409
+ };
410
+ impact: {
411
+ total: number;
412
+ sample: import("@bridge-ds/core").ImpactEntry[];
413
+ };
414
+ notes: string[];
415
+ status: string;
416
+ message?: undefined;
417
+ } | {
418
+ fileContents: {
419
+ path: string;
420
+ content: string | null;
421
+ }[];
422
+ changesMode: "suggest";
423
+ files: string[];
424
+ title: string;
425
+ tier: 1 | 2 | 3;
426
+ bump: import("@bridge-ds/core").SemverBump;
427
+ reasons: string[];
428
+ changes: {
429
+ fields?: ("value" | "description" | "type" | "extensions")[] | undefined;
430
+ file: string;
431
+ before: string | undefined;
432
+ after: string | undefined;
433
+ from?: string | undefined;
434
+ kind: "added" | "changed" | "renamed" | "removed";
435
+ path: string;
436
+ }[];
437
+ contrast: {
438
+ moved: number;
439
+ newFailures: import("@bridge-ds/core").ContrastDelta[];
440
+ };
441
+ impact: {
442
+ total: number;
443
+ sample: import("@bridge-ds/core").ImpactEntry[];
444
+ };
445
+ notes: string[];
446
+ status: string;
447
+ message: string;
448
+ } | {
449
+ product: string;
450
+ next: string;
451
+ warnings?: string[] | undefined;
452
+ number: number;
453
+ url: string;
454
+ version: string;
455
+ labels: string[];
456
+ changesMode: "suggest";
457
+ files: string[];
458
+ title: string;
459
+ tier: 1 | 2 | 3;
460
+ bump: import("@bridge-ds/core").SemverBump;
461
+ reasons: string[];
462
+ changes: {
463
+ fields?: ("value" | "description" | "type" | "extensions")[] | undefined;
464
+ file: string;
465
+ before: string | undefined;
466
+ after: string | undefined;
467
+ from?: string | undefined;
468
+ kind: "added" | "changed" | "renamed" | "removed";
469
+ path: string;
470
+ }[];
471
+ contrast: {
472
+ moved: number;
473
+ newFailures: import("@bridge-ds/core").ContrastDelta[];
474
+ };
475
+ impact: {
476
+ total: number;
477
+ sample: import("@bridge-ds/core").ImpactEntry[];
478
+ };
479
+ notes: string[];
480
+ status: string;
481
+ message?: undefined;
377
482
  } | {
378
483
  fileContents: {
379
484
  path: string;
package/dist/pieces.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type ChangesMode } from '@bridge-ds/core';
1
2
  import type { BridgeContext } from './context.js';
2
3
  /** Who opens library branches from here: the MCP server speaks for an AI agent, the CLI for the person. */
3
4
  export type PiecesSource = 'mcp' | 'cli';
@@ -45,6 +46,7 @@ export declare function openLibraryBranchOp(ctx: BridgeContext, a: {
45
46
  usePreview?: boolean | undefined;
46
47
  dryRun?: boolean | undefined;
47
48
  source?: PiecesSource | undefined;
49
+ changes?: ChangesMode | undefined;
48
50
  }): Promise<{
49
51
  next: string;
50
52
  warnings?: string[] | undefined;
@@ -55,6 +57,7 @@ export declare function openLibraryBranchOp(ctx: BridgeContext, a: {
55
57
  number: number;
56
58
  url: string;
57
59
  } | undefined;
60
+ changesMode: ChangesMode;
58
61
  neededBy: string;
59
62
  request?: string | undefined;
60
63
  exploration?: string | undefined;
@@ -11,7 +11,7 @@ import {
11
11
  referenceImagePath,
12
12
  selectTokenFiles,
13
13
  showFile
14
- } from "./chunk-E4D5KPIQ.js";
14
+ } from "./chunk-BZ3KXXMM.js";
15
15
 
16
16
  // ../visual/src/run.ts
17
17
  import { existsSync as existsSync3 } from "node:fs";
package/dist/studio.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type ChangesMode } from '@bridge-ds/core';
1
2
  import type { BridgeContext } from './context.js';
2
3
  /**
3
4
  * Save a component's guidance (docs.json) the way the Library edit mode does: merged into the docs on the branch,
@@ -13,6 +14,9 @@ export declare function saveDocs(ctx: BridgeContext, a: {
13
14
  jira?: string | undefined;
14
15
  product?: string | undefined;
15
16
  dryRun?: boolean | undefined;
17
+ /** "suggest" or "direct" for this call; default: `changes` in bridge.config.json, else "suggest". */
18
+ changes?: ChangesMode | undefined;
19
+ source?: 'mcp' | 'cli' | undefined;
16
20
  }): Promise<{
17
21
  status: "dry-run";
18
22
  pr: number;
@@ -57,9 +61,23 @@ export declare function saveDocs(ctx: BridgeContext, a: {
57
61
  path: string;
58
62
  content: string;
59
63
  product: string;
64
+ changesMode: ChangesMode;
60
65
  pr?: undefined;
61
66
  url?: undefined;
62
67
  title?: undefined;
68
+ } | {
69
+ said: string;
70
+ next: string;
71
+ warnings?: string[] | undefined;
72
+ status: "suggested";
73
+ number: number;
74
+ url: string;
75
+ title: string;
76
+ path: string;
77
+ product: string;
78
+ changesMode: "suggest";
79
+ pr?: undefined;
80
+ content?: undefined;
63
81
  } | {
64
82
  status: "sent-for-review";
65
83
  pr: number;