@cortexkit/aft-pi 0.47.0 → 0.47.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/dist/index.js +69 -25
- package/dist/tools/hoisted.d.ts +2 -1
- package/dist/tools/hoisted.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -10311,6 +10311,49 @@ function markAnnouncementSeen(storageRoot, harness, currentVersion) {
|
|
|
10311
10311
|
writeFileSync(versionFile, currentVersion);
|
|
10312
10312
|
} catch {}
|
|
10313
10313
|
}
|
|
10314
|
+
function decodeFileUrl(target) {
|
|
10315
|
+
if (!target.startsWith("file:"))
|
|
10316
|
+
return target;
|
|
10317
|
+
const rest = target.slice("file:".length);
|
|
10318
|
+
let pathPart;
|
|
10319
|
+
if (rest.startsWith("//")) {
|
|
10320
|
+
const after = rest.slice(2);
|
|
10321
|
+
const slash = after.indexOf("/");
|
|
10322
|
+
const authority = slash === -1 ? after : after.slice(0, slash);
|
|
10323
|
+
const p = slash === -1 ? "" : after.slice(slash);
|
|
10324
|
+
if (authority === "" || authority === "localhost")
|
|
10325
|
+
pathPart = p;
|
|
10326
|
+
else if (process.platform === "win32")
|
|
10327
|
+
pathPart = `//${authority}${p}`;
|
|
10328
|
+
else
|
|
10329
|
+
return target;
|
|
10330
|
+
} else if (rest.startsWith("/")) {
|
|
10331
|
+
pathPart = rest;
|
|
10332
|
+
} else {
|
|
10333
|
+
return target;
|
|
10334
|
+
}
|
|
10335
|
+
const bytes = [];
|
|
10336
|
+
for (let i = 0;i < pathPart.length; ) {
|
|
10337
|
+
if (pathPart[i] === "%" && i + 2 < pathPart.length) {
|
|
10338
|
+
const hex = pathPart.slice(i + 1, i + 3);
|
|
10339
|
+
if (/^[0-9a-fA-F]{2}$/.test(hex)) {
|
|
10340
|
+
bytes.push(Number.parseInt(hex, 16));
|
|
10341
|
+
i += 3;
|
|
10342
|
+
continue;
|
|
10343
|
+
}
|
|
10344
|
+
}
|
|
10345
|
+
const cp = pathPart.codePointAt(i);
|
|
10346
|
+
const ch = String.fromCodePoint(cp);
|
|
10347
|
+
for (const b of Buffer.from(ch, "utf8"))
|
|
10348
|
+
bytes.push(b);
|
|
10349
|
+
i += ch.length;
|
|
10350
|
+
}
|
|
10351
|
+
const decoded = Buffer.from(bytes).toString("utf8");
|
|
10352
|
+
if (process.platform === "win32" && /^\/[A-Za-z]:/.test(decoded)) {
|
|
10353
|
+
return decoded.slice(1);
|
|
10354
|
+
}
|
|
10355
|
+
return decoded;
|
|
10356
|
+
}
|
|
10314
10357
|
|
|
10315
10358
|
// ../aft-bridge/dist/resolver.js
|
|
10316
10359
|
import { execSync } from "node:child_process";
|
|
@@ -15748,7 +15791,7 @@ import {
|
|
|
15748
15791
|
// package.json
|
|
15749
15792
|
var package_default = {
|
|
15750
15793
|
name: "@cortexkit/aft-pi",
|
|
15751
|
-
version: "0.47.
|
|
15794
|
+
version: "0.47.1",
|
|
15752
15795
|
type: "module",
|
|
15753
15796
|
description: "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
|
|
15754
15797
|
main: "dist/index.js",
|
|
@@ -15771,19 +15814,19 @@ var package_default = {
|
|
|
15771
15814
|
"test:unit": "bun test src/__tests__ --path-ignore-patterns 'src/__tests__/e2e/**'"
|
|
15772
15815
|
},
|
|
15773
15816
|
dependencies: {
|
|
15774
|
-
"@cortexkit/aft-bridge": "0.47.
|
|
15817
|
+
"@cortexkit/aft-bridge": "0.47.1",
|
|
15775
15818
|
"comment-json": "^5.0.0",
|
|
15776
15819
|
diff: "^8.0.4",
|
|
15777
15820
|
typebox: "1.1.38",
|
|
15778
15821
|
zod: "^4.4.3"
|
|
15779
15822
|
},
|
|
15780
15823
|
optionalDependencies: {
|
|
15781
|
-
"@cortexkit/aft-darwin-arm64": "0.47.
|
|
15782
|
-
"@cortexkit/aft-darwin-x64": "0.47.
|
|
15783
|
-
"@cortexkit/aft-linux-arm64": "0.47.
|
|
15784
|
-
"@cortexkit/aft-linux-x64": "0.47.
|
|
15785
|
-
"@cortexkit/aft-win32-arm64": "0.47.
|
|
15786
|
-
"@cortexkit/aft-win32-x64": "0.47.
|
|
15824
|
+
"@cortexkit/aft-darwin-arm64": "0.47.1",
|
|
15825
|
+
"@cortexkit/aft-darwin-x64": "0.47.1",
|
|
15826
|
+
"@cortexkit/aft-linux-arm64": "0.47.1",
|
|
15827
|
+
"@cortexkit/aft-linux-x64": "0.47.1",
|
|
15828
|
+
"@cortexkit/aft-win32-arm64": "0.47.1",
|
|
15829
|
+
"@cortexkit/aft-win32-x64": "0.47.1"
|
|
15787
15830
|
},
|
|
15788
15831
|
devDependencies: {
|
|
15789
15832
|
"@earendil-works/pi-coding-agent": "^0.80.2",
|
|
@@ -33362,18 +33405,19 @@ function containsPath(parent, child) {
|
|
|
33362
33405
|
const rel = relative4(parent, child);
|
|
33363
33406
|
return rel === "" || !rel.startsWith("..") && !isAbsolute6(rel);
|
|
33364
33407
|
}
|
|
33365
|
-
function
|
|
33366
|
-
|
|
33367
|
-
|
|
33368
|
-
|
|
33408
|
+
function normalizePathInput(path2) {
|
|
33409
|
+
const decoded = decodeFileUrl(path2);
|
|
33410
|
+
if (!decoded || !decoded.startsWith("~"))
|
|
33411
|
+
return decoded;
|
|
33412
|
+
if (decoded === "~")
|
|
33369
33413
|
return homedir13();
|
|
33370
|
-
if (
|
|
33371
|
-
return resolve8(homedir13(),
|
|
33414
|
+
if (decoded.startsWith(`~${sep}`) || decoded.startsWith("~/")) {
|
|
33415
|
+
return resolve8(homedir13(), decoded.slice(2));
|
|
33372
33416
|
}
|
|
33373
|
-
return
|
|
33417
|
+
return decoded;
|
|
33374
33418
|
}
|
|
33375
33419
|
function absoluteSearchPath(cwd, target) {
|
|
33376
|
-
const expanded =
|
|
33420
|
+
const expanded = normalizePathInput(target);
|
|
33377
33421
|
return isAbsolute6(expanded) ? expanded : resolve8(cwd, expanded);
|
|
33378
33422
|
}
|
|
33379
33423
|
async function searchPathExists(cwd, target) {
|
|
@@ -33429,7 +33473,7 @@ ${note}` : note;
|
|
|
33429
33473
|
async function assertExternalDirectoryPermission(extCtx, target, options = {}) {
|
|
33430
33474
|
if (!target)
|
|
33431
33475
|
return;
|
|
33432
|
-
const expanded =
|
|
33476
|
+
const expanded = normalizePathInput(target);
|
|
33433
33477
|
const absoluteTarget = isAbsolute6(expanded) ? expanded : resolve8(extCtx.cwd, expanded);
|
|
33434
33478
|
if (containsPath(extCtx.cwd, absoluteTarget))
|
|
33435
33479
|
return;
|
|
@@ -33899,7 +33943,7 @@ function shortenPath2(path2) {
|
|
|
33899
33943
|
return path2;
|
|
33900
33944
|
}
|
|
33901
33945
|
async function resolvePathArg(cwd, path2) {
|
|
33902
|
-
const expanded =
|
|
33946
|
+
const expanded = normalizePathInput(path2);
|
|
33903
33947
|
const abs = absoluteSearchPath(cwd, path2);
|
|
33904
33948
|
try {
|
|
33905
33949
|
await stat2(abs);
|
|
@@ -36736,14 +36780,14 @@ var PLUGIN_VERSION = (() => {
|
|
|
36736
36780
|
return "0.0.0";
|
|
36737
36781
|
}
|
|
36738
36782
|
})();
|
|
36739
|
-
var ANNOUNCEMENT_VERSION = "0.47.
|
|
36783
|
+
var ANNOUNCEMENT_VERSION = "0.47.1";
|
|
36740
36784
|
var ANNOUNCEMENT_FEATURES = [
|
|
36741
|
-
"
|
|
36742
|
-
"
|
|
36743
|
-
"
|
|
36744
|
-
"
|
|
36745
|
-
"
|
|
36746
|
-
"
|
|
36785
|
+
"Fixed: apply_patch could delete a file when a patch moved it to its own path — same-path moves are now plain in-place updates.",
|
|
36786
|
+
"Fixed: moving a symlink across filesystems turned it into a regular file; the link itself is now preserved.",
|
|
36787
|
+
"Fixed: a failed delete could leave a phantom undo entry, so the next undo reverted the wrong operation.",
|
|
36788
|
+
"Fixed: a crashed process could leave a stale lock that permanently disabled update checks.",
|
|
36789
|
+
"Paths can be given as file: URLs (#162), and reading your own background task's output files no longer prompts for permission (#161).",
|
|
36790
|
+
"Faster hot paths: warm symbol lookups skip re-hashing unchanged files, search reads each posting list once per query, snippets stream only the needed lines, and edits no longer copy the whole undo history per mutation."
|
|
36747
36791
|
];
|
|
36748
36792
|
var ANNOUNCEMENT_FOOTER = "Join us on Discord: https://discord.gg/DSa65w8wuf";
|
|
36749
36793
|
var ALL_ONLY_TOOLS = new Set(["aft_callgraph", "aft_delete", "aft_move", "aft_refactor"]);
|
package/dist/tools/hoisted.d.ts
CHANGED
|
@@ -112,7 +112,8 @@ export declare function registerHoistedTools(pi: ExtensionAPI, ctx: PluginContex
|
|
|
112
112
|
export declare function buildMutationResult(response: Record<string, unknown>): AgentToolResult<FileMutationDetails>;
|
|
113
113
|
export declare function renderMutationCall(toolName: "write" | "edit", filePath: string | undefined, theme: Theme, context: RenderContextLike): Text;
|
|
114
114
|
export declare function renderMutationResult(result: AgentToolResult<FileMutationDetails>, theme: Theme, context: RenderContextLike): Container | Text;
|
|
115
|
-
/** Resolve a path argument to an absolute path if it exists,
|
|
115
|
+
/** Resolve a path argument to an absolute path if it exists, decoding file:
|
|
116
|
+
* URLs and expanding `~`. */
|
|
116
117
|
export declare function resolvePathArg(cwd: string, path: string): Promise<string>;
|
|
117
118
|
/**
|
|
118
119
|
* Brace-aware split for OpenCode-style include args.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAYH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EAEjB,KAAK,KAAK,EACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,SAAS,EAAE,SAAS,EAAU,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAEjF,OA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B,GACxB,IAAI,CAkQN;AAMD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,eAAe,CAAC,mBAAmB,CAAC,CAmFtC;AAuED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,OAAO,GAAG,MAAM,EAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,GACzB,IAAI,CAON;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,eAAe,CAAC,mBAAmB,CAAC,EAC5C,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,GACzB,SAAS,GAAG,IAAI,CAmDlB;AAQD;6BAC6B;AAC7B,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAS/E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CA0B3D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,mBAAmB,EAAE,OAAO,EAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,MAAM,CAER"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-pi",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.1",
|
|
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",
|
|
@@ -23,19 +23,19 @@
|
|
|
23
23
|
"test:unit": "bun test src/__tests__ --path-ignore-patterns 'src/__tests__/e2e/**'"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cortexkit/aft-bridge": "0.47.
|
|
26
|
+
"@cortexkit/aft-bridge": "0.47.1",
|
|
27
27
|
"comment-json": "^5.0.0",
|
|
28
28
|
"diff": "^8.0.4",
|
|
29
29
|
"typebox": "1.1.38",
|
|
30
30
|
"zod": "^4.4.3"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@cortexkit/aft-darwin-arm64": "0.47.
|
|
34
|
-
"@cortexkit/aft-darwin-x64": "0.47.
|
|
35
|
-
"@cortexkit/aft-linux-arm64": "0.47.
|
|
36
|
-
"@cortexkit/aft-linux-x64": "0.47.
|
|
37
|
-
"@cortexkit/aft-win32-arm64": "0.47.
|
|
38
|
-
"@cortexkit/aft-win32-x64": "0.47.
|
|
33
|
+
"@cortexkit/aft-darwin-arm64": "0.47.1",
|
|
34
|
+
"@cortexkit/aft-darwin-x64": "0.47.1",
|
|
35
|
+
"@cortexkit/aft-linux-arm64": "0.47.1",
|
|
36
|
+
"@cortexkit/aft-linux-x64": "0.47.1",
|
|
37
|
+
"@cortexkit/aft-win32-arm64": "0.47.1",
|
|
38
|
+
"@cortexkit/aft-win32-x64": "0.47.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@earendil-works/pi-coding-agent": "^0.80.2",
|