@vibgrate/cli 2026.825.2 → 2026.829.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/DOCS.md +204 -9
- package/README.md +2 -0
- package/dist/{agent-DHQYEHVW.js → agent-5GW7C7EB.js} +14 -14
- package/dist/{agent-DHQYEHVW.js.map → agent-5GW7C7EB.js.map} +1 -1
- package/dist/{approvals-KBM72NU2.js → approvals-ISJFILVK.js} +5 -5
- package/dist/{approvals-KBM72NU2.js.map → approvals-ISJFILVK.js.map} +1 -1
- package/dist/{attach-O74NL4M5.js → attach-JUSALQ75.js} +3 -3
- package/dist/{attach-O74NL4M5.js.map → attach-JUSALQ75.js.map} +1 -1
- package/dist/baseline-YL2IZZ4Y.js +9 -0
- package/dist/{baseline-4X6MQBDA.js.map → baseline-YL2IZZ4Y.js.map} +1 -1
- package/dist/{chunk-JAEHLTVX.js → chunk-5RW5PIBH.js} +3 -3
- package/dist/{chunk-JAEHLTVX.js.map → chunk-5RW5PIBH.js.map} +1 -1
- package/dist/{chunk-TT2J2TB6.js → chunk-65YN3BG3.js} +1207 -40
- package/dist/chunk-65YN3BG3.js.map +1 -0
- package/dist/{chunk-VMPKOMHG.js → chunk-B5VCPIKT.js} +7 -6
- package/dist/chunk-B5VCPIKT.js.map +1 -0
- package/dist/{chunk-FQHWPOTS.js → chunk-BA6YBVNT.js} +3 -3
- package/dist/{chunk-FQHWPOTS.js.map → chunk-BA6YBVNT.js.map} +1 -1
- package/dist/{chunk-3E7QT4NE.js → chunk-BODXEZEY.js} +9 -9
- package/dist/{chunk-3E7QT4NE.js.map → chunk-BODXEZEY.js.map} +1 -1
- package/dist/{chunk-BICZR6UJ.js → chunk-D3SV3JWB.js} +3 -3
- package/dist/{chunk-BICZR6UJ.js.map → chunk-D3SV3JWB.js.map} +1 -1
- package/dist/chunk-EGMBHPXV.js +127 -0
- package/dist/chunk-EGMBHPXV.js.map +1 -0
- package/dist/{chunk-DIZ5KI5Q.js → chunk-FHSEK64W.js} +7 -7
- package/dist/{chunk-DIZ5KI5Q.js.map → chunk-FHSEK64W.js.map} +1 -1
- package/dist/{chunk-E3XVIFSH.js → chunk-FKCN653F.js} +3 -3
- package/dist/{chunk-E3XVIFSH.js.map → chunk-FKCN653F.js.map} +1 -1
- package/dist/{chunk-OIUVWCKM.js → chunk-FPIMNVLI.js} +12 -4
- package/dist/chunk-FPIMNVLI.js.map +1 -0
- package/dist/{chunk-NS4DL3QR.js → chunk-HHMWE52J.js} +10 -135
- package/dist/chunk-HHMWE52J.js.map +1 -0
- package/dist/{chunk-5UG4UHKU.js → chunk-HUJZO4K5.js} +281 -106
- package/dist/chunk-HUJZO4K5.js.map +1 -0
- package/dist/{chunk-HFQIYM6E.js → chunk-JWQ2JCQS.js} +4 -4
- package/dist/{chunk-HFQIYM6E.js.map → chunk-JWQ2JCQS.js.map} +1 -1
- package/dist/{chunk-27TS2AUJ.js → chunk-K7QR7U3V.js} +12 -11
- package/dist/chunk-K7QR7U3V.js.map +1 -0
- package/dist/{chunk-IJVWKZRS.js → chunk-KCKG3EEJ.js} +3 -3
- package/dist/{chunk-IJVWKZRS.js.map → chunk-KCKG3EEJ.js.map} +1 -1
- package/dist/{chunk-GWSJYDK7.js → chunk-MMIIVRQC.js} +7 -7
- package/dist/chunk-MMIIVRQC.js.map +1 -0
- package/dist/chunk-N6R4XPLX.js +27 -0
- package/dist/chunk-N6R4XPLX.js.map +1 -0
- package/dist/{chunk-GR7SFCQJ.js → chunk-NQQT75AN.js} +77 -27
- package/dist/chunk-NQQT75AN.js.map +1 -0
- package/dist/{chunk-6MIJLO5B.js → chunk-NSC7ZK62.js} +3 -3
- package/dist/{chunk-6MIJLO5B.js.map → chunk-NSC7ZK62.js.map} +1 -1
- package/dist/{chunk-SYMJSRYF.js → chunk-OAYSRM7J.js} +12 -14
- package/dist/chunk-OAYSRM7J.js.map +1 -0
- package/dist/{chunk-L7GCJNDT.js → chunk-QMROD7MI.js} +15 -8
- package/dist/chunk-QMROD7MI.js.map +1 -0
- package/dist/{chunk-SHD5TCZ5.js → chunk-R2FX4USU.js} +7 -7
- package/dist/chunk-R2FX4USU.js.map +1 -0
- package/dist/{chunk-7M4E7UGX.js → chunk-RL7JYG3D.js} +3 -3
- package/dist/{chunk-7M4E7UGX.js.map → chunk-RL7JYG3D.js.map} +1 -1
- package/dist/{chunk-QLNJ3VWO.js → chunk-RRSUNTZI.js} +3 -3
- package/dist/{chunk-QLNJ3VWO.js.map → chunk-RRSUNTZI.js.map} +1 -1
- package/dist/{chunk-NZES47ST.js → chunk-TWFPHXPN.js} +3 -3
- package/dist/{chunk-NZES47ST.js.map → chunk-TWFPHXPN.js.map} +1 -1
- package/dist/chunk-UGRUG2FA.js +6 -0
- package/dist/{chunk-G3ACLBMG.js.map → chunk-UGRUG2FA.js.map} +1 -1
- package/dist/{chunk-KYM55VZX.js → chunk-VOEEYCR3.js} +6 -6
- package/dist/{chunk-KYM55VZX.js.map → chunk-VOEEYCR3.js.map} +1 -1
- package/dist/{chunk-SIXWWQ6S.js → chunk-WBDRBP22.js} +4 -4
- package/dist/{chunk-SIXWWQ6S.js.map → chunk-WBDRBP22.js.map} +1 -1
- package/dist/{chunk-K3SXWOTT.js → chunk-YL332BU2.js} +20 -15
- package/dist/chunk-YL332BU2.js.map +1 -0
- package/dist/{chunk-2NUS5BOR.js → chunk-ZQY5TWCB.js} +3 -3
- package/dist/{chunk-2NUS5BOR.js.map → chunk-ZQY5TWCB.js.map} +1 -1
- package/dist/cli.d.ts +16 -1
- package/dist/cli.js +2362 -342
- package/dist/cli.js.map +1 -1
- package/dist/{daemon-RZS5FPIW.js → daemon-NRIIDMX2.js} +10 -10
- package/dist/{daemon-RZS5FPIW.js.map → daemon-NRIIDMX2.js.map} +1 -1
- package/dist/embed-worker-main.js +3 -3
- package/dist/{ensure-map-DL2S774J.js → ensure-map-VAIYCCEJ.js} +17 -16
- package/dist/{ensure-map-DL2S774J.js.map → ensure-map-VAIYCCEJ.js.map} +1 -1
- package/dist/explain-EXPJTCB5.js +126 -0
- package/dist/explain-EXPJTCB5.js.map +1 -0
- package/dist/{graph-backend-JXARVT3R.js → graph-backend-V5A2H5ZB.js} +7 -7
- package/dist/{graph-backend-JXARVT3R.js.map → graph-backend-V5A2H5ZB.js.map} +1 -1
- package/dist/index.d.ts +217 -13
- package/dist/index.js +17 -16
- package/dist/index.js.map +1 -1
- package/dist/{interactive-2XRBRFRB.js → interactive-VQM2CTE2.js} +37 -32
- package/dist/interactive-VQM2CTE2.js.map +1 -0
- package/dist/load-UAVA732M.js +11 -0
- package/dist/{load-7C5VETRD.js.map → load-UAVA732M.js.map} +1 -1
- package/dist/parse-worker.js +2 -2
- package/dist/{rules-ASYEUNB5.js → rules-TLRGB5L4.js} +12 -4
- package/dist/rules-TLRGB5L4.js.map +1 -0
- package/dist/{run-outcome-TMB5TJNA.js → run-outcome-EATWIKLR.js} +5 -5
- package/dist/{run-outcome-TMB5TJNA.js.map → run-outcome-EATWIKLR.js.map} +1 -1
- package/dist/{runtime-session-Y23NVY7R.js → runtime-session-Y2BRBXUW.js} +9 -9
- package/dist/{runtime-session-Y23NVY7R.js.map → runtime-session-Y2BRBXUW.js.map} +1 -1
- package/dist/{session-KXT2ZTPE.js → session-N2FTYIHQ.js} +9 -9
- package/dist/{session-KXT2ZTPE.js.map → session-N2FTYIHQ.js.map} +1 -1
- package/dist/{stream-json-NW6AOE47.js → stream-json-GCZAHORX.js} +14 -14
- package/dist/{stream-json-NW6AOE47.js.map → stream-json-GCZAHORX.js.map} +1 -1
- package/dist/version-XNZ4GLMQ.js +4 -0
- package/dist/{version-7ABYXWOZ.js.map → version-XNZ4GLMQ.js.map} +1 -1
- package/dist/{vg-mcp-bridge-LXBHKEFR.js → vg-mcp-bridge-VDZWFEO2.js} +22 -11
- package/dist/vg-mcp-bridge-VDZWFEO2.js.map +1 -0
- package/dist/{vgd-RW7HCEIP.js → vgd-3A2TRNP5.js} +8 -8
- package/dist/vgd-3A2TRNP5.js.map +1 -0
- package/package.json +2 -2
- package/dist/baseline-4X6MQBDA.js +0 -9
- package/dist/chunk-27TS2AUJ.js.map +0 -1
- package/dist/chunk-5UG4UHKU.js.map +0 -1
- package/dist/chunk-G3ACLBMG.js +0 -6
- package/dist/chunk-GR7SFCQJ.js.map +0 -1
- package/dist/chunk-GWSJYDK7.js.map +0 -1
- package/dist/chunk-K3SXWOTT.js.map +0 -1
- package/dist/chunk-L7GCJNDT.js.map +0 -1
- package/dist/chunk-NS4DL3QR.js.map +0 -1
- package/dist/chunk-OIUVWCKM.js.map +0 -1
- package/dist/chunk-SHD5TCZ5.js.map +0 -1
- package/dist/chunk-SYMJSRYF.js.map +0 -1
- package/dist/chunk-TT2J2TB6.js.map +0 -1
- package/dist/chunk-VMPKOMHG.js.map +0 -1
- package/dist/chunk-YENM3HT7.js +0 -23
- package/dist/chunk-YENM3HT7.js.map +0 -1
- package/dist/interactive-2XRBRFRB.js.map +0 -1
- package/dist/load-7C5VETRD.js +0 -11
- package/dist/rules-ASYEUNB5.js.map +0 -1
- package/dist/version-7ABYXWOZ.js +0 -4
- package/dist/vg-mcp-bridge-LXBHKEFR.js.map +0 -1
- package/dist/vgd-RW7HCEIP.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { isSecretPath, secretRefusal, secretEgressRefusal, redactText } from './chunk-543E6WDJ.js';
|
|
2
|
-
import { findMatchingRule, ruleLabel } from './chunk-
|
|
3
|
-
import { localGraphBackend } from './chunk-
|
|
4
|
-
import { buildAgentMessages, redactSecrets, unifiedDiff, applyEdit } from './chunk-
|
|
2
|
+
import { findMatchingRule, ruleLabel } from './chunk-FKCN653F.js';
|
|
3
|
+
import { localGraphBackend } from './chunk-5RW5PIBH.js';
|
|
4
|
+
import { buildAgentMessages, redactSecrets, unifiedDiff, applyEdit } from './chunk-R2FX4USU.js';
|
|
5
5
|
import { buildIdentifierTrieFromGraph, KvBlockRegistry, graphDraftCandidates, extractIdentifiers, scanIdentifiersAgainstTrie } from './chunk-5HYCB55P.js';
|
|
6
|
-
import { mappedFilePaths, capsuleMode, askNamesSymbol, sourceTokenMass, buildWholeRepoPacket } from './chunk-
|
|
6
|
+
import { mappedFilePaths, capsuleMode, rankConfidenceOf, askNamesSymbol, sourceTokenMass, buildWholeRepoPacket } from './chunk-QMROD7MI.js';
|
|
7
7
|
import { resolve } from './chunk-VIWZ4QT7.js';
|
|
8
|
-
import { searchSymbols, resolveLib, loadCatalog, readDoc, localPackageDocs, resolveVersion } from './chunk-
|
|
9
|
-
import { summarizeCapsule, CAPSULE_RANKING_VERSION, buildCodeContext, buildTaskCapsule, capsuleToCodeContext, recordCliCall, CLI_TOOL_ALIASES } from './chunk-
|
|
8
|
+
import { searchSymbols, resolveLib, loadCatalog, readDoc, localPackageDocs, resolveVersion } from './chunk-TWFPHXPN.js';
|
|
9
|
+
import { summarizeCapsule, CAPSULE_RANKING_VERSION, buildCodeContext, buildTaskCapsule, capsuleToCodeContext, recordCliCall, CLI_TOOL_ALIASES } from './chunk-OAYSRM7J.js';
|
|
10
10
|
import { resolveOne } from './chunk-J7LKEB2R.js';
|
|
11
|
-
import {
|
|
12
|
-
import { parseSource } from './chunk-
|
|
11
|
+
import { rankingAskFrom, isLocateOnlyInstruction, userAskFromInstruction, extractLiteralNeedles, impactOf } from './chunk-YL332BU2.js';
|
|
12
|
+
import { parseSource } from './chunk-NSC7ZK62.js';
|
|
13
13
|
import { langForExtension } from './chunk-6WRG7VDO.js';
|
|
14
|
-
import { loadTopicTags, rankQuestion } from './chunk-
|
|
14
|
+
import { loadTopicTags, rankQuestion } from './chunk-FPIMNVLI.js';
|
|
15
15
|
import { repositoryIdFromRoot } from './chunk-XP6UUCZZ.js';
|
|
16
16
|
import { hashString, canonicalize } from './chunk-JFGYT6BI.js';
|
|
17
17
|
import { spawnSync, spawn } from 'child_process';
|
|
@@ -1940,8 +1940,8 @@ async function runSubagent(host, req) {
|
|
|
1940
1940
|
text: `Subagent starting${worktreePath ? ` in worktree ${worktreePath}` : " in-place"}\u2026`
|
|
1941
1941
|
});
|
|
1942
1942
|
try {
|
|
1943
|
-
const { runAgent: runAgent2 } = await import('./agent-
|
|
1944
|
-
const { nodeCodeFs } = await import('./session-
|
|
1943
|
+
const { runAgent: runAgent2 } = await import('./agent-5GW7C7EB.js');
|
|
1944
|
+
const { nodeCodeFs } = await import('./session-N2FTYIHQ.js');
|
|
1945
1945
|
const childFs = childRoot === host.root ? host.fsImpl : nodeCodeFs(childRoot);
|
|
1946
1946
|
const childApprove = async (action) => {
|
|
1947
1947
|
host.onEvent?.({
|
|
@@ -2274,10 +2274,49 @@ var AGENT_TOOLS = [
|
|
|
2274
2274
|
}
|
|
2275
2275
|
}
|
|
2276
2276
|
];
|
|
2277
|
+
var VG_MCP_PREFIX = "mcp__vibgrate__";
|
|
2278
|
+
var AGENT_TOOL_NAME_SET = new Set(AGENT_TOOLS.map((t) => t.name));
|
|
2279
|
+
function pickQuery(a) {
|
|
2280
|
+
const query = typeof a.query === "string" && a.query || typeof a.question === "string" && a.question || typeof a.name === "string" && a.name || typeof a.symbol === "string" && a.symbol || "";
|
|
2281
|
+
return { ...a, query };
|
|
2282
|
+
}
|
|
2283
|
+
function pickSymbol(a) {
|
|
2284
|
+
const symbol = typeof a.symbol === "string" && a.symbol || typeof a.name === "string" && a.name || typeof a.query === "string" && a.query || "";
|
|
2285
|
+
return { ...a, symbol };
|
|
2286
|
+
}
|
|
2287
|
+
var AGENT_TOOL_ALIASES = {
|
|
2288
|
+
search_symbols: { name: "search_code" },
|
|
2289
|
+
query_graph: { name: "search_code", mapArgs: pickQuery },
|
|
2290
|
+
orient: { name: "search_code", mapArgs: pickQuery },
|
|
2291
|
+
get_node: { name: "search_code", mapArgs: pickQuery },
|
|
2292
|
+
impact_of: { name: "graph_impact", mapArgs: pickSymbol },
|
|
2293
|
+
grep: { name: "search_code" },
|
|
2294
|
+
codebase_search: { name: "search_code" },
|
|
2295
|
+
semantic_search: { name: "search_code" }
|
|
2296
|
+
};
|
|
2297
|
+
function resolveAgentToolCall(call) {
|
|
2298
|
+
let name = call.name;
|
|
2299
|
+
if (name.startsWith(VG_MCP_PREFIX)) name = name.slice(VG_MCP_PREFIX.length);
|
|
2300
|
+
if (AGENT_TOOL_NAME_SET.has(name)) {
|
|
2301
|
+
return name === call.name ? call : { ...call, name };
|
|
2302
|
+
}
|
|
2303
|
+
const alias = AGENT_TOOL_ALIASES[name];
|
|
2304
|
+
if (!alias) return call;
|
|
2305
|
+
const mapped = alias.mapArgs ? alias.mapArgs(call.arguments ?? {}) : call.arguments;
|
|
2306
|
+
return { ...call, name: alias.name, arguments: mapped ?? {} };
|
|
2307
|
+
}
|
|
2308
|
+
function unknownToolMessage(requested) {
|
|
2309
|
+
const available = AGENT_TOOLS.map((t) => t.name).join(", ");
|
|
2310
|
+
const bare = requested.startsWith(VG_MCP_PREFIX) ? requested.slice(VG_MCP_PREFIX.length) : requested;
|
|
2311
|
+
const alias = AGENT_TOOL_ALIASES[bare];
|
|
2312
|
+
const hint = alias ? ` Use \`${alias.name}\` instead.` : "";
|
|
2313
|
+
return `unknown tool "${requested}".${hint} Available: ${available}. Call only a name from that list.`;
|
|
2314
|
+
}
|
|
2277
2315
|
async function executeTool(call, ctx) {
|
|
2278
|
-
const
|
|
2316
|
+
const resolved = resolveAgentToolCall(call);
|
|
2317
|
+
const a = resolved.arguments;
|
|
2279
2318
|
try {
|
|
2280
|
-
switch (
|
|
2319
|
+
switch (resolved.name) {
|
|
2281
2320
|
case "search_code":
|
|
2282
2321
|
return await search(ctx, str(a.query));
|
|
2283
2322
|
case "read_file":
|
|
@@ -2340,7 +2379,7 @@ async function executeTool(call, ctx) {
|
|
|
2340
2379
|
finalSummary: `aborted: ${str(a.reason) || "no reason given"}`
|
|
2341
2380
|
};
|
|
2342
2381
|
default:
|
|
2343
|
-
return { content:
|
|
2382
|
+
return { content: unknownToolMessage(call.name), mutated: false, failed: true };
|
|
2344
2383
|
}
|
|
2345
2384
|
} catch (e) {
|
|
2346
2385
|
return { content: `tool ${call.name} failed: ${e.message}`, mutated: false, failed: true };
|
|
@@ -3443,6 +3482,7 @@ var NUDGE_AT = 3;
|
|
|
3443
3482
|
var STOP_AT = 5;
|
|
3444
3483
|
var EMPTY_REPLY_RETRIES = 2;
|
|
3445
3484
|
var TRUNCATED_REPLY_CONTINUES = 2;
|
|
3485
|
+
var REASONING_ONLY_RETRIES = 3;
|
|
3446
3486
|
async function runAgent(options) {
|
|
3447
3487
|
const { root, instruction, providers } = options;
|
|
3448
3488
|
let graph = options.graph;
|
|
@@ -3486,9 +3526,9 @@ async function runAgent(options) {
|
|
|
3486
3526
|
const agentToolSpecs = allowSubagents ? AGENT_TOOLS : AGENT_TOOLS.filter((t) => t.name !== "spawn_subagent");
|
|
3487
3527
|
const allTools = [...agentToolSpecs, ...options.externalTools?.specs ?? []];
|
|
3488
3528
|
const topicTags = await loadTopicTags(graph, options.root);
|
|
3489
|
-
const ranked = await rankQuestion(graph,
|
|
3529
|
+
const ranked = await rankQuestion(graph, rankingAskFrom(instruction), {
|
|
3490
3530
|
limit: 48,
|
|
3491
|
-
priorQuestion: options.priorInstruction ?
|
|
3531
|
+
priorQuestion: options.priorInstruction ? rankingAskFrom(options.priorInstruction) : null,
|
|
3492
3532
|
topicTags
|
|
3493
3533
|
});
|
|
3494
3534
|
const built = buildAgentContext(graph, instruction, { ...options, fsImpl, budget, ranked });
|
|
@@ -3523,6 +3563,7 @@ async function runAgent(options) {
|
|
|
3523
3563
|
const changes = [];
|
|
3524
3564
|
const repeats = /* @__PURE__ */ new Map();
|
|
3525
3565
|
let emptyReplies = 0;
|
|
3566
|
+
let reasoningOnlyReplies = 0;
|
|
3526
3567
|
let truncatedContinues = 0;
|
|
3527
3568
|
let truncatedPrefix = "";
|
|
3528
3569
|
let recordedSearch = false;
|
|
@@ -3703,9 +3744,9 @@ async function runAgent(options) {
|
|
|
3703
3744
|
onEvent({ type: "session-graph", reparsed: session.reparsed.length, dirty: session.deleted.length + session.rewritten.length });
|
|
3704
3745
|
if (options.capsule && capsule) {
|
|
3705
3746
|
try {
|
|
3706
|
-
const nextRanked = await rankQuestion(session.graph,
|
|
3747
|
+
const nextRanked = await rankQuestion(session.graph, rankingAskFrom(instruction), {
|
|
3707
3748
|
limit: 48,
|
|
3708
|
-
priorQuestion: options.priorInstruction ?
|
|
3749
|
+
priorQuestion: options.priorInstruction ? rankingAskFrom(options.priorInstruction) : null,
|
|
3709
3750
|
topicTags: await loadTopicTags(session.graph, root)
|
|
3710
3751
|
});
|
|
3711
3752
|
const nextCapsule = buildTaskCapsule(session.graph, instruction, {
|
|
@@ -3981,21 +4022,25 @@ _(Answer cut short at the model's output limit after ${truncatedContinues + 1} a
|
|
|
3981
4022
|
step
|
|
3982
4023
|
);
|
|
3983
4024
|
}
|
|
3984
|
-
|
|
3985
|
-
if (
|
|
4025
|
+
const reasoningOnly = displayText.trim().length === 0 && !!result.reasoning?.trim();
|
|
4026
|
+
if (reasoningOnly) reasoningOnlyReplies++;
|
|
4027
|
+
else emptyReplies++;
|
|
4028
|
+
const retriesLeft = reasoningOnly ? reasoningOnlyReplies <= REASONING_ONLY_RETRIES : emptyReplies <= EMPTY_REPLY_RETRIES;
|
|
4029
|
+
if (retriesLeft && step < maxSteps) {
|
|
3986
4030
|
messages.push({
|
|
3987
4031
|
role: "user",
|
|
3988
|
-
content: displayText.trim().length === 0 ? "Your last reply was empty. Either call a tool to keep working, or answer the task in plain Markdown now." : "Your last reply was neither a tool call nor a readable answer. Do not emit raw JSON or templates \u2014 call a tool, or answer the task in plain Markdown."
|
|
4032
|
+
content: reasoningOnly ? "You produced reasoning but no visible reply. Reasoning is never shown as the answer. Stop thinking and act now: call a tool, or write the answer to the task in plain Markdown." : displayText.trim().length === 0 ? "Your last reply was empty. Either call a tool to keep working, or answer the task in plain Markdown now." : "Your last reply was neither a tool call nor a readable answer. Do not emit raw JSON or templates \u2014 call a tool, or answer the task in plain Markdown."
|
|
3989
4033
|
});
|
|
3990
4034
|
continue;
|
|
3991
4035
|
}
|
|
3992
4036
|
return finish(
|
|
3993
4037
|
"no-tools",
|
|
3994
|
-
fullText || `The model (${providerInfo.model}) returned no usable output after ${emptyReplies} attempt(s). Try a stronger model, or re-ask with a more specific instruction
|
|
4038
|
+
fullText || (reasoningOnlyReplies > 0 ? `The model (${providerInfo.model}) kept reasoning without ever writing an answer (${reasoningOnlyReplies} reasoning-only reply/replies${emptyReplies > 0 ? `, ${emptyReplies} empty reply/replies` : ""}). Lower the reasoning effort, raise the output limit, or re-ask with a more specific instruction.` : `The model (${providerInfo.model}) returned no usable output after ${emptyReplies} attempt(s). Try a stronger model, or re-ask with a more specific instruction.`),
|
|
3995
4039
|
step
|
|
3996
4040
|
);
|
|
3997
4041
|
}
|
|
3998
4042
|
emptyReplies = 0;
|
|
4043
|
+
reasoningOnlyReplies = 0;
|
|
3999
4044
|
truncatedPrefix = "";
|
|
4000
4045
|
messages.push({ role: "assistant", content: result.text, toolCalls });
|
|
4001
4046
|
for (const call of toolCalls) {
|
|
@@ -4063,7 +4108,11 @@ ${gateNote}`;
|
|
|
4063
4108
|
if (stopNoProgress) return finish("no-progress", `stopped: the model repeated \`${call.name}\` without making progress`, step);
|
|
4064
4109
|
}
|
|
4065
4110
|
}
|
|
4066
|
-
return finish(
|
|
4111
|
+
return finish(
|
|
4112
|
+
"max-steps",
|
|
4113
|
+
`Stopped at the step limit (${maxSteps} steps) before the task was finished. Re-run with \`--max-steps <n>\`, or set \`maxSteps\` in vibgrate.config.json, to give it more room.`,
|
|
4114
|
+
maxSteps
|
|
4115
|
+
);
|
|
4067
4116
|
}
|
|
4068
4117
|
async function complete(providers, messages, tools, onEvent, stream, modelProfile, identifierTrie, draftCandidates, promptSegments, reasoningEffort) {
|
|
4069
4118
|
if (providers.length === 0) throw new Error("no model provider available");
|
|
@@ -4195,7 +4244,8 @@ function buildAgentContext(graph, instruction, options) {
|
|
|
4195
4244
|
}));
|
|
4196
4245
|
const mode = options.capsuleMode ?? capsuleMode({
|
|
4197
4246
|
sourceTokens: sourceTokenMass(mapped.map((f) => f.content)),
|
|
4198
|
-
askNamesSymbol: askNamesSymbol(graph, instruction)
|
|
4247
|
+
askNamesSymbol: askNamesSymbol(graph, instruction),
|
|
4248
|
+
rankConfidence: rankConfidenceOf(ranked)
|
|
4199
4249
|
});
|
|
4200
4250
|
if (mode === "off") {
|
|
4201
4251
|
return {
|
|
@@ -4204,7 +4254,7 @@ function buildAgentContext(graph, instruction, options) {
|
|
|
4204
4254
|
};
|
|
4205
4255
|
}
|
|
4206
4256
|
if (mode === "whole-repo") {
|
|
4207
|
-
const packet = buildWholeRepoPacket(
|
|
4257
|
+
const packet = buildWholeRepoPacket(mapped, budget);
|
|
4208
4258
|
return {
|
|
4209
4259
|
context: {
|
|
4210
4260
|
instruction,
|
|
@@ -4314,5 +4364,5 @@ function buildSpanIndex(graph) {
|
|
|
4314
4364
|
}
|
|
4315
4365
|
|
|
4316
4366
|
export { CONTEXT_POLICY_VERSION, DISCOVERY_TOOLS, MUTATION_TOOLS, compact, compactWithModel, computeFcsReport, createTrajectoryCollector, lookupModelCapabilities, renderFcsReportMarkdown, runAgent };
|
|
4317
|
-
//# sourceMappingURL=chunk-
|
|
4318
|
-
//# sourceMappingURL=chunk-
|
|
4367
|
+
//# sourceMappingURL=chunk-NQQT75AN.js.map
|
|
4368
|
+
//# sourceMappingURL=chunk-NQQT75AN.js.map
|