@weareikko/code-review 0.9.7 → 0.9.9

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.
Files changed (46) hide show
  1. package/README.md +1 -0
  2. package/dist/{cli-m4pS6_5q.js → cli-SQpUnA6c.js} +1462 -62
  3. package/dist/cli-SQpUnA6c.js.map +1 -0
  4. package/dist/cli.d.ts +29 -3
  5. package/dist/cli.d.ts.map +1 -1
  6. package/dist/cli.js +2 -2
  7. package/dist/config.d.ts +39 -1
  8. package/dist/config.d.ts.map +1 -1
  9. package/dist/diagnostics.d.ts +79 -0
  10. package/dist/diagnostics.d.ts.map +1 -1
  11. package/dist/github.d.ts +7 -0
  12. package/dist/github.d.ts.map +1 -1
  13. package/dist/gitlab-review.d.ts +69 -11
  14. package/dist/gitlab-review.d.ts.map +1 -1
  15. package/dist/gitlab.d.ts +6 -0
  16. package/dist/gitlab.d.ts.map +1 -1
  17. package/dist/intent.d.ts +21 -0
  18. package/dist/intent.d.ts.map +1 -0
  19. package/dist/marketplaces.d.ts +37 -0
  20. package/dist/marketplaces.d.ts.map +1 -1
  21. package/dist/mcp-config.d.ts +90 -0
  22. package/dist/mcp-config.d.ts.map +1 -0
  23. package/dist/mcp-parse.d.ts +146 -0
  24. package/dist/mcp-parse.d.ts.map +1 -0
  25. package/dist/mcp.d.ts +95 -0
  26. package/dist/mcp.d.ts.map +1 -0
  27. package/dist/otel.d.ts.map +1 -1
  28. package/dist/platform.d.ts +5 -0
  29. package/dist/platform.d.ts.map +1 -1
  30. package/dist/platforms/github.d.ts +1 -0
  31. package/dist/platforms/github.d.ts.map +1 -1
  32. package/dist/platforms/gitlab.d.ts +1 -0
  33. package/dist/platforms/gitlab.d.ts.map +1 -1
  34. package/dist/posting.d.ts +1 -0
  35. package/dist/posting.d.ts.map +1 -1
  36. package/dist/review.d.ts +9 -3
  37. package/dist/review.d.ts.map +1 -1
  38. package/dist/review.js +2 -2
  39. package/dist/skill-links.d.ts +14 -4
  40. package/dist/skill-links.d.ts.map +1 -1
  41. package/dist/skill-usage.d.ts +67 -0
  42. package/dist/skill-usage.d.ts.map +1 -0
  43. package/dist/verify.d.ts +25 -1
  44. package/dist/verify.d.ts.map +1 -1
  45. package/package.json +2 -1
  46. package/dist/cli-m4pS6_5q.js.map +0 -1
@@ -0,0 +1,90 @@
1
+ import type { Logger } from './logger.js';
2
+ import { type MarketplaceRegistry } from './marketplaces.js';
3
+ import { type McpDisableFilters, type McpEnvVars, type McpServerConfig } from './mcp-parse.js';
4
+ export { applyMcpDisableFilters, dropEmptyHeaders, expandMcpTemplate, extractMcpServerMap, MAX_MCP_TIMEOUT_MS, normalizeMcpServer, parseMcpDisableFilters, parseMcpServers, pickMcpEnvVars, type McpDisableFilters, type McpEnvVars, type McpServerConfig, type McpServerSource, type McpTransportType, type NormalizeMcpServerOptions, } from './mcp-parse.js';
5
+ /** Options for `loadAutoDiscoveredMcpServers`. */
6
+ export interface LoadAutoDiscoveredMcpServersOptions {
7
+ /** Variables for `${VAR}` expansion; defaults to none. */
8
+ vars?: McpEnvVars;
9
+ /** Disable lists to apply; loaded with `loadMcpDisableFilters` when omitted. */
10
+ filters?: McpDisableFilters;
11
+ }
12
+ /**
13
+ * Collect the MCP disable lists declared in the repository: `.claude/settings.json`
14
+ * and the gitignored project-local `.claude/settings.local.json` — where Claude
15
+ * Code persists `disabledMcpjsonServers` when a developer declines a server —
16
+ * in every directory from `gitRoot` down to `cwd`. Lists from every level and
17
+ * both files are unioned. Enable keys are ignored: this tool never re-enables a
18
+ * server another config disabled.
19
+ */
20
+ export declare function loadMcpDisableFilters(cwd: string, gitRoot: string, warn?: (msg: string) => void): Promise<McpDisableFilters>;
21
+ /**
22
+ * Discover MCP servers declared in the repository, mirroring
23
+ * `loadAutoDiscoveredSkills`: `.mcp.json` in every directory from `gitRoot` down
24
+ * to `cwd`, the closest directory winning per server name.
25
+ *
26
+ * `disabledMcpjsonServers` is scoped to these project-declared servers and
27
+ * applied here. `disabledMcpServers` is *not* scoped to them — it names a server
28
+ * whatever its source — so `resolveMcpServers` applies it once at the end, over
29
+ * marketplace and `file:` servers too.
30
+ */
31
+ export declare function loadAutoDiscoveredMcpServers(cwd: string, gitRoot: string, warn?: (msg: string) => void, options?: LoadAutoDiscoveredMcpServersOptions): Promise<McpServerConfig[]>;
32
+ /** A parsed `--mcp` spec. Produced by `parseMcpSpec`. */
33
+ export type McpSpec = {
34
+ protocol: 'file';
35
+ path: string;
36
+ } | {
37
+ protocol: 'marketplace';
38
+ marketplace: string;
39
+ plugin: string;
40
+ server: string;
41
+ };
42
+ /**
43
+ * Parse a `--mcp` / `CODE_REVIEW_MCP` spec string, mirroring `parseSkillSpec`'s
44
+ * conventions:
45
+ *
46
+ * | Input | Result |
47
+ * |---------------------------------|------------------------------------------------------------------|
48
+ * | `file:./extra-servers.json` | `{ protocol: 'file', path: './extra-servers.json' }` |
49
+ * | `acme:dev` | `{ protocol: 'marketplace', marketplace: 'acme', plugin: 'dev', server: '' }` |
50
+ * | `acme:dev/context7` | `{ protocol: 'marketplace', marketplace: 'acme', plugin: 'dev', server: 'context7' }` |
51
+ *
52
+ * An empty `server` means "every server the plugin exposes". Throws a
53
+ * `ConfigError` with an actionable hint on any malformed input.
54
+ */
55
+ export declare function parseMcpSpec(spec: string): McpSpec;
56
+ /** The slice of `Config` `resolveMcpServers` needs — kept structural to avoid importing `Config`. */
57
+ export interface McpServerSourcesConfig {
58
+ /** Raw `--mcp` / `CODE_REVIEW_MCP` specs, in the order given. */
59
+ mcp: string[];
60
+ /** Server names to drop, applied last over every source. */
61
+ disableMcp: string[];
62
+ /** Whether to auto-discover `.mcp.json` files walked from `gitRoot` to `cwd`. Opt-in. */
63
+ mcpDiscovery: boolean;
64
+ }
65
+ /**
66
+ * Resolve every MCP server for a review, merging sources in the approved order:
67
+ *
68
+ * 1. Repo auto-discovery (`.mcp.json` walked from `gitRoot` to `cwd`, closest
69
+ * wins, `disabledMcpjsonServers` applied) — only when `config.mcpDiscovery`
70
+ * is `true`, which is opt-in: `.mcp.json` is content of the repository under
71
+ * review, so a merge request could otherwise make the reviewer spawn a
72
+ * process of its choosing on the CI runner.
73
+ * 2. Every `--mcp` / `CODE_REVIEW_MCP` spec, in the order given: a `file:` spec
74
+ * loads a standalone document, a `<marketplace>:<plugin>[/<server>]` spec
75
+ * loads from the registered marketplace. A later spec's server overrides an
76
+ * earlier one (from any source) of the same name.
77
+ * 3. `disabledMcpServers` from `.claude/settings.json` (and `settings.local.json`)
78
+ * plus `config.disableMcp` (`--disable-mcp` / `CODE_REVIEW_DISABLE_MCP`),
79
+ * applied last over every source above — a name disabled there stays dropped
80
+ * even when a `--mcp` spec redeclares it.
81
+ *
82
+ * A spec that fails to resolve (bad file, unregistered marketplace, unknown
83
+ * plugin/server) is skipped with a warning — one broken `--mcp` entry must not
84
+ * abort the whole review.
85
+ */
86
+ export declare function resolveMcpServers(config: McpServerSourcesConfig, cwd: string, gitRoot: string, registry: MarketplaceRegistry, logger?: Logger, options?: {
87
+ vars?: McpEnvVars;
88
+ refresh?: boolean;
89
+ }): Promise<McpServerConfig[]>;
90
+ //# sourceMappingURL=mcp-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-config.d.ts","sourceRoot":"","sources":["../src/mcp-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,eAAe,EAErB,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,eA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M,EAAE,sBAAsB,EAC9B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,UAAU,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GACrD,OAAO,CAAC,eAAe,EAAE,CAAC,CAsC5B"}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Pure MCP server-definition parsing: `.mcp.json`-style document shapes,
3
+ * `${VAR}` env expansion, and normalisation into `McpServerConfig`. Has no
4
+ * dependency on the filesystem, git, or marketplaces, so both `mcp-config.ts`
5
+ * (repo/file discovery) and `marketplaces.ts` (plugin sources) can depend on
6
+ * it without forming a cycle between themselves.
7
+ */
8
+ /**
9
+ * Where an MCP server definition came from. Carried in enough detail to link
10
+ * the server name in the summary footer back to its source (see the MCP
11
+ * footer helper in `cli.ts`). `project.path` is the `.mcp.json` file relative to
12
+ * the repository root, POSIX-separated, like `SkillOrigin.project`.
13
+ */
14
+ export type McpServerSource = {
15
+ kind: 'project';
16
+ path: string;
17
+ } | {
18
+ kind: 'marketplace';
19
+ marketplace: string;
20
+ plugin: string;
21
+ url: string;
22
+ ref: string;
23
+ path: string;
24
+ } | {
25
+ kind: 'file';
26
+ path: string;
27
+ };
28
+ /** Transports we can connect to. `ws` is recognised in files but skipped. */
29
+ export type McpTransportType = 'stdio' | 'http' | 'sse';
30
+ /** A normalised, env-expanded MCP server definition ready to connect. */
31
+ export interface McpServerConfig {
32
+ name: string;
33
+ type: McpTransportType;
34
+ /** stdio only. */
35
+ command?: string;
36
+ /** stdio only. */
37
+ args: string[];
38
+ /** stdio only — extra environment for the child process. */
39
+ env: Record<string, string>;
40
+ /** http / sse only. */
41
+ url?: string;
42
+ /** http / sse only. */
43
+ headers: Record<string, string>;
44
+ /** Per-call timeout; `undefined` means the bridge default. */
45
+ timeoutMs?: number;
46
+ source: McpServerSource;
47
+ }
48
+ /** Names disabled by a `.claude/settings.json` file. */
49
+ export interface McpDisableFilters {
50
+ /** `disabledMcpjsonServers` — servers declared in repo `.mcp.json` files. */
51
+ disabledMcpjsonServers: string[];
52
+ /** `disabledMcpServers` — servers from any source (plugins included). */
53
+ disabledMcpServers: string[];
54
+ }
55
+ /** Variables available to `${VAR}` expansion. Undefined values count as unset. */
56
+ export type McpEnvVars = Readonly<Record<string, string | undefined>>;
57
+ /**
58
+ * Upper bound on a server-declared `timeout`. A server definition governs its
59
+ * own per-call timeout, but it must not be able to stall the review for hours:
60
+ * connect and `tools/list` run before the agent loop, outside the review
61
+ * timeout, so an unclamped value there is a one-line denial of service.
62
+ */
63
+ export declare const MAX_MCP_TIMEOUT_MS = 120000;
64
+ /**
65
+ * The subset of `env` an operator opted into exposing to `${VAR}` expansion.
66
+ *
67
+ * Server definitions can come from the repository under review or from a
68
+ * marketplace plugin whose upstream ref moves, so expanding from the whole
69
+ * process environment would let a definition read any secret the reviewer holds
70
+ * (`CODE_REVIEW_GITLAB_TOKEN`, `ANTHROPIC_API_KEY`, …) and ship it out in argv,
71
+ * a header, or a URL query string. Only names listed in `allowlist` are
72
+ * readable; everything else expands as unset, which skips the server with a
73
+ * warning that names the variable and never a value.
74
+ */
75
+ export declare function pickMcpEnvVars(env: McpEnvVars, allowlist: readonly string[]): McpEnvVars;
76
+ /**
77
+ * Expand `${VAR}` and `${VAR:-default}` references in `value`. Missing
78
+ * variables (unset, with no default) are left untouched and reported by name in
79
+ * `missing` so callers can skip the server without ever logging a value.
80
+ *
81
+ * `${VAR:-default}` follows POSIX: the default applies when `VAR` is unset *or*
82
+ * empty. Bare `${VAR}` expands to an empty string when `VAR` is set but empty.
83
+ */
84
+ export declare function expandMcpTemplate(value: string, vars: McpEnvVars): {
85
+ value: string;
86
+ missing: string[];
87
+ };
88
+ /**
89
+ * Extract the server map from a parsed `.mcp.json`-style document. Two shapes
90
+ * are accepted:
91
+ *
92
+ * - Claude Code project shape: `{ "mcpServers": { name: server } }`
93
+ * - Plugin shape: `{ name: server }` (servers at the top level)
94
+ *
95
+ * The project shape is detected by a top-level `mcpServers` object. Returns
96
+ * `null` when the document is not an object at all.
97
+ */
98
+ export declare function extractMcpServerMap(raw: unknown): Record<string, unknown> | null;
99
+ /**
100
+ * Drop headers whose value is empty or whitespace-only.
101
+ *
102
+ * A header value is routinely a `${VAR}` or `${VAR:-}` reference to a
103
+ * credential that is simply absent — an optional API key, or a token only set
104
+ * in CI. Sending `Authorization:` with no value is worse than not sending it:
105
+ * some servers reject the malformed header outright where they would have
106
+ * served the request anonymously. So an empty expansion means "no header",
107
+ * not "empty header". `env` for stdio servers is deliberately left alone: an
108
+ * empty environment variable is a meaningful, distinct value there.
109
+ */
110
+ export declare function dropEmptyHeaders(headers: Record<string, string>): Record<string, string>;
111
+ /** Read the MCP disable lists from a parsed `.claude/settings.json` document. */
112
+ export declare function parseMcpDisableFilters(raw: unknown): McpDisableFilters;
113
+ /** Options for `normalizeMcpServer` / `parseMcpServers`. */
114
+ export interface NormalizeMcpServerOptions {
115
+ /**
116
+ * Variables for `${VAR}` expansion. Defaults to none: the process
117
+ * environment is never exposed implicitly — callers pass the operator's
118
+ * allowlist (see `pickMcpEnvVars`).
119
+ */
120
+ vars?: McpEnvVars;
121
+ /** Expanded from `${CLAUDE_PLUGIN_ROOT}` for marketplace plugins. */
122
+ pluginRoot?: string;
123
+ warn?: (msg: string) => void;
124
+ }
125
+ /**
126
+ * Normalise one raw server entry. Returns `null` (after warning) when the
127
+ * server is unsupported or incomplete:
128
+ *
129
+ * - `type: ws`, or any `oauth` / `headersHelper` field — unsupported transports
130
+ * and auth flows
131
+ * - no `command` for stdio, no `url` for http/sse, before or after expansion
132
+ * - a `${VAR}` reference with no value and no default (the warning names the
133
+ * variable, never a value)
134
+ *
135
+ * `type` defaults to `stdio` when `command` is present and `http` when `url`
136
+ * is present. A server-declared `timeout` is clamped to `MAX_MCP_TIMEOUT_MS`.
137
+ */
138
+ export declare function normalizeMcpServer(name: string, raw: unknown, source: McpServerSource, options?: NormalizeMcpServerOptions): McpServerConfig | null;
139
+ /**
140
+ * Parse a whole `.mcp.json`-style document (either shape) into normalised
141
+ * server configs. Invalid entries are skipped with a warning.
142
+ */
143
+ export declare function parseMcpServers(raw: unknown, source: McpServerSource, options?: NormalizeMcpServerOptions): McpServerConfig[];
144
+ /** Drop servers named in either disable list. */
145
+ export declare function applyMcpDisableFilters(servers: readonly McpServerConfig[], filters: McpDisableFilters): McpServerConfig[];
146
+ //# sourceMappingURL=mcp-parse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-parse.d.ts","sourceRoot":"","sources":["../src/mcp-parse.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IACE,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnC,6EAA6E;AAC7E,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAExD,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,gBAAgB,CAAC;IACvB,kBAAkB;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,4DAA4D;IAC5D,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,uBAAuB;IACvB,GAAG,CAAC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AE,UAAU,CAAC;IAClB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAuBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,eAAe,EACvB,OAAO,GAAE,yBAA8B,GACtC,eAAe,GAAG,IAAI,CA6FxB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,eAAe,EACvB,OAAO,GAAE,yBAA8B,GACtC,eAAe,EAAE,CAYnB;AAED,iDAAiD;AACjD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,OAAO,EAAE,iBAAiB,GACzB,eAAe,EAAE,CAGnB"}
package/dist/mcp.d.ts ADDED
@@ -0,0 +1,95 @@
1
+ /**
2
+ * MCP client bridge for the reviewer agent.
3
+ *
4
+ * Connects the servers described by `McpServerConfig` (see `mcp-config.ts`),
5
+ * lists their tools, keeps only the read-only ones, and wraps each as a pi
6
+ * `AgentTool` named `mcp__<server>__<tool>`. The bridge enforces a per-call
7
+ * timeout, a result size cap, and a per-review call budget shared by every MCP
8
+ * tool. A server that fails to connect is reported as `unavailable` and never
9
+ * aborts the review.
10
+ *
11
+ * The reviewer processes attacker-controlled MR content, so only tools that
12
+ * declare themselves read-only (`annotations.readOnlyHint === true` and not
13
+ * `destructiveHint`) are exposed.
14
+ */
15
+ import type { AgentTool } from '@earendil-works/pi-agent-core';
16
+ import type { ImageContent, TextContent } from '@earendil-works/pi-ai';
17
+ import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
18
+ import type { CallToolResult, Tool as McpTool } from '@modelcontextprotocol/sdk/types.js';
19
+ import { type Logger } from './logger.js';
20
+ import type { McpServerConfig, McpServerSource } from './mcp-config.js';
21
+ /** Default per-call timeout. A server config may lower or raise it, up to `MAX_MCP_TIMEOUT_MS`. */
22
+ export declare const DEFAULT_MCP_TIMEOUT_MS = 30000;
23
+ /**
24
+ * Timeout for connect and `tools/list`. Deliberately not overridable by a server
25
+ * definition: both run before the agent loop starts, so they are outside the
26
+ * review timeout and a large per-server `timeout` must not stall the pipeline.
27
+ */
28
+ export declare const MCP_CONNECT_TIMEOUT_MS = 30000;
29
+ /** Default number of MCP tool calls allowed per review, across all servers. */
30
+ export declare const DEFAULT_MCP_CALL_BUDGET = 40;
31
+ /** Default cap on the content returned by one MCP tool call, text and image bytes together. */
32
+ export declare const DEFAULT_MCP_MAX_RESULT_CHARS = 200000;
33
+ /** Cap on image blocks kept from one MCP tool call, whatever the size budget allows. */
34
+ export declare const MAX_MCP_IMAGE_BLOCKS = 4;
35
+ /** Connection outcome for one configured server, rendered in the summary footer. */
36
+ export interface McpServerStatus {
37
+ name: string;
38
+ source: McpServerSource;
39
+ status: 'connected' | 'unavailable';
40
+ /** Original (server-side) names of the tools exposed to the reviewer. */
41
+ tools: string[];
42
+ /** Calls made during the review. Updated in place by the bridge. */
43
+ calls: number;
44
+ }
45
+ export interface ConnectMcpServersOptions {
46
+ logger?: Logger;
47
+ /** Per-call timeout when the server config does not set one. */
48
+ timeoutMs?: number;
49
+ /** Total MCP calls allowed per review, across every server and tool. */
50
+ callBudget?: number;
51
+ /** Cap on the text returned by one call; longer results are truncated. */
52
+ maxResultChars?: number;
53
+ /**
54
+ * Supported library extension point (also the test seam): build the transport
55
+ * for a config instead of the real stdio/http/sse one. See `docs/mcp.md`.
56
+ */
57
+ createTransport?: (config: McpServerConfig) => Transport;
58
+ /**
59
+ * The enclosing review's diagnostic run id. When set, connect/list-tools/call
60
+ * are traced on the `mcp.connect` / `mcp.tools` / `mcp.call` diagnostics
61
+ * channels (see `src/diagnostics.ts`); omitted (e.g. ad hoc library use, most
62
+ * tests) means no diagnostics events are published.
63
+ */
64
+ runId?: string;
65
+ }
66
+ export interface McpConnection {
67
+ tools: AgentTool[];
68
+ servers: McpServerStatus[];
69
+ /** Close every connected client. Safe to call more than once. */
70
+ close(): Promise<void>;
71
+ }
72
+ /** Only tools that declare themselves read-only and non-destructive are exposed. */
73
+ export declare function isReadOnlyMcpTool(tool: Pick<McpTool, 'annotations'>): boolean;
74
+ /** `mcp__<server>__<tool>`, with characters outside `[A-Za-z0-9_-]` replaced. */
75
+ export declare function mcpToolName(server: string, tool: string): string;
76
+ /** Build the real transport for a server config. */
77
+ export declare function createMcpTransport(config: McpServerConfig): Transport;
78
+ /**
79
+ * Convert an MCP `tools/call` result into pi tool content. Text-like blocks are
80
+ * joined into one text block; images follow. Server output is untrusted and
81
+ * unbounded, so `maxChars` caps the whole result — the joined text first, then
82
+ * each image's base64 payload against what the text left — and at most
83
+ * `MAX_MCP_IMAGE_BLOCKS` images survive. Dropped images leave a note in the text
84
+ * so the agent knows something was there. The cap applies on the error path too:
85
+ * a result the server flagged as an error throws the same capped text, so the
86
+ * agent loop records a bounded error tool result.
87
+ */
88
+ export declare function formatMcpToolResult(result: CallToolResult, maxChars: number): (TextContent | ImageContent)[];
89
+ /**
90
+ * Connect every configured server, list its tools, and bridge the read-only
91
+ * ones. Never throws for a server failure: the server is reported as
92
+ * `unavailable` and the review continues with the others.
93
+ */
94
+ export declare function connectMcpServers(configs: readonly McpServerConfig[], options?: ConnectMcpServersOptions): Promise<McpConnection>;
95
+ //# sourceMappingURL=mcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,+BAA+B,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAQvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,EAAE,c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1B;;;;;;OAMG;IACH,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACpF;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,gBAAgB,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAChE;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,cAAc,CAAC;IAC/B,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA4DD,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAE3E;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAIrF;AAED,wBAAsB,eAAe,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAsYjG;AAmWD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,IAAI,CAMpF"}
@@ -53,6 +53,11 @@ export interface ReviewPlatform {
53
53
  postComments(generated: GeneratedComment[], mode: PostingMode): Promise<PostResult>;
54
54
  /** Create or update the single MR-level summary note. */
55
55
  upsertSummary(summary: string, discussions: Discussion[], options: UpsertSummaryOptions): Promise<SummaryResult>;
56
+ /**
57
+ * Add `add` and remove `remove` on the MR/PR labels. Removing a label that is
58
+ * not present is not an error.
59
+ */
60
+ updateLabels(add: string[], remove: string[]): Promise<void>;
56
61
  /**
57
62
  * The most recent HTTP response this platform issued, for telemetry stamping.
58
63
  * Returns `undefined` until the first request completes. Each request reports
@@ -1 +1 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAO9C,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACjG,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5E;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,eAAe,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7C;;;;OAIG;IACH,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,wFAAwF;IACxF,cAAc,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IACxC,6EAA6E;IAC7E,aAAa,CACX,QAAQ,EAAE,aAAa,EAAE,EACzB,IAAI,EAAE,MAAM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AAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,eAAe,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7C;;;;OAIG;IACH,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,wFAAwF;IACxF,cAAc,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IACxC,6EAA6E;IAC7E,aAAa,CACX,QAAQ,EAAE,aAAa,EAAE,EACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,EACd,oBAAoB,EAAE,GAAG,CAAC,MAAM,CAAC,GAChC,gBAAgB,EAAE,CAAC;IACtB,yEAAyE;IACzE,YAAY,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACpF,yDAAyD;IACzD,aAAa,CACX,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,UAAU,EAAE,EACzB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D;;;;OAIG;IACH,YAAY,IAAI,eAAe,GAAG,SAAS,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAY7D"}
@@ -117,6 +117,7 @@ export declare class GitHubPlatform implements ReviewPlatform {
117
117
  getDiscussions(): Promise<Discussion[]>;
118
118
  buildComments(comments: ReviewComment[], diff: string, refs: DiffRefs, existingFingerprints: Set<string>): GeneratedComment[];
119
119
  postComments(generated: GeneratedComment[], _mode: PostingMode): Promise<PostResult>;
120
+ updateLabels(add: string[], remove: string[]): Promise<void>;
120
121
  upsertSummary(summary: string, discussions: Discussion[], options: UpsertSummaryOptions): Promise<SummaryResult>;
121
122
  }
122
123
  //# sourceMappingURL=github.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/platforms/github.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,UAAU,EAA0C,MAAM,cAAc,CAAC;AAEvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,mEAAmE;AACnE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CASpE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ3D;AAED,uEAAuE;AACvE,MAAM,WAAW,qBAAqB;IACpC,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B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AS;IAG9B,OAAO,CAAC,IAAI,CAA8B;IAI1C,OAAO,CAAC,kBAAkB,CAAmC;IAG7D,OAAO,CAAC,QAAQ,CAAqB;IAErC,YAAY,OAAO,EAAE,qBAAqB,EAazC;IAED,YAAY,IAAI,eAAe,GAAG,SAAS,CAE1C;IAED,OAAO,CAAC,WAAW;IAOb,eAAe,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAQjD;IAEK,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,CAYjC;IAEK,cAAc,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAO5C;IAED,aAAa,CACX,QAAQ,EAAE,aAAa,EAAE,EACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,EACd,oBAAoB,EAAE,GAAG,CAAC,MAAM,CAAC,GAChC,gBAAgB,EAAE,CAGpB;IAIK,YAAY,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA8CzF;IAIK,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAKjE;IAEK,aAAa,CACjB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,UAAU,EAAE,EACzB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,aAAa,CAAC,CAQxB;CACF"}
@@ -21,6 +21,7 @@ export declare class GitLabPlatform implements ReviewPlatform {
21
21
  getDiscussions(): Promise<Discussion[]>;
22
22
  buildComments(comments: ReviewComment[], diff: string, refs: DiffRefs, existingFingerprints: Set<string>): GeneratedComment[];
23
23
  postComments(generated: GeneratedComment[], mode: PostingMode): Promise<PostResult>;
24
+ updateLabels(add: string[], remove: string[]): Promise<void>;
24
25
  upsertSummary(summary: string, discussions: Discussion[], options: UpsertSummaryOptions): Promise<SummaryResult>;
25
26
  }
26
27
  //# sourceMappingURL=gitlab.d.ts.map
@@ -1 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AAO,CAAC,UAAU,CAAC,CAElF;IAED,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3D;IAED,aAAa,CACX,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,UAAU,EAAE,EACzB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,aAAa,CAAC,CAExB;CACF"}
package/dist/posting.d.ts CHANGED
@@ -53,6 +53,7 @@ export interface SummaryBodyOptions {
53
53
  historyEntries?: string[];
54
54
  reviewedCommitSha?: string;
55
55
  skillsFooter?: string;
56
+ mcpFooter?: string;
56
57
  runId?: string;
57
58
  /** Prominent size/decompose callout rendered above the reviewer's summary. */
58
59
  sizeNotice?: SizeNotice;
@@ -1 +1 @@
1
- {"version":3,"file":"posting.d.ts","sourceRoot":"","sources":["../src/posting.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,KAAK,EAAgB,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElF,eAAO,MAAM,cAAc,iCAAiC,CAAC;AAC7D,eAAO,MAAM,qBAAqB,+CAA+C,CAAC;AAClF,eAAO,MAAM,mBAAmB,6CAA6C,CAAC;AAC9E,eAAO,MAAM,2BAA2B,qDAAqD,CAAC;AAC9F,eAAO,MAAM,yBAAyB,mDAAmD,CAAC;AAC1F,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAYxC;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,QAC+I,CAAC;AAI3L,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAA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AE,MAAM,EACf,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,gBAAgB,EAAE,EAC7B,IAAI,GAAE,WAAsB,GAC3B,OAAO,CAAC,UAAU,CAAC,CAKrB"}
package/dist/review.d.ts CHANGED
@@ -1,10 +1,14 @@
1
- export type { DiagnosticContext, DiagnosticError, DiagnosticPhase, DiagnosticUsage, DiagnosticUsageBreakdown, } from './diagnostics.js';
2
- export { DIAGNOSTIC_CHANNEL_NAMES, DIAGNOSTIC_CHANNEL_PREFIX, createDiagnosticContext, createDiagnosticRunId, diagnosticChannels, traceDiagnostic, traceDiagnosticPhase, } from './diagnostics.js';
1
+ export type { DiagnosticContext, DiagnosticError, DiagnosticMcpUsage, DiagnosticPhase, DiagnosticSkillUsage, DiagnosticUsage, DiagnosticUsageBreakdown, McpDiagnosticContext, McpDiagnosticOp, } from './diagnostics.js';
2
+ export { DIAGNOSTIC_CHANNEL_NAMES, DIAGNOSTIC_CHANNEL_PREFIX, MCP_DIAGNOSTIC_CHANNEL_NAMES, createDiagnosticContext, createDiagnosticRunId, diagnosticChannels, mcpDiagnosticChannels, traceDiagnostic, traceDiagnosticPhase, traceMcpDiagnostic, } from './diagnostics.js';
3
3
  export type { OtelBridge, OtelBridgeOptions, OtelRuntime } from './otel.js';
4
4
  export { isOtelEnabled, startOtelBridge } from './otel.js';
5
5
  export type { RunBridges, RunResult } from './cli.js';
6
6
  export { run } from './cli.js';
7
- export type { AgentLike, CreateAgent, CreateAgentParams, FilteredDiff, ModelUsage, ReviewIntent, ReviewSizeNotice, ReviewUsage, RunReviewOptions, UsageBreakdown, } from './gitlab-review.js';
7
+ export type { AgentLike, CreateAgent, CreateAgentParams, FilteredDiff, McpServerUsage, ModelUsage, ReviewSizeNotice, ReviewUsage, RunReviewOptions, UsageBreakdown, } from './gitlab-review.js';
8
+ export type { ReviewIntent } from './intent.js';
9
+ export type { McpServerConfig, McpServerSource } from './mcp-config.js';
10
+ export type { ConnectMcpServersOptions, McpConnection, McpServerStatus } from './mcp.js';
11
+ export { connectMcpServers } from './mcp.js';
8
12
  export { filterDiff } from './gitlab-review.js';
9
13
  export { runReview } from './gitlab-review.js';
10
14
  export type { DiffRefs, Fingerprints, GeneratedComment, GitLabDiscussionPayload, ReviewComment, Side, SizeSkippedFile, } from './types.js';
@@ -14,6 +18,8 @@ export { appendFingerprintMarkers, extractDiffHunkContext, extractExistingFinger
14
18
  export { buildGeneratedComments, buildPayload } from './payloads.js';
15
19
  export type { SkillLinkContext, SkillRef } from './skill-links.js';
16
20
  export { blobUrl, formatSkillLink, gitRepoWebUrl, skillDisplayName, skillSourceUrl, } from './skill-links.js';
21
+ export type { SkillReadCounter, SkillReadTarget } from './skill-usage.js';
22
+ export { createSkillReadCounter, findSkillForPath, formatMcpUsageState, formatReviewUsageSummary, formatSkillUsageState, readToolPath, } from './skill-usage.js';
17
23
  export type { LoadNamedSkillOptions, Skill, SkillOrigin, SkillSpec } from './skills.js';
18
24
  export { gitSkillCacheKey, loadNamedSkill, parseSkillSpec, resolveNpmSkillDir, resolveSkillCacheDir, } from './skills.js';
19
25
  export { SUMMARY_HISTORY_END, SUMMARY_HISTORY_ENTRY_END, SUMMARY_HISTORY_ENTRY_START, SUMMARY_HISTORY_LIMIT, SUMMARY_HISTORY_START, SUMMARY_MARKER, buildArchivedSummaryEntry, buildSizeNoticeBlock, buildSummaryBody, buildReviewedCommitFooter, buildSummaryHistoryEntries, extractReviewedCommitSha, extractSummaryHistoryEntries, findExistingReviewedCommitSha, findExistingSummaryNote, findExistingSummaryNoteId, stripSummaryHistory, stripSummaryMarker, upsertSummaryNote, type SizeNotice, type SummaryAction, type SummaryBodyOptions, type SummaryNote, type SummaryResult, type UpsertSummaryOptions, } from './posting.js';
@@ -1 +1 @@
1
- {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../src/review.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,wBAAwB,GACzB,MAAM,kB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AO,EACP,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,qBAAqB,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EACvB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../src/review.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,4BAA4B,EAC5B,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC3D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MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,qBAAqB,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EACvB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC"}
package/dist/review.js CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as normalizeBody, A as SUMMARY_HISTORY_END, B as buildSummaryHistoryEntries, C as createDiagnosticContext, D as traceDiagnosticPhase, E as traceDiagnostic, F as SUMMARY_MARKER, G as findExistingSummaryNoteId, H as extractSummaryHistoryEntries, I as buildArchivedSummaryEntry, J as upsertSummaryNote, K as stripSummaryHistory, L as buildReviewedCommitFooter, M as SUMMARY_HISTORY_ENTRY_START, N as SUMMARY_HISTORY_LIMIT, O as normalizeSeverity, P as SUMMARY_HISTORY_START, Q as fingerprints, R as buildSizeNoticeBlock, S as DIAGNOSTIC_CHANNEL_PREFIX, T as diagnosticChannels, U as findExistingReviewedCommitSha, V as extractReviewedCommitSha, W as findExistingSummaryNote, X as extractDiffHunkContext, Y as appendFingerprintMarkers, Z as extractExistingFingerprints, _ as filterDiff, at as resolveSkillCacheDir, b as parseReviewMarkdownWithWarnings, c as blobUrl, d as skillDisplayName, et as sha256, f as skillSourceUrl, g as startOtelBridge, h as isOtelEnabled, it as resolveNpmSkillDir, j as SUMMARY_HISTORY_ENTRY_END, k as toGitLabReviewSeverity, l as formatSkillLink, m as buildPayload, nt as loadNamedSkill, o as run, p as buildGeneratedComments, q as stripSummaryMarker, rt as parseSkillSpec, tt as gitSkillCacheKey, u as gitRepoWebUrl, v as runReview, w as createDiagnosticRunId, x as DIAGNOSTIC_CHANNEL_NAMES, y as parseReviewMarkdown, z as buildSummaryBody } from "./cli-m4pS6_5q.js";
2
- export { DIAGNOSTIC_CHANNEL_NAMES, DIAGNOSTIC_CHANNEL_PREFIX, SUMMARY_HISTORY_END, SUMMARY_HISTORY_ENTRY_END, SUMMARY_HISTORY_ENTRY_START, SUMMARY_HISTORY_LIMIT, SUMMARY_HISTORY_START, SUMMARY_MARKER, appendFingerprintMarkers, blobUrl, buildArchivedSummaryEntry, buildGeneratedComments, buildPayload, buildReviewedCommitFooter, buildSizeNoticeBlock, buildSummaryBody, buildSummaryHistoryEntries, createDiagnosticContext, createDiagnosticRunId, diagnosticChannels, extractDiffHunkContext, extractExistingFingerprints, extractReviewedCommitSha, extractSummaryHistoryEntries, filterDiff, findExistingReviewedCommitSha, findExistingSummaryNote, findExistingSummaryNoteId, fingerprints, formatSkillLink, gitRepoWebUrl, gitSkillCacheKey, isOtelEnabled, loadNamedSkill, normalizeBody, normalizeSeverity, parseReviewMarkdown, parseReviewMarkdownWithWarnings, parseSkillSpec, resolveNpmSkillDir, resolveSkillCacheDir, run, runReview, sha256, skillDisplayName, skillSourceUrl, startOtelBridge, stripSummaryHistory, stripSummaryMarker, toGitLabReviewSeverity, traceDiagnostic, traceDiagnosticPhase, upsertSummaryNote };
1
+ import { $ as buildSummaryHistoryEntries, A as connectMcpServers, B as traceMcpDiagnostic, C as findSkillForPath, D as readToolPath, E as formatSkillUsageState, F as createDiagnosticRunId, G as SUMMARY_HISTORY_ENTRY_START, H as toGitLabReviewSeverity, I as diagnosticChannels, J as SUMMARY_MARKER, K as SUMMARY_HISTORY_LIMIT, L as mcpDiagnosticChannels, M as DIAGNOSTIC_CHANNEL_PREFIX, N as MCP_DIAGNOSTIC_CHANNEL_NAMES, O as parseReviewMarkdown, P as createDiagnosticContext, Q as buildSummaryBody, R as traceDiagnostic, S as createSkillReadCounter, T as formatReviewUsageSummary, U as SUMMARY_HISTORY_END, V as normalizeSeverity, W as SUMMARY_HISTORY_ENTRY_END, X as buildReviewedCommitFooter, Y as buildArchivedSummaryEntry, Z as buildSizeNoticeBlock, _ as buildPayload, _t as resolveNpmSkillDir, at as stripSummaryHistory, b as filterDiff, ct as appendFingerprintMarkers, d as blobUrl, dt as fingerprints, et as extractReviewedCommitSha, f as formatSkillLink, ft as normalizeBody, g as buildGeneratedComments, gt as parseSkillSpec, h as skillSourceUrl, ht as loadNamedSkill, it as findExistingSummaryNoteId, j as DIAGNOSTIC_CHANNEL_NAMES, k as parseReviewMarkdownWithWarnings, l as run, lt as extractDiffHunkContext, m as skillDisplayName, mt as gitSkillCacheKey, nt as findExistingReviewedCommitSha, ot as stripSummaryMarker, p as gitRepoWebUrl, pt as sha256, q as SUMMARY_HISTORY_START, rt as findExistingSummaryNote, st as upsertSummaryNote, tt as extractSummaryHistoryEntries, ut as extractExistingFingerprints, v as isOtelEnabled, vt as resolveSkillCacheDir, w as formatMcpUsageState, x as runReview, y as startOtelBridge, z as traceDiagnosticPhase } from "./cli-SQpUnA6c.js";
2
+ export { DIAGNOSTIC_CHANNEL_NAMES, DIAGNOSTIC_CHANNEL_PREFIX, MCP_DIAGNOSTIC_CHANNEL_NAMES, SUMMARY_HISTORY_END, SUMMARY_HISTORY_ENTRY_END, SUMMARY_HISTORY_ENTRY_START, SUMMARY_HISTORY_LIMIT, SUMMARY_HISTORY_START, SUMMARY_MARKER, appendFingerprintMarkers, blobUrl, buildArchivedSummaryEntry, buildGeneratedComments, buildPayload, buildReviewedCommitFooter, buildSizeNoticeBlock, buildSummaryBody, buildSummaryHistoryEntries, connectMcpServers, createDiagnosticContext, createDiagnosticRunId, createSkillReadCounter, diagnosticChannels, extractDiffHunkContext, extractExistingFingerprints, extractReviewedCommitSha, extractSummaryHistoryEntries, filterDiff, findExistingReviewedCommitSha, findExistingSummaryNote, findExistingSummaryNoteId, findSkillForPath, fingerprints, formatMcpUsageState, formatReviewUsageSummary, formatSkillLink, formatSkillUsageState, gitRepoWebUrl, gitSkillCacheKey, isOtelEnabled, loadNamedSkill, mcpDiagnosticChannels, normalizeBody, normalizeSeverity, parseReviewMarkdown, parseReviewMarkdownWithWarnings, parseSkillSpec, readToolPath, resolveNpmSkillDir, resolveSkillCacheDir, run, runReview, sha256, skillDisplayName, skillSourceUrl, startOtelBridge, stripSummaryHistory, stripSummaryMarker, toGitLabReviewSeverity, traceDiagnostic, traceDiagnosticPhase, traceMcpDiagnostic, upsertSummaryNote };
@@ -1,3 +1,4 @@
1
+ import type { McpServerSource } from './mcp-parse.js';
1
2
  import type { SkillOrigin } from './skills.js';
2
3
  /**
3
4
  * Repository coordinates needed to link a skill that lives in the repository
@@ -15,11 +16,12 @@ export interface SkillRef {
15
16
  origin: SkillOrigin;
16
17
  }
17
18
  /**
18
- * Build a blob URL for `path` at `ref` inside the repository served at
19
- * `repoWebUrl`. An empty ref resolves to `HEAD`, which both GitHub and GitLab
20
- * accept, so a skill pinned to a remote's default branch still links.
19
+ * Build a blob (file) or tree (directory) URL for `path` at `ref` inside the
20
+ * repository served at `repoWebUrl`. An empty ref resolves to `HEAD`, which both
21
+ * GitHub and GitLab accept, so a skill or MCP server pinned to a remote's
22
+ * default branch still links.
21
23
  */
22
- export declare function blobUrl(repoWebUrl: string, ref: string, path: string): string | undefined;
24
+ export declare function blobUrl(repoWebUrl: string, ref: string, path: string, kind?: 'blob' | 'tree'): string | undefined;
23
25
  /**
24
26
  * Convert a git clone URL to the repository's web URL: drop any transport
25
27
  * marker, embedded credentials, and the `.git` suffix, and serve it over HTTPS.
@@ -35,6 +37,14 @@ export declare function gitRepoWebUrl(cloneUrl: string): string | undefined;
35
37
  * the link always shows the skill exactly as the run used it.
36
38
  */
37
39
  export declare function skillSourceUrl(origin: SkillOrigin, context?: SkillLinkContext): string | undefined;
40
+ /**
41
+ * Resolve a link to an MCP server's source, or `undefined` when it is not
42
+ * reachable from a browser (a `file:` spec, or a repo `.mcp.json` on a run with
43
+ * no CI project URL). A `project` source links to the `.mcp.json` file it was
44
+ * declared in; a `marketplace` source links to the plugin's directory in the
45
+ * marketplace repository.
46
+ */
47
+ export declare function mcpSourceUrl(source: McpServerSource, context?: SkillLinkContext): string | undefined;
38
48
  /**
39
49
  * The name a skill is shown under in the footer. Marketplace skills carry their
40
50
  * full selector (`<marketplace>:<plugin>/<skill>`) because a bare skill name says
@@ -1 +1 @@
1
- {"version":3,"file":"skill-links.d.ts","sourceRoot":"","sources":["../src/skill-links.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,mFAAmF;AACnF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;CACrB;AAkBD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAUzF;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAoBlE;AA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