@cortexkit/aft-pi 0.31.1 → 0.32.0
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/dialogs/status-dialog.d.ts.map +1 -1
- package/dist/index.js +124 -53
- package/dist/shared/status.d.ts +3 -0
- package/dist/shared/status.d.ts.map +1 -1
- package/dist/tools/_shared.d.ts +13 -0
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/ast.d.ts.map +1 -1
- package/dist/tools/reading.d.ts.map +1 -1
- package/dist/tools/refactor.d.ts.map +1 -1
- package/dist/tools/semantic.d.ts +2 -1
- package/dist/tools/semantic.d.ts.map +1 -1
- package/dist/workflow-hints.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-dialog.d.ts","sourceRoot":"","sources":["../../src/dialogs/status-dialog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAUpG,OAAO,EACL,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"status-dialog.d.ts","sourceRoot":"","sources":["../../src/dialogs/status-dialog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAUpG,OAAO,EACL,KAAK,iBAAiB,EAKtB,KAAK,iBAAiB,EAEvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,YAAY,EAChB,MAAM,EAAE,uBAAuB,EAC/B,SAAS,EAAE,aAAa,GACvB,OAAO,CAAC,IAAI,CAAC,CAgBf;AAqPD,wBAAgB,8BAA8B,CAC5C,CAAC,EAAE,iBAAiB,GAAG,IAAI,EAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,MAAM,GACjB,MAAM,EAAE,CAEV;AAkBD,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,iBAAiB,GAAG,SAAS,GAAG,MAAM,EAAE,CAShG"}
|
package/dist/index.js
CHANGED
|
@@ -14534,7 +14534,7 @@ import {
|
|
|
14534
14534
|
// package.json
|
|
14535
14535
|
var package_default = {
|
|
14536
14536
|
name: "@cortexkit/aft-pi",
|
|
14537
|
-
version: "0.
|
|
14537
|
+
version: "0.32.0",
|
|
14538
14538
|
type: "module",
|
|
14539
14539
|
description: "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
|
|
14540
14540
|
main: "dist/index.js",
|
|
@@ -14556,7 +14556,7 @@ var package_default = {
|
|
|
14556
14556
|
prepublishOnly: "bun run build"
|
|
14557
14557
|
},
|
|
14558
14558
|
dependencies: {
|
|
14559
|
-
"@cortexkit/aft-bridge": "0.
|
|
14559
|
+
"@cortexkit/aft-bridge": "0.32.0",
|
|
14560
14560
|
"@xterm/headless": "^5.5.0",
|
|
14561
14561
|
"comment-json": "^5.0.0",
|
|
14562
14562
|
diff: "^8.0.4",
|
|
@@ -14564,12 +14564,12 @@ var package_default = {
|
|
|
14564
14564
|
zod: "^4.1.8"
|
|
14565
14565
|
},
|
|
14566
14566
|
optionalDependencies: {
|
|
14567
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
14568
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
14569
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
14570
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
14571
|
-
"@cortexkit/aft-win32-arm64": "0.
|
|
14572
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
14567
|
+
"@cortexkit/aft-darwin-arm64": "0.32.0",
|
|
14568
|
+
"@cortexkit/aft-darwin-x64": "0.32.0",
|
|
14569
|
+
"@cortexkit/aft-linux-arm64": "0.32.0",
|
|
14570
|
+
"@cortexkit/aft-linux-x64": "0.32.0",
|
|
14571
|
+
"@cortexkit/aft-win32-arm64": "0.32.0",
|
|
14572
|
+
"@cortexkit/aft-win32-x64": "0.32.0"
|
|
14573
14573
|
},
|
|
14574
14574
|
devDependencies: {
|
|
14575
14575
|
"@earendil-works/pi-coding-agent": "*",
|
|
@@ -14638,6 +14638,19 @@ function formatFlag(enabled) {
|
|
|
14638
14638
|
function formatCount(value) {
|
|
14639
14639
|
return value == null ? "—" : value.toLocaleString("en-US");
|
|
14640
14640
|
}
|
|
14641
|
+
function formatSemanticIndexStatus(status, stage) {
|
|
14642
|
+
if ((status === "loading" || status === "building") && stage === "fingerprint_change") {
|
|
14643
|
+
return "Rebuilding (model changed)";
|
|
14644
|
+
}
|
|
14645
|
+
return status;
|
|
14646
|
+
}
|
|
14647
|
+
function formatSemanticRefreshing(refreshingCount) {
|
|
14648
|
+
if (!Number.isFinite(refreshingCount) || refreshingCount <= 0)
|
|
14649
|
+
return null;
|
|
14650
|
+
if (refreshingCount > 20)
|
|
14651
|
+
return "Ready (many files refreshing)";
|
|
14652
|
+
return `Ready (${refreshingCount} file(s) refreshing)`;
|
|
14653
|
+
}
|
|
14641
14654
|
function formatBytes(bytes) {
|
|
14642
14655
|
if (!Number.isFinite(bytes) || bytes <= 0)
|
|
14643
14656
|
return "0 B";
|
|
@@ -14688,6 +14701,7 @@ function coerceAftStatus(response) {
|
|
|
14688
14701
|
files: readOptionalNumber(semanticIndex.files),
|
|
14689
14702
|
entries_done: readOptionalNumber(semanticIndex.entries_done),
|
|
14690
14703
|
entries_total: readOptionalNumber(semanticIndex.entries_total),
|
|
14704
|
+
refreshing_count: readNumber(semanticIndex.refreshing_count),
|
|
14691
14705
|
entries: readOptionalNumber(semanticIndex.entries),
|
|
14692
14706
|
dimension: readOptionalNumber(semanticIndex.dimension),
|
|
14693
14707
|
error: readNullableString(semanticIndex.error)
|
|
@@ -14730,9 +14744,13 @@ function formatStatusDialogMessage(status) {
|
|
|
14730
14744
|
`- trigrams: ${formatCount(status.search_index.trigrams)}`,
|
|
14731
14745
|
"",
|
|
14732
14746
|
"Semantic index",
|
|
14733
|
-
`- status: ${status.semantic_index.status}
|
|
14734
|
-
`- entries: ${formatCount(status.semantic_index.entries)}`
|
|
14747
|
+
`- status: ${formatSemanticIndexStatus(status.semantic_index.status, status.semantic_index.stage)}`
|
|
14735
14748
|
];
|
|
14749
|
+
const refreshing = formatSemanticRefreshing(status.semantic_index.refreshing_count);
|
|
14750
|
+
if (refreshing) {
|
|
14751
|
+
lines.push(`- ${refreshing}`);
|
|
14752
|
+
}
|
|
14753
|
+
lines.push(`- entries: ${formatCount(status.semantic_index.entries)}`);
|
|
14736
14754
|
if (status.semantic_index.backend) {
|
|
14737
14755
|
lines.push(`- backend: ${status.semantic_index.backend}`);
|
|
14738
14756
|
}
|
|
@@ -14779,6 +14797,17 @@ function coerceOptionalInt(v, paramName, min, max) {
|
|
|
14779
14797
|
}
|
|
14780
14798
|
return n;
|
|
14781
14799
|
}
|
|
14800
|
+
function isEmptyParam(value) {
|
|
14801
|
+
if (value === undefined || value === null)
|
|
14802
|
+
return true;
|
|
14803
|
+
if (typeof value === "string")
|
|
14804
|
+
return value.length === 0;
|
|
14805
|
+
if (Array.isArray(value))
|
|
14806
|
+
return value.length === 0;
|
|
14807
|
+
if (typeof value === "object")
|
|
14808
|
+
return Object.keys(value).length === 0;
|
|
14809
|
+
return false;
|
|
14810
|
+
}
|
|
14782
14811
|
var LONG_RUNNING_COMMAND_TIMEOUT_MS = {
|
|
14783
14812
|
callers: 60000,
|
|
14784
14813
|
trace_to: 60000,
|
|
@@ -14787,7 +14816,7 @@ var LONG_RUNNING_COMMAND_TIMEOUT_MS = {
|
|
|
14787
14816
|
impact: 60000,
|
|
14788
14817
|
grep: 60000,
|
|
14789
14818
|
glob: 60000,
|
|
14790
|
-
semantic_search:
|
|
14819
|
+
semantic_search: 60000
|
|
14791
14820
|
};
|
|
14792
14821
|
function timeoutForCommand(command) {
|
|
14793
14822
|
return LONG_RUNNING_COMMAND_TIMEOUT_MS[command];
|
|
@@ -15000,7 +15029,10 @@ function renderInner(s, error3, theme, innerWidth) {
|
|
|
15000
15029
|
left.push(kv("trigrams", formatCountShort(s.search_index.trigrams), theme));
|
|
15001
15030
|
left.push(kv("disk", formatBytes(s.disk.trigram_disk_bytes), theme));
|
|
15002
15031
|
right.push(theme.fg("muted", "Semantic index"));
|
|
15003
|
-
right.push(kv("status", colorStatus(s.semantic_index.status, theme), theme));
|
|
15032
|
+
right.push(kv("status", colorStatus(s.semantic_index.status, theme, formatSemanticIndexStatus(s.semantic_index.status, s.semantic_index.stage)), theme));
|
|
15033
|
+
const semanticRefreshing = formatSemanticRefreshing(s.semantic_index.refreshing_count);
|
|
15034
|
+
if (semanticRefreshing)
|
|
15035
|
+
right.push(theme.fg("muted", ` ${semanticRefreshing}`));
|
|
15004
15036
|
right.push(kv("entries", formatCountShort(s.semantic_index.entries), theme));
|
|
15005
15037
|
if (s.semantic_index.backend)
|
|
15006
15038
|
right.push(kv("backend", s.semantic_index.backend, theme));
|
|
@@ -15074,24 +15106,24 @@ function formatCompressionStatusRows(compression) {
|
|
|
15074
15106
|
appendCompressionScope(rows, "Project", compression.project);
|
|
15075
15107
|
return rows;
|
|
15076
15108
|
}
|
|
15077
|
-
function colorStatus(status, theme) {
|
|
15109
|
+
function colorStatus(status, theme, label = status) {
|
|
15078
15110
|
switch (status) {
|
|
15079
15111
|
case "ready":
|
|
15080
15112
|
try {
|
|
15081
|
-
return theme.fg("success",
|
|
15113
|
+
return theme.fg("success", label);
|
|
15082
15114
|
} catch {
|
|
15083
|
-
return theme.fg("accent",
|
|
15115
|
+
return theme.fg("accent", label);
|
|
15084
15116
|
}
|
|
15085
15117
|
case "loading":
|
|
15086
15118
|
case "building":
|
|
15087
|
-
return theme.fg("warning",
|
|
15119
|
+
return theme.fg("warning", label);
|
|
15088
15120
|
case "failed":
|
|
15089
15121
|
case "error":
|
|
15090
|
-
return theme.fg("error",
|
|
15122
|
+
return theme.fg("error", label);
|
|
15091
15123
|
case "disabled":
|
|
15092
|
-
return theme.fg("muted",
|
|
15124
|
+
return theme.fg("muted", label);
|
|
15093
15125
|
default:
|
|
15094
|
-
return
|
|
15126
|
+
return label;
|
|
15095
15127
|
}
|
|
15096
15128
|
}
|
|
15097
15129
|
function featureBadge(name, enabled, theme) {
|
|
@@ -31531,9 +31563,9 @@ function registerAstTools(pi, ctx, surface) {
|
|
|
31531
31563
|
pattern: params.pattern,
|
|
31532
31564
|
lang: params.lang
|
|
31533
31565
|
};
|
|
31534
|
-
if (params.paths
|
|
31566
|
+
if (!isEmptyParam(params.paths))
|
|
31535
31567
|
req.paths = params.paths;
|
|
31536
|
-
if (params.globs
|
|
31568
|
+
if (!isEmptyParam(params.globs))
|
|
31537
31569
|
req.globs = params.globs;
|
|
31538
31570
|
if (params.contextLines !== undefined)
|
|
31539
31571
|
req.context_lines = params.contextLines;
|
|
@@ -31561,9 +31593,9 @@ function registerAstTools(pi, ctx, surface) {
|
|
|
31561
31593
|
rewrite: params.rewrite,
|
|
31562
31594
|
lang: params.lang
|
|
31563
31595
|
};
|
|
31564
|
-
if (params.paths
|
|
31596
|
+
if (!isEmptyParam(params.paths))
|
|
31565
31597
|
req.paths = params.paths;
|
|
31566
|
-
if (params.globs
|
|
31598
|
+
if (!isEmptyParam(params.globs))
|
|
31567
31599
|
req.globs = params.globs;
|
|
31568
31600
|
req.dry_run = params.dryRun === true;
|
|
31569
31601
|
const response = await callBridge(bridge, "ast_replace", req, extCtx);
|
|
@@ -33582,10 +33614,10 @@ Pass a single \`target\`:
|
|
|
33582
33614
|
parameters: ZoomParams,
|
|
33583
33615
|
async execute(_toolCallId, params, _signal, _onUpdate, extCtx) {
|
|
33584
33616
|
const bridge = bridgeFor(ctx, extCtx.cwd);
|
|
33585
|
-
const hasFilePath =
|
|
33586
|
-
const hasUrl =
|
|
33587
|
-
const hasTargets = params.targets
|
|
33588
|
-
const hasSymbols =
|
|
33617
|
+
const hasFilePath = !isEmptyParam(params.filePath);
|
|
33618
|
+
const hasUrl = !isEmptyParam(params.url);
|
|
33619
|
+
const hasTargets = !isEmptyParam(params.targets);
|
|
33620
|
+
const hasSymbols = !isEmptyParam(params.symbols);
|
|
33589
33621
|
if (hasTargets) {
|
|
33590
33622
|
if (hasFilePath || hasUrl || hasSymbols) {
|
|
33591
33623
|
throw new Error("'targets' is mutually exclusive with 'filePath', 'url', and 'symbols'");
|
|
@@ -33808,14 +33840,23 @@ function registerRefactorTool(pi, ctx) {
|
|
|
33808
33840
|
extract: "extract_function",
|
|
33809
33841
|
inline: "inline_symbol"
|
|
33810
33842
|
};
|
|
33843
|
+
if ((params.op === "move" || params.op === "inline") && isEmptyParam(params.symbol)) {
|
|
33844
|
+
throw new Error(`'symbol' is required for '${params.op}' op`);
|
|
33845
|
+
}
|
|
33846
|
+
if (params.op === "move" && isEmptyParam(params.destination)) {
|
|
33847
|
+
throw new Error("'destination' is required for 'move' op");
|
|
33848
|
+
}
|
|
33849
|
+
if (params.op === "extract" && isEmptyParam(params.name)) {
|
|
33850
|
+
throw new Error("'name' is required for 'extract' op");
|
|
33851
|
+
}
|
|
33811
33852
|
const req = { file: params.filePath };
|
|
33812
|
-
if (params.symbol
|
|
33853
|
+
if (!isEmptyParam(params.symbol))
|
|
33813
33854
|
req.symbol = params.symbol;
|
|
33814
|
-
if (params.destination
|
|
33855
|
+
if (!isEmptyParam(params.destination))
|
|
33815
33856
|
req.destination = params.destination;
|
|
33816
|
-
if (params.scope
|
|
33857
|
+
if (!isEmptyParam(params.scope))
|
|
33817
33858
|
req.scope = params.scope;
|
|
33818
|
-
if (params.name
|
|
33859
|
+
if (!isEmptyParam(params.name))
|
|
33819
33860
|
req.name = params.name;
|
|
33820
33861
|
const startLine = coerceOptionalInt(params.startLine, "startLine", 1, Number.MAX_SAFE_INTEGER);
|
|
33821
33862
|
const endLine = coerceOptionalInt(params.endLine, "endLine", 1, Number.MAX_SAFE_INTEGER);
|
|
@@ -33984,31 +34025,55 @@ function registerSafetyTool(pi, ctx) {
|
|
|
33984
34025
|
import { Type as Type13 } from "typebox";
|
|
33985
34026
|
var SearchParams2 = Type13.Object({
|
|
33986
34027
|
query: Type13.String({
|
|
33987
|
-
description: "Concept
|
|
34028
|
+
description: "Concept, regex, literal text, filename, or capability to find. Examples: 'fuzzy match with whitespace tolerance', '^export', 'Cargo.lock'."
|
|
33988
34029
|
}),
|
|
33989
|
-
topK: Type13.Optional(Type13.Number({ description: "Maximum number of results (default: 10, max: 100)" }))
|
|
34030
|
+
topK: Type13.Optional(Type13.Number({ description: "Maximum number of results (default: 10, max: 100)" })),
|
|
34031
|
+
hint: Type13.Optional(Type13.Union([
|
|
34032
|
+
Type13.Literal("regex"),
|
|
34033
|
+
Type13.Literal("literal"),
|
|
34034
|
+
Type13.Literal("semantic"),
|
|
34035
|
+
Type13.Literal("auto")
|
|
34036
|
+
], {
|
|
34037
|
+
description: "Optional routing hint. Defaults to 'auto'."
|
|
34038
|
+
}))
|
|
33990
34039
|
});
|
|
33991
34040
|
function buildSemanticSections(args, payload, theme) {
|
|
33992
34041
|
const response = asRecord2(payload);
|
|
33993
34042
|
if (!response)
|
|
33994
|
-
return [theme.fg("muted", "No
|
|
34043
|
+
return [theme.fg("muted", "No search result.")];
|
|
33995
34044
|
const status = asString(response.status) ?? "unknown";
|
|
34045
|
+
const semanticStatus = asString(response.semantic_status) ?? status;
|
|
34046
|
+
const interpretedAs = asString(response.interpreted_as) ?? "unknown";
|
|
34047
|
+
const queryKind = asString(response.query_kind);
|
|
33996
34048
|
const sections = [
|
|
33997
|
-
`${theme.fg(
|
|
34049
|
+
`${theme.fg(semanticStatus === "ready" ? "success" : "warning", `semantic: ${semanticStatus}`)} ${theme.fg("muted", `mode=${interpretedAs}${queryKind ? ` kind=${queryKind}` : ""} query=${JSON.stringify(args.query)} topK=${args.topK ?? 10}`)}`
|
|
33998
34050
|
];
|
|
33999
|
-
|
|
34051
|
+
const warnings = Array.isArray(response.warnings) ? response.warnings.filter((warning) => typeof warning === "string") : [];
|
|
34052
|
+
if (warnings.length > 0) {
|
|
34053
|
+
sections.push(warnings.map((warning) => theme.fg("warning", `⚠ ${warning}`)).join(`
|
|
34054
|
+
`));
|
|
34055
|
+
}
|
|
34056
|
+
const results = asRecords(response.results);
|
|
34057
|
+
if (status !== "ready" && results.length === 0) {
|
|
34000
34058
|
sections.push(asString(response.text) ?? theme.fg("muted", "Semantic index is not ready."));
|
|
34001
34059
|
return sections;
|
|
34002
34060
|
}
|
|
34003
|
-
const results = asRecords(response.results);
|
|
34004
34061
|
if (results.length === 0) {
|
|
34005
|
-
sections.push(theme.fg("muted", "No
|
|
34062
|
+
sections.push(theme.fg("muted", "No matches found."));
|
|
34006
34063
|
return sections;
|
|
34007
34064
|
}
|
|
34008
34065
|
const grouped = groupByFile(results, (result) => asString(result.file));
|
|
34009
34066
|
for (const [file2, fileResults] of grouped.entries()) {
|
|
34010
34067
|
const lines = [theme.fg("accent", shortenPath(file2))];
|
|
34011
34068
|
fileResults.forEach((result) => {
|
|
34069
|
+
if (asString(result.kind) === "GrepLine") {
|
|
34070
|
+
const line = asNumber(result.line);
|
|
34071
|
+
const column = asNumber(result.column);
|
|
34072
|
+
const lineText = asString(result.line_text) ?? "";
|
|
34073
|
+
const location = line !== undefined ? `${line}${column !== undefined ? `:${column}` : ""}` : "?";
|
|
34074
|
+
lines.push(` ↳ ${theme.fg("muted", `line ${location}`)} ${lineText}`);
|
|
34075
|
+
return;
|
|
34076
|
+
}
|
|
34012
34077
|
const score = asNumber(result.score);
|
|
34013
34078
|
const source = asString(result.source);
|
|
34014
34079
|
if (source === "lexical") {
|
|
@@ -34038,33 +34103,33 @@ function buildSemanticSections(args, payload, theme) {
|
|
|
34038
34103
|
return sections;
|
|
34039
34104
|
}
|
|
34040
34105
|
function renderSemanticCall(args, theme, context) {
|
|
34041
|
-
return renderToolCall("
|
|
34106
|
+
return renderToolCall("search", theme.fg("toolOutput", args.query), theme, context);
|
|
34042
34107
|
}
|
|
34043
34108
|
function renderSemanticResult(result, args, theme, context) {
|
|
34044
34109
|
if (context.isError)
|
|
34045
|
-
return renderErrorResult(result, "
|
|
34110
|
+
return renderErrorResult(result, "search failed", theme, context);
|
|
34046
34111
|
return renderSections(buildSemanticSections(args, extractStructuredPayload(result), theme), context);
|
|
34047
34112
|
}
|
|
34048
34113
|
function registerSemanticTool(pi, ctx) {
|
|
34049
34114
|
pi.registerTool({
|
|
34050
34115
|
name: "aft_search",
|
|
34051
|
-
label: "
|
|
34116
|
+
label: "search",
|
|
34052
34117
|
description: [
|
|
34053
|
-
"Find
|
|
34118
|
+
"Find code with unified semantic, lexical, literal, and regex search. Returns ranked symbol/file results or exact matching lines, with routing metadata.",
|
|
34054
34119
|
"",
|
|
34055
34120
|
"When to reach for it:",
|
|
34056
34121
|
"- Exploring an unfamiliar area: 'where is rate limiting handled', 'how does auth flow work'",
|
|
34057
34122
|
"- Concept doesn't appear as a literal string: 'retry logic', 'cache invalidation', 'graceful shutdown'",
|
|
34058
34123
|
"- Filename-shaped concepts: 'the bridge spawn helper', 'the session detection module'",
|
|
34059
|
-
"-
|
|
34124
|
+
"- Regex-shaped or exact text queries when you want AFT to classify and route automatically",
|
|
34060
34125
|
"- You know roughly what the function does but not what it's named",
|
|
34061
34126
|
"",
|
|
34062
34127
|
"When NOT to use:",
|
|
34063
|
-
"- You
|
|
34128
|
+
"- You need exhaustive literal enumeration → use grep directly",
|
|
34064
34129
|
"- You want the file/module structure → use aft_outline",
|
|
34065
34130
|
"- You're following a call chain → use aft_navigate",
|
|
34066
34131
|
"",
|
|
34067
|
-
"
|
|
34132
|
+
"Set hint to 'regex', 'literal', 'semantic', or 'auto' to override or document routing intent."
|
|
34068
34133
|
].join(`
|
|
34069
34134
|
`),
|
|
34070
34135
|
parameters: SearchParams2,
|
|
@@ -34073,6 +34138,8 @@ function registerSemanticTool(pi, ctx) {
|
|
|
34073
34138
|
const req = { query: params.query };
|
|
34074
34139
|
if (params.topK !== undefined)
|
|
34075
34140
|
req.top_k = params.topK;
|
|
34141
|
+
if (params.hint !== undefined)
|
|
34142
|
+
req.hint = params.hint;
|
|
34076
34143
|
const response = await callBridge(bridge, "semantic_search", req, extCtx);
|
|
34077
34144
|
return textResult(response.text ?? JSON.stringify(response, null, 2));
|
|
34078
34145
|
},
|
|
@@ -34227,8 +34294,12 @@ function buildWorkflowHints(opts) {
|
|
|
34227
34294
|
sections.push(`**Web/URL access**: \`aft_outline({ target: "<url>" })\` first for structure, then \`aft_zoom({ url: "<url>", symbols: "<heading>" })\` for the specific section.`);
|
|
34228
34295
|
}
|
|
34229
34296
|
if (hasOutline && hasZoom && (hasGrep || hasSearch)) {
|
|
34230
|
-
|
|
34231
|
-
|
|
34297
|
+
if (hasSearch) {
|
|
34298
|
+
const grepFallback = hasGrep ? ` Use \`${grepName}\` directly only when you need exhaustive enumeration of literal text (every TODO, every import of X) without ranking.` : "";
|
|
34299
|
+
sections.push(`**Code exploration**: \`aft_search\` is the primary code-search tool. It auto-routes by query shape — exact identifiers, regex, error messages, natural language all use the same call. Pass \`hint: "regex"\` / \`hint: "literal"\` / \`hint: "semantic"\` to override routing if needed. Then \`aft_outline\` for structure → \`aft_zoom\` for symbol(s).${grepFallback}`);
|
|
34300
|
+
} else {
|
|
34301
|
+
sections.push(`**Code exploration**: \`${grepName}\` to locate → \`aft_outline\` for structure → \`aft_zoom\` for symbol(s).`);
|
|
34302
|
+
}
|
|
34232
34303
|
}
|
|
34233
34304
|
if (hasNavigate) {
|
|
34234
34305
|
sections.push([
|
|
@@ -34336,13 +34407,13 @@ var PLUGIN_VERSION = (() => {
|
|
|
34336
34407
|
return "0.0.0";
|
|
34337
34408
|
}
|
|
34338
34409
|
})();
|
|
34339
|
-
var ANNOUNCEMENT_VERSION = "0.
|
|
34410
|
+
var ANNOUNCEMENT_VERSION = "0.32.0";
|
|
34340
34411
|
var ANNOUNCEMENT_FEATURES = [
|
|
34341
|
-
"`
|
|
34342
|
-
'
|
|
34343
|
-
|
|
34344
|
-
"
|
|
34345
|
-
|
|
34412
|
+
"`aft_search` is now the primary code-search tool — auto-routes regex / literal / semantic / hybrid by query shape, with a `hint` override.",
|
|
34413
|
+
'Semantic search stays queryable through edits — no more "rebuilding" fallback after every save.',
|
|
34414
|
+
"Workflow hints promote `aft_search` as primary; `grep` is positioned as the specialized fallback.",
|
|
34415
|
+
"Bare `\\n`, `\\t`, `\\r` queries correctly route to regex mode.",
|
|
34416
|
+
'Empty params (`targets: []`, `url: ""`) no longer trigger misleading mutual-exclusion errors.'
|
|
34346
34417
|
];
|
|
34347
34418
|
var ANNOUNCEMENT_FOOTER = "Join us on Discord: https://discord.gg/F2uWxjGnU";
|
|
34348
34419
|
var ALL_ONLY_TOOLS = new Set([
|
package/dist/shared/status.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export interface AftStatusSnapshot {
|
|
|
33
33
|
files?: number | null;
|
|
34
34
|
entries_done?: number | null;
|
|
35
35
|
entries_total?: number | null;
|
|
36
|
+
refreshing_count: number;
|
|
36
37
|
entries: number | null;
|
|
37
38
|
dimension: number | null;
|
|
38
39
|
error?: string | null;
|
|
@@ -64,6 +65,8 @@ export interface AftStatusSnapshot {
|
|
|
64
65
|
*/
|
|
65
66
|
message?: string;
|
|
66
67
|
}
|
|
68
|
+
export declare function formatSemanticIndexStatus(status: string, stage?: string | null): string;
|
|
69
|
+
export declare function formatSemanticRefreshing(refreshingCount: number): string | null;
|
|
67
70
|
export declare function formatBytes(bytes: number): string;
|
|
68
71
|
export declare function coerceAftStatus(response: Record<string, unknown>): AftStatusSnapshot;
|
|
69
72
|
export declare function formatStatusDialogMessage(status: AftStatusSnapshot): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/shared/status.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IAC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CAAC;QACX,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,wEAAwE;IACxE,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAqDD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAKvF;AAED,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/E;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAajD;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,iBAAiB,CAgEpF;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAmE3E;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAqEtE"}
|
package/dist/tools/_shared.d.ts
CHANGED
|
@@ -7,6 +7,19 @@ import { Type } from "typebox";
|
|
|
7
7
|
import type { PluginContext } from "../types.js";
|
|
8
8
|
export declare const optionalInt: (_min: number, _max: number) => Type.TOptional<Type.TAny>;
|
|
9
9
|
export declare function coerceOptionalInt(v: unknown, paramName: string, min: number, max: number): number | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* True when a value represents "agent did not provide this param".
|
|
12
|
+
*
|
|
13
|
+
* GPT-family models send empty strings / empty arrays / null instead of
|
|
14
|
+
* omitting optional params entirely. Use this BEFORE mutual-exclusion
|
|
15
|
+
* checks so an empty `targets: []` or `url: ""` doesn't get counted as
|
|
16
|
+
* present and trigger a misleading "X is mutually exclusive with Y" error.
|
|
17
|
+
*
|
|
18
|
+
* Treats undefined / null / "" / [] / {} as empty. Booleans and numbers
|
|
19
|
+
* (including 0 and false) are NOT empty by themselves — only string and
|
|
20
|
+
* collection sentinels qualify.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isEmptyParam(value: unknown): boolean;
|
|
10
23
|
/**
|
|
11
24
|
* Per-command timeout overrides (milliseconds).
|
|
12
25
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,8BACC,CAAC;AAExD,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,OAAO,EACV,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,SAAS,CAWpB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CASlE,CAAC;AAEF,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAErE;AA2BD,8EAA8E;AAC9E,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACnC,MAAM,CAsDR;AAsBD,gEAAgE;AAChE,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY,CAEvE;AAED;;;;;;;;GAQG;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AAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,CAAC,OAAO,UAAU,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,yCAuB3B;AAED,wCAAwC;AACxC,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,IAAI,EAAE,MAAM,CAAC,OAAO,UAAU,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,sFAI3B;AAED,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,YAAY,EAChB,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,cAAc,GACtB,IAAI,CAuPN;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACnC,eAAe,CAyBjB;AA0BD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CA2ChF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refactor.d.ts","sourceRoot":"","sources":["../../src/tools/refactor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"refactor.d.ts","sourceRoot":"","sources":["../../src/tools/refactor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,OAAO,EAOL,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAE7B,QAAA,MAAM,cAAc;;;;;;;;;;EAYlB,CAAC;AAEH,wCAAwC;AACxC,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,CAAC,OAAO,cAAc,CAAC,EACnC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACX,MAAM,EAAE,CAiCV;AAED,wCAAwC;AACxC,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,CAAC,OAAO,cAAc,CAAC,EACnC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,yCAU3B;AAED,wCAAwC;AACxC,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,IAAI,EAAE,MAAM,CAAC,OAAO,cAAc,CAAC,EACnC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,sFAO3B;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAqE/E"}
|
package/dist/tools/semantic.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* aft_search —
|
|
2
|
+
* aft_search — unified code search.
|
|
3
3
|
* Only registered when config.semantic_search is enabled AND
|
|
4
4
|
* the ONNX runtime / configured backend is available.
|
|
5
5
|
*/
|
|
@@ -10,6 +10,7 @@ import { type RenderContextLike } from "./render-helpers.js";
|
|
|
10
10
|
declare const SearchParams: Type.TObject<{
|
|
11
11
|
query: Type.TString;
|
|
12
12
|
topK: Type.TOptional<Type.TNumber>;
|
|
13
|
+
hint: Type.TOptional<Type.TUnion<[Type.TLiteral<"regex">, Type.TLiteral<"literal">, Type.TLiteral<"semantic">, Type.TLiteral<"auto">]>>;
|
|
13
14
|
}>;
|
|
14
15
|
/** Exported for renderer unit tests. */
|
|
15
16
|
export declare function buildSemanticSections(args: Static<typeof SearchParams>, payload: unknown, theme: Theme): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../src/tools/semantic.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAOL,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAE7B,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../src/tools/semantic.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAOL,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAE7B,QAAA,MAAM,YAAY;;;;EAqBhB,CAAC;AAEH,wCAAwC;AACxC,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,EACjC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACX,MAAM,EAAE,CA4EV;AAED,wCAAwC;AACxC,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,EACjC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,yCAG3B;AAED,wCAAwC;AACxC,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,EACjC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,sFAO3B;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CA2C/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,SAAS,GAAG,aAAa,GAAG,KAAK,CAAC;IAC/C,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kEAAkE;IAClE,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC1B;AAID,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,SAAS,GAAG,aAAa,GAAG,KAAK,CAAC;IAC/C,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kEAAkE;IAClE,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC1B;AAID,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAqEzE;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,EACxB,aAAa,EAAE,OAAO,GACrB,MAAM,GAAG,IAAI,CAYf;AAMD,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,YAAY,EAChB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,gBAAgB,GACxB,IAAI,CA8BN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"prepublishOnly": "bun run build"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@cortexkit/aft-bridge": "0.
|
|
25
|
+
"@cortexkit/aft-bridge": "0.32.0",
|
|
26
26
|
"@xterm/headless": "^5.5.0",
|
|
27
27
|
"comment-json": "^5.0.0",
|
|
28
28
|
"diff": "^8.0.4",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"zod": "^4.1.8"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
34
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
35
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
36
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
37
|
-
"@cortexkit/aft-win32-arm64": "0.
|
|
38
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
33
|
+
"@cortexkit/aft-darwin-arm64": "0.32.0",
|
|
34
|
+
"@cortexkit/aft-darwin-x64": "0.32.0",
|
|
35
|
+
"@cortexkit/aft-linux-arm64": "0.32.0",
|
|
36
|
+
"@cortexkit/aft-linux-x64": "0.32.0",
|
|
37
|
+
"@cortexkit/aft-win32-arm64": "0.32.0",
|
|
38
|
+
"@cortexkit/aft-win32-x64": "0.32.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@earendil-works/pi-coding-agent": "*",
|