@cortexkit/aft-pi 0.18.3 → 0.18.4
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/config.d.ts.map +1 -1
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +168 -6
- package/dist/pool.d.ts +2 -0
- package/dist/pool.d.ts.map +1 -1
- package/dist/tools/reading.d.ts +13 -0
- package/dist/tools/reading.d.ts.map +1 -1
- package/dist/workflow-hints.d.ts +31 -0
- package/dist/workflow-hints.d.ts.map +1 -0
- package/package.json +6 -6
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,UAAU,GACV,MAAM,GACN,MAAM,GACN,OAAO,GACP,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,MAAM,OAAO,GACf,KAAK,GACL,OAAO,GACP,SAAS,GACT,MAAM,GACN,OAAO,GACP,IAAI,GACJ,aAAa,GACb,MAAM,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,mBAAmB,GAAG,QAAQ,CAAC;AAE3E,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IAC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AAC,EAAE,SAAS,CAAC;IAChB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAwDD,eAAO,MAAM,eAAe;;;;;;;;;iBAE1B,CAAC;AAsCH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkBjB,CAAC;AAMZ,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,GAAG,qBAAqB,CAmDrF;AAED,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,SAAS,GAChB,8BAA8B,CAehC;AAED,KAAK,MAAM,GAAG;IACZ,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AAyFF,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,MAAsB,GAC7B;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAgD1C;AAuPD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CA4CjE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,10 +30,45 @@
|
|
|
30
30
|
* - /aft-status Status dialog (index states, LSP servers, storage dir)
|
|
31
31
|
*/
|
|
32
32
|
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
33
|
+
import { loadAftConfig } from "./config.js";
|
|
34
|
+
/**
|
|
35
|
+
* Tool surface mirrors opencode-plugin: navigate/delete/move/transform/refactor
|
|
36
|
+
* are all-only. recommended exposes hoisted + read/safety/import/ast/lsp/conflicts
|
|
37
|
+
* + experimental search/semantic when enabled.
|
|
38
|
+
*
|
|
39
|
+
* Returns the set of AFT tool names that should be registered given the
|
|
40
|
+
* configured surface + disabled_tools filter. Pi's built-in tools are always
|
|
41
|
+
* present; registering an AFT tool with the same name replaces them.
|
|
42
|
+
*/
|
|
43
|
+
declare function resolveToolSurface(config: ReturnType<typeof loadAftConfig>): {
|
|
44
|
+
hoistBash: boolean;
|
|
45
|
+
hoistRead: boolean;
|
|
46
|
+
hoistWrite: boolean;
|
|
47
|
+
hoistEdit: boolean;
|
|
48
|
+
hoistGrep: boolean;
|
|
49
|
+
outline: boolean;
|
|
50
|
+
zoom: boolean;
|
|
51
|
+
semantic: boolean;
|
|
52
|
+
navigate: boolean;
|
|
53
|
+
conflicts: boolean;
|
|
54
|
+
importTool: boolean;
|
|
55
|
+
safety: boolean;
|
|
56
|
+
delete: boolean;
|
|
57
|
+
move: boolean;
|
|
58
|
+
astSearch: boolean;
|
|
59
|
+
astReplace: boolean;
|
|
60
|
+
lspDiagnostics: boolean;
|
|
61
|
+
structure: boolean;
|
|
62
|
+
refactor: boolean;
|
|
63
|
+
};
|
|
33
64
|
/**
|
|
34
65
|
* Pi extension default export.
|
|
35
66
|
*
|
|
36
67
|
* Called once per session. Registers tools, commands, and session shutdown hooks.
|
|
37
68
|
*/
|
|
38
69
|
export default function (pi: ExtensionAPI): Promise<void>;
|
|
70
|
+
export declare const __test__: {
|
|
71
|
+
resolveToolSurface: typeof resolveToolSurface;
|
|
72
|
+
};
|
|
73
|
+
export {};
|
|
39
74
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAQlE,OAAO,EACL,aAAa,EAGd,MAAM,aAAa,CAAC;AAkFrB;;;;;;;;GAQG;AACH,iBAAS,kBAAkB,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,GAAG;IACrE,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,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,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAiEA;AAED;;;;GAIG;AACH,yBAA+B,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA6T9D;AAED,eAAO,MAAM,QAAQ;;CAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22107,6 +22107,18 @@ function isWritableMigrationError(errorValue) {
|
|
|
22107
22107
|
const code = errorValue?.code;
|
|
22108
22108
|
return code === "EROFS" || code === "EACCES" || code === "EPERM";
|
|
22109
22109
|
}
|
|
22110
|
+
function extractCommentsForPreservation(content) {
|
|
22111
|
+
const comments = [];
|
|
22112
|
+
const linePattern = /\/\/[^\n]*/g;
|
|
22113
|
+
for (const match of content.match(linePattern) ?? []) {
|
|
22114
|
+
comments.push(match.trim());
|
|
22115
|
+
}
|
|
22116
|
+
const blockPattern = /\/\*[\s\S]*?\*\//g;
|
|
22117
|
+
for (const match of content.match(blockPattern) ?? []) {
|
|
22118
|
+
comments.push(match.replace(/\s+/g, " ").trim());
|
|
22119
|
+
}
|
|
22120
|
+
return comments;
|
|
22121
|
+
}
|
|
22110
22122
|
function ensureRecordAtPath(root, path2) {
|
|
22111
22123
|
let current = root;
|
|
22112
22124
|
for (const segment of path2) {
|
|
@@ -22165,10 +22177,9 @@ function migrateAftConfigFile(configPath, logger = { log, warn }) {
|
|
|
22165
22177
|
if (oldKeys.length === 0) {
|
|
22166
22178
|
return { migrated: false, oldKeys: [] };
|
|
22167
22179
|
}
|
|
22168
|
-
const comments = content.match(/^\s*\/\/.*$/gm) ?? [];
|
|
22169
22180
|
const serialized = `${import_comment_json.stringify(rawConfig, null, 2)}
|
|
22170
22181
|
`;
|
|
22171
|
-
const preservedComments =
|
|
22182
|
+
const preservedComments = extractCommentsForPreservation(content).filter((comment) => !serialized.includes(comment.trim()));
|
|
22172
22183
|
const nextContent = preservedComments.length > 0 ? `${preservedComments.join(`
|
|
22173
22184
|
`)}
|
|
22174
22185
|
${serialized}` : serialized;
|
|
@@ -24886,6 +24897,14 @@ class BridgePool {
|
|
|
24886
24897
|
}
|
|
24887
24898
|
return null;
|
|
24888
24899
|
}
|
|
24900
|
+
getActiveBridgeForRoot(directory) {
|
|
24901
|
+
const key = canonicalKey(directory);
|
|
24902
|
+
const entry = this.bridges.get(key);
|
|
24903
|
+
if (!entry?.bridge.isAlive())
|
|
24904
|
+
return null;
|
|
24905
|
+
entry.lastUsed = Date.now();
|
|
24906
|
+
return entry.bridge;
|
|
24907
|
+
}
|
|
24889
24908
|
getBridge(directory) {
|
|
24890
24909
|
const key = canonicalKey(directory);
|
|
24891
24910
|
const existing = this.bridges.get(key);
|
|
@@ -26991,6 +27010,29 @@ function buildOutlineSections(text, theme) {
|
|
|
26991
27010
|
`)];
|
|
26992
27011
|
}
|
|
26993
27012
|
function buildZoomSections(args, payload, theme) {
|
|
27013
|
+
const batch = asRecord2(payload);
|
|
27014
|
+
if (Array.isArray(batch?.symbols)) {
|
|
27015
|
+
const header = batch.complete === false ? [theme.fg("warning", "Incomplete zoom results")] : [];
|
|
27016
|
+
const items2 = batch.symbols;
|
|
27017
|
+
return [
|
|
27018
|
+
...header,
|
|
27019
|
+
...items2.map((item) => {
|
|
27020
|
+
const record2 = asRecord2(item);
|
|
27021
|
+
if (!record2)
|
|
27022
|
+
return theme.fg("muted", "No zoom result available.");
|
|
27023
|
+
const name = asString(record2.name) ?? "(unknown symbol)";
|
|
27024
|
+
if (record2.success === false) {
|
|
27025
|
+
return theme.fg("error", `Symbol "${name}" not found: ${asString(record2.error) ?? "zoom failed"}`);
|
|
27026
|
+
}
|
|
27027
|
+
const content = asString(record2.content);
|
|
27028
|
+
return [
|
|
27029
|
+
`${theme.fg("accent", name)} ${theme.fg("muted", shortenPath(args.filePath))}`,
|
|
27030
|
+
content
|
|
27031
|
+
].filter(Boolean).join(`
|
|
27032
|
+
`);
|
|
27033
|
+
})
|
|
27034
|
+
];
|
|
27035
|
+
}
|
|
26994
27036
|
const items = Array.isArray(payload) ? payload : payload ? [payload] : [];
|
|
26995
27037
|
if (items.length === 0)
|
|
26996
27038
|
return [theme.fg("muted", "No zoom result available.")];
|
|
@@ -27109,9 +27151,13 @@ function registerReadingTools(pi, ctx, surface) {
|
|
|
27109
27151
|
const req2 = { file: params.filePath, symbol: sym };
|
|
27110
27152
|
if (params.contextLines !== undefined)
|
|
27111
27153
|
req2.context_lines = params.contextLines;
|
|
27112
|
-
return callBridge(bridge, "zoom", req2, extCtx)
|
|
27154
|
+
return callBridge(bridge, "zoom", req2, extCtx).catch((err) => ({
|
|
27155
|
+
success: false,
|
|
27156
|
+
message: err instanceof Error ? err.message : String(err)
|
|
27157
|
+
}));
|
|
27113
27158
|
}));
|
|
27114
|
-
|
|
27159
|
+
const batch = formatZoomBatchResult(params.symbols, results);
|
|
27160
|
+
return textResult(batch.text, batch);
|
|
27115
27161
|
}
|
|
27116
27162
|
const req = { file: params.filePath };
|
|
27117
27163
|
if (params.symbol)
|
|
@@ -27130,6 +27176,40 @@ function registerReadingTools(pi, ctx, surface) {
|
|
|
27130
27176
|
});
|
|
27131
27177
|
}
|
|
27132
27178
|
}
|
|
27179
|
+
function formatZoomBatchResult(symbols, responses) {
|
|
27180
|
+
const entries = symbols.map((name, index) => {
|
|
27181
|
+
const response = responses[index] ?? { success: false, message: "missing zoom response" };
|
|
27182
|
+
if (response.success === false) {
|
|
27183
|
+
const message = typeof response.message === "string" && response.message.length > 0 ? response.message : "zoom failed";
|
|
27184
|
+
return { name, success: false, error: message };
|
|
27185
|
+
}
|
|
27186
|
+
return { name, success: true, content: zoomResponseContent(response) };
|
|
27187
|
+
});
|
|
27188
|
+
const complete = entries.every((entry) => entry.success);
|
|
27189
|
+
const lines = [];
|
|
27190
|
+
if (!complete) {
|
|
27191
|
+
lines.push("Incomplete zoom results: one or more symbols failed.");
|
|
27192
|
+
}
|
|
27193
|
+
for (const entry of entries) {
|
|
27194
|
+
if (entry.success) {
|
|
27195
|
+
lines.push(`Symbol "${entry.name}":
|
|
27196
|
+
${entry.content ?? ""}`.trimEnd());
|
|
27197
|
+
} else {
|
|
27198
|
+
lines.push(`Symbol "${entry.name}" not found: ${entry.error ?? "zoom failed"}`);
|
|
27199
|
+
}
|
|
27200
|
+
}
|
|
27201
|
+
return { complete, symbols: entries, text: lines.join(`
|
|
27202
|
+
|
|
27203
|
+
`) };
|
|
27204
|
+
}
|
|
27205
|
+
function zoomResponseContent(response) {
|
|
27206
|
+
if (typeof response.content === "string")
|
|
27207
|
+
return response.content;
|
|
27208
|
+
if (typeof response.text === "string")
|
|
27209
|
+
return response.text;
|
|
27210
|
+
const { success: _success2, ...rest } = response;
|
|
27211
|
+
return JSON.stringify(rest, null, 2);
|
|
27212
|
+
}
|
|
27133
27213
|
function formatOutlineText(response) {
|
|
27134
27214
|
const text = response.text ?? "";
|
|
27135
27215
|
const skipped = response.skipped_files;
|
|
@@ -27621,6 +27701,83 @@ function validateTransformParams(params) {
|
|
|
27621
27701
|
}
|
|
27622
27702
|
}
|
|
27623
27703
|
|
|
27704
|
+
// src/workflow-hints.ts
|
|
27705
|
+
var HEADING = "## Prefer AFT tools for token efficiency";
|
|
27706
|
+
function buildWorkflowHints(opts) {
|
|
27707
|
+
const sections = [];
|
|
27708
|
+
const grepName = opts.hoistBuiltins ? "grep" : "aft_grep";
|
|
27709
|
+
const bashName = opts.hoistBuiltins ? "bash" : "aft_bash";
|
|
27710
|
+
const hasOutline = !opts.absentTools.has("aft_outline");
|
|
27711
|
+
const hasZoom = !opts.absentTools.has("aft_zoom");
|
|
27712
|
+
const hasGrep = opts.toolSurface !== "minimal" && !opts.absentTools.has(grepName);
|
|
27713
|
+
const hasSearch = opts.toolSurface !== "minimal" && opts.semanticEnabled && !opts.absentTools.has("aft_search");
|
|
27714
|
+
const hasNavigate = opts.toolSurface === "all" && !opts.absentTools.has("aft_navigate");
|
|
27715
|
+
const hasBgBash = opts.bashBackgroundEnabled && !opts.absentTools.has(bashName) && !opts.absentTools.has("bash_status");
|
|
27716
|
+
if (hasOutline && hasZoom) {
|
|
27717
|
+
sections.push(`**Web/URL access**: \`aft_outline({ url })\` first for structure, then \`aft_zoom({ url, symbol: "<heading>" })\` for the specific section.`);
|
|
27718
|
+
}
|
|
27719
|
+
if (hasOutline && hasZoom && (hasGrep || hasSearch)) {
|
|
27720
|
+
const locator = hasGrep && hasSearch ? `\`${grepName}\` or \`aft_search\`` : hasGrep ? `\`${grepName}\`` : "`aft_search`";
|
|
27721
|
+
sections.push(`**Code exploration**: ${locator} to locate → \`aft_outline\` for structure → \`aft_zoom\` for symbol(s).`);
|
|
27722
|
+
}
|
|
27723
|
+
if (hasNavigate) {
|
|
27724
|
+
sections.push([
|
|
27725
|
+
"Use `aft_navigate` instead of grep + read chains for relationship questions:",
|
|
27726
|
+
"- `callers` — find all call sites before changing a function signature",
|
|
27727
|
+
"- `impact` — blast radius (which functions/files will need updates)",
|
|
27728
|
+
"- `trace_to` — how execution reaches this code from entry points (routes, exports, main)",
|
|
27729
|
+
"- `trace_data` — follow a value through assignments and parameters across files"
|
|
27730
|
+
].join(`
|
|
27731
|
+
`));
|
|
27732
|
+
}
|
|
27733
|
+
if (hasBgBash) {
|
|
27734
|
+
sections.push(`**Long-running commands** (builds, installs, full test suites): \`${bashName}({ background: true })\` returns immediately with a \`taskId\`. Check progress with \`bash_status({ taskId })\`.`);
|
|
27735
|
+
}
|
|
27736
|
+
if (sections.length === 0) {
|
|
27737
|
+
return null;
|
|
27738
|
+
}
|
|
27739
|
+
return `${HEADING}
|
|
27740
|
+
|
|
27741
|
+
${sections.join(`
|
|
27742
|
+
|
|
27743
|
+
`)}`;
|
|
27744
|
+
}
|
|
27745
|
+
function buildHintsFromConfig(config2, absentTools, hoistBuiltins) {
|
|
27746
|
+
return buildWorkflowHints({
|
|
27747
|
+
toolSurface: config2.tool_surface ?? "recommended",
|
|
27748
|
+
hoistBuiltins,
|
|
27749
|
+
semanticEnabled: config2.semantic_search === true,
|
|
27750
|
+
bashBackgroundEnabled: config2.experimental?.bash?.background === true,
|
|
27751
|
+
absentTools
|
|
27752
|
+
});
|
|
27753
|
+
}
|
|
27754
|
+
function registerWorkflowHints(pi, config2, surface) {
|
|
27755
|
+
const absent = new Set;
|
|
27756
|
+
if (!surface.outline)
|
|
27757
|
+
absent.add("aft_outline");
|
|
27758
|
+
if (!surface.zoom)
|
|
27759
|
+
absent.add("aft_zoom");
|
|
27760
|
+
if (!surface.semantic)
|
|
27761
|
+
absent.add("aft_search");
|
|
27762
|
+
if (!surface.navigate)
|
|
27763
|
+
absent.add("aft_navigate");
|
|
27764
|
+
if (!surface.hoistGrep)
|
|
27765
|
+
absent.add("grep");
|
|
27766
|
+
if (!surface.hoistBash) {
|
|
27767
|
+
absent.add("bash");
|
|
27768
|
+
absent.add("bash_status");
|
|
27769
|
+
}
|
|
27770
|
+
const hintsBlock = buildHintsFromConfig(config2, absent, true);
|
|
27771
|
+
if (!hintsBlock)
|
|
27772
|
+
return;
|
|
27773
|
+
log(`Workflow hints injected (${hintsBlock.length} chars)`);
|
|
27774
|
+
pi.on("before_agent_start", (event) => {
|
|
27775
|
+
return { systemPrompt: `${event.systemPrompt}
|
|
27776
|
+
|
|
27777
|
+
${hintsBlock}` };
|
|
27778
|
+
});
|
|
27779
|
+
}
|
|
27780
|
+
|
|
27624
27781
|
// src/index.ts
|
|
27625
27782
|
var PLUGIN_VERSION = (() => {
|
|
27626
27783
|
try {
|
|
@@ -27666,6 +27823,7 @@ function resolveToolSurface(config2) {
|
|
|
27666
27823
|
const allOnly = (name) => ALL_ONLY_TOOLS.has(name) && ok(name);
|
|
27667
27824
|
if (surface === "minimal") {
|
|
27668
27825
|
return {
|
|
27826
|
+
hoistBash: ok("bash"),
|
|
27669
27827
|
hoistRead: false,
|
|
27670
27828
|
hoistWrite: false,
|
|
27671
27829
|
hoistEdit: false,
|
|
@@ -27687,6 +27845,7 @@ function resolveToolSurface(config2) {
|
|
|
27687
27845
|
};
|
|
27688
27846
|
}
|
|
27689
27847
|
const base = {
|
|
27848
|
+
hoistBash: ok("bash"),
|
|
27690
27849
|
hoistRead: ok("read"),
|
|
27691
27850
|
hoistWrite: ok("write"),
|
|
27692
27851
|
hoistEdit: ok("edit"),
|
|
@@ -27862,7 +28021,7 @@ ${lines}
|
|
|
27862
28021
|
sendFeatureAnnouncement(ANNOUNCEMENT_VERSION, ANNOUNCEMENT_FEATURES, storageDir);
|
|
27863
28022
|
}
|
|
27864
28023
|
const surface = resolveToolSurface(config2);
|
|
27865
|
-
if (surface.
|
|
28024
|
+
if (surface.hoistBash) {
|
|
27866
28025
|
registerBashTool(pi, ctx);
|
|
27867
28026
|
}
|
|
27868
28027
|
registerHoistedTools(pi, ctx, surface);
|
|
@@ -27899,6 +28058,7 @@ ${lines}
|
|
|
27899
28058
|
if (surface.refactor) {
|
|
27900
28059
|
registerRefactorTool(pi, ctx);
|
|
27901
28060
|
}
|
|
28061
|
+
registerWorkflowHints(pi, config2, surface);
|
|
27902
28062
|
registerStatusCommand(pi, ctx);
|
|
27903
28063
|
pi.on("tool_result", async (event, extCtx) => {
|
|
27904
28064
|
const content = await appendToolResultBgCompletions({ ctx, directory: extCtx.cwd, sessionID: resolveSessionId(extCtx) }, event.content);
|
|
@@ -27937,6 +28097,8 @@ ${lines}
|
|
|
27937
28097
|
});
|
|
27938
28098
|
log(`AFT extension ready (surface=${config2.tool_surface ?? "recommended"})`);
|
|
27939
28099
|
}
|
|
28100
|
+
var __test__ = { resolveToolSurface };
|
|
27940
28101
|
export {
|
|
27941
|
-
src_default as default
|
|
28102
|
+
src_default as default,
|
|
28103
|
+
__test__
|
|
27942
28104
|
};
|
package/dist/pool.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export declare class BridgePool {
|
|
|
22
22
|
constructor(binaryPath: string, options?: PoolOptions, configOverrides?: Record<string, unknown>);
|
|
23
23
|
/** Get any existing alive bridge, preferring the given directory. */
|
|
24
24
|
getAnyActiveBridge(directory: string): BinaryBridge | null;
|
|
25
|
+
/** Get an alive bridge only when it belongs to the requested directory. */
|
|
26
|
+
getActiveBridgeForRoot(directory: string): BinaryBridge | null;
|
|
25
27
|
/** Get or create a bridge for the given directory. */
|
|
26
28
|
getBridge(directory: string): BinaryBridge;
|
|
27
29
|
private cleanup;
|
package/dist/pool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../src/pool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAY/D,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,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Q,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA0B;IAC1D,OAAO,CAAC,YAAY,CAA+C;gBAGjE,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,WAAgB,EACzB,eAAe,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;IAoB/C,qEAAqE;IACrE,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAgB1D,2EAA2E;IAC3E,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAQ9D,sDAAsD;IACtD,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY;IAiB1C,OAAO,CAAC,OAAO;IAUf,OAAO,CAAC,QAAQ;IAgBV,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAUzB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnD,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
|
package/dist/tools/reading.d.ts
CHANGED
|
@@ -21,6 +21,17 @@ export interface ReadingSurface {
|
|
|
21
21
|
outline: boolean;
|
|
22
22
|
zoom: boolean;
|
|
23
23
|
}
|
|
24
|
+
interface ZoomBatchSymbolResult {
|
|
25
|
+
name: string;
|
|
26
|
+
success: boolean;
|
|
27
|
+
content?: string;
|
|
28
|
+
error?: string;
|
|
29
|
+
}
|
|
30
|
+
interface ZoomBatchResult {
|
|
31
|
+
complete: boolean;
|
|
32
|
+
symbols: ZoomBatchSymbolResult[];
|
|
33
|
+
text: string;
|
|
34
|
+
}
|
|
24
35
|
/** Exported for renderer unit tests. */
|
|
25
36
|
export declare function buildOutlineSections(text: string, theme: Theme): string[];
|
|
26
37
|
/** Exported for renderer unit tests. */
|
|
@@ -34,5 +45,7 @@ export declare function renderZoomCall(args: Static<typeof ZoomParams>, theme: T
|
|
|
34
45
|
/** Exported for renderer unit tests. */
|
|
35
46
|
export declare function renderZoomResult(result: AgentToolResult<unknown>, args: Static<typeof ZoomParams>, theme: Theme, context: RenderContextLike): import("@mariozechner/pi-tui").Text | import("@mariozechner/pi-tui").Container;
|
|
36
47
|
export declare function registerReadingTools(pi: ExtensionAPI, ctx: PluginContext, surface: ReadingSurface): void;
|
|
48
|
+
/** Exported for regression tests. */
|
|
49
|
+
export declare function formatZoomBatchResult(symbols: string[], responses: Record<string, unknown>[]): ZoomBatchResult;
|
|
37
50
|
export {};
|
|
38
51
|
//# sourceMappingURL=reading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAOL,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAE7B,QAAA,MAAM,aAAa;;;;EAYjB,CAAC;AAEH,QAAA,MAAM,UAAU;;;;;EAWd,CAAC;AAEH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,wCAAwC;AACxC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAOzE;AAED,wCAAwC;AACxC,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,CAAC,OAAO,UAAU,CAAC,EAC/B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACX,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"reading.d.ts","sourceRoot":"","sources":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,OAAO,CAAC,EAChC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,kFAI3B;AAED,wCAAwC;AACxC,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,CAAC,OAAO,UAAU,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,uCAQ3B;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,kFAI3B;AAED,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,YAAY,EAChB,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,cAAc,GACtB,IAAI,CAsHN;AAED,qCAAqC;AACrC,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACnC,eAAe,CA0BjB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
import type { AftConfig } from "./config.js";
|
|
3
|
+
export interface WorkflowHintsOpts {
|
|
4
|
+
toolSurface: "minimal" | "recommended" | "all";
|
|
5
|
+
hoistBuiltins: boolean;
|
|
6
|
+
semanticEnabled: boolean;
|
|
7
|
+
bashBackgroundEnabled: boolean;
|
|
8
|
+
/** Set of tool names KNOWN-ABSENT from the registered surface. */
|
|
9
|
+
absentTools: Set<string>;
|
|
10
|
+
}
|
|
11
|
+
export declare function buildWorkflowHints(opts: WorkflowHintsOpts): string | null;
|
|
12
|
+
export declare function buildHintsFromConfig(config: AftConfig, absentTools: Set<string>, hoistBuiltins: boolean): string | null;
|
|
13
|
+
interface ToolSurfaceFlags {
|
|
14
|
+
outline: boolean;
|
|
15
|
+
zoom: boolean;
|
|
16
|
+
semantic: boolean;
|
|
17
|
+
navigate: boolean;
|
|
18
|
+
hoistGrep: boolean;
|
|
19
|
+
hoistBash: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Register the workflow-hints extension on Pi via `before_agent_start`.
|
|
23
|
+
*
|
|
24
|
+
* Pi assembles a fresh system prompt for every turn, then fires
|
|
25
|
+
* `before_agent_start` with the assembled prompt. Our handler appends the
|
|
26
|
+
* AFT workflow hints block to that prompt. If multiple extensions return a
|
|
27
|
+
* `systemPrompt`, Pi chains them — so we always append (never replace).
|
|
28
|
+
*/
|
|
29
|
+
export declare function registerWorkflowHints(pi: ExtensionAPI, config: AftConfig, surface: ToolSurfaceFlags): void;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=workflow-hints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,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,CA8DzE;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,EACxB,aAAa,EAAE,OAAO,GACrB,MAAM,GAAG,IAAI,CAQf;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.18.
|
|
3
|
+
"version": "0.18.4",
|
|
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",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"zod": "^4.1.8"
|
|
29
29
|
},
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"@cortexkit/aft-darwin-arm64": "0.18.
|
|
32
|
-
"@cortexkit/aft-darwin-x64": "0.18.
|
|
33
|
-
"@cortexkit/aft-linux-arm64": "0.18.
|
|
34
|
-
"@cortexkit/aft-linux-x64": "0.18.
|
|
35
|
-
"@cortexkit/aft-win32-x64": "0.18.
|
|
31
|
+
"@cortexkit/aft-darwin-arm64": "0.18.4",
|
|
32
|
+
"@cortexkit/aft-darwin-x64": "0.18.4",
|
|
33
|
+
"@cortexkit/aft-linux-arm64": "0.18.4",
|
|
34
|
+
"@cortexkit/aft-linux-x64": "0.18.4",
|
|
35
|
+
"@cortexkit/aft-win32-x64": "0.18.4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@mariozechner/pi-coding-agent": "*",
|