@bridge-ds/mcp 0.0.0-stage → 0.2.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/README.md +130 -2
- package/dist/audit.d.ts +15 -0
- package/dist/brand.d.ts +263 -0
- package/dist/chunk-6JO2AG6X.js +7365 -0
- package/dist/chunk-FJL6UTZG.js +1317 -0
- package/dist/components.d.ts +55 -0
- package/dist/config.d.ts +13 -0
- package/dist/context.d.ts +42 -0
- package/dist/core-adapter.d.ts +48 -0
- package/dist/drafts.d.ts +46 -0
- package/dist/explorations.d.ts +168 -0
- package/dist/history.d.ts +431 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +33 -0
- package/dist/lib.d.ts +19 -0
- package/dist/lib.js +46 -0
- package/dist/markdown.d.ts +16 -0
- package/dist/ops.d.ts +721 -0
- package/dist/requests.d.ts +89 -0
- package/dist/server.d.ts +4 -0
- package/dist/source.d.ts +39 -0
- package/dist/src-ABJPOTKE.js +1125 -0
- package/package.json +65 -4
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { type ComponentChangeRequest, type IssueSummary, type RequestChange, type RequestKind, type RequestSource, type RequestStatus } from '@bridge-ds/core';
|
|
2
|
+
import type { BridgeContext } from './context.js';
|
|
3
|
+
export type RequestStatusFilter = RequestStatus | 'all';
|
|
4
|
+
export interface LinkedPr {
|
|
5
|
+
number: number;
|
|
6
|
+
title: string;
|
|
7
|
+
/** "open", "closed" or "merged". */
|
|
8
|
+
state: string;
|
|
9
|
+
url: string;
|
|
10
|
+
}
|
|
11
|
+
export interface RequestRow {
|
|
12
|
+
number: number;
|
|
13
|
+
component: string;
|
|
14
|
+
kind: RequestKind;
|
|
15
|
+
title: string;
|
|
16
|
+
status: RequestStatus;
|
|
17
|
+
url: string;
|
|
18
|
+
linkedPrs: LinkedPr[];
|
|
19
|
+
/** Exploration branch it is implemented on, when it is part of one. */
|
|
20
|
+
exploration?: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The request in an issue: the hidden Bridge block, or, for an issue someone labeled component-change by hand, what
|
|
24
|
+
* the title ("Button: add a ghost variant"), the request labels and the body tell.
|
|
25
|
+
*/
|
|
26
|
+
export declare function requestFromIssue(issue: Pick<IssueSummary, 'title' | 'body' | 'labels'>): ComponentChangeRequest;
|
|
27
|
+
export declare function listRequests(ctx: BridgeContext, a: {
|
|
28
|
+
status?: RequestStatusFilter;
|
|
29
|
+
component?: string;
|
|
30
|
+
limit?: number;
|
|
31
|
+
}): Promise<{
|
|
32
|
+
repo: string;
|
|
33
|
+
label: string;
|
|
34
|
+
status: RequestStatusFilter;
|
|
35
|
+
total: number;
|
|
36
|
+
requests: RequestRow[];
|
|
37
|
+
}>;
|
|
38
|
+
export declare function getRequest(ctx: BridgeContext, a: {
|
|
39
|
+
number: number;
|
|
40
|
+
branch?: string | undefined;
|
|
41
|
+
}): Promise<{
|
|
42
|
+
next: string;
|
|
43
|
+
exploration?: string | undefined;
|
|
44
|
+
number: number;
|
|
45
|
+
url: string;
|
|
46
|
+
state: "closed" | "open";
|
|
47
|
+
status: RequestStatus;
|
|
48
|
+
labels: string[];
|
|
49
|
+
author: string;
|
|
50
|
+
request: ComponentChangeRequest;
|
|
51
|
+
linkedPrs: LinkedPr[];
|
|
52
|
+
component: {
|
|
53
|
+
name: string;
|
|
54
|
+
exists: boolean;
|
|
55
|
+
dir: string | undefined;
|
|
56
|
+
files: string[];
|
|
57
|
+
};
|
|
58
|
+
agentsFile: string;
|
|
59
|
+
brief: string;
|
|
60
|
+
}>;
|
|
61
|
+
export interface CreateRequestInput {
|
|
62
|
+
component: string;
|
|
63
|
+
kind: RequestKind;
|
|
64
|
+
title: string;
|
|
65
|
+
summary: string;
|
|
66
|
+
changes?: RequestChange[] | undefined;
|
|
67
|
+
figmaUrl?: string | undefined;
|
|
68
|
+
source?: RequestSource | undefined;
|
|
69
|
+
/** Exploration branch to implement it on (`explore/<slug>`), instead of a pull request to main. */
|
|
70
|
+
exploration?: string | undefined;
|
|
71
|
+
dryRun?: boolean | undefined;
|
|
72
|
+
}
|
|
73
|
+
export declare function createRequest(ctx: BridgeContext, a: CreateRequestInput): Promise<{
|
|
74
|
+
status: "dry-run";
|
|
75
|
+
issue: import("@bridge-ds/core").RequestIssue;
|
|
76
|
+
number?: undefined;
|
|
77
|
+
url?: undefined;
|
|
78
|
+
title?: undefined;
|
|
79
|
+
labels?: undefined;
|
|
80
|
+
next?: undefined;
|
|
81
|
+
} | {
|
|
82
|
+
status: "created";
|
|
83
|
+
number: number;
|
|
84
|
+
url: string;
|
|
85
|
+
title: string;
|
|
86
|
+
labels: string[];
|
|
87
|
+
next: string;
|
|
88
|
+
issue?: undefined;
|
|
89
|
+
}>;
|
package/dist/server.d.ts
ADDED
package/dist/source.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { GitHubClient } from '@bridge-ds/core';
|
|
2
|
+
export interface RepoSource {
|
|
3
|
+
kind: 'local' | 'git-ref' | 'github';
|
|
4
|
+
/** Human label: a path, `ref` or `owner/repo@ref`. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Repo-relative file paths under `prefix` ('' for everything). */
|
|
7
|
+
list(prefix?: string): Promise<string[]>;
|
|
8
|
+
read(path: string): Promise<string | null>;
|
|
9
|
+
}
|
|
10
|
+
export declare class LocalSource implements RepoSource {
|
|
11
|
+
readonly root: string;
|
|
12
|
+
readonly kind: "local";
|
|
13
|
+
constructor(root: string);
|
|
14
|
+
get label(): string;
|
|
15
|
+
list(prefix?: string): Promise<string[]>;
|
|
16
|
+
read(path: string): Promise<string | null>;
|
|
17
|
+
}
|
|
18
|
+
/** A local git ref (branch, tag, sha): reviews of local proposal branches and `bridge diff <base>`. */
|
|
19
|
+
export declare class GitRefSource implements RepoSource {
|
|
20
|
+
readonly root: string;
|
|
21
|
+
readonly ref: string;
|
|
22
|
+
readonly kind: "git-ref";
|
|
23
|
+
private files?;
|
|
24
|
+
constructor(root: string, ref: string);
|
|
25
|
+
get label(): string;
|
|
26
|
+
list(prefix?: string): Promise<string[]>;
|
|
27
|
+
read(path: string): Promise<string | null>;
|
|
28
|
+
}
|
|
29
|
+
export declare class GitHubSource implements RepoSource {
|
|
30
|
+
readonly client: GitHubClient;
|
|
31
|
+
readonly ref: string;
|
|
32
|
+
readonly kind: "github";
|
|
33
|
+
private tree?;
|
|
34
|
+
private cache;
|
|
35
|
+
constructor(client: GitHubClient, ref: string);
|
|
36
|
+
get label(): string;
|
|
37
|
+
list(prefix?: string): Promise<string[]>;
|
|
38
|
+
read(path: string): Promise<string | null>;
|
|
39
|
+
}
|