reygent-code 1.1.1 → 1.1.3
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/cli.js +40 -13
- package/dist/cli.js.map +1 -1
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -577,7 +577,11 @@ var claudeAdapter = {
|
|
|
577
577
|
"--model",
|
|
578
578
|
options.model
|
|
579
579
|
];
|
|
580
|
-
if (options.
|
|
580
|
+
if (options.allowedTools !== void 0) {
|
|
581
|
+
if (options.allowedTools.length > 0) {
|
|
582
|
+
args.push("--allowedTools", ...options.allowedTools);
|
|
583
|
+
}
|
|
584
|
+
} else if (options.autoApprove) {
|
|
581
585
|
args.push("--allowedTools", "Bash", "Edit", "Write", "Read", "Glob", "Grep");
|
|
582
586
|
}
|
|
583
587
|
const name = options.agentName;
|
|
@@ -2868,7 +2872,8 @@ ${knowledgeSections.join("\n\n")}
|
|
|
2868
2872
|
quiet: options?.quiet,
|
|
2869
2873
|
timeoutMs,
|
|
2870
2874
|
agentName: name,
|
|
2871
|
-
onActivity: options?.onActivity
|
|
2875
|
+
onActivity: options?.onActivity,
|
|
2876
|
+
allowedTools: options?.allowedTools
|
|
2872
2877
|
});
|
|
2873
2878
|
clearTimeout(timeoutHandle);
|
|
2874
2879
|
if (!timedOut && chesstrace) {
|
|
@@ -2978,7 +2983,7 @@ async function runPlanner(spec, previousAnswers, options) {
|
|
|
2978
2983
|
const agents = getAgents();
|
|
2979
2984
|
const plannerAgent = agents.find((a) => a.name === "planner");
|
|
2980
2985
|
const prompt2 = buildPrompt(spec, previousAnswers, options);
|
|
2981
|
-
const spawnResult = await spawnAgentStream("planner", prompt2, 3e5, { quiet: true, onActivity: options?.onActivity, provider: plannerAgent?.provider, model: plannerAgent?.model });
|
|
2986
|
+
const spawnResult = await spawnAgentStream("planner", prompt2, 3e5, { quiet: true, onActivity: options?.onActivity, provider: plannerAgent?.provider, model: plannerAgent?.model, allowedTools: [] });
|
|
2982
2987
|
const { stdout: raw, exitCode, usage, errorMessage, apiErrorStatus } = spawnResult;
|
|
2983
2988
|
if (exitCode !== 0) {
|
|
2984
2989
|
const detail = formatExitDetail(spawnResult, plannerAgent?.model);
|
|
@@ -4816,12 +4821,31 @@ function splitDiffByFile(rawDiff) {
|
|
|
4816
4821
|
}
|
|
4817
4822
|
return files;
|
|
4818
4823
|
}
|
|
4824
|
+
var EXCLUDED_DIFF_PATTERNS = [
|
|
4825
|
+
"package-lock.json",
|
|
4826
|
+
"yarn.lock",
|
|
4827
|
+
"pnpm-lock.yaml",
|
|
4828
|
+
"bun.lockb",
|
|
4829
|
+
"Gemfile.lock",
|
|
4830
|
+
"Pipfile.lock",
|
|
4831
|
+
"poetry.lock",
|
|
4832
|
+
"composer.lock",
|
|
4833
|
+
"Cargo.lock"
|
|
4834
|
+
];
|
|
4835
|
+
function isExcludedFile(filePath) {
|
|
4836
|
+
const basename3 = filePath.split("/").pop() ?? filePath;
|
|
4837
|
+
return EXCLUDED_DIFF_PATTERNS.includes(basename3);
|
|
4838
|
+
}
|
|
4819
4839
|
function selectDiffsWithinBudget(files, budgetTokens, reservedTokens) {
|
|
4820
4840
|
const available = budgetTokens - reservedTokens;
|
|
4821
4841
|
const included = [];
|
|
4822
4842
|
const excluded = [];
|
|
4823
4843
|
let used = 0;
|
|
4824
4844
|
for (const f of files) {
|
|
4845
|
+
if (isExcludedFile(f.file)) {
|
|
4846
|
+
excluded.push(f.file);
|
|
4847
|
+
continue;
|
|
4848
|
+
}
|
|
4825
4849
|
if (used + f.tokens <= available) {
|
|
4826
4850
|
included.push(f);
|
|
4827
4851
|
used += f.tokens;
|
|
@@ -5166,7 +5190,7 @@ async function runPRReview(context, options) {
|
|
|
5166
5190
|
includedDiffs: included,
|
|
5167
5191
|
excludedFiles: excluded
|
|
5168
5192
|
});
|
|
5169
|
-
const result = await spawnAgent("pr-review", prompt2, { ...options, quiet: true, provider: agent.provider, model: agent.model });
|
|
5193
|
+
const result = await spawnAgent("pr-review", prompt2, { ...options, quiet: true, provider: agent.provider, model: agent.model, allowedTools: [] });
|
|
5170
5194
|
if (result.exitCode !== 0) {
|
|
5171
5195
|
throw new TaskError(
|
|
5172
5196
|
`pr-review: agent exited with code ${result.exitCode}`
|
|
@@ -5361,16 +5385,16 @@ var PROVIDER_PRICING = {
|
|
|
5361
5385
|
supportsCaching: true,
|
|
5362
5386
|
defaultModel: "claude-sonnet-4-5-20250929",
|
|
5363
5387
|
pricingUrl: "https://www.anthropic.com/pricing",
|
|
5364
|
-
lastVerified: "2026-05-
|
|
5388
|
+
lastVerified: "2026-05-15"
|
|
5365
5389
|
},
|
|
5366
5390
|
codex: {
|
|
5367
|
-
inputCostPerMillion:
|
|
5368
|
-
outputCostPerMillion:
|
|
5391
|
+
inputCostPerMillion: 2.5,
|
|
5392
|
+
outputCostPerMillion: 15,
|
|
5369
5393
|
cacheDiscountRate: 0.9,
|
|
5370
5394
|
supportsCaching: true,
|
|
5371
5395
|
defaultModel: "gpt-5.4",
|
|
5372
5396
|
pricingUrl: "https://openai.com/api/pricing/",
|
|
5373
|
-
lastVerified: "2026-05-
|
|
5397
|
+
lastVerified: "2026-05-15"
|
|
5374
5398
|
},
|
|
5375
5399
|
openrouter: {
|
|
5376
5400
|
inputCostPerMillion: 3,
|
|
@@ -5379,7 +5403,7 @@ var PROVIDER_PRICING = {
|
|
|
5379
5403
|
supportsCaching: true,
|
|
5380
5404
|
defaultModel: "anthropic/claude-sonnet-4-5",
|
|
5381
5405
|
pricingUrl: "https://openrouter.ai/models",
|
|
5382
|
-
lastVerified: "
|
|
5406
|
+
lastVerified: "2026-05-15"
|
|
5383
5407
|
},
|
|
5384
5408
|
gemini: {
|
|
5385
5409
|
inputCostPerMillion: 1.25,
|
|
@@ -5388,7 +5412,7 @@ var PROVIDER_PRICING = {
|
|
|
5388
5412
|
supportsCaching: true,
|
|
5389
5413
|
defaultModel: "gemini-2.5-pro",
|
|
5390
5414
|
pricingUrl: "https://ai.google.dev/pricing",
|
|
5391
|
-
lastVerified: "2026-05-
|
|
5415
|
+
lastVerified: "2026-05-15"
|
|
5392
5416
|
}
|
|
5393
5417
|
};
|
|
5394
5418
|
|
|
@@ -7856,7 +7880,7 @@ async function runAgentReview(baseBranch, spec, onActivity) {
|
|
|
7856
7880
|
excludedFiles: excluded,
|
|
7857
7881
|
spec
|
|
7858
7882
|
});
|
|
7859
|
-
const result = await spawnAgent("pr-review", prompt2, { quiet: true, onActivity, provider: agent.provider, model: agent.model });
|
|
7883
|
+
const result = await spawnAgent("pr-review", prompt2, { quiet: true, onActivity, provider: agent.provider, model: agent.model, allowedTools: [] });
|
|
7860
7884
|
if (result.exitCode !== 0) {
|
|
7861
7885
|
throw new TaskError(
|
|
7862
7886
|
`review-work: agent exited with code ${result.exitCode}`
|
|
@@ -8096,10 +8120,13 @@ function classifyComment(body) {
|
|
|
8096
8120
|
);
|
|
8097
8121
|
return secondaryMatches.length >= 2;
|
|
8098
8122
|
}
|
|
8123
|
+
function isReygentComment(comment) {
|
|
8124
|
+
return comment.body.includes("\u{1F431} Reygent PR Review") || comment.body.includes("*Review by [reygent]");
|
|
8125
|
+
}
|
|
8099
8126
|
function classifyComments(comments) {
|
|
8100
8127
|
return comments.map((c) => ({
|
|
8101
8128
|
...c,
|
|
8102
|
-
isSecurity: classifyComment(c.body)
|
|
8129
|
+
isSecurity: isReygentComment(c) ? false : classifyComment(c.body)
|
|
8103
8130
|
}));
|
|
8104
8131
|
}
|
|
8105
8132
|
function exec4(cmd, args) {
|
|
@@ -8391,7 +8418,7 @@ async function generatePlan(comments, includedDiffs, excludedFiles, feedback) {
|
|
|
8391
8418
|
throw new TaskError("review-comments: no agent with role 'planner' found in config");
|
|
8392
8419
|
}
|
|
8393
8420
|
const prompt2 = feedback ? buildPlanPromptWithFeedback(agent.systemPrompt, comments, includedDiffs, excludedFiles, feedback) : buildPlanPrompt(agent.systemPrompt, comments, includedDiffs, excludedFiles);
|
|
8394
|
-
const result = await spawnAgent("planner", prompt2, { quiet: true, provider: agent.provider, model: agent.model });
|
|
8421
|
+
const result = await spawnAgent("planner", prompt2, { quiet: true, provider: agent.provider, model: agent.model, allowedTools: [] });
|
|
8395
8422
|
if (result.exitCode !== 0) {
|
|
8396
8423
|
throw new TaskError(`review-comments: planner agent exited with code ${result.exitCode}`);
|
|
8397
8424
|
}
|