@vibgrate/cli 2026.731.2 → 2026.731.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/{agent-6PPW5GIV.js → agent-6XOI7RVW.js} +4 -4
- package/dist/{agent-6PPW5GIV.js.map → agent-6XOI7RVW.js.map} +1 -1
- package/dist/{baseline-ZMHL6DXF.js → baseline-PY6TETA5.js} +3 -3
- package/dist/{baseline-ZMHL6DXF.js.map → baseline-PY6TETA5.js.map} +1 -1
- package/dist/{chunk-Q7HUXIUF.js → chunk-3VSU7G75.js} +26 -53
- package/dist/chunk-3VSU7G75.js.map +1 -0
- package/dist/{chunk-Y44GPOBL.js → chunk-5IA2TA57.js} +5 -5
- package/dist/{chunk-Y44GPOBL.js.map → chunk-5IA2TA57.js.map} +1 -1
- package/dist/{chunk-L6BRBFBP.js → chunk-5XIEVZLW.js} +4 -4
- package/dist/{chunk-L6BRBFBP.js.map → chunk-5XIEVZLW.js.map} +1 -1
- package/dist/chunk-7G5S5KZN.js +99 -0
- package/dist/chunk-7G5S5KZN.js.map +1 -0
- package/dist/{chunk-QWOJO32H.js → chunk-AVCBKQKA.js} +3 -3
- package/dist/{chunk-QWOJO32H.js.map → chunk-AVCBKQKA.js.map} +1 -1
- package/dist/{chunk-LZX5NH4V.js → chunk-B6S2DSBS.js} +6 -6
- package/dist/{chunk-LZX5NH4V.js.map → chunk-B6S2DSBS.js.map} +1 -1
- package/dist/{chunk-4TC6RJ7U.js → chunk-BMUTNUB7.js} +4 -4
- package/dist/{chunk-4TC6RJ7U.js.map → chunk-BMUTNUB7.js.map} +1 -1
- package/dist/chunk-DEKGSQHL.js +6 -0
- package/dist/{chunk-NNB2H4BA.js.map → chunk-DEKGSQHL.js.map} +1 -1
- package/dist/{chunk-WBMMRERH.js → chunk-KLO2XBUX.js} +3 -3
- package/dist/{chunk-WBMMRERH.js.map → chunk-KLO2XBUX.js.map} +1 -1
- package/dist/{chunk-5J45MN3K.js → chunk-LTTVCI5C.js} +6 -6
- package/dist/{chunk-5J45MN3K.js.map → chunk-LTTVCI5C.js.map} +1 -1
- package/dist/{chunk-IZNOMGR6.js → chunk-MOLBANFB.js} +3 -3
- package/dist/{chunk-IZNOMGR6.js.map → chunk-MOLBANFB.js.map} +1 -1
- package/dist/{chunk-4CGLQXSI.js → chunk-PHGAUWWF.js} +3 -3
- package/dist/{chunk-4CGLQXSI.js.map → chunk-PHGAUWWF.js.map} +1 -1
- package/dist/{chunk-4DZC3ADC.js → chunk-SCTLOFNH.js} +4 -4
- package/dist/{chunk-4DZC3ADC.js.map → chunk-SCTLOFNH.js.map} +1 -1
- package/dist/{chunk-MYM5VIJ4.js → chunk-TRKRRX2S.js} +10 -6
- package/dist/chunk-TRKRRX2S.js.map +1 -0
- package/dist/{chunk-EX2SH5CT.js → chunk-WK52LWRX.js} +3 -3
- package/dist/{chunk-EX2SH5CT.js.map → chunk-WK52LWRX.js.map} +1 -1
- package/dist/{chunk-TNCD5VFX.js → chunk-Z7VH4RPO.js} +3 -3
- package/dist/{chunk-TNCD5VFX.js.map → chunk-Z7VH4RPO.js.map} +1 -1
- package/dist/cli.js +58 -112
- package/dist/cli.js.map +1 -1
- package/dist/{ensure-map-C3NEC2GI.js → ensure-map-UQL7SM34.js} +8 -8
- package/dist/{ensure-map-C3NEC2GI.js.map → ensure-map-UQL7SM34.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/{interactive-2TAYVEHE.js → interactive-QWT7ERXJ.js} +17 -17
- package/dist/{interactive-2TAYVEHE.js.map → interactive-QWT7ERXJ.js.map} +1 -1
- package/dist/load-WA53B3GW.js +10 -0
- package/dist/{load-A5BGEQWP.js.map → load-WA53B3GW.js.map} +1 -1
- package/dist/{run-outcome-OSIVMVT7.js → run-outcome-J2IDIVYI.js} +5 -5
- package/dist/{run-outcome-OSIVMVT7.js.map → run-outcome-J2IDIVYI.js.map} +1 -1
- package/dist/{runtime-session-UPTC3E6N.js → runtime-session-52P2Y5LX.js} +7 -7
- package/dist/{runtime-session-UPTC3E6N.js.map → runtime-session-52P2Y5LX.js.map} +1 -1
- package/dist/{session-3OBIQLE4.js → session-L7SJNE55.js} +4 -4
- package/dist/{session-3OBIQLE4.js.map → session-L7SJNE55.js.map} +1 -1
- package/dist/session-store-SQECEXUU.js +4 -0
- package/dist/{session-store-O4XPXKOV.js.map → session-store-SQECEXUU.js.map} +1 -1
- package/dist/{stream-json-CFKBL3MR.js → stream-json-TSGYC2MQ.js} +4 -4
- package/dist/{stream-json-CFKBL3MR.js.map → stream-json-TSGYC2MQ.js.map} +1 -1
- package/dist/{vg-mcp-bridge-JHRKJBVT.js → vg-mcp-bridge-IFAXEQMZ.js} +3 -3
- package/dist/{vg-mcp-bridge-JHRKJBVT.js.map → vg-mcp-bridge-IFAXEQMZ.js.map} +1 -1
- package/dist/{vgd-HNPOSXKZ.js → vgd-PNR7UKLL.js} +6 -6
- package/dist/vgd-PNR7UKLL.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-K3SLGULW.js +0 -50
- package/dist/chunk-K3SLGULW.js.map +0 -1
- package/dist/chunk-MYM5VIJ4.js.map +0 -1
- package/dist/chunk-NNB2H4BA.js +0 -6
- package/dist/chunk-Q7HUXIUF.js.map +0 -1
- package/dist/load-A5BGEQWP.js +0 -10
- package/dist/session-store-O4XPXKOV.js +0 -4
- package/dist/vgd-HNPOSXKZ.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CONTEXT_POLICY_VERSION, DISCOVERY_TOOLS, MUTATION_TOOLS, compact, runAgent } from './chunk-
|
|
1
|
+
export { CONTEXT_POLICY_VERSION, DISCOVERY_TOOLS, MUTATION_TOOLS, compact, runAgent } from './chunk-3VSU7G75.js';
|
|
2
2
|
import './chunk-543E6WDJ.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-TRKRRX2S.js';
|
|
4
4
|
import './chunk-REIGWTTH.js';
|
|
5
5
|
import './chunk-RGEVBSLK.js';
|
|
6
6
|
import './chunk-RBIRXQR6.js';
|
|
@@ -18,5 +18,5 @@ import './chunk-BWPBB45M.js';
|
|
|
18
18
|
import './chunk-JFGYT6BI.js';
|
|
19
19
|
import './chunk-BPF3YX2U.js';
|
|
20
20
|
import './chunk-Z6ZWNWWR.js';
|
|
21
|
-
//# sourceMappingURL=agent-
|
|
22
|
-
//# sourceMappingURL=agent-
|
|
21
|
+
//# sourceMappingURL=agent-6XOI7RVW.js.map
|
|
22
|
+
//# sourceMappingURL=agent-6XOI7RVW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-6XOI7RVW.js"}
|
|
@@ -2,8 +2,8 @@ export { baselineCommand, runBaseline } from './chunk-FF5ZQ6KI.js';
|
|
|
2
2
|
import './chunk-XRN7DQGR.js';
|
|
3
3
|
import './chunk-CRAMOEBE.js';
|
|
4
4
|
import './chunk-RXP66R2E.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-DEKGSQHL.js';
|
|
6
6
|
import './chunk-DT4KIVRI.js';
|
|
7
7
|
import './chunk-Z6ZWNWWR.js';
|
|
8
|
-
//# sourceMappingURL=baseline-
|
|
9
|
-
//# sourceMappingURL=baseline-
|
|
8
|
+
//# sourceMappingURL=baseline-PY6TETA5.js.map
|
|
9
|
+
//# sourceMappingURL=baseline-PY6TETA5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"baseline-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"baseline-PY6TETA5.js"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { secretEgressRefusal, isSecretPath, secretRefusal, redactText } from './chunk-543E6WDJ.js';
|
|
2
|
-
import { buildAgentMessages, redactSecrets, unifiedDiff, applyEdit } from './chunk-
|
|
2
|
+
import { buildAgentMessages, redactSecrets, unifiedDiff, applyEdit } from './chunk-TRKRRX2S.js';
|
|
3
3
|
import { localGraphBackend } from './chunk-RGEVBSLK.js';
|
|
4
4
|
import { buildIdentifierTrieFromGraph, KvBlockRegistry, graphDraftCandidates, extractIdentifiers, scanIdentifiersAgainstTrie } from './chunk-5HYCB55P.js';
|
|
5
5
|
import { summarizeCapsule, CAPSULE_RANKING_VERSION, buildCodeContext, buildTaskCapsule, capsuleToCodeContext, recordCliCall, CLI_TOOL_ALIASES } from './chunk-US2DAKCM.js';
|
|
@@ -1316,11 +1316,19 @@ function arrStr(v) {
|
|
|
1316
1316
|
if (!Array.isArray(v)) return void 0;
|
|
1317
1317
|
return v.map((x) => typeof x === "string" ? x : String(x ?? "")).filter(Boolean);
|
|
1318
1318
|
}
|
|
1319
|
+
function occurrenceSearchQuery(query) {
|
|
1320
|
+
const q = query.trim();
|
|
1321
|
+
if (!q) return q;
|
|
1322
|
+
if (/^["'`]/.test(q) || /^https?:\/\//i.test(q) || /\s/.test(q)) return q;
|
|
1323
|
+
if (/^[\w./:@-]+$/.test(q)) return JSON.stringify(q);
|
|
1324
|
+
return q;
|
|
1325
|
+
}
|
|
1319
1326
|
async function search(ctx, query) {
|
|
1320
1327
|
if (!query) return { content: "search_code needs a query", mutated: false };
|
|
1321
1328
|
if (ctx.root) {
|
|
1322
1329
|
try {
|
|
1323
|
-
const
|
|
1330
|
+
const hybridQuery = occurrenceSearchQuery(query);
|
|
1331
|
+
const hybrid = await searchSymbols(ctx.graph, ctx.root, hybridQuery, 40);
|
|
1324
1332
|
if (hybrid.matches.length > 0) {
|
|
1325
1333
|
const lines2 = hybrid.matches.map((m) => {
|
|
1326
1334
|
if ("preview" in m) {
|
|
@@ -1938,40 +1946,6 @@ function buildRunProvenance(input = {}) {
|
|
|
1938
1946
|
};
|
|
1939
1947
|
}
|
|
1940
1948
|
|
|
1941
|
-
// src/code/patch-ir-grammar.ts
|
|
1942
|
-
function patchIrGbnf() {
|
|
1943
|
-
return [
|
|
1944
|
-
"root ::= ws patch",
|
|
1945
|
-
"ws ::= [ \\t\\n]*",
|
|
1946
|
-
'patch ::= "{" ws "\\"schemaVersion\\"" ws ":" ws "\\"patch-ir/0\\"" ws "," ws "\\"operations\\"" ws ":" ws operations ws "," ws "\\"assumptions\\"" ws ":" ws array-any ws "," ws "\\"requestedVerification\\"" ws ":" ws array-any ws "," ws "\\"provenance\\"" ws ":" ws provenance ws "}"',
|
|
1947
|
-
'operations ::= "[" ws operation (ws "," ws operation)* ws "]"',
|
|
1948
|
-
"operation ::= replace-range | replace-text | create-file | delete-file | replace-symbol",
|
|
1949
|
-
'replace-range ::= "{" ws "\\"op\\"" ws ":" ws "\\"replace-range\\"" ws "," ws "\\"file\\"" ws ":" ws string ws "," ws "\\"start\\"" ws ":" ws number ws "," ws "\\"end\\"" ws ":" ws number ws "," ws "\\"replacement\\"" ws ":" ws string (ws "," ws "\\"expectedHash\\"" ws ":" ws (string | null) )? (ws "," ws "\\"anchorSymbol\\"" ws ":" ws (string | null) )? ws "}"',
|
|
1950
|
-
'replace-text ::= "{" ws "\\"op\\"" ws ":" ws "\\"replace-text\\"" ws "," ws "\\"file\\"" ws ":" ws string ws "," ws "\\"search\\"" ws ":" ws string ws "," ws "\\"replace\\"" ws ":" ws string (ws "," ws "\\"anchorSymbol\\"" ws ":" ws (string | null) )? ws "}"',
|
|
1951
|
-
'create-file ::= "{" ws "\\"op\\"" ws ":" ws "\\"create-file\\"" ws "," ws "\\"file\\"" ws ":" ws string ws "," ws "\\"content\\"" ws ":" ws string ws "}"',
|
|
1952
|
-
'delete-file ::= "{" ws "\\"op\\"" ws ":" ws "\\"delete-file\\"" ws "," ws "\\"file\\"" ws ":" ws string ws "}"',
|
|
1953
|
-
'replace-symbol ::= "{" ws "\\"op\\"" ws ":" ws "\\"replace-symbol\\"" ws "," ws "\\"symbolId\\"" ws ":" ws string ws "," ws "\\"replacement\\"" ws ":" ws string (ws "," ws "\\"file\\"" ws ":" ws (string | null) )? (ws "," ws "\\"expectedHash\\"" ws ":" ws (string | null) )? ws "}"',
|
|
1954
|
-
'provenance ::= "{" ws "\\"format\\"" ws ":" ws format (ws "," ws "\\"modelId\\"" ws ":" ws (string | null) )? (ws "," ws "\\"raw\\"" ws ":" ws (string | null) )? ws "}"',
|
|
1955
|
-
'format ::= "\\"search-replace\\"" | "\\"whole-file\\"" | "\\"structured-json\\"" | "\\"grammar-constrained\\"" | "\\"code-edit\\""',
|
|
1956
|
-
'array-any ::= "[" ws (value (ws "," ws value)*)? ws "]"',
|
|
1957
|
-
'value ::= object | array-any | string | number | "true" | "false" | null',
|
|
1958
|
-
'object ::= "{" ws (string ws ":" ws value (ws "," ws string ws ":" ws value)*)? ws "}"',
|
|
1959
|
-
'string ::= "\\"" ( [^"\\\\] | "\\\\" (["\\\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) )* "\\""',
|
|
1960
|
-
'number ::= "-"? ("0" | [1-9] [0-9]*) ("." [0-9]+)? ([eE] [+-]? [0-9]+)?',
|
|
1961
|
-
'null ::= "null"',
|
|
1962
|
-
""
|
|
1963
|
-
].join("\n");
|
|
1964
|
-
}
|
|
1965
|
-
function shouldUsePatchIrGrammar(profile) {
|
|
1966
|
-
if (!profile) return false;
|
|
1967
|
-
if (profile.constrainedDecoding) return true;
|
|
1968
|
-
if (profile.toolCalling === "grammar") return true;
|
|
1969
|
-
if (profile.editFormat === "patch_ir_json" && profile.constrainedDecoding !== false) {
|
|
1970
|
-
return !!profile.constrainedDecoding;
|
|
1971
|
-
}
|
|
1972
|
-
return false;
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
1949
|
// src/code/locate-answer.ts
|
|
1976
1950
|
function primaryLocateNeedle(instruction) {
|
|
1977
1951
|
const needles = extractLiteralNeedles(instruction);
|
|
@@ -1992,8 +1966,15 @@ ${lines.join("\n")}${more}`;
|
|
|
1992
1966
|
}
|
|
1993
1967
|
async function answerLocateInstruction(graph, root, instruction, limit = 30) {
|
|
1994
1968
|
const needle = primaryLocateNeedle(instruction);
|
|
1995
|
-
const
|
|
1996
|
-
const
|
|
1969
|
+
const occurrenceQuery = /^https?:\/\//i.test(needle) ? needle : JSON.stringify(needle);
|
|
1970
|
+
const result = await searchSymbols(graph, root, occurrenceQuery, limit);
|
|
1971
|
+
const textHits = result.matches.filter((m) => m.kind === "text").map((m) => ({ file: m.file, line: m.line, preview: m.preview }));
|
|
1972
|
+
const symbolHits = result.matches.filter((m) => m.kind !== "text").map((m) => ({
|
|
1973
|
+
file: m.file,
|
|
1974
|
+
line: m.line,
|
|
1975
|
+
preview: "name" in m ? `${m.name} (${m.kind})` : m.kind
|
|
1976
|
+
}));
|
|
1977
|
+
const hits = textHits.length > 0 ? textHits : symbolHits;
|
|
1997
1978
|
const total = result.totalTextMatches ?? hits.length;
|
|
1998
1979
|
return {
|
|
1999
1980
|
needle,
|
|
@@ -2006,7 +1987,7 @@ function sanitizeAgentDisplayText(text) {
|
|
|
2006
1987
|
if (!text) return text;
|
|
2007
1988
|
let t = text.replace(/\n*\/\*\s*vg:\s*unknown identifiers[\s\S]*?\*\//gi, "").trim();
|
|
2008
1989
|
if (/"schemaVersion"\s*:\s*"patch-ir\/0"/i.test(t) || /"op"\s*:\s*"replace-text"/i.test(t) && /"operations"\s*:/i.test(t)) {
|
|
2009
|
-
return "
|
|
1990
|
+
return "The model returned an edit-shaped payload instead of a chat answer. Use tools (search_code, read_file, edit_file, apply_patch) or finish with Markdown.";
|
|
2010
1991
|
}
|
|
2011
1992
|
return t;
|
|
2012
1993
|
}
|
|
@@ -2054,7 +2035,7 @@ async function runAgent(options) {
|
|
|
2054
2035
|
const flushOverlay = () => {
|
|
2055
2036
|
overlay?.flush();
|
|
2056
2037
|
};
|
|
2057
|
-
const advancedMode = options.advancedMode ??
|
|
2038
|
+
const advancedMode = options.advancedMode ?? true;
|
|
2058
2039
|
const discoveryGate = createDiscoveryGateState();
|
|
2059
2040
|
const allTools = [...AGENT_TOOLS, ...options.externalTools?.specs ?? []];
|
|
2060
2041
|
const built = buildAgentContext(graph, instruction, { ...options, fsImpl, budget });
|
|
@@ -2071,7 +2052,6 @@ async function runAgent(options) {
|
|
|
2071
2052
|
if (options.testCommand) {
|
|
2072
2053
|
messages.push({ role: "user", content: `When you want to verify a change, the project's test command is: \`${options.testCommand}\`` });
|
|
2073
2054
|
}
|
|
2074
|
-
const locateOnly = isLocateOnlyInstruction(instruction);
|
|
2075
2055
|
const spans = buildSpanIndex(graph);
|
|
2076
2056
|
const changes = [];
|
|
2077
2057
|
const repeats = /* @__PURE__ */ new Map();
|
|
@@ -2087,7 +2067,7 @@ async function runAgent(options) {
|
|
|
2087
2067
|
let currentStep = 0;
|
|
2088
2068
|
const capsuleSummary = capsule ? summarizeCapsule(capsule) : null;
|
|
2089
2069
|
if (capsuleSummary) onEvent({ type: "capsule", summary: capsuleSummary });
|
|
2090
|
-
if (
|
|
2070
|
+
if (options.deterministicLocate === true && isLocateOnlyInstruction(instruction)) {
|
|
2091
2071
|
try {
|
|
2092
2072
|
const locate = await answerLocateInstruction(graph, root, instruction, 30);
|
|
2093
2073
|
providerInfo = { id: "deterministic-locate", model: "literal-sweep", fellBack: false };
|
|
@@ -2402,9 +2382,7 @@ Fix the failing tests, then call finish again.${verifyRounds === 0 ? " (last ver
|
|
|
2402
2382
|
options.modelProfile,
|
|
2403
2383
|
identifierTrie,
|
|
2404
2384
|
draftCandidates,
|
|
2405
|
-
promptSegments
|
|
2406
|
-
/* skipPatchIrGrammar */
|
|
2407
|
-
locateOnly
|
|
2385
|
+
promptSegments
|
|
2408
2386
|
);
|
|
2409
2387
|
result = c.result;
|
|
2410
2388
|
providerInfo = { id: c.provider.id, model: c.provider.model, fellBack: c.fellBack };
|
|
@@ -2490,11 +2468,9 @@ ${gateNote}`;
|
|
|
2490
2468
|
}
|
|
2491
2469
|
return finish("max-steps", "reached the step limit before finishing", maxSteps);
|
|
2492
2470
|
}
|
|
2493
|
-
async function complete(providers, messages, tools, onEvent, stream, modelProfile, identifierTrie, draftCandidates, promptSegments
|
|
2471
|
+
async function complete(providers, messages, tools, onEvent, stream, modelProfile, identifierTrie, draftCandidates, promptSegments) {
|
|
2494
2472
|
if (providers.length === 0) throw new Error("no model provider available");
|
|
2495
2473
|
const onToken = stream ? (t) => onEvent({ type: "token", text: t }) : void 0;
|
|
2496
|
-
const grammar = !skipPatchIrGrammar && shouldUsePatchIrGrammar(modelProfile) ? patchIrGbnf() : void 0;
|
|
2497
|
-
const requireGrammar = !!(grammar && modelProfile?.constrainedDecoding && providers.some((p) => p.id === "llama-cpp"));
|
|
2498
2474
|
let lastErr;
|
|
2499
2475
|
for (let i = 0; i < providers.length; i++) {
|
|
2500
2476
|
try {
|
|
@@ -2503,9 +2479,6 @@ async function complete(providers, messages, tools, onEvent, stream, modelProfil
|
|
|
2503
2479
|
tools,
|
|
2504
2480
|
stream,
|
|
2505
2481
|
onToken,
|
|
2506
|
-
grammar,
|
|
2507
|
-
// Only require grammar on the llama-cpp provider; HTTP providers ignore it.
|
|
2508
|
-
requireGrammar: requireGrammar && providers[i].id === "llama-cpp",
|
|
2509
2482
|
identifierTrie,
|
|
2510
2483
|
draftCandidates,
|
|
2511
2484
|
promptSegments
|
|
@@ -2637,5 +2610,5 @@ function buildSpanIndex(graph) {
|
|
|
2637
2610
|
}
|
|
2638
2611
|
|
|
2639
2612
|
export { CONTEXT_POLICY_VERSION, DISCOVERY_TOOLS, MUTATION_TOOLS, compact, computeFcsReport, createTrajectoryCollector, renderFcsReportMarkdown, runAgent };
|
|
2640
|
-
//# sourceMappingURL=chunk-
|
|
2641
|
-
//# sourceMappingURL=chunk-
|
|
2613
|
+
//# sourceMappingURL=chunk-3VSU7G75.js.map
|
|
2614
|
+
//# sourceMappingURL=chunk-3VSU7G75.js.map
|