@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/brand.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type BrandRadiusInput } from '@bridge-ds/core';
1
+ import { type ChangesMode, type BrandRadiusInput } from '@bridge-ds/core';
2
2
  import type { BridgeContext } from './context.js';
3
3
  export interface BrandArgs {
4
4
  slug: string;
@@ -62,6 +62,8 @@ export declare function planBrand(ctx: BridgeContext, a: BrandArgs): Promise<{
62
62
  }>;
63
63
  export declare function proposeBrand(ctx: BridgeContext, a: BrandArgs & {
64
64
  dryRun?: boolean;
65
+ changes?: ChangesMode | undefined;
66
+ source?: 'mcp' | 'cli' | undefined;
65
67
  }): Promise<{
66
68
  hint: string;
67
69
  ok: boolean;
@@ -99,6 +101,135 @@ export declare function proposeBrand(ctx: BridgeContext, a: BrandArgs & {
99
101
  prBody: string;
100
102
  status: string;
101
103
  why: string;
104
+ } | {
105
+ changesMode: string;
106
+ suggestion: {
107
+ title: string;
108
+ labels: string[];
109
+ body: string;
110
+ parts: number;
111
+ };
112
+ fileContents: {
113
+ path: string;
114
+ content: string | null;
115
+ }[];
116
+ ok: boolean;
117
+ slug: string;
118
+ name: string;
119
+ from: string;
120
+ title: string;
121
+ tier: import("@bridge-ds/core").RiskTier;
122
+ bump: "minor";
123
+ label: string;
124
+ reasons: string[];
125
+ files: {
126
+ path: string;
127
+ action: "create" | "modify";
128
+ }[];
129
+ actionStep: number;
130
+ ramps: {
131
+ [k: string]: {
132
+ [k: string]: string;
133
+ };
134
+ };
135
+ contrast: {
136
+ checks: number;
137
+ passing: number;
138
+ themes: string[];
139
+ line: string;
140
+ failing: {
141
+ pair: string;
142
+ modes: string;
143
+ ratio: number | null;
144
+ min: number;
145
+ }[];
146
+ };
147
+ issues: import("@bridge-ds/core").BrandIssue[];
148
+ prBody: string;
149
+ status: string;
150
+ } | {
151
+ changesMode: string;
152
+ fileContents: {
153
+ path: string;
154
+ content: string | null;
155
+ }[];
156
+ ok: boolean;
157
+ slug: string;
158
+ name: string;
159
+ from: string;
160
+ title: string;
161
+ tier: import("@bridge-ds/core").RiskTier;
162
+ bump: "minor";
163
+ label: string;
164
+ reasons: string[];
165
+ files: {
166
+ path: string;
167
+ action: "create" | "modify";
168
+ }[];
169
+ actionStep: number;
170
+ ramps: {
171
+ [k: string]: {
172
+ [k: string]: string;
173
+ };
174
+ };
175
+ contrast: {
176
+ checks: number;
177
+ passing: number;
178
+ themes: string[];
179
+ line: string;
180
+ failing: {
181
+ pair: string;
182
+ modes: string;
183
+ ratio: number | null;
184
+ min: number;
185
+ }[];
186
+ };
187
+ issues: import("@bridge-ds/core").BrandIssue[];
188
+ prBody: string;
189
+ status: string;
190
+ message: string;
191
+ } | {
192
+ next: string;
193
+ warnings?: string[] | undefined;
194
+ changesMode: string;
195
+ number: number;
196
+ url: string;
197
+ version: string;
198
+ labels: string[];
199
+ ok: boolean;
200
+ slug: string;
201
+ name: string;
202
+ from: string;
203
+ title: string;
204
+ tier: import("@bridge-ds/core").RiskTier;
205
+ bump: "minor";
206
+ label: string;
207
+ reasons: string[];
208
+ files: {
209
+ path: string;
210
+ action: "create" | "modify";
211
+ }[];
212
+ actionStep: number;
213
+ ramps: {
214
+ [k: string]: {
215
+ [k: string]: string;
216
+ };
217
+ };
218
+ contrast: {
219
+ checks: number;
220
+ passing: number;
221
+ themes: string[];
222
+ line: string;
223
+ failing: {
224
+ pair: string;
225
+ modes: string;
226
+ ratio: number | null;
227
+ min: number;
228
+ }[];
229
+ };
230
+ issues: import("@bridge-ds/core").BrandIssue[];
231
+ prBody: string;
232
+ status: string;
102
233
  } | {
103
234
  branch: string;
104
235
  fileContents: {
@@ -416,6 +416,10 @@ function holdersOf(right, owners, rights) {
416
416
  const groups = (rights ?? DEFAULT_RIGHTS)[right];
417
417
  return uniq(groups.flatMap((g) => owners[g] ?? []));
418
418
  }
419
+ function approverLists(owners, rights, teams) {
420
+ const entries = approverEntries(owners, rights);
421
+ return teams === void 0 ? entries : expandOwners(entries, teams);
422
+ }
419
423
  function approverEntries(owners, rights) {
420
424
  if (!rights) return { design: [...owners.design], tech: [...owners.tech] };
421
425
  return { design: holdersOf("approveDesign", owners, rights), tech: holdersOf("approveTech", owners, rights) };
@@ -2004,6 +2008,7 @@ export {
2004
2008
  unreadableTeams,
2005
2009
  TeamDirectory,
2006
2010
  DEFAULT_RIGHTS,
2011
+ approverLists,
2007
2012
  approverEntries,
2008
2013
  shipPolicy,
2009
2014
  unreadableShipTeams,
@@ -2022,6 +2027,7 @@ export {
2022
2027
  tokensPath,
2023
2028
  protectedBranchesOf,
2024
2029
  baseBranchOf,
2030
+ changesMode,
2025
2031
  toConfigJson,
2026
2032
  hexToRgba,
2027
2033
  rgbaToHex,
@@ -2068,5 +2074,6 @@ export {
2068
2074
  showFile,
2069
2075
  listFilesAt,
2070
2076
  originRepo,
2071
- commitToNewLocalBranch
2077
+ commitToNewLocalBranch,
2078
+ commitTree
2072
2079
  };