@vibgrate/cli 2026.826.1 → 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-4RHH2FR2.js → agent-5GW7C7EB.js} +14 -14
- package/dist/{agent-4RHH2FR2.js.map → agent-5GW7C7EB.js.map} +1 -1
- package/dist/{approvals-XDFM346D.js → approvals-ISJFILVK.js} +5 -5
- package/dist/{approvals-XDFM346D.js.map → approvals-ISJFILVK.js.map} +1 -1
- package/dist/{attach-LGTCYNKC.js → attach-JUSALQ75.js} +3 -3
- package/dist/{attach-LGTCYNKC.js.map → attach-JUSALQ75.js.map} +1 -1
- package/dist/baseline-YL2IZZ4Y.js +9 -0
- package/dist/{baseline-PRY5HKL5.js.map → baseline-YL2IZZ4Y.js.map} +1 -1
- package/dist/{chunk-ZRDTI67N.js → chunk-5RW5PIBH.js} +3 -3
- package/dist/{chunk-ZRDTI67N.js.map → chunk-5RW5PIBH.js.map} +1 -1
- package/dist/{chunk-TUVB6Q6F.js → chunk-65YN3BG3.js} +1207 -40
- package/dist/chunk-65YN3BG3.js.map +1 -0
- package/dist/{chunk-TKUWEJZJ.js → chunk-B5VCPIKT.js} +7 -6
- package/dist/chunk-B5VCPIKT.js.map +1 -0
- package/dist/{chunk-WU2DVESP.js → chunk-BA6YBVNT.js} +3 -3
- package/dist/{chunk-WU2DVESP.js.map → chunk-BA6YBVNT.js.map} +1 -1
- package/dist/{chunk-IM7HME2T.js → chunk-BODXEZEY.js} +9 -9
- package/dist/{chunk-IM7HME2T.js.map → chunk-BODXEZEY.js.map} +1 -1
- package/dist/{chunk-PIB3YNJU.js → chunk-D3SV3JWB.js} +3 -3
- package/dist/{chunk-PIB3YNJU.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-7KOEEEIZ.js → chunk-FHSEK64W.js} +7 -7
- package/dist/{chunk-7KOEEEIZ.js.map → chunk-FHSEK64W.js.map} +1 -1
- package/dist/{chunk-PEHMRPYM.js → chunk-FKCN653F.js} +3 -3
- package/dist/{chunk-PEHMRPYM.js.map → chunk-FKCN653F.js.map} +1 -1
- package/dist/{chunk-K2IWOZEQ.js → chunk-FPIMNVLI.js} +12 -4
- package/dist/chunk-FPIMNVLI.js.map +1 -0
- package/dist/{chunk-BHDP7EVJ.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-TQ75FB52.js → chunk-JWQ2JCQS.js} +4 -4
- package/dist/{chunk-TQ75FB52.js.map → chunk-JWQ2JCQS.js.map} +1 -1
- package/dist/{chunk-WGA4KUGS.js → chunk-K7QR7U3V.js} +12 -11
- package/dist/chunk-K7QR7U3V.js.map +1 -0
- package/dist/{chunk-E44I7635.js → chunk-KCKG3EEJ.js} +3 -3
- package/dist/{chunk-E44I7635.js.map → chunk-KCKG3EEJ.js.map} +1 -1
- package/dist/{chunk-WGSLN73L.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-WPQCJADP.js → chunk-NQQT75AN.js} +62 -22
- package/dist/chunk-NQQT75AN.js.map +1 -0
- package/dist/{chunk-TOHNVUDD.js → chunk-NSC7ZK62.js} +3 -3
- package/dist/{chunk-TOHNVUDD.js.map → chunk-NSC7ZK62.js.map} +1 -1
- package/dist/{chunk-LAYDXJEQ.js → chunk-OAYSRM7J.js} +12 -14
- package/dist/chunk-OAYSRM7J.js.map +1 -0
- package/dist/{chunk-R5BGRJ6X.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-7S4ELKK6.js → chunk-RL7JYG3D.js} +3 -3
- package/dist/{chunk-7S4ELKK6.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-QONHVC4H.js → chunk-TWFPHXPN.js} +3 -3
- package/dist/{chunk-QONHVC4H.js.map → chunk-TWFPHXPN.js.map} +1 -1
- package/dist/chunk-UGRUG2FA.js +6 -0
- package/dist/{chunk-JQ7OL4XG.js.map → chunk-UGRUG2FA.js.map} +1 -1
- package/dist/{chunk-XW4FCBL4.js → chunk-VOEEYCR3.js} +6 -6
- package/dist/{chunk-XW4FCBL4.js.map → chunk-VOEEYCR3.js.map} +1 -1
- package/dist/{chunk-WHNB3443.js → chunk-WBDRBP22.js} +4 -4
- package/dist/{chunk-WHNB3443.js.map → chunk-WBDRBP22.js.map} +1 -1
- package/dist/{chunk-NQU6E6OG.js → chunk-YL332BU2.js} +20 -15
- package/dist/chunk-YL332BU2.js.map +1 -0
- package/dist/{chunk-IEZCFMNL.js → chunk-ZQY5TWCB.js} +3 -3
- package/dist/{chunk-IEZCFMNL.js.map → chunk-ZQY5TWCB.js.map} +1 -1
- package/dist/cli.d.ts +16 -1
- package/dist/cli.js +2359 -340
- package/dist/cli.js.map +1 -1
- package/dist/{daemon-2YMCH7R2.js → daemon-NRIIDMX2.js} +10 -10
- package/dist/{daemon-2YMCH7R2.js.map → daemon-NRIIDMX2.js.map} +1 -1
- package/dist/embed-worker-main.js +3 -3
- package/dist/{ensure-map-S2GBW2UC.js → ensure-map-VAIYCCEJ.js} +17 -16
- package/dist/{ensure-map-S2GBW2UC.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-QDEU5RIR.js → graph-backend-V5A2H5ZB.js} +7 -7
- package/dist/{graph-backend-QDEU5RIR.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-GMGWUEQO.js → interactive-VQM2CTE2.js} +32 -31
- package/dist/interactive-VQM2CTE2.js.map +1 -0
- package/dist/load-UAVA732M.js +11 -0
- package/dist/{load-JXCTAAEI.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-5NA7PI52.js → run-outcome-EATWIKLR.js} +5 -5
- package/dist/{run-outcome-5NA7PI52.js.map → run-outcome-EATWIKLR.js.map} +1 -1
- package/dist/{runtime-session-IEM6DZDP.js → runtime-session-Y2BRBXUW.js} +9 -9
- package/dist/{runtime-session-IEM6DZDP.js.map → runtime-session-Y2BRBXUW.js.map} +1 -1
- package/dist/{session-VYFLJ7KL.js → session-N2FTYIHQ.js} +9 -9
- package/dist/{session-VYFLJ7KL.js.map → session-N2FTYIHQ.js.map} +1 -1
- package/dist/{stream-json-2ISQLKPD.js → stream-json-GCZAHORX.js} +14 -14
- package/dist/{stream-json-2ISQLKPD.js.map → stream-json-GCZAHORX.js.map} +1 -1
- package/dist/version-XNZ4GLMQ.js +4 -0
- package/dist/{version-B62ELJRY.js.map → version-XNZ4GLMQ.js.map} +1 -1
- package/dist/{vg-mcp-bridge-CJIK5U56.js → vg-mcp-bridge-VDZWFEO2.js} +22 -11
- package/dist/vg-mcp-bridge-VDZWFEO2.js.map +1 -0
- package/dist/{vgd-4EB6SKFB.js → vgd-3A2TRNP5.js} +8 -8
- package/dist/vgd-3A2TRNP5.js.map +1 -0
- package/package.json +2 -2
- package/dist/baseline-PRY5HKL5.js +0 -9
- package/dist/chunk-5UG4UHKU.js.map +0 -1
- package/dist/chunk-BHDP7EVJ.js.map +0 -1
- package/dist/chunk-JQ7OL4XG.js +0 -6
- package/dist/chunk-K2IWOZEQ.js.map +0 -1
- package/dist/chunk-LAYDXJEQ.js.map +0 -1
- package/dist/chunk-NQU6E6OG.js.map +0 -1
- package/dist/chunk-R5BGRJ6X.js.map +0 -1
- package/dist/chunk-SHD5TCZ5.js.map +0 -1
- package/dist/chunk-TKUWEJZJ.js.map +0 -1
- package/dist/chunk-TUVB6Q6F.js.map +0 -1
- package/dist/chunk-WGA4KUGS.js.map +0 -1
- package/dist/chunk-WGSLN73L.js.map +0 -1
- package/dist/chunk-WPQCJADP.js.map +0 -1
- package/dist/chunk-YENM3HT7.js +0 -23
- package/dist/chunk-YENM3HT7.js.map +0 -1
- package/dist/interactive-GMGWUEQO.js.map +0 -1
- package/dist/load-JXCTAAEI.js +0 -11
- package/dist/rules-ASYEUNB5.js.map +0 -1
- package/dist/version-B62ELJRY.js +0 -4
- package/dist/vg-mcp-bridge-CJIK5U56.js.map +0 -1
- package/dist/vgd-4EB6SKFB.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 };
|
|
@@ -3487,9 +3526,9 @@ async function runAgent(options) {
|
|
|
3487
3526
|
const agentToolSpecs = allowSubagents ? AGENT_TOOLS : AGENT_TOOLS.filter((t) => t.name !== "spawn_subagent");
|
|
3488
3527
|
const allTools = [...agentToolSpecs, ...options.externalTools?.specs ?? []];
|
|
3489
3528
|
const topicTags = await loadTopicTags(graph, options.root);
|
|
3490
|
-
const ranked = await rankQuestion(graph,
|
|
3529
|
+
const ranked = await rankQuestion(graph, rankingAskFrom(instruction), {
|
|
3491
3530
|
limit: 48,
|
|
3492
|
-
priorQuestion: options.priorInstruction ?
|
|
3531
|
+
priorQuestion: options.priorInstruction ? rankingAskFrom(options.priorInstruction) : null,
|
|
3493
3532
|
topicTags
|
|
3494
3533
|
});
|
|
3495
3534
|
const built = buildAgentContext(graph, instruction, { ...options, fsImpl, budget, ranked });
|
|
@@ -3705,9 +3744,9 @@ async function runAgent(options) {
|
|
|
3705
3744
|
onEvent({ type: "session-graph", reparsed: session.reparsed.length, dirty: session.deleted.length + session.rewritten.length });
|
|
3706
3745
|
if (options.capsule && capsule) {
|
|
3707
3746
|
try {
|
|
3708
|
-
const nextRanked = await rankQuestion(session.graph,
|
|
3747
|
+
const nextRanked = await rankQuestion(session.graph, rankingAskFrom(instruction), {
|
|
3709
3748
|
limit: 48,
|
|
3710
|
-
priorQuestion: options.priorInstruction ?
|
|
3749
|
+
priorQuestion: options.priorInstruction ? rankingAskFrom(options.priorInstruction) : null,
|
|
3711
3750
|
topicTags: await loadTopicTags(session.graph, root)
|
|
3712
3751
|
});
|
|
3713
3752
|
const nextCapsule = buildTaskCapsule(session.graph, instruction, {
|
|
@@ -4205,7 +4244,8 @@ function buildAgentContext(graph, instruction, options) {
|
|
|
4205
4244
|
}));
|
|
4206
4245
|
const mode = options.capsuleMode ?? capsuleMode({
|
|
4207
4246
|
sourceTokens: sourceTokenMass(mapped.map((f) => f.content)),
|
|
4208
|
-
askNamesSymbol: askNamesSymbol(graph, instruction)
|
|
4247
|
+
askNamesSymbol: askNamesSymbol(graph, instruction),
|
|
4248
|
+
rankConfidence: rankConfidenceOf(ranked)
|
|
4209
4249
|
});
|
|
4210
4250
|
if (mode === "off") {
|
|
4211
4251
|
return {
|
|
@@ -4214,7 +4254,7 @@ function buildAgentContext(graph, instruction, options) {
|
|
|
4214
4254
|
};
|
|
4215
4255
|
}
|
|
4216
4256
|
if (mode === "whole-repo") {
|
|
4217
|
-
const packet = buildWholeRepoPacket(
|
|
4257
|
+
const packet = buildWholeRepoPacket(mapped, budget);
|
|
4218
4258
|
return {
|
|
4219
4259
|
context: {
|
|
4220
4260
|
instruction,
|
|
@@ -4324,5 +4364,5 @@ function buildSpanIndex(graph) {
|
|
|
4324
4364
|
}
|
|
4325
4365
|
|
|
4326
4366
|
export { CONTEXT_POLICY_VERSION, DISCOVERY_TOOLS, MUTATION_TOOLS, compact, compactWithModel, computeFcsReport, createTrajectoryCollector, lookupModelCapabilities, renderFcsReportMarkdown, runAgent };
|
|
4327
|
-
//# sourceMappingURL=chunk-
|
|
4328
|
-
//# sourceMappingURL=chunk-
|
|
4367
|
+
//# sourceMappingURL=chunk-NQQT75AN.js.map
|
|
4368
|
+
//# sourceMappingURL=chunk-NQQT75AN.js.map
|