@weareikko/code-review 0.9.9 → 0.10.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/README.md +21 -1
- package/dist/{cli-SQpUnA6c.js → cli-DIXQI0Bd.js} +105 -84
- package/dist/cli-DIXQI0Bd.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/mcp-parse.d.ts +7 -7
- package/dist/mcp-parse.d.ts.map +1 -1
- package/dist/mcp.d.ts +6 -5
- package/dist/mcp.d.ts.map +1 -1
- package/dist/review.js +1 -1
- package/package.json +6 -5
- package/dist/cli-SQpUnA6c.js.map +0 -1
package/README.md
CHANGED
|
@@ -194,7 +194,7 @@ Equivalently, set `CODE_REVIEW_MODEL` and the provider's key (e.g. `ANTHROPIC_AP
|
|
|
194
194
|
|
|
195
195
|
## Providers
|
|
196
196
|
|
|
197
|
-
`code-review` uses [`@earendil-works/pi-ai`](https://github.com/earendil-works/pi-ai) for model access. Any registered provider can be selected with `--model provider/modelId` (e.g. `anthropic/claude-sonnet-4-5`, `openrouter/anthropic/claude-
|
|
197
|
+
`code-review` uses [`@earendil-works/pi-ai`](https://github.com/earendil-works/pi-ai) for model access. Any registered provider can be selected with `--model provider/modelId` (e.g. `anthropic/claude-sonnet-4-5`, `openrouter/anthropic/claude-opus-4.5`, `google/gemini-2.5-flash`, `ollama/qwen2.5-coder:32b`). See [Providers](https://github.com/weareikko/code-review/blob/main/docs/providers.md) for per-provider setup and the model pool.
|
|
198
198
|
|
|
199
199
|
## Artifacts
|
|
200
200
|
|
|
@@ -243,6 +243,26 @@ npm run build
|
|
|
243
243
|
npm pack --dry-run
|
|
244
244
|
```
|
|
245
245
|
|
|
246
|
+
Do not edit `CHANGELOG.md`: each pull request adds a fragment in `.changelog/` (format: [`weareikko/changelog`](https://github.com/weareikko/changelog)), or gets the `no-changelog` label when users do not see the change.
|
|
247
|
+
|
|
248
|
+
Each merge into `main` releases: the `Publish` workflow tests, folds the fragments into `CHANGELOG.md`, bumps the version, tags, publishes to npm and creates the GitHub release. A merge without a fragment (and without a dependency pull request from Renovate) releases nothing. The fragments give the version ([automatic version](https://github.com/weareikko/changelog#automatic-version)):
|
|
249
|
+
|
|
250
|
+
| Entries | From 1.0.0 | On 0.x |
|
|
251
|
+
| ------------------------------------------ | ---------- | ------ |
|
|
252
|
+
| A breaking entry (`**BREAKING**: …`) | major | minor |
|
|
253
|
+
| An entry under `Added`, no breaking entry | minor | patch |
|
|
254
|
+
| Other entries only (fixes, `Dependencies`) | patch | patch |
|
|
255
|
+
|
|
256
|
+
Prereleases follow the file `.changelog/prerelease` ([prereleases](https://github.com/weareikko/changelog#prereleases)): a pull request that adds it with `beta` makes the next merges with fragments release prereleases (from `0.10.0`, a fix gives `0.10.1-beta.0`, then `0.10.1-beta.1`…); a pull request that deletes it releases the stable version, also without a new fragment. A prerelease (a version with a `-`) is published on the `next` npm dist-tag, is a GitHub prerelease and does not move the `@0` / `@0.x` tags; any other version goes to `latest`.
|
|
257
|
+
|
|
258
|
+
A manual run forces a bump, for example a major version without a breaking entry:
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
gh workflow run publish.yml -f version=major # or patch / minor
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Publishing uses npm trusted publishing (no npm token) and skips a version that npm already has: if the `Publish to npm` job fails, use "Re-run failed jobs".
|
|
265
|
+
|
|
246
266
|
Eval tests call the real LLM and require `ANTHROPIC_API_KEY` (or `CODE_REVIEW_API_KEY`) in a local `.env` file:
|
|
247
267
|
|
|
248
268
|
```bash
|
|
@@ -16,10 +16,7 @@ import { createReadOnlyTools } from "@earendil-works/pi-coding-agent";
|
|
|
16
16
|
import { createTwoFilesPatch } from "diff";
|
|
17
17
|
import * as git from "isomorphic-git";
|
|
18
18
|
import { Type } from "typebox";
|
|
19
|
-
import {
|
|
20
|
-
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
21
|
-
import { StdioClientTransport, getDefaultEnvironment } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
22
|
-
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
19
|
+
import { McpClient, StdioTransport, StreamableHttpTransport } from "@earendil-works/pi-mcp";
|
|
23
20
|
import { SpanKind, SpanStatusCode, context, metrics, trace } from "@opentelemetry/api";
|
|
24
21
|
import { SeverityNumber, logs } from "@opentelemetry/api-logs";
|
|
25
22
|
//#region src/errors.ts
|
|
@@ -416,7 +413,7 @@ var TEMPLATE_PATTERN = /\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-([^}]*))?\}/g;
|
|
|
416
413
|
* timeout, so an unclamped value there is a one-line denial of service.
|
|
417
414
|
*/
|
|
418
415
|
var MAX_MCP_TIMEOUT_MS = 12e4;
|
|
419
|
-
function isRecord(value) {
|
|
416
|
+
function isRecord$1(value) {
|
|
420
417
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
421
418
|
}
|
|
422
419
|
/**
|
|
@@ -467,15 +464,15 @@ function expandMcpTemplate(value, vars) {
|
|
|
467
464
|
* `null` when the document is not an object at all.
|
|
468
465
|
*/
|
|
469
466
|
function extractMcpServerMap(raw) {
|
|
470
|
-
if (!isRecord(raw)) return null;
|
|
471
|
-
if (isRecord(raw.mcpServers)) return raw.mcpServers;
|
|
467
|
+
if (!isRecord$1(raw)) return null;
|
|
468
|
+
if (isRecord$1(raw.mcpServers)) return raw.mcpServers;
|
|
472
469
|
return raw;
|
|
473
470
|
}
|
|
474
471
|
function stringList(value) {
|
|
475
472
|
return Array.isArray(value) ? value.filter((v) => typeof v === "string") : [];
|
|
476
473
|
}
|
|
477
474
|
function stringMap(value) {
|
|
478
|
-
if (!isRecord(value)) return {};
|
|
475
|
+
if (!isRecord$1(value)) return {};
|
|
479
476
|
const out = {};
|
|
480
477
|
for (const [key, entry] of Object.entries(value)) if (typeof entry === "string") out[key] = entry;
|
|
481
478
|
return out;
|
|
@@ -496,7 +493,7 @@ function dropEmptyHeaders(headers) {
|
|
|
496
493
|
}
|
|
497
494
|
/** Read the MCP disable lists from a parsed `.claude/settings.json` document. */
|
|
498
495
|
function parseMcpDisableFilters(raw) {
|
|
499
|
-
if (!isRecord(raw)) return {
|
|
496
|
+
if (!isRecord$1(raw)) return {
|
|
500
497
|
disabledMcpjsonServers: [],
|
|
501
498
|
disabledMcpServers: []
|
|
502
499
|
};
|
|
@@ -523,9 +520,9 @@ function describeSource(source) {
|
|
|
523
520
|
* Normalise one raw server entry. Returns `null` (after warning) when the
|
|
524
521
|
* server is unsupported or incomplete:
|
|
525
522
|
*
|
|
526
|
-
* - `type: ws`, or any `oauth` / `headersHelper` field — unsupported
|
|
527
|
-
* and auth flows
|
|
528
|
-
* - no `command` for stdio, no `url` for http
|
|
523
|
+
* - `type: sse` or `ws`, or any `oauth` / `headersHelper` field — unsupported
|
|
524
|
+
* transports and auth flows
|
|
525
|
+
* - no `command` for stdio, no `url` for http, before or after expansion
|
|
529
526
|
* - a `${VAR}` reference with no value and no default (the warning names the
|
|
530
527
|
* variable, never a value)
|
|
531
528
|
*
|
|
@@ -535,7 +532,7 @@ function describeSource(source) {
|
|
|
535
532
|
function normalizeMcpServer(name, raw, source, options = {}) {
|
|
536
533
|
const warn = options.warn ?? (() => {});
|
|
537
534
|
const where = describeSource(source);
|
|
538
|
-
if (!isRecord(raw)) {
|
|
535
|
+
if (!isRecord$1(raw)) {
|
|
539
536
|
warn(`MCP server "${name}" in ${where} is not an object — skipped.`);
|
|
540
537
|
return null;
|
|
541
538
|
}
|
|
@@ -558,8 +555,8 @@ function normalizeMcpServer(name, raw, source, options = {}) {
|
|
|
558
555
|
warn(`MCP server "${name}" in ${where} has neither "command" nor "url" — skipped.`);
|
|
559
556
|
return null;
|
|
560
557
|
}
|
|
561
|
-
if (type === "ws") {
|
|
562
|
-
warn(`MCP server "${name}" in ${where} uses the
|
|
558
|
+
if (type === "sse" || type === "ws") {
|
|
559
|
+
warn(`MCP server "${name}" in ${where} uses the ${type} transport, which is not supported — skipped.`);
|
|
563
560
|
return null;
|
|
564
561
|
}
|
|
565
562
|
if (type === "stdio" && !hasCommand) {
|
|
@@ -1770,7 +1767,7 @@ function buildSummaryBody(summary, costFooter, options = {}) {
|
|
|
1770
1767
|
return `${withFooter}\n\n${buildSummaryHistoryBlock(historyEntries)}`;
|
|
1771
1768
|
}
|
|
1772
1769
|
function buildReviewedCommitFooter(commitSha) {
|
|
1773
|
-
return `Reviewed by ${PRODUCT_LINK} v0.
|
|
1770
|
+
return `Reviewed by ${PRODUCT_LINK} v0.10.1 for commit ${commitSha}.`;
|
|
1774
1771
|
}
|
|
1775
1772
|
function extractReviewedCommitSha(body) {
|
|
1776
1773
|
return REVIEWED_COMMIT_FOOTER_PATTERN.exec(body)?.[1] ?? null;
|
|
@@ -3191,20 +3188,60 @@ function safeSegment(value) {
|
|
|
3191
3188
|
function mcpToolName(server, tool) {
|
|
3192
3189
|
return `mcp__${safeSegment(server)}__${safeSegment(tool)}`;
|
|
3193
3190
|
}
|
|
3191
|
+
/**
|
|
3192
|
+
* Parent environment variables a stdio server inherits: the sudo-style safe
|
|
3193
|
+
* subset the official MCP SDK used. pi-mcp inherits the whole `process.env` by
|
|
3194
|
+
* default, which would hand CI secrets (GitLab token, provider API keys) to a
|
|
3195
|
+
* server the repository under review may have declared.
|
|
3196
|
+
*/
|
|
3197
|
+
var INHERITED_ENV_VARS = process.platform === "win32" ? [
|
|
3198
|
+
"APPDATA",
|
|
3199
|
+
"HOMEDRIVE",
|
|
3200
|
+
"HOMEPATH",
|
|
3201
|
+
"LOCALAPPDATA",
|
|
3202
|
+
"PATH",
|
|
3203
|
+
"PROCESSOR_ARCHITECTURE",
|
|
3204
|
+
"SYSTEMDRIVE",
|
|
3205
|
+
"SYSTEMROOT",
|
|
3206
|
+
"TEMP",
|
|
3207
|
+
"USERNAME",
|
|
3208
|
+
"USERPROFILE",
|
|
3209
|
+
"PROGRAMFILES"
|
|
3210
|
+
] : [
|
|
3211
|
+
"HOME",
|
|
3212
|
+
"LOGNAME",
|
|
3213
|
+
"PATH",
|
|
3214
|
+
"SHELL",
|
|
3215
|
+
"TERM",
|
|
3216
|
+
"USER"
|
|
3217
|
+
];
|
|
3218
|
+
/** The safe subset of `env`, skipping exported shell functions (`() { …`). */
|
|
3219
|
+
function inheritedMcpEnvironment(env = process.env) {
|
|
3220
|
+
const inherited = {};
|
|
3221
|
+
for (const key of INHERITED_ENV_VARS) {
|
|
3222
|
+
const value = env[key];
|
|
3223
|
+
if (value === void 0 || value.startsWith("()")) continue;
|
|
3224
|
+
inherited[key] = value;
|
|
3225
|
+
}
|
|
3226
|
+
return inherited;
|
|
3227
|
+
}
|
|
3194
3228
|
/** Build the real transport for a server config. */
|
|
3195
3229
|
function createMcpTransport(config) {
|
|
3196
3230
|
switch (config.type) {
|
|
3197
|
-
case "stdio": return new
|
|
3231
|
+
case "stdio": return new StdioTransport({
|
|
3198
3232
|
command: config.command,
|
|
3199
3233
|
args: config.args,
|
|
3200
3234
|
env: {
|
|
3201
|
-
...
|
|
3235
|
+
...inheritedMcpEnvironment(),
|
|
3202
3236
|
...config.env
|
|
3203
3237
|
},
|
|
3204
|
-
|
|
3238
|
+
inheritEnv: false
|
|
3239
|
+
});
|
|
3240
|
+
case "http": return new StreamableHttpTransport({
|
|
3241
|
+
url: config.url,
|
|
3242
|
+
headers: config.headers,
|
|
3243
|
+
openGetStream: false
|
|
3205
3244
|
});
|
|
3206
|
-
case "http": return new StreamableHTTPClientTransport(new URL(config.url), { requestInit: { headers: config.headers } });
|
|
3207
|
-
case "sse": return new SSEClientTransport(new URL(config.url), { requestInit: { headers: config.headers } });
|
|
3208
3245
|
default: throw new Error(`Unsupported MCP transport: ${String(config.type)}`);
|
|
3209
3246
|
}
|
|
3210
3247
|
}
|
|
@@ -3233,25 +3270,33 @@ function withMcpTrace(runId, op, server, operation) {
|
|
|
3233
3270
|
function formatMcpToolResult(result, maxChars) {
|
|
3234
3271
|
const texts = [];
|
|
3235
3272
|
const images = [];
|
|
3236
|
-
for (const block of result.content)
|
|
3237
|
-
|
|
3238
|
-
texts.push(
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3273
|
+
for (const block of result.content) {
|
|
3274
|
+
if (!isRecord(block)) {
|
|
3275
|
+
texts.push("[invalid content omitted]");
|
|
3276
|
+
continue;
|
|
3277
|
+
}
|
|
3278
|
+
switch (block.type) {
|
|
3279
|
+
case "text":
|
|
3280
|
+
texts.push(typeof block.text === "string" ? block.text : "[invalid text content omitted]");
|
|
3281
|
+
break;
|
|
3282
|
+
case "image":
|
|
3283
|
+
if (typeof block.data === "string" && typeof block.mimeType === "string") images.push({
|
|
3284
|
+
type: "image",
|
|
3285
|
+
data: block.data,
|
|
3286
|
+
mimeType: block.mimeType
|
|
3287
|
+
});
|
|
3288
|
+
else texts.push("[invalid image content omitted]");
|
|
3289
|
+
break;
|
|
3290
|
+
case "resource":
|
|
3291
|
+
if (!isRecord(block.resource)) texts.push("[invalid resource content omitted]");
|
|
3292
|
+
else if (typeof block.resource.text === "string") texts.push(block.resource.text);
|
|
3293
|
+
else texts.push(`[binary resource ${String(block.resource.uri)} omitted]`);
|
|
3294
|
+
break;
|
|
3295
|
+
case "resource_link":
|
|
3296
|
+
texts.push(`[resource link] ${String(block.uri)}${typeof block.description === "string" && block.description ? ` — ${block.description}` : ""}`);
|
|
3297
|
+
break;
|
|
3298
|
+
default: texts.push(`[${String(block.type)} content omitted]`);
|
|
3299
|
+
}
|
|
3255
3300
|
}
|
|
3256
3301
|
if (texts.length === 0 && result.structuredContent !== void 0) texts.push(JSON.stringify(result.structuredContent));
|
|
3257
3302
|
let text = texts.join("\n");
|
|
@@ -3264,11 +3309,12 @@ function formatMcpToolResult(result, maxChars) {
|
|
|
3264
3309
|
const kept = [];
|
|
3265
3310
|
const notes = [];
|
|
3266
3311
|
for (const image of images) {
|
|
3267
|
-
|
|
3312
|
+
const size = image.data.length + image.mimeType.length;
|
|
3313
|
+
if (kept.length >= 4 || size > remaining) {
|
|
3268
3314
|
notes.push(`[image omitted: ${image.data.length} bytes]`);
|
|
3269
3315
|
continue;
|
|
3270
3316
|
}
|
|
3271
|
-
remaining -=
|
|
3317
|
+
remaining -= size;
|
|
3272
3318
|
kept.push(image);
|
|
3273
3319
|
}
|
|
3274
3320
|
if (notes.length > 0) {
|
|
@@ -3283,6 +3329,9 @@ function formatMcpToolResult(result, maxChars) {
|
|
|
3283
3329
|
content.push(...kept);
|
|
3284
3330
|
return content;
|
|
3285
3331
|
}
|
|
3332
|
+
function isRecord(value) {
|
|
3333
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3334
|
+
}
|
|
3286
3335
|
function toParameters(tool) {
|
|
3287
3336
|
const schema = { ...tool.inputSchema };
|
|
3288
3337
|
if (schema.type !== "object") schema.type = "object";
|
|
@@ -3308,11 +3357,8 @@ function bridgeTool(tool, deps) {
|
|
|
3308
3357
|
status.calls += 1;
|
|
3309
3358
|
return withMcpTrace(runId, "mcp.call", status.name, async (context) => {
|
|
3310
3359
|
if (context) context.tool = tool.name;
|
|
3311
|
-
const content = formatMcpToolResult(await client.callTool({
|
|
3312
|
-
|
|
3313
|
-
arguments: params
|
|
3314
|
-
}, void 0, {
|
|
3315
|
-
timeout: timeoutMs,
|
|
3360
|
+
const content = formatMcpToolResult(await client.callTool(tool.name, params, {
|
|
3361
|
+
timeoutMs,
|
|
3316
3362
|
signal
|
|
3317
3363
|
}), maxResultChars);
|
|
3318
3364
|
if (context) context.resultChars = content.reduce((chars, block) => chars + (block.type === "text" ? block.text.length : 0), 0);
|
|
@@ -3324,32 +3370,6 @@ function bridgeTool(tool, deps) {
|
|
|
3324
3370
|
}
|
|
3325
3371
|
};
|
|
3326
3372
|
}
|
|
3327
|
-
/**
|
|
3328
|
-
* `Client.listTools` caches each tool's output-schema validator and task-support
|
|
3329
|
-
* flags, and clears that cache at the start of every call — so after paginating,
|
|
3330
|
-
* the client only holds metadata for the last page and `callTool` silently skips
|
|
3331
|
-
* output validation for every tool listed before it. The SDK exposes no public
|
|
3332
|
-
* re-prime, so re-seed the cache with the full set through its (typed-private,
|
|
3333
|
-
* runtime-public) `cacheToolMetadata`, guarded so a future SDK that drops it
|
|
3334
|
-
* degrades to today's single-page behaviour instead of throwing.
|
|
3335
|
-
*/
|
|
3336
|
-
function recacheToolMetadata(client, tools) {
|
|
3337
|
-
const recache = client.cacheToolMetadata;
|
|
3338
|
-
if (typeof recache === "function") recache.call(client, tools);
|
|
3339
|
-
}
|
|
3340
|
-
async function listAllTools(client, timeoutMs) {
|
|
3341
|
-
const tools = [];
|
|
3342
|
-
let cursor;
|
|
3343
|
-
let pages = 0;
|
|
3344
|
-
do {
|
|
3345
|
-
const page = await client.listTools(cursor ? { cursor } : void 0, { timeout: timeoutMs });
|
|
3346
|
-
tools.push(...page.tools);
|
|
3347
|
-
cursor = page.nextCursor;
|
|
3348
|
-
pages += 1;
|
|
3349
|
-
} while (cursor);
|
|
3350
|
-
if (pages > 1) recacheToolMetadata(client, tools);
|
|
3351
|
-
return tools;
|
|
3352
|
-
}
|
|
3353
3373
|
async function connectOne(config, options) {
|
|
3354
3374
|
const { logger, budget, maxResultChars, runId } = options;
|
|
3355
3375
|
const timeoutMs = config.timeoutMs ?? options.timeoutMs;
|
|
@@ -3360,14 +3380,15 @@ async function connectOne(config, options) {
|
|
|
3360
3380
|
tools: [],
|
|
3361
3381
|
calls: 0
|
|
3362
3382
|
};
|
|
3363
|
-
const client = new
|
|
3383
|
+
const client = new McpClient({
|
|
3364
3384
|
name: PRODUCT_NAME,
|
|
3365
|
-
version: "0.
|
|
3385
|
+
version: "0.10.1",
|
|
3386
|
+
requestTimeoutMs: MCP_CONNECT_TIMEOUT_MS
|
|
3366
3387
|
});
|
|
3367
3388
|
try {
|
|
3368
|
-
await withMcpTrace(runId, "mcp.connect", config.name, () => client.connect(options.createTransport(config)
|
|
3389
|
+
await withMcpTrace(runId, "mcp.connect", config.name, () => client.connect(options.createTransport(config)));
|
|
3369
3390
|
const { exposed, dropped } = await withMcpTrace(runId, "mcp.tools", config.name, async (context) => {
|
|
3370
|
-
const listed = await
|
|
3391
|
+
const listed = await client.listTools({ timeoutMs: MCP_CONNECT_TIMEOUT_MS });
|
|
3371
3392
|
const readOnly = listed.filter(isReadOnlyMcpTool);
|
|
3372
3393
|
const notReadOnly = listed.filter((tool) => !isReadOnlyMcpTool(tool));
|
|
3373
3394
|
if (context) context.toolCount = readOnly.length;
|
|
@@ -7035,7 +7056,7 @@ async function loadDefaultRuntime() {
|
|
|
7035
7056
|
const [sdkNode, resources, semconv] = modules;
|
|
7036
7057
|
const serviceResource = resources.resourceFromAttributes({
|
|
7037
7058
|
[semconv.ATTR_SERVICE_NAME ?? "service.name"]: SERVICE_NAME,
|
|
7038
|
-
[semconv.ATTR_SERVICE_VERSION ?? "service.version"]: "0.
|
|
7059
|
+
[semconv.ATTR_SERVICE_VERSION ?? "service.version"]: "0.10.1"
|
|
7039
7060
|
});
|
|
7040
7061
|
applyOtelExporterDefaults(process.env);
|
|
7041
7062
|
const sdk = new sdkNode.NodeSDK({ resource: resources.defaultResource().merge(serviceResource) });
|
|
@@ -7548,7 +7569,7 @@ function boldCommentTitle(body) {
|
|
|
7548
7569
|
*/
|
|
7549
7570
|
function buildCommentBody(body, commitSha, confidence) {
|
|
7550
7571
|
const confidenceLine = `_Confidence: ${confidence}._`;
|
|
7551
|
-
const footer = `<sub>Reviewed by ${PRODUCT_LINK} v0.
|
|
7572
|
+
const footer = `<sub>Reviewed by ${PRODUCT_LINK} v0.10.1 for commit ${commitSha}.</sub>`;
|
|
7552
7573
|
return `${boldCommentTitle(body.trim())}\n\n${confidenceLine}\n\n---\n\n${footer}`;
|
|
7553
7574
|
}
|
|
7554
7575
|
function buildPayload(comment, body, refs, resolved) {
|
|
@@ -8200,7 +8221,7 @@ function gitRepoWebUrl(cloneUrl) {
|
|
|
8200
8221
|
*/
|
|
8201
8222
|
function skillSourceUrl(origin, context = {}) {
|
|
8202
8223
|
switch (origin.kind) {
|
|
8203
|
-
case "builtin": return blobUrl(PRODUCT_URL, "0.
|
|
8224
|
+
case "builtin": return blobUrl(PRODUCT_URL, "0.10.1", `skills/${origin.name}/SKILL.md`);
|
|
8204
8225
|
case "project":
|
|
8205
8226
|
if (!context.projectWebUrl || !context.commitSha) return void 0;
|
|
8206
8227
|
return blobUrl(context.projectWebUrl, context.commitSha, `${origin.path}/SKILL.md`);
|
|
@@ -8386,7 +8407,7 @@ Options:
|
|
|
8386
8407
|
provider's standard env var (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY,
|
|
8387
8408
|
GEMINI_API_KEY, OPENROUTER_API_KEY) or this flag.
|
|
8388
8409
|
--model <provider/id> Model to use. Format: provider/modelId. Multi-slash IDs such as
|
|
8389
|
-
openrouter/anthropic/claude-
|
|
8410
|
+
openrouter/anthropic/claude-opus-4.5 are supported by splitting on the
|
|
8390
8411
|
first slash. Use ollama/<model> for local Ollama models.
|
|
8391
8412
|
(required; env: CODE_REVIEW_MODEL)
|
|
8392
8413
|
--model-pool <list> Comma-separated provider/modelId list for heterogeneous full-depth
|
|
@@ -8868,10 +8889,10 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
8868
8889
|
return;
|
|
8869
8890
|
}
|
|
8870
8891
|
if (argv.includes("--version") || argv.includes("-v")) {
|
|
8871
|
-
console.log("0.
|
|
8892
|
+
console.log("0.10.1");
|
|
8872
8893
|
return;
|
|
8873
8894
|
}
|
|
8874
|
-
process.stderr.write(`[code-review] @weareikko/code-review v0.
|
|
8895
|
+
process.stderr.write(`[code-review] @weareikko/code-review v0.10.1\n`);
|
|
8875
8896
|
assertNodeVersion();
|
|
8876
8897
|
applyCodeReviewEnvPrefix();
|
|
8877
8898
|
applyDefaultCacheRetention();
|
|
@@ -8894,4 +8915,4 @@ if (isDirectRun()) main().catch((error) => {
|
|
|
8894
8915
|
//#endregion
|
|
8895
8916
|
export { buildSummaryHistoryEntries as $, connectMcpServers as A, traceMcpDiagnostic as B, findSkillForPath as C, readToolPath as D, formatSkillUsageState as E, createDiagnosticRunId as F, SUMMARY_HISTORY_ENTRY_START as G, toGitLabReviewSeverity as H, diagnosticChannels as I, SUMMARY_MARKER as J, SUMMARY_HISTORY_LIMIT as K, mcpDiagnosticChannels as L, DIAGNOSTIC_CHANNEL_PREFIX as M, MCP_DIAGNOSTIC_CHANNEL_NAMES as N, parseReviewMarkdown as O, createDiagnosticContext as P, buildSummaryBody as Q, traceDiagnostic as R, createSkillReadCounter as S, formatReviewUsageSummary as T, SUMMARY_HISTORY_END as U, normalizeSeverity as V, SUMMARY_HISTORY_ENTRY_END as W, buildReviewedCommitFooter as X, buildArchivedSummaryEntry as Y, buildSizeNoticeBlock as Z, buildPayload as _, resolveNpmSkillDir as _t, formatSkillsFooter as a, stripSummaryHistory as at, filterDiff as b, resolveLabelChange as c, appendFingerprintMarkers as ct, blobUrl as d, fingerprints as dt, extractReviewedCommitSha as et, formatSkillLink as f, normalizeBody as ft, buildGeneratedComments as g, parseSkillSpec as gt, skillSourceUrl as h, loadNamedSkill as ht, formatPerModelUsage as i, findExistingSummaryNoteId as it, DIAGNOSTIC_CHANNEL_NAMES as j, parseReviewMarkdownWithWarnings as k, run as l, extractDiffHunkContext as lt, skillDisplayName as m, gitSkillCacheKey as mt, formatLabelChange as n, findExistingReviewedCommitSha as nt, formatUsageLine as o, stripSummaryMarker as ot, gitRepoWebUrl as p, sha256 as pt, SUMMARY_HISTORY_START as q, formatMcpFooter as r, findExistingSummaryNote as rt, main as s, upsertSummaryNote as st, countPostedBySeverity as t, extractSummaryHistoryEntries as tt, withHttpStamping as u, extractExistingFingerprints as ut, isOtelEnabled as v, resolveSkillCacheDir as vt, formatMcpUsageState as w, runReview as x, startOtelBridge as y, traceDiagnosticPhase as z };
|
|
8896
8917
|
|
|
8897
|
-
//# sourceMappingURL=cli-
|
|
8918
|
+
//# sourceMappingURL=cli-DIXQI0Bd.js.map
|