@cortexkit/aft-pi 0.49.0 → 0.49.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.
Files changed (2) hide show
  1. package/dist/index.js +136 -48
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -7952,6 +7952,7 @@ function sleep(ms) {
7952
7952
  return new Promise((resolve) => setTimeout(resolve, ms));
7953
7953
  }
7954
7954
  // ../aft-bridge/dist/bash-hints.js
7955
+ import * as fs from "node:fs";
7955
7956
  import * as os from "node:os";
7956
7957
  import * as path from "node:path";
7957
7958
  var CONFLICT_HINT = `
@@ -7960,6 +7961,7 @@ var CONFLICT_HINT = `
7960
7961
  var GREP_SEARCH_AFT_SEARCH_HINT = "DO NOT search code by running grep/rg in bash — it is unindexed, unranked, and serial. Use the `aft_search` tool instead (it auto-routes concepts, identifiers, regex, and literals).";
7961
7962
  var GREP_SEARCH_GREP_HINT = "DO NOT search code by running grep/rg in bash — it is unindexed, unranked, and serial. Use the `grep` tool instead (indexed and ranked).";
7962
7963
  var GREP_SEARCH_HINT_PREFIX = "DO NOT search code by running grep/rg in bash —";
7964
+ var GREP_SEARCH_FRESHNESS_WINDOW_MS = 60000;
7963
7965
  function maybeAppendConflictsHint(output) {
7964
7966
  if (!output.includes("Automatic merge failed; fix conflicts"))
7965
7967
  return output;
@@ -8031,12 +8033,19 @@ function shouldSuppressGrepSearchHint(command, projectRoot) {
8031
8033
  const operands = collectPathOperands(firstStage, firstToken.end);
8032
8034
  if (operands.length === 0)
8033
8035
  return false;
8036
+ let sawInProjectOperand = false;
8034
8037
  for (const operand of operands) {
8035
8038
  if (isDynamicPathOperand(operand))
8036
8039
  continue;
8037
- if (isPathInsideProject(resolvedRoot, effectiveCwd, operand))
8038
- return false;
8040
+ const resolvedOperand = resolvePathOperand(effectiveCwd, operand);
8041
+ if (!isPathInsideProject(resolvedRoot, effectiveCwd, operand))
8042
+ continue;
8043
+ sawInProjectOperand = true;
8044
+ if (shouldSuppressResolvedPath(resolvedOperand))
8045
+ return true;
8039
8046
  }
8047
+ if (sawInProjectOperand)
8048
+ return false;
8040
8049
  }
8041
8050
  return sawCodeSearchStatement;
8042
8051
  }
@@ -8135,6 +8144,17 @@ function isPathInsideProject(resolvedRoot, baseCwd, operand) {
8135
8144
  const rel = path.relative(resolvedRoot, resolved);
8136
8145
  return rel === "" || !rel.startsWith("..") && !path.isAbsolute(rel);
8137
8146
  }
8147
+ function shouldSuppressResolvedPath(resolved) {
8148
+ try {
8149
+ const stats = fs.statSync(resolved);
8150
+ if (stats.isFile())
8151
+ return true;
8152
+ const ageMs = Date.now() - stats.mtimeMs;
8153
+ return ageMs >= 0 && ageMs < GREP_SEARCH_FRESHNESS_WINDOW_MS;
8154
+ } catch {
8155
+ return false;
8156
+ }
8157
+ }
8138
8158
  function splitTopLevelStatements(command) {
8139
8159
  const statements = [];
8140
8160
  let start = 0;
@@ -9736,7 +9756,7 @@ function formatDroppedKeyWarnings(dropped) {
9736
9756
  // ../aft-bridge/dist/downloader.js
9737
9757
  import { spawnSync } from "node:child_process";
9738
9758
  import { createHash as createHash2, randomUUID } from "node:crypto";
9739
- import { chmodSync, closeSync, copyFileSync, createWriteStream, existsSync as existsSync2, mkdirSync, openSync, readFileSync as readFileSync3, renameSync, rmSync, statSync, unlinkSync, writeSync } from "node:fs";
9759
+ import { chmodSync, closeSync, copyFileSync, createWriteStream, existsSync as existsSync2, mkdirSync, openSync, readFileSync as readFileSync3, renameSync, rmSync, statSync as statSync2, unlinkSync, writeSync } from "node:fs";
9740
9760
  import { homedir as homedir4 } from "node:os";
9741
9761
  import { join as join3 } from "node:path";
9742
9762
  import { Readable } from "node:stream";
@@ -9769,7 +9789,7 @@ function readBinaryVersion(binaryPath) {
9769
9789
  const result = spawnSync(binaryPath, ["--version"], {
9770
9790
  encoding: "utf-8",
9771
9791
  stdio: ["pipe", "pipe", "pipe"],
9772
- timeout: 5000
9792
+ timeout: 60000
9773
9793
  });
9774
9794
  const stdoutVersion = result.stdout?.trim();
9775
9795
  const stderrVersion = result.stderr?.trim();
@@ -9974,7 +9994,7 @@ async function acquireDownloadLock(lockPath) {
9974
9994
  if (code !== "EEXIST")
9975
9995
  throw err;
9976
9996
  try {
9977
- const ageMs = Date.now() - statSync(lockPath).mtimeMs;
9997
+ const ageMs = Date.now() - statSync2(lockPath).mtimeMs;
9978
9998
  if (ageMs > DOWNLOAD_LOCK_STALE_MS) {
9979
9999
  rmSync(lockPath, { force: true });
9980
10000
  continue;
@@ -10217,7 +10237,7 @@ function stripJsoncSymbols(value) {
10217
10237
  }
10218
10238
  // ../aft-bridge/dist/migration.js
10219
10239
  import { spawnSync as spawnSync2 } from "node:child_process";
10220
- import { closeSync as closeSync3, existsSync as existsSync5, mkdirSync as mkdirSync4, openSync as openSync3, readFileSync as readFileSync5, renameSync as renameSync4, rmSync as rmSync2, statSync as statSync2, unlinkSync as unlinkSync3, writeFileSync as writeFileSync2 } from "node:fs";
10240
+ import { closeSync as closeSync3, existsSync as existsSync5, mkdirSync as mkdirSync4, openSync as openSync3, readFileSync as readFileSync5, renameSync as renameSync4, rmSync as rmSync2, statSync as statSync3, unlinkSync as unlinkSync3, writeFileSync as writeFileSync2 } from "node:fs";
10221
10241
  import { homedir as homedir8, tmpdir } from "node:os";
10222
10242
  import { basename, dirname as dirname3, join as join7, resolve as resolve4 } from "node:path";
10223
10243
 
@@ -10717,7 +10737,7 @@ function acquireConfigMigrationLock(lockDir) {
10717
10737
  if (code !== "EEXIST")
10718
10738
  throw err;
10719
10739
  try {
10720
- const ageMs = Date.now() - statSync2(lockDir).mtimeMs;
10740
+ const ageMs = Date.now() - statSync3(lockDir).mtimeMs;
10721
10741
  if (ageMs > 60000) {
10722
10742
  rmSync2(lockDir, { recursive: true, force: true });
10723
10743
  continue;
@@ -11003,7 +11023,7 @@ async function ensureStorageMigrated(opts) {
11003
11023
  throw new Error(`AFT storage migration failed (${detail}). ` + `Harness: ${opts.harness}. Legacy: ${legacyRoot}. Target: ${newRoot}. ` + `See log: ${logPath}. ` + `Plugin load aborted to prevent legacy/new state divergence.` + (stderrTail ? ` Stderr tail: ${stderrTail}` : "") + (stdoutTail ? ` Stdout tail: ${stdoutTail}` : ""));
11004
11024
  }
11005
11025
  // ../aft-bridge/dist/npm-resolver.js
11006
- import { readdirSync, statSync as statSync3 } from "node:fs";
11026
+ import { readdirSync, statSync as statSync4 } from "node:fs";
11007
11027
  import { homedir as homedir9 } from "node:os";
11008
11028
  import { delimiter, dirname as dirname4, isAbsolute as isAbsolute3, join as join8 } from "node:path";
11009
11029
  function defaultDeps() {
@@ -11019,7 +11039,7 @@ function npmBinaryName(platform) {
11019
11039
  }
11020
11040
  function isFile(p) {
11021
11041
  try {
11022
- return statSync3(p).isFile();
11042
+ return statSync4(p).isFile();
11023
11043
  } catch {
11024
11044
  return false;
11025
11045
  }
@@ -11119,7 +11139,7 @@ function npmSpawnEnv(resolved, baseEnv = process.env) {
11119
11139
  // ../aft-bridge/dist/onnx-runtime.js
11120
11140
  import { execFileSync } from "node:child_process";
11121
11141
  import { createHash as createHash3 } from "node:crypto";
11122
- import { chmodSync as chmodSync3, closeSync as closeSync4, copyFileSync as copyFileSync3, createWriteStream as createWriteStream2, existsSync as existsSync6, lstatSync, mkdirSync as mkdirSync5, openSync as openSync4, readdirSync as readdirSync2, readFileSync as readFileSync6, readlinkSync, realpathSync, rmSync as rmSync3, statSync as statSync4, symlinkSync, unlinkSync as unlinkSync4, writeFileSync as writeFileSync3 } from "node:fs";
11142
+ import { chmodSync as chmodSync3, closeSync as closeSync4, copyFileSync as copyFileSync3, createWriteStream as createWriteStream2, existsSync as existsSync6, lstatSync, mkdirSync as mkdirSync5, openSync as openSync4, readdirSync as readdirSync2, readFileSync as readFileSync6, readlinkSync, realpathSync, rmSync as rmSync3, statSync as statSync5, symlinkSync, unlinkSync as unlinkSync4, writeFileSync as writeFileSync3 } from "node:fs";
11123
11143
  import { basename as basename2, dirname as dirname5, isAbsolute as isAbsolute4, join as join9, relative as relative2, resolve as resolve5, win32 } from "node:path";
11124
11144
  import { Readable as Readable2 } from "node:stream";
11125
11145
  import { pipeline as pipeline2 } from "node:stream/promises";
@@ -11249,7 +11269,7 @@ function cleanupAbandonedStagingDirs(onnxBaseDir) {
11249
11269
  abandoned = true;
11250
11270
  } else {
11251
11271
  try {
11252
- const ageMs = Date.now() - statSync4(stagingDir).mtimeMs;
11272
+ const ageMs = Date.now() - statSync5(stagingDir).mtimeMs;
11253
11273
  abandoned = ageMs > STALE_LOCK_MS;
11254
11274
  } catch {
11255
11275
  abandoned = true;
@@ -11682,7 +11702,7 @@ function writeOnnxInstalledMeta(installDir, version, sha256, archiveSha256) {
11682
11702
  function readOnnxInstalledMeta(installDir) {
11683
11703
  const path2 = join9(installDir, ONNX_INSTALLED_META_FILE);
11684
11704
  try {
11685
- if (!statSync4(path2).isFile())
11705
+ if (!statSync5(path2).isFile())
11686
11706
  return null;
11687
11707
  const raw = readFileSync6(path2, "utf8");
11688
11708
  const parsed = JSON.parse(raw);
@@ -11733,7 +11753,7 @@ ${new Date().toISOString()}
11733
11753
  const parsed = Number.parseInt(firstLine, 10);
11734
11754
  if (Number.isFinite(parsed) && parsed > 0)
11735
11755
  owningPid = parsed;
11736
- lockMtimeMs = statSync4(lockPath).mtimeMs;
11756
+ lockMtimeMs = statSync5(lockPath).mtimeMs;
11737
11757
  } catch {
11738
11758
  return tryClaim();
11739
11759
  }
@@ -12005,11 +12025,14 @@ function prepareCanonicalEditArguments(toolName, rawArguments) {
12005
12025
  throw new InvalidRequestError(formatUnknownKeys(unknownRootKeys));
12006
12026
  }
12007
12027
  const modes = editModesPresent(record);
12028
+ if (hasOrphanedSymbolContent(record)) {
12029
+ throw new InvalidRequestError("edit: 'content' requires a non-empty string 'symbol' when symbol mode is selected");
12030
+ }
12008
12031
  if (modes.length > 1) {
12009
- throw new InvalidRequestError(`edit: conflicting modes: ${modes.join(", ")}`);
12032
+ throw new InvalidRequestError(`edit: conflicting modes: ${modes.join(", ")}. ` + OMIT_OPTIONAL_FIELDS_STEERING);
12010
12033
  }
12011
12034
  if (modes.length === 0) {
12012
- throw new InvalidRequestError("edit: exactly one of `appendContent`, `edits`, or `symbol` plus `content` is required");
12035
+ throw new InvalidRequestError("edit: exactly one of `appendContent`, `edits`, or `symbol` plus `content` is required. " + OMIT_OPTIONAL_FIELDS_STEERING);
12013
12036
  }
12014
12037
  const mode = modes[0];
12015
12038
  if (mode === "appendContent") {
@@ -12074,18 +12097,83 @@ function formatUnknownKeys(keys) {
12074
12097
  return `Unrecognized keys: ${keys.map((key) => `"${key}"`).join(", ")}`;
12075
12098
  }
12076
12099
  function editModesPresent(record) {
12100
+ const hasAppendContent = isNonEmptyString(record.appendContent);
12101
+ if (!hasAppendContent)
12102
+ delete record.appendContent;
12103
+ const hasEdits = normalizeEditArraySentinels(record);
12104
+ if (!hasEdits)
12105
+ delete record.edits;
12106
+ const hasSymbol = isNonEmptyString(record.symbol);
12107
+ if (!hasSymbol) {
12108
+ delete record.symbol;
12109
+ if (record.content === null || record.content === "")
12110
+ delete record.content;
12111
+ } else if (record.content === null) {
12112
+ delete record.content;
12113
+ }
12114
+ const hasSingleEdit = isNonEmptyString(record.oldString);
12115
+ if (!hasSingleEdit) {
12116
+ for (const key of EDIT_ROOT_COMPATIBILITY_KEYS)
12117
+ delete record[key];
12118
+ } else {
12119
+ for (const key of ["newString", "replaceAll", "occurrence"]) {
12120
+ if (record[key] === null)
12121
+ delete record[key];
12122
+ }
12123
+ }
12077
12124
  const modes = [];
12078
- if (hasOwn(record, "appendContent"))
12125
+ if (hasAppendContent)
12079
12126
  modes.push("appendContent");
12080
- if (hasOwn(record, "edits"))
12127
+ if (hasEdits)
12081
12128
  modes.push("edits");
12082
- if (hasOwn(record, "symbol") || hasOwn(record, "content"))
12129
+ if (hasSymbol)
12083
12130
  modes.push("symbol/content");
12084
- if (["oldString", "newString", "replaceAll", "occurrence"].some((key) => hasOwn(record, key))) {
12131
+ if (hasSingleEdit)
12085
12132
  modes.push("oldString/newString");
12086
- }
12087
12133
  return modes;
12088
12134
  }
12135
+ function isNonEmptyString(value) {
12136
+ return typeof value === "string" && value.length > 0;
12137
+ }
12138
+ var OMIT_OPTIONAL_FIELDS_STEERING = "Omit unused optional fields entirely; do not send empty strings or empty arrays for them.";
12139
+ function isEditSentinelItem(item) {
12140
+ if (!item || typeof item !== "object" || Array.isArray(item))
12141
+ return false;
12142
+ const record = item;
12143
+ if (record.oldString !== "")
12144
+ return false;
12145
+ const newStringEmpty = !hasOwn(record, "newString") || record.newString === "" || record.newString === null;
12146
+ if (!newStringEmpty)
12147
+ return false;
12148
+ return !hasOwn(record, "content") || record.content === "" || record.content === null;
12149
+ }
12150
+ function normalizeEditArraySentinels(record) {
12151
+ const value = record.edits;
12152
+ if (Array.isArray(value)) {
12153
+ const survivors = value.filter((item) => !isEditSentinelItem(item));
12154
+ if (survivors.length === 0)
12155
+ return false;
12156
+ record.edits = survivors;
12157
+ return true;
12158
+ }
12159
+ if (typeof value !== "string" || value.length === 0)
12160
+ return false;
12161
+ try {
12162
+ const parsed = JSON.parse(value);
12163
+ if (!Array.isArray(parsed))
12164
+ return true;
12165
+ const survivors = parsed.filter((item) => !isEditSentinelItem(item));
12166
+ if (survivors.length === 0)
12167
+ return false;
12168
+ record.edits = survivors;
12169
+ return true;
12170
+ } catch {
12171
+ return true;
12172
+ }
12173
+ }
12174
+ function hasOrphanedSymbolContent(record) {
12175
+ return isNonEmptyString(record.content) && !isNonEmptyString(record.symbol);
12176
+ }
12089
12177
  function parseEditArray(value) {
12090
12178
  if (typeof value === "string") {
12091
12179
  let parsed;
@@ -12684,7 +12772,7 @@ class RevivableProjectTransport {
12684
12772
  }
12685
12773
  }
12686
12774
  // ../../node_modules/.bun/@cortexkit+subc-client@0.5.0/node_modules/@cortexkit/subc-client/dist/client.js
12687
- import { promises as fs2 } from "node:fs";
12775
+ import { promises as fs3 } from "node:fs";
12688
12776
  import { debuglog } from "node:util";
12689
12777
 
12690
12778
  // ../../node_modules/.bun/@cortexkit+subc-client@0.5.0/node_modules/@cortexkit/subc-client/dist/auth.js
@@ -12752,7 +12840,7 @@ async function authenticateClient(sock, conn, deadlineMs) {
12752
12840
  }
12753
12841
 
12754
12842
  // ../../node_modules/.bun/@cortexkit+subc-client@0.5.0/node_modules/@cortexkit/subc-client/dist/connection-file.js
12755
- import { promises as fs } from "node:fs";
12843
+ import { promises as fs2 } from "node:fs";
12756
12844
 
12757
12845
  // ../../node_modules/.bun/@cortexkit+subc-client@0.5.0/node_modules/@cortexkit/subc-client/dist/envelope.js
12758
12846
  var PROTOCOL_VERSION = 2;
@@ -12920,7 +13008,7 @@ function validate(info) {
12920
13008
  async function verifyOwnerOnly(path2) {
12921
13009
  if (process.platform === "win32")
12922
13010
  return;
12923
- const stat2 = await fs.stat(path2);
13011
+ const stat2 = await fs2.stat(path2);
12924
13012
  const mode = stat2.mode & 511;
12925
13013
  if ((mode & 63) !== 0) {
12926
13014
  throw new ConnectionFileError(`connection file ${path2} has insecure permissions 0o${mode.toString(8)}; expected owner-only 0600`);
@@ -12928,7 +13016,7 @@ async function verifyOwnerOnly(path2) {
12928
13016
  }
12929
13017
  async function readConnectionFile(path2) {
12930
13018
  await verifyOwnerOnly(path2);
12931
- const raw = await fs.readFile(path2, "utf8");
13019
+ const raw = await fs2.readFile(path2, "utf8");
12932
13020
  let parsed;
12933
13021
  try {
12934
13022
  parsed = JSON.parse(raw);
@@ -13991,7 +14079,7 @@ function isRetryableRouteOpenCode(code) {
13991
14079
  }
13992
14080
  async function connectionFileExists(path2) {
13993
14081
  try {
13994
- await fs2.access(path2);
14082
+ await fs3.access(path2);
13995
14083
  return true;
13996
14084
  } catch {
13997
14085
  return false;
@@ -16218,7 +16306,7 @@ import {
16218
16306
  // package.json
16219
16307
  var package_default = {
16220
16308
  name: "@cortexkit/aft-pi",
16221
- version: "0.49.0",
16309
+ version: "0.49.1",
16222
16310
  type: "module",
16223
16311
  description: "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
16224
16312
  main: "dist/index.js",
@@ -16241,19 +16329,19 @@ var package_default = {
16241
16329
  "test:unit": "bun test src/__tests__ --path-ignore-patterns 'src/__tests__/e2e/**'"
16242
16330
  },
16243
16331
  dependencies: {
16244
- "@cortexkit/aft-bridge": "0.49.0",
16332
+ "@cortexkit/aft-bridge": "0.49.1",
16245
16333
  "comment-json": "^5.0.0",
16246
16334
  diff: "^8.0.4",
16247
16335
  typebox: "1.1.38",
16248
16336
  zod: "^4.4.3"
16249
16337
  },
16250
16338
  optionalDependencies: {
16251
- "@cortexkit/aft-darwin-arm64": "0.49.0",
16252
- "@cortexkit/aft-darwin-x64": "0.49.0",
16253
- "@cortexkit/aft-linux-arm64": "0.49.0",
16254
- "@cortexkit/aft-linux-x64": "0.49.0",
16255
- "@cortexkit/aft-win32-arm64": "0.49.0",
16256
- "@cortexkit/aft-win32-x64": "0.49.0"
16339
+ "@cortexkit/aft-darwin-arm64": "0.49.1",
16340
+ "@cortexkit/aft-darwin-x64": "0.49.1",
16341
+ "@cortexkit/aft-linux-arm64": "0.49.1",
16342
+ "@cortexkit/aft-linux-x64": "0.49.1",
16343
+ "@cortexkit/aft-win32-arm64": "0.49.1",
16344
+ "@cortexkit/aft-win32-x64": "0.49.1"
16257
16345
  },
16258
16346
  devDependencies: {
16259
16347
  "@earendil-works/pi-coding-agent": "^0.80.2",
@@ -31791,7 +31879,7 @@ import {
31791
31879
  readFileSync as readFileSync10,
31792
31880
  renameSync as renameSync6,
31793
31881
  rmSync as rmSync4,
31794
- statSync as statSync6,
31882
+ statSync as statSync7,
31795
31883
  writeFileSync as writeFileSync6
31796
31884
  } from "node:fs";
31797
31885
  import { join as join13 } from "node:path";
@@ -31802,7 +31890,7 @@ import {
31802
31890
  mkdirSync as mkdirSync6,
31803
31891
  openSync as openSync5,
31804
31892
  readFileSync as readFileSync8,
31805
- statSync as statSync5,
31893
+ statSync as statSync6,
31806
31894
  unlinkSync as unlinkSync6,
31807
31895
  writeFileSync as writeFileSync5
31808
31896
  } from "node:fs";
@@ -31835,7 +31923,7 @@ function lspBinDir(npmPackage) {
31835
31923
  function isInstalled(npmPackage, binary) {
31836
31924
  for (const candidate of lspBinaryCandidates(binary)) {
31837
31925
  try {
31838
- if (statSync5(join11(lspBinDir(npmPackage), candidate)).isFile())
31926
+ if (statSync6(join11(lspBinDir(npmPackage), candidate)).isFile())
31839
31927
  return true;
31840
31928
  } catch {}
31841
31929
  }
@@ -31863,7 +31951,7 @@ function writeInstalledMetaIn(installDir, version2, sha256) {
31863
31951
  function readInstalledMetaIn(installDir) {
31864
31952
  const path2 = join11(installDir, INSTALLED_META_FILE);
31865
31953
  try {
31866
- if (!statSync5(path2).isFile())
31954
+ if (!statSync6(path2).isFile())
31867
31955
  return null;
31868
31956
  const raw = readFileSync8(path2, "utf8");
31869
31957
  const parsed = JSON.parse(raw);
@@ -31920,7 +32008,7 @@ ${new Date().toISOString()}
31920
32008
  const parsed = Number.parseInt(firstLine, 10);
31921
32009
  if (Number.isFinite(parsed) && parsed > 0)
31922
32010
  owningPid = parsed;
31923
- lockMtimeMs = statSync5(lock).mtimeMs;
32011
+ lockMtimeMs = statSync6(lock).mtimeMs;
31924
32012
  } catch {
31925
32013
  return tryClaim();
31926
32014
  }
@@ -32525,7 +32613,7 @@ function hashInstalledBinary(spec) {
32525
32613
  let pathToHash = null;
32526
32614
  for (const p of candidates) {
32527
32615
  try {
32528
- if (statSync6(p).isFile()) {
32616
+ if (statSync7(p).isFile()) {
32529
32617
  pathToHash = p;
32530
32618
  break;
32531
32619
  }
@@ -32551,7 +32639,7 @@ function installedBinaryPath(spec) {
32551
32639
  ] : [lspBinaryPath(spec.npm, spec.binary)];
32552
32640
  for (const candidate of candidates) {
32553
32641
  try {
32554
- if (statSync6(candidate).isFile())
32642
+ if (statSync7(candidate).isFile())
32555
32643
  return candidate;
32556
32644
  } catch {}
32557
32645
  }
@@ -32662,7 +32750,7 @@ import {
32662
32750
  realpathSync as realpathSync3,
32663
32751
  renameSync as renameSync7,
32664
32752
  rmSync as rmSync5,
32665
- statSync as statSync7,
32753
+ statSync as statSync8,
32666
32754
  unlinkSync as unlinkSync7,
32667
32755
  writeFileSync as writeFileSync7
32668
32756
  } from "node:fs";
@@ -32775,7 +32863,7 @@ function ghBinaryPath(spec, platform) {
32775
32863
  function isGithubInstalled(spec, platform) {
32776
32864
  for (const candidate of ghBinaryCandidates(spec, platform)) {
32777
32865
  try {
32778
- if (statSync7(join14(ghBinDir(spec), candidate)).isFile())
32866
+ if (statSync8(join14(ghBinDir(spec), candidate)).isFile())
32779
32867
  return true;
32780
32868
  } catch {}
32781
32869
  }
@@ -32789,7 +32877,7 @@ function ghBinaryCandidates(spec, platform) {
32789
32877
  function readGithubInstalledMetaIn(installDir) {
32790
32878
  try {
32791
32879
  const path2 = join14(installDir, INSTALLED_META_FILE2);
32792
- if (!statSync7(path2).isFile())
32880
+ if (!statSync8(path2).isFile())
32793
32881
  return null;
32794
32882
  const parsed = JSON.parse(readFileSync11(path2, "utf8"));
32795
32883
  if (typeof parsed.version !== "string" || parsed.version.length === 0)
@@ -33167,7 +33255,7 @@ function validateCachedGithubInstall(spec, platform) {
33167
33255
  const meta3 = readGithubInstalledMetaIn(packageDir);
33168
33256
  const binaryPath = ghBinaryCandidates(spec, platform).map((candidate) => join14(ghBinDir(spec), candidate)).find((candidate) => {
33169
33257
  try {
33170
- return statSync7(candidate).isFile();
33258
+ return statSync8(candidate).isFile();
33171
33259
  } catch {
33172
33260
  return false;
33173
33261
  }
@@ -37363,11 +37451,11 @@ var PLUGIN_VERSION = (() => {
37363
37451
  return "0.0.0";
37364
37452
  }
37365
37453
  })();
37366
- var ANNOUNCEMENT_VERSION = "0.49.0";
37454
+ var ANNOUNCEMENT_VERSION = "0.49.1";
37367
37455
  var ANNOUNCEMENT_FEATURES = [
37368
- "One unified tool surface: every tool now takes `path` (old spellings keep working), `edit` has one calling shape, and `occurrence` is 1-based. Fewer ways for models to get a call wrong; prompt caches re-warm once after this upgrade.",
37369
- "aft_search now routes queries itself — the hint parameter is gone, and searches that find no exact match are re-ranked by their terms instead of returning nothing.",
37370
- "Corporate and custom certificate authorities now work: HTTPS requests verify through the OS trust store (Keychain, Windows certificate store, SSL_CERT_FILE on Linux)."
37456
+ "Windows: language servers spawn again under extended-length paths, config edits reach running servers, and dead-code/diagnostics results no longer silently drop — one canonical path form across the LSP and inspect surface.",
37457
+ "Faster answers under load: completed bash commands respond immediately instead of waiting behind background maintenance (thanks @hheei), and chained commands like `cargo test && ...` keep every command's output.",
37458
+ "Permission rules with absolute paths outside the project root now match (thanks @iceteaSA), and slow embedding providers get a clear timeout message naming the setting that raises the budget."
37371
37459
  ];
37372
37460
  var ANNOUNCEMENT_FOOTER = "Join us on Discord: https://discord.gg/DSa65w8wuf";
37373
37461
  var pendingEagerWarnings = new Map;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft-pi",
3
- "version": "0.49.0",
3
+ "version": "0.49.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.49.0",
26
+ "@cortexkit/aft-bridge": "0.49.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.49.0",
34
- "@cortexkit/aft-darwin-x64": "0.49.0",
35
- "@cortexkit/aft-linux-arm64": "0.49.0",
36
- "@cortexkit/aft-linux-x64": "0.49.0",
37
- "@cortexkit/aft-win32-arm64": "0.49.0",
38
- "@cortexkit/aft-win32-x64": "0.49.0"
33
+ "@cortexkit/aft-darwin-arm64": "0.49.1",
34
+ "@cortexkit/aft-darwin-x64": "0.49.1",
35
+ "@cortexkit/aft-linux-arm64": "0.49.1",
36
+ "@cortexkit/aft-linux-x64": "0.49.1",
37
+ "@cortexkit/aft-win32-arm64": "0.49.1",
38
+ "@cortexkit/aft-win32-x64": "0.49.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@earendil-works/pi-coding-agent": "^0.80.2",