@cortexkit/aft-pi 0.43.1 → 0.45.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/config.d.ts CHANGED
@@ -49,6 +49,7 @@ export interface InspectConfig {
49
49
  duplicates?: {
50
50
  lower_bound?: number;
51
51
  discard_cost?: number;
52
+ expected_mirrors?: [string, string][];
52
53
  anonymize?: {
53
54
  variables?: boolean;
54
55
  fields?: boolean;
@@ -275,6 +276,7 @@ export declare const AftConfigSchema: z.ZodObject<{
275
276
  duplicates: z.ZodOptional<z.ZodObject<{
276
277
  lower_bound: z.ZodOptional<z.ZodNumber>;
277
278
  discard_cost: z.ZodOptional<z.ZodNumber>;
279
+ expected_mirrors: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>>;
278
280
  anonymize: z.ZodOptional<z.ZodObject<{
279
281
  variables: z.ZodOptional<z.ZodBoolean>;
280
282
  fields: z.ZodOptional<z.ZodBoolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,UAAU,EAMhB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,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,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,GACN,OAAO,GACP,IAAI,GACJ,aAAa,GACb,MAAM,CAAC;AAEX,gFAAgF;AAChF,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,mBAAmB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AAC;IAC1E,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoChB;AAED;;;;;;;;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,qBAAqB,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,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,QAAQ,EAAE,OAAO,CAAC;CACnB,CAqEA;AAED;;;;GAIG;AACH,yBAA+B,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAohB9D;AAED,eAAO,MAAM,QAAQ;;;;;;;CAOpB,CAAC"}
package/dist/index.js CHANGED
@@ -8314,6 +8314,8 @@ function resolveBashKillTimeout(modelTimeout, foregroundWaitMs) {
8314
8314
  }
8315
8315
  // ../aft-bridge/dist/bridge.js
8316
8316
  import { spawn } from "node:child_process";
8317
+ import { createHash } from "node:crypto";
8318
+ import { readFileSync } from "node:fs";
8317
8319
  import { homedir as homedir2 } from "node:os";
8318
8320
  import { join as join2 } from "node:path";
8319
8321
  import { StringDecoder } from "node:string_decoder";
@@ -8408,6 +8410,22 @@ function bashTaskIdFrom(response) {
8408
8410
  return camelCase;
8409
8411
  return;
8410
8412
  }
8413
+ function hashBinaryOnDisk(binaryPath) {
8414
+ try {
8415
+ return createHash("sha256").update(readFileSync(binaryPath)).digest("hex");
8416
+ } catch {
8417
+ return null;
8418
+ }
8419
+ }
8420
+ var binaryFingerprintReader = hashBinaryOnDisk;
8421
+ function readBinaryFingerprint(binaryPath) {
8422
+ try {
8423
+ const fingerprint = binaryFingerprintReader(binaryPath);
8424
+ return typeof fingerprint === "string" && fingerprint.length > 0 ? fingerprint : null;
8425
+ } catch {
8426
+ return null;
8427
+ }
8428
+ }
8411
8429
  function tagStderrLine(line) {
8412
8430
  return /^\[aft(-\w+)?\] /.test(line) ? line : `[aft] ${line}`;
8413
8431
  }
@@ -8503,6 +8521,9 @@ class BinaryBridge {
8503
8521
  binaryPath;
8504
8522
  cwd;
8505
8523
  process = null;
8524
+ spawnedBinaryFingerprint = null;
8525
+ lastBinaryFingerprintCheckAt = 0;
8526
+ _retiringDueToBinaryChange = false;
8506
8527
  pending = new Map;
8507
8528
  outstandingBackgroundTaskIds = new Set;
8508
8529
  nextId = 1;
@@ -8622,6 +8643,24 @@ class BinaryBridge {
8622
8643
  hasOutstandingBackgroundTasks() {
8623
8644
  return this.outstandingBackgroundTaskIds.size > 0;
8624
8645
  }
8646
+ maybeScheduleRespawnForUpdatedBinary(checkIntervalMs, now = Date.now()) {
8647
+ if (this._shuttingDown || this._retiringDueToBinaryChange || !this.isAlive())
8648
+ return false;
8649
+ if (this.pending.size > 0 || this.outstandingBackgroundTaskIds.size > 0)
8650
+ return false;
8651
+ if (now - this.lastBinaryFingerprintCheckAt < checkIntervalMs)
8652
+ return false;
8653
+ this.lastBinaryFingerprintCheckAt = now;
8654
+ const spawnedFingerprint = this.spawnedBinaryFingerprint;
8655
+ if (!spawnedFingerprint)
8656
+ return false;
8657
+ const currentFingerprint = readBinaryFingerprint(this.binaryPath);
8658
+ if (!currentFingerprint || currentFingerprint === spawnedFingerprint)
8659
+ return false;
8660
+ this._retiringDueToBinaryChange = true;
8661
+ this.logVia(`Binary contents changed on disk for ${this.binaryPath}; retiring this bridge so the next tool call respawns onto the updated binary.`);
8662
+ return true;
8663
+ }
8625
8664
  getCwd() {
8626
8665
  return this.cwd;
8627
8666
  }
@@ -8654,6 +8693,9 @@ class BinaryBridge {
8654
8693
  }
8655
8694
  async sendWithVersionMismatchRetry(command, params, options, canRetryAfterVersionSwap) {
8656
8695
  try {
8696
+ if (this._retiringDueToBinaryChange) {
8697
+ throw new Error(`${this.errorPrefix} Bridge is retiring after the on-disk binary changed; retry to respawn on the updated binary`);
8698
+ }
8657
8699
  if (this._shuttingDown) {
8658
8700
  throw new Error(`${this.errorPrefix} Bridge is shutting down, cannot send "${command}"`);
8659
8701
  }
@@ -8852,6 +8894,7 @@ class BinaryBridge {
8852
8894
  }
8853
8895
  async shutdown() {
8854
8896
  this._shuttingDown = true;
8897
+ this.spawnedBinaryFingerprint = null;
8855
8898
  this.clearRestartResetTimer();
8856
8899
  this.configureWarningClients.clear();
8857
8900
  this.rejectAllPending(new Error(`${this.errorPrefix} Bridge shutting down`));
@@ -8905,6 +8948,9 @@ class BinaryBridge {
8905
8948
  async replaceCurrentBinary(newBinaryPath) {
8906
8949
  this.binaryPath = newBinaryPath;
8907
8950
  this.configured = false;
8951
+ this.spawnedBinaryFingerprint = null;
8952
+ this.lastBinaryFingerprintCheckAt = 0;
8953
+ this._retiringDueToBinaryChange = false;
8908
8954
  this.clearRestartResetTimer();
8909
8955
  this.rejectAllPending(new Error(`${this.errorPrefix} Bridge restarting with updated binary: ${newBinaryPath}`));
8910
8956
  if (!this.process)
@@ -8930,6 +8976,7 @@ class BinaryBridge {
8930
8976
  this.spawnProcess(triggeringSessionId);
8931
8977
  }
8932
8978
  spawnProcess(triggeringSessionId) {
8979
+ this._retiringDueToBinaryChange = false;
8933
8980
  this.lastStatusBar = undefined;
8934
8981
  if (triggeringSessionId) {
8935
8982
  this.sessionLogVia(triggeringSessionId, `Spawning binary: ${this.binaryPath} (cwd: ${this.cwd})`);
@@ -9020,6 +9067,8 @@ class BinaryBridge {
9020
9067
  this.handleCrash();
9021
9068
  });
9022
9069
  this.process = child;
9070
+ this.spawnedBinaryFingerprint = readBinaryFingerprint(this.binaryPath);
9071
+ this.lastBinaryFingerprintCheckAt = Date.now();
9023
9072
  this.stdoutBuffer = "";
9024
9073
  this.stdoutReadOffset = 0;
9025
9074
  this.stderrBuffer = "";
@@ -9198,6 +9247,7 @@ class BinaryBridge {
9198
9247
  }
9199
9248
  handleTimeout(triggeringSessionId) {
9200
9249
  this.consecutiveRequestTimeouts = 0;
9250
+ this.spawnedBinaryFingerprint = null;
9201
9251
  this.rejectAllPending(new Error(`${this.errorPrefix} bridge killed during sibling timeout — request aborted`));
9202
9252
  this.outstandingBackgroundTaskIds.clear();
9203
9253
  if (this.process) {
@@ -9224,6 +9274,7 @@ class BinaryBridge {
9224
9274
  handleCrash(cause) {
9225
9275
  const proc = this.process;
9226
9276
  this.process = null;
9277
+ this.spawnedBinaryFingerprint = null;
9227
9278
  if (proc && proc.exitCode === null && !proc.killed) {
9228
9279
  proc.kill("SIGKILL");
9229
9280
  }
@@ -9235,6 +9286,10 @@ class BinaryBridge {
9235
9286
  this.errorVia(`Binary crashed (restarts: ${this._restartCount})${cause ? `: ${cause.message}` : ""}.${tail}`);
9236
9287
  }
9237
9288
  this.rejectAllPending(new Error(`${this.errorPrefix} Binary crashed (restarts: ${this._restartCount})${cause ? `: ${cause.message}` : ""} (see ${this.getLogFilePathVia()})`));
9289
+ if (this._retiringDueToBinaryChange) {
9290
+ this.logVia("Binary exited while retiring after an on-disk update; skipping auto-restart");
9291
+ return;
9292
+ }
9238
9293
  if (this._restartCount < this.maxRestarts) {
9239
9294
  const delay = 100 * 2 ** this._restartCount;
9240
9295
  this._restartCount++;
@@ -9643,13 +9698,13 @@ function isEmptyParam(value) {
9643
9698
  return false;
9644
9699
  }
9645
9700
  // ../aft-bridge/dist/config-tiers.js
9646
- import { existsSync, readFileSync } from "node:fs";
9701
+ import { existsSync, readFileSync as readFileSync2 } from "node:fs";
9647
9702
  import { resolve as resolve2 } from "node:path";
9648
9703
  function readConfigTiers(opts) {
9649
9704
  const tiers = [];
9650
9705
  try {
9651
9706
  if (existsSync(opts.userConfigPath)) {
9652
- const doc = readFileSync(opts.userConfigPath, "utf-8");
9707
+ const doc = readFileSync2(opts.userConfigPath, "utf-8");
9653
9708
  tiers.push({
9654
9709
  tier: "user",
9655
9710
  source: resolve2(opts.userConfigPath),
@@ -9659,7 +9714,7 @@ function readConfigTiers(opts) {
9659
9714
  } catch {}
9660
9715
  try {
9661
9716
  if (existsSync(opts.projectConfigPath)) {
9662
- const doc = readFileSync(opts.projectConfigPath, "utf-8");
9717
+ const doc = readFileSync2(opts.projectConfigPath, "utf-8");
9663
9718
  tiers.push({
9664
9719
  tier: "project",
9665
9720
  source: resolve2(opts.projectConfigPath),
@@ -9677,8 +9732,8 @@ function formatDroppedKeyWarnings(dropped) {
9677
9732
  }
9678
9733
  // ../aft-bridge/dist/downloader.js
9679
9734
  import { spawnSync } from "node:child_process";
9680
- import { createHash, randomUUID } from "node:crypto";
9681
- import { chmodSync, closeSync, copyFileSync, createWriteStream, existsSync as existsSync2, mkdirSync, openSync, readFileSync as readFileSync2, renameSync, rmSync, statSync, unlinkSync, writeSync } from "node:fs";
9735
+ import { createHash as createHash2, randomUUID } from "node:crypto";
9736
+ import { chmodSync, closeSync, copyFileSync, createWriteStream, existsSync as existsSync2, mkdirSync, openSync, readFileSync as readFileSync3, renameSync, rmSync, statSync, unlinkSync, writeSync } from "node:fs";
9682
9737
  import { homedir as homedir4 } from "node:os";
9683
9738
  import { join as join3 } from "node:path";
9684
9739
  import { Readable } from "node:stream";
@@ -9822,7 +9877,7 @@ async function downloadBinary(version) {
9822
9877
  warn(`Checksum verification failed: checksums.sha256 found but no entry for ${assetName}. ` + "Binary download aborted for security reasons.");
9823
9878
  return null;
9824
9879
  }
9825
- const hash = createHash("sha256");
9880
+ const hash = createHash2("sha256");
9826
9881
  let bytesWritten = 0;
9827
9882
  const guard = new TransformStream({
9828
9883
  transform(chunk, controller) {
@@ -9906,7 +9961,7 @@ async function acquireDownloadLock(lockPath) {
9906
9961
  closeSync(fd);
9907
9962
  } catch {}
9908
9963
  try {
9909
- if (readFileSync2(lockPath, "utf-8") === owner) {
9964
+ if (readFileSync3(lockPath, "utf-8") === owner) {
9910
9965
  rmSync(lockPath, { force: true });
9911
9966
  }
9912
9967
  } catch {}
@@ -10031,12 +10086,12 @@ function stripJsoncSymbols(value) {
10031
10086
  }
10032
10087
  // ../aft-bridge/dist/migration.js
10033
10088
  import { spawnSync as spawnSync2 } from "node:child_process";
10034
- import { closeSync as closeSync3, existsSync as existsSync5, mkdirSync as mkdirSync4, openSync as openSync3, readFileSync as readFileSync4, renameSync as renameSync4, rmSync as rmSync2, statSync as statSync2, unlinkSync as unlinkSync3, writeFileSync as writeFileSync2 } from "node:fs";
10089
+ 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";
10035
10090
  import { homedir as homedir7, tmpdir } from "node:os";
10036
10091
  import { basename, dirname as dirname2, join as join6, resolve as resolve4 } from "node:path";
10037
10092
 
10038
10093
  // ../aft-bridge/dist/paths.js
10039
- import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync3, renameSync as renameSync2, writeFileSync } from "node:fs";
10094
+ import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync } from "node:fs";
10040
10095
  import { homedir as homedir5 } from "node:os";
10041
10096
  import { dirname, isAbsolute as isAbsolute2, join as join4, resolve as resolve3 } from "node:path";
10042
10097
  function homeDir() {
@@ -10110,7 +10165,7 @@ function shouldShowAnnouncement(storageRoot, harness, currentVersion) {
10110
10165
  let lastVersion = "";
10111
10166
  try {
10112
10167
  if (existsSync3(versionFile)) {
10113
- lastVersion = readFileSync3(versionFile, "utf-8").trim();
10168
+ lastVersion = readFileSync4(versionFile, "utf-8").trim();
10114
10169
  }
10115
10170
  } catch {
10116
10171
  return false;
@@ -10507,7 +10562,7 @@ function atomicCopyConfigFile(sourcePath, targetPath) {
10507
10562
  let fd = null;
10508
10563
  try {
10509
10564
  fd = openSync3(tmpPath, "wx", 384);
10510
- writeFileSync2(fd, readFileSync4(sourcePath));
10565
+ writeFileSync2(fd, readFileSync5(sourcePath));
10511
10566
  closeSync3(fd);
10512
10567
  fd = null;
10513
10568
  renameSync4(tmpPath, targetPath);
@@ -10586,7 +10641,7 @@ function markLegacySourcesMovedAside(sources, targetPath, logger) {
10586
10641
  const desiredMarkerPath = `${source.path}${MOVED_MARKER_SUFFIX}`;
10587
10642
  const markerPath = nonClobberingSidecarPath(desiredMarkerPath);
10588
10643
  try {
10589
- const original = readFileSync4(source.path, "utf-8");
10644
+ const original = readFileSync5(source.path, "utf-8");
10590
10645
  if (markerPath !== desiredMarkerPath) {
10591
10646
  logger?.warn?.(`Preserving existing legacy AFT marker ${desiredMarkerPath}; writing new marker to ${markerPath}`);
10592
10647
  }
@@ -10655,10 +10710,10 @@ function migrateAftConfigFile(opts) {
10655
10710
  try {
10656
10711
  const sources = existingSources.map((source) => ({
10657
10712
  ...source,
10658
- content: readFileSync4(source.path, "utf-8")
10713
+ content: readFileSync5(source.path, "utf-8")
10659
10714
  }));
10660
10715
  if (existsSync5(opts.targetPath)) {
10661
- const targetContent = readFileSync4(opts.targetPath, "utf-8");
10716
+ const targetContent = readFileSync5(opts.targetPath, "utf-8");
10662
10717
  for (const source of sources) {
10663
10718
  if (fileSemanticsMatch(source.content, targetContent))
10664
10719
  continue;
@@ -10889,8 +10944,8 @@ function npmSpawnEnv(resolved, baseEnv = process.env) {
10889
10944
  }
10890
10945
  // ../aft-bridge/dist/onnx-runtime.js
10891
10946
  import { execFileSync } from "node:child_process";
10892
- import { createHash as createHash2 } from "node:crypto";
10893
- 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 readFileSync5, readlinkSync, realpathSync, rmSync as rmSync3, statSync as statSync4, symlinkSync, unlinkSync as unlinkSync4, writeFileSync as writeFileSync3 } from "node:fs";
10947
+ import { createHash as createHash3 } from "node:crypto";
10948
+ 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";
10894
10949
  import { basename as basename2, dirname as dirname4, isAbsolute as isAbsolute4, join as join8, relative as relative2, resolve as resolve5, win32 } from "node:path";
10895
10950
  import { Readable as Readable2 } from "node:stream";
10896
10951
  import { pipeline as pipeline2 } from "node:stream/promises";
@@ -11440,7 +11495,7 @@ function readOnnxInstalledMeta(installDir) {
11440
11495
  try {
11441
11496
  if (!statSync4(path2).isFile())
11442
11497
  return null;
11443
- const raw = readFileSync5(path2, "utf8");
11498
+ const raw = readFileSync6(path2, "utf8");
11444
11499
  const parsed = JSON.parse(raw);
11445
11500
  if (typeof parsed.version !== "string" || parsed.version.length === 0)
11446
11501
  return null;
@@ -11455,8 +11510,8 @@ function readOnnxInstalledMeta(installDir) {
11455
11510
  }
11456
11511
  }
11457
11512
  function sha256File(path2) {
11458
- const hash = createHash2("sha256");
11459
- hash.update(readFileSync5(path2));
11513
+ const hash = createHash3("sha256");
11514
+ hash.update(readFileSync6(path2));
11460
11515
  return hash.digest("hex");
11461
11516
  }
11462
11517
  function acquireLock(lockPath) {
@@ -11484,7 +11539,7 @@ ${new Date().toISOString()}
11484
11539
  let owningPid = null;
11485
11540
  let lockMtimeMs = 0;
11486
11541
  try {
11487
- const raw = readFileSync5(lockPath, "utf8");
11542
+ const raw = readFileSync6(lockPath, "utf8");
11488
11543
  const firstLine = raw.split(/\r?\n/, 1)[0]?.trim() ?? "";
11489
11544
  const parsed = Number.parseInt(firstLine, 10);
11490
11545
  if (Number.isFinite(parsed) && parsed > 0)
@@ -11509,7 +11564,7 @@ function releaseLock(lockPath) {
11509
11564
  try {
11510
11565
  let owningPid = null;
11511
11566
  try {
11512
- const raw = readFileSync5(lockPath, "utf8");
11567
+ const raw = readFileSync6(lockPath, "utf8");
11513
11568
  const firstLine = raw.split(/\r?\n/, 1)[0]?.trim() ?? "";
11514
11569
  const parsed = Number.parseInt(firstLine, 10);
11515
11570
  if (Number.isFinite(parsed) && parsed > 0)
@@ -11704,6 +11759,11 @@ class BridgePool {
11704
11759
  for (const [dir, entry] of this.bridges) {
11705
11760
  if (entry.bridge.hasPendingRequests() || entry.bridge.hasOutstandingBackgroundTasks())
11706
11761
  continue;
11762
+ if (entry.bridge.maybeScheduleRespawnForUpdatedBinary(CLEANUP_INTERVAL_MS, now)) {
11763
+ this.staleBridges.add(entry.bridge);
11764
+ this.bridges.delete(dir);
11765
+ continue;
11766
+ }
11707
11767
  if (now - entry.lastUsed > this.idleTimeoutMs) {
11708
11768
  entry.bridge.shutdown().catch((err) => this.error("cleanup shutdown failed:", err));
11709
11769
  this.bridges.delete(dir);
@@ -11800,10 +11860,11 @@ class BridgePool {
11800
11860
  function normalizeKey(projectRoot) {
11801
11861
  return canonicalizeProjectRoot(projectRoot);
11802
11862
  }
11803
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/client.ts
11863
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.3.0/node_modules/@cortexkit/subc-client/src/client.ts
11804
11864
  import { promises as fs2 } from "node:fs";
11865
+ import { debuglog } from "node:util";
11805
11866
 
11806
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/auth.ts
11867
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.3.0/node_modules/@cortexkit/subc-client/src/auth.ts
11807
11868
  import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
11808
11869
  var NONCE_LEN = 32;
11809
11870
  var MAX_AUTH_MESSAGE_LEN = 4096;
@@ -11867,7 +11928,7 @@ async function authenticateClient(sock, conn, deadlineMs) {
11867
11928
  await writeMessage(sock, { client_auth: Array.from(clientAuth) }, deadlineMs);
11868
11929
  }
11869
11930
 
11870
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/connection-file.ts
11931
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.3.0/node_modules/@cortexkit/subc-client/src/connection-file.ts
11871
11932
  import { promises as fs } from "node:fs";
11872
11933
  var SCHEMA_VERSION = 1;
11873
11934
  var MIN_KEY_LEN = 32;
@@ -11936,7 +11997,7 @@ async function readConnectionFile(path2) {
11936
11997
  return info;
11937
11998
  }
11938
11999
 
11939
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/envelope.ts
12000
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.3.0/node_modules/@cortexkit/subc-client/src/envelope.ts
11940
12001
  var PROTOCOL_VERSION = 1;
11941
12002
  var HEADER_LEN = 17;
11942
12003
  var FROZEN_PREFIX_LEN = 5;
@@ -12043,7 +12104,7 @@ function encodeFrame(frame) {
12043
12104
  return out;
12044
12105
  }
12045
12106
 
12046
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/socket.ts
12107
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.3.0/node_modules/@cortexkit/subc-client/src/socket.ts
12047
12108
  import net from "node:net";
12048
12109
 
12049
12110
  class SocketClosedError extends Error {
@@ -12074,6 +12135,9 @@ class SubcSocket {
12074
12135
  buffered = 0;
12075
12136
  waiter = null;
12076
12137
  closedErr = null;
12138
+ bufferedBytes() {
12139
+ return this.buffered;
12140
+ }
12077
12141
  constructor(sock) {
12078
12142
  this.sock = sock;
12079
12143
  sock.on("data", (chunk) => {
@@ -12090,6 +12154,9 @@ class SubcSocket {
12090
12154
  sock.on("end", () => fail(new SocketClosedError("subc closed the connection")));
12091
12155
  sock.on("close", () => fail(new SocketClosedError("subc connection closed")));
12092
12156
  }
12157
+ localPort() {
12158
+ return this.sock.localPort ?? null;
12159
+ }
12093
12160
  static connect(host, port, deadlineMs) {
12094
12161
  return new Promise((resolve7, reject) => {
12095
12162
  const sock = net.connect({ host, port });
@@ -12229,9 +12296,14 @@ class SubcSocket {
12229
12296
  }
12230
12297
  }
12231
12298
 
12232
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/client.ts
12299
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.3.0/node_modules/@cortexkit/subc-client/src/client.ts
12300
+ var debug = debuglog("subc-client");
12233
12301
  var DEFAULT_HANDSHAKE_TIMEOUT_MS = 1e4;
12234
12302
  var DEFAULT_REQUEST_TIMEOUT_MS = 30000;
12303
+ var TIMEOUT_ARBITRATION_GRACE_MS = 50;
12304
+ var REQUEST_DEADLINE_MARKER = "request_deadline";
12305
+ var DEADLINE_NO_DROP_CODE = "deadline_exceeded_no_drop_observed";
12306
+ var ROUTE_OPEN_RETRY_DEADLINE_MS = 1e4;
12235
12307
  var BODY_READ_TIMEOUT_MS = 30000;
12236
12308
  var EMPTY_BODY = new Uint8Array(0);
12237
12309
  var DEFAULT_MANAGED_TARGET_KIND = "management_surface";
@@ -12275,6 +12347,7 @@ class SubcClient {
12275
12347
  closeStarted = false;
12276
12348
  reconnecting = null;
12277
12349
  generation = 1;
12350
+ readerActive = false;
12278
12351
  constructor(sock, currentConn, opts) {
12279
12352
  this.sock = sock;
12280
12353
  this.currentConn = currentConn;
@@ -12333,7 +12406,7 @@ class SubcClient {
12333
12406
  }
12334
12407
  continue;
12335
12408
  }
12336
- if (err.kind === "outcome_unknown") {
12409
+ if (err.kind === "outcome_unknown" && err.code !== DEADLINE_NO_DROP_CODE) {
12337
12410
  this.scheduleReconnectAfterDrop(err);
12338
12411
  }
12339
12412
  throw err;
@@ -12456,7 +12529,7 @@ class SubcClient {
12456
12529
  timer: null
12457
12530
  };
12458
12531
  pending.timer = setTimeout(() => {
12459
- this.rejectPending(key, pending, new SubcError(`request on channel ${channel} timed out after ${ms}ms`));
12532
+ this.arbitrateTimeout(key, pending, channel, corr, ms);
12460
12533
  }, ms);
12461
12534
  this.pending.set(key, pending);
12462
12535
  this.sock.write(encodeFrame(frame), Date.now() + ms).catch((err) => {
@@ -12466,6 +12539,23 @@ class SubcClient {
12466
12539
  });
12467
12540
  });
12468
12541
  }
12542
+ arbitrateTimeout(key, pending, channel, corr, ms) {
12543
+ const settleAsTimeout = () => {
12544
+ this.rejectPending(key, pending, new SubcError(this.timeoutMessage(channel, corr, ms), REQUEST_DEADLINE_MARKER));
12545
+ };
12546
+ const graceDeadline = Date.now() + this.opts.timeoutArbitrationGraceMs;
12547
+ const arbitrate = () => {
12548
+ if (this.pending.get(key) !== pending)
12549
+ return;
12550
+ const readerDraining = this.readerActive || this.sock.bufferedBytes() > 0;
12551
+ if (readerDraining && Date.now() < graceDeadline) {
12552
+ setImmediate(arbitrate);
12553
+ return;
12554
+ }
12555
+ settleAsTimeout();
12556
+ };
12557
+ setImmediate(arbitrate);
12558
+ }
12469
12559
  async managedRequest(routeChannel, body, opts) {
12470
12560
  const bytes = body instanceof Uint8Array ? body : this.encode(body);
12471
12561
  const priority = opts.priority ?? 1 /* Interactive */;
@@ -12490,6 +12580,9 @@ class SubcClient {
12490
12580
  if (!handedToSocket) {
12491
12581
  return this.notSentCallError("request bytes were not queued to the subc socket", err);
12492
12582
  }
12583
+ if (err instanceof SubcError && err.code === REQUEST_DEADLINE_MARKER) {
12584
+ return new SubcCallError("outcome_unknown", `managed call deadline exceeded after request bytes were queued to the local socket; no terminal response was observed; outcome unknown${causeMessage(err)}`, DEADLINE_NO_DROP_CODE, err);
12585
+ }
12493
12586
  return this.outcomeUnknownCallError("connection dropped before the managed call returned a response", err);
12494
12587
  };
12495
12588
  return new Promise((resolve7, reject) => {
@@ -12503,7 +12596,7 @@ class SubcClient {
12503
12596
  classifyFailure
12504
12597
  };
12505
12598
  pending.timer = setTimeout(() => {
12506
- this.rejectPending(key, pending, new SubcError(`request on channel ${channel} timed out after ${ms}ms`));
12599
+ this.arbitrateTimeout(key, pending, channel, corr, ms);
12507
12600
  }, ms);
12508
12601
  this.pending.set(key, pending);
12509
12602
  const write = this.sock.writeTracked(encodeFrame(frame), Date.now() + ms);
@@ -12548,6 +12641,9 @@ class SubcClient {
12548
12641
  return cached.opening;
12549
12642
  }
12550
12643
  async openCachedRoute(cached) {
12644
+ const routeRetryDeadline = Date.now() + ROUTE_OPEN_RETRY_DEADLINE_MS;
12645
+ let routeRetryDelay = this.opts.reconnectBackoff.baseMs;
12646
+ let routeRetryAttempt = 0;
12551
12647
  for (;; ) {
12552
12648
  if (cached.closed)
12553
12649
  throw this.routeClosedDuringOpen();
@@ -12581,6 +12677,15 @@ class SubcClient {
12581
12677
  }
12582
12678
  continue;
12583
12679
  }
12680
+ if (!this.closeStarted && err instanceof SubcError && isRetryableRouteOpenCode(err.code)) {
12681
+ routeRetryAttempt += 1;
12682
+ if (routeRetryAttempt < this.opts.reconnectBackoff.maxAttempts && Date.now() < routeRetryDeadline) {
12683
+ await this.opts.sleep(routeRetryDelay);
12684
+ routeRetryDelay = Math.min(routeRetryDelay * 2, this.opts.reconnectBackoff.capMs);
12685
+ continue;
12686
+ }
12687
+ throw this.notSentCallError(`route.open failed for module ${cached.moduleId}: ${err.code} (retry budget exhausted)`, err);
12688
+ }
12584
12689
  throw this.terminalCallError(`route.open failed for module ${cached.moduleId}`, err);
12585
12690
  }
12586
12691
  }
@@ -12651,7 +12756,9 @@ class SubcClient {
12651
12756
  for (const cached of this.routes.values()) {
12652
12757
  if (cached.closed)
12653
12758
  continue;
12654
- const channel = await this.routeOpen(cached.target, cached.identity);
12759
+ const channel = await this.routeOpen(cached.target, cached.identity, {
12760
+ consumerIdentity: cached.consumerIdentity ?? null
12761
+ });
12655
12762
  if (cached.closed) {
12656
12763
  this.sendRouteGoodbye(channel);
12657
12764
  continue;
@@ -12660,6 +12767,11 @@ class SubcClient {
12660
12767
  cached.generation = this.generation;
12661
12768
  }
12662
12769
  }
12770
+ timeoutMessage(channel, corr, ms) {
12771
+ const port = this.sock.localPort();
12772
+ const where = port === null ? "channel" : `local_port=${port} channel`;
12773
+ return `request on ${where} ${channel} corr ${corr} timed out after ${ms}ms`;
12774
+ }
12663
12775
  routeClosedDuringOpen() {
12664
12776
  return new SubcCallError("not_sent", "route was closed before route.open completed", "route_closed");
12665
12777
  }
@@ -12667,9 +12779,16 @@ class SubcClient {
12667
12779
  try {
12668
12780
  for (;; ) {
12669
12781
  const headerBytes = await sock.readExact(HEADER_LEN, Number.POSITIVE_INFINITY);
12670
- const header = decodeHeader(headerBytes);
12671
- const body = header.len === 0 ? new Uint8Array(0) : await sock.readExact(header.len, Date.now() + BODY_READ_TIMEOUT_MS);
12672
- this.dispatch({ header, body });
12782
+ this.readerActive = true;
12783
+ try {
12784
+ const header = decodeHeader(headerBytes);
12785
+ const body = header.len === 0 ? new Uint8Array(0) : await sock.readExact(header.len, Date.now() + BODY_READ_TIMEOUT_MS);
12786
+ if (this.sock === sock && this.generation === generation) {
12787
+ this.dispatch({ header, body });
12788
+ }
12789
+ } finally {
12790
+ this.readerActive = false;
12791
+ }
12673
12792
  }
12674
12793
  } catch (err) {
12675
12794
  if (this.sock === sock && this.generation === generation) {
@@ -12701,13 +12820,20 @@ class SubcClient {
12701
12820
  this.failChannel(frame.header.channel, new SubcError("route closed by subc (GOODBYE)"));
12702
12821
  return;
12703
12822
  }
12823
+ if (frame.header.ty === 1 /* Response */ || frame.header.ty === 5 /* Error */ || frame.header.ty === 4 /* StreamEnd */) {
12824
+ debug("dropped terminal frame with no waiter: type=%d channel=%d corr=%s port=%s", frame.header.ty, frame.header.channel, frame.header.corr, this.sock.localPort() ?? "?");
12825
+ return;
12826
+ }
12704
12827
  }
12705
12828
  settle(key, pending, run) {
12829
+ if (this.pending.get(key) !== pending)
12830
+ return false;
12706
12831
  this.pending.delete(key);
12707
12832
  if (pending.timer)
12708
12833
  clearTimeout(pending.timer);
12709
12834
  run();
12710
12835
  pending.onSettle?.();
12836
+ return true;
12711
12837
  }
12712
12838
  rejectPending(key, pending, err) {
12713
12839
  this.settle(key, pending, () => pending.reject(pending.classifyFailure?.(err) ?? err));
@@ -12771,6 +12897,9 @@ function isConsumerReconnectTransient(err) {
12771
12897
  const code = errorCode(err);
12772
12898
  return code === "ECONNREFUSED" || code === "ECONNRESET" || code === "EPIPE" || code === "ETIMEDOUT" || code === "ENOENT";
12773
12899
  }
12900
+ function isRetryableRouteOpenCode(code) {
12901
+ return code === "unknown_module" || code === "module_reloading" || code === "target_unavailable" || code === "module_timeout";
12902
+ }
12774
12903
  async function connectionFileExists(path2) {
12775
12904
  try {
12776
12905
  await fs2.access(path2);
@@ -12786,7 +12915,8 @@ function normalizeConnectOptions(opts) {
12786
12915
  identity: opts.identity,
12787
12916
  targetKind: opts.targetKind ?? DEFAULT_MANAGED_TARGET_KIND,
12788
12917
  reconnectBackoff: opts.reconnectBackoff ?? DEFAULT_RECONNECT_BACKOFF,
12789
- sleep: opts.sleep ?? ((ms) => new Promise((resolve7) => setTimeout(resolve7, ms)))
12918
+ sleep: opts.sleep ?? ((ms) => new Promise((resolve7) => setTimeout(resolve7, ms))),
12919
+ timeoutArbitrationGraceMs: opts.timeoutArbitrationGraceMs ?? TIMEOUT_ARBITRATION_GRACE_MS
12790
12920
  };
12791
12921
  }
12792
12922
  function routeCacheKey(target, identity, consumerIdentity) {
@@ -12815,7 +12945,7 @@ function causeMessage(cause) {
12815
12945
  return "";
12816
12946
  return `: ${cause instanceof Error ? cause.message : String(cause)}`;
12817
12947
  }
12818
- // ../../node_modules/.bun/@cortexkit+subc-client@0.2.0/node_modules/@cortexkit/subc-client/src/provider.ts
12948
+ // ../../node_modules/.bun/@cortexkit+subc-client@0.3.0/node_modules/@cortexkit/subc-client/src/provider.ts
12819
12949
  import { Buffer as Buffer2 } from "node:buffer";
12820
12950
  var DEFAULT_HANDSHAKE_TIMEOUT_MS2 = 1e4;
12821
12951
  var BODY_READ_TIMEOUT_MS2 = 30000;
@@ -14648,7 +14778,7 @@ import {
14648
14778
  // package.json
14649
14779
  var package_default = {
14650
14780
  name: "@cortexkit/aft-pi",
14651
- version: "0.43.1",
14781
+ version: "0.45.0",
14652
14782
  type: "module",
14653
14783
  description: "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
14654
14784
  main: "dist/index.js",
@@ -14671,19 +14801,19 @@ var package_default = {
14671
14801
  "test:unit": "bun test src/__tests__ --path-ignore-patterns 'src/__tests__/e2e/**'"
14672
14802
  },
14673
14803
  dependencies: {
14674
- "@cortexkit/aft-bridge": "0.43.1",
14804
+ "@cortexkit/aft-bridge": "0.45.0",
14675
14805
  "comment-json": "^5.0.0",
14676
14806
  diff: "^8.0.4",
14677
14807
  typebox: "1.1.38",
14678
14808
  zod: "^4.4.3"
14679
14809
  },
14680
14810
  optionalDependencies: {
14681
- "@cortexkit/aft-darwin-arm64": "0.43.1",
14682
- "@cortexkit/aft-darwin-x64": "0.43.1",
14683
- "@cortexkit/aft-linux-arm64": "0.43.1",
14684
- "@cortexkit/aft-linux-x64": "0.43.1",
14685
- "@cortexkit/aft-win32-arm64": "0.43.1",
14686
- "@cortexkit/aft-win32-x64": "0.43.1"
14811
+ "@cortexkit/aft-darwin-arm64": "0.45.0",
14812
+ "@cortexkit/aft-darwin-x64": "0.45.0",
14813
+ "@cortexkit/aft-linux-arm64": "0.45.0",
14814
+ "@cortexkit/aft-linux-x64": "0.45.0",
14815
+ "@cortexkit/aft-win32-arm64": "0.45.0",
14816
+ "@cortexkit/aft-win32-x64": "0.45.0"
14687
14817
  },
14688
14818
  devDependencies: {
14689
14819
  "@earendil-works/pi-coding-agent": "^0.80.2",
@@ -15272,7 +15402,7 @@ function registerStatusCommand(pi, ctx) {
15272
15402
  }
15273
15403
 
15274
15404
  // src/config.ts
15275
- import { existsSync as existsSync7, readFileSync as readFileSync6, renameSync as renameSync5, unlinkSync as unlinkSync5, writeFileSync as writeFileSync4 } from "node:fs";
15405
+ import { existsSync as existsSync7, readFileSync as readFileSync7, renameSync as renameSync5, unlinkSync as unlinkSync5, writeFileSync as writeFileSync4 } from "node:fs";
15276
15406
  var import_comment_json = __toESM(require_src2(), 1);
15277
15407
 
15278
15408
  // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
@@ -29693,6 +29823,7 @@ var InspectConfigSchema = exports_external.object({
29693
29823
  duplicates: exports_external.object({
29694
29824
  lower_bound: exports_external.number().int().positive().optional(),
29695
29825
  discard_cost: exports_external.number().int().min(0).optional(),
29826
+ expected_mirrors: exports_external.array(exports_external.tuple([exports_external.string().trim().min(1), exports_external.string().trim().min(1)])).optional(),
29696
29827
  anonymize: exports_external.object({
29697
29828
  variables: exports_external.boolean().optional(),
29698
29829
  fields: exports_external.boolean().optional(),
@@ -29849,7 +29980,7 @@ function migrateAftConfigFile2(configPath, logger = { log: log2, warn: warn2 })
29849
29980
  let tmpPath = null;
29850
29981
  let oldKeys = [];
29851
29982
  try {
29852
- const content = readFileSync6(configPath, "utf-8");
29983
+ const content = readFileSync7(configPath, "utf-8");
29853
29984
  const rawConfig = import_comment_json.parse(content);
29854
29985
  if (!rawConfig || typeof rawConfig !== "object" || Array.isArray(rawConfig)) {
29855
29986
  return { migrated: false, oldKeys: [] };
@@ -29898,7 +30029,7 @@ function loadConfigFromPath(configPath) {
29898
30029
  try {
29899
30030
  if (!existsSync7(configPath))
29900
30031
  return null;
29901
- const content = readFileSync6(configPath, "utf-8");
30032
+ const content = readFileSync7(configPath, "utf-8");
29902
30033
  const rawConfig = import_comment_json.parse(content);
29903
30034
  if (!rawConfig || typeof rawConfig !== "object" || Array.isArray(rawConfig)) {
29904
30035
  recordConfigParseFailure(configPath, "root must be an object");
@@ -30181,12 +30312,12 @@ function loadAftConfig(projectDirectory) {
30181
30312
 
30182
30313
  // src/lsp-auto-install.ts
30183
30314
  import { spawn as spawn2 } from "node:child_process";
30184
- import { createHash as createHash3 } from "node:crypto";
30315
+ import { createHash as createHash4 } from "node:crypto";
30185
30316
  import {
30186
30317
  createReadStream,
30187
30318
  existsSync as existsSync9,
30188
30319
  mkdirSync as mkdirSync7,
30189
- readFileSync as readFileSync9,
30320
+ readFileSync as readFileSync10,
30190
30321
  renameSync as renameSync6,
30191
30322
  rmSync as rmSync4,
30192
30323
  statSync as statSync6,
@@ -30199,7 +30330,7 @@ import {
30199
30330
  closeSync as closeSync5,
30200
30331
  mkdirSync as mkdirSync6,
30201
30332
  openSync as openSync5,
30202
- readFileSync as readFileSync7,
30333
+ readFileSync as readFileSync8,
30203
30334
  statSync as statSync5,
30204
30335
  unlinkSync as unlinkSync6,
30205
30336
  writeFileSync as writeFileSync5
@@ -30263,7 +30394,7 @@ function readInstalledMetaIn(installDir) {
30263
30394
  try {
30264
30395
  if (!statSync5(path3).isFile())
30265
30396
  return null;
30266
- const raw = readFileSync7(path3, "utf8");
30397
+ const raw = readFileSync8(path3, "utf8");
30267
30398
  const parsed = JSON.parse(raw);
30268
30399
  if (typeof parsed.version !== "string" || parsed.version.length === 0)
30269
30400
  return null;
@@ -30313,7 +30444,7 @@ ${new Date().toISOString()}
30313
30444
  let owningPid = null;
30314
30445
  let lockMtimeMs = 0;
30315
30446
  try {
30316
- const raw = readFileSync7(lock, "utf8");
30447
+ const raw = readFileSync8(lock, "utf8");
30317
30448
  const firstLine = raw.split(/\r?\n/, 1)[0]?.trim() ?? "";
30318
30449
  const parsed = Number.parseInt(firstLine, 10);
30319
30450
  if (Number.isFinite(parsed) && parsed > 0)
@@ -30351,7 +30482,7 @@ function releaseInstallLock(lockKey) {
30351
30482
  try {
30352
30483
  let owningPid = null;
30353
30484
  try {
30354
- const raw = readFileSync7(lock, "utf8");
30485
+ const raw = readFileSync8(lock, "utf8");
30355
30486
  const firstLine = raw.split(/\r?\n/, 1)[0]?.trim() ?? "";
30356
30487
  const parsed = Number.parseInt(firstLine, 10);
30357
30488
  if (Number.isFinite(parsed) && parsed > 0)
@@ -30392,7 +30523,7 @@ var VERSION_CHECK_FILE = ".aft-version-check";
30392
30523
  function readVersionCheck(npmPackage) {
30393
30524
  const file2 = join11(lspPackageDir(npmPackage), VERSION_CHECK_FILE);
30394
30525
  try {
30395
- const raw = readFileSync7(file2, "utf8");
30526
+ const raw = readFileSync8(file2, "utf8");
30396
30527
  const parsed = JSON.parse(raw);
30397
30528
  if (typeof parsed.last_checked === "string") {
30398
30529
  return {
@@ -30569,7 +30700,7 @@ var NPM_LSP_TABLE = [
30569
30700
  ];
30570
30701
 
30571
30702
  // src/lsp-project-relevance.ts
30572
- import { existsSync as existsSync8, readdirSync as readdirSync3, readFileSync as readFileSync8 } from "node:fs";
30703
+ import { existsSync as existsSync8, readdirSync as readdirSync3, readFileSync as readFileSync9 } from "node:fs";
30573
30704
  import { join as join12 } from "node:path";
30574
30705
  var MAX_WALK_DIRS = 200;
30575
30706
  var MAX_WALK_DEPTH = 4;
@@ -30611,7 +30742,7 @@ function hasPackageJsonDep(projectRoot, depNames) {
30611
30742
  }
30612
30743
  function readPackageJson(projectRoot) {
30613
30744
  try {
30614
- const raw = readFileSync8(join12(projectRoot, "package.json"), "utf8");
30745
+ const raw = readFileSync9(join12(projectRoot, "package.json"), "utf8");
30615
30746
  const parsed = JSON.parse(raw);
30616
30747
  if (typeof parsed !== "object" || parsed === null)
30617
30748
  return null;
@@ -30933,7 +31064,7 @@ function hashInstalledBinary(spec) {
30933
31064
  reject(new Error(`installed binary not found at any of: ${candidates.join(", ")}`));
30934
31065
  return;
30935
31066
  }
30936
- const hash2 = createHash3("sha256");
31067
+ const hash2 = createHash4("sha256");
30937
31068
  const stream = createReadStream(pathToHash);
30938
31069
  stream.on("error", reject);
30939
31070
  stream.on("data", (chunk) => hash2.update(chunk));
@@ -30956,7 +31087,7 @@ function installedBinaryPath(spec) {
30956
31087
  return null;
30957
31088
  }
30958
31089
  function sha256OfFileSync(path3) {
30959
- return createHash3("sha256").update(readFileSync9(path3)).digest("hex");
31090
+ return createHash4("sha256").update(readFileSync10(path3)).digest("hex");
30960
31091
  }
30961
31092
  function quarantineCachedNpmInstall(spec, reason) {
30962
31093
  const packageDir = lspPackageDir(spec.npm);
@@ -31040,7 +31171,7 @@ function runAutoInstall(projectRoot, config2, fetchImpl = fetch) {
31040
31171
 
31041
31172
  // src/lsp-github-install.ts
31042
31173
  import { execFileSync as execFileSync2 } from "node:child_process";
31043
- import { createHash as createHash4, randomBytes as randomBytes2 } from "node:crypto";
31174
+ import { createHash as createHash5, randomBytes as randomBytes2 } from "node:crypto";
31044
31175
  import {
31045
31176
  copyFileSync as copyFileSync4,
31046
31177
  createReadStream as createReadStream2,
@@ -31049,7 +31180,7 @@ import {
31049
31180
  lstatSync as lstatSync2,
31050
31181
  mkdirSync as mkdirSync8,
31051
31182
  readdirSync as readdirSync4,
31052
- readFileSync as readFileSync10,
31183
+ readFileSync as readFileSync11,
31053
31184
  readlinkSync as readlinkSync2,
31054
31185
  realpathSync as realpathSync3,
31055
31186
  renameSync as renameSync7,
@@ -31183,7 +31314,7 @@ function readGithubInstalledMetaIn(installDir) {
31183
31314
  const path3 = join14(installDir, INSTALLED_META_FILE2);
31184
31315
  if (!statSync7(path3).isFile())
31185
31316
  return null;
31186
- const parsed = JSON.parse(readFileSync10(path3, "utf8"));
31317
+ const parsed = JSON.parse(readFileSync11(path3, "utf8"));
31187
31318
  if (typeof parsed.version !== "string" || parsed.version.length === 0)
31188
31319
  return null;
31189
31320
  return {
@@ -31216,7 +31347,7 @@ var MAX_DOWNLOAD_BYTES3 = 256 * 1024 * 1024;
31216
31347
  var MAX_EXTRACT_BYTES2 = 1024 * 1024 * 1024;
31217
31348
  function sha256OfFile(path3) {
31218
31349
  return new Promise((resolve8, reject) => {
31219
- const hash2 = createHash4("sha256");
31350
+ const hash2 = createHash5("sha256");
31220
31351
  const stream = createReadStream2(path3);
31221
31352
  stream.on("error", reject);
31222
31353
  stream.on("data", (chunk) => hash2.update(chunk));
@@ -31224,7 +31355,7 @@ function sha256OfFile(path3) {
31224
31355
  });
31225
31356
  }
31226
31357
  function sha256OfFileSync2(path3) {
31227
- return createHash4("sha256").update(readFileSync10(path3)).digest("hex");
31358
+ return createHash5("sha256").update(readFileSync11(path3)).digest("hex");
31228
31359
  }
31229
31360
  async function fetchReleaseByTag(githubRepo, tag, fetchImpl, signal) {
31230
31361
  const candidates = [];
@@ -32235,21 +32366,6 @@ function modelSupportsImages(extCtx) {
32235
32366
  return Array.isArray(extCtx.model?.input) && extCtx.model.input.includes("image");
32236
32367
  }
32237
32368
  var NON_VISION_IMAGE_NOTE = "[Current model does not support images. The image will be omitted from this request.]";
32238
- async function assertMutationPermission(extCtx, action, filePath, previewDiff) {
32239
- if (extCtx.hasUI !== true || typeof extCtx.ui?.confirm !== "function")
32240
- return;
32241
- const diff = typeof previewDiff === "string" && previewDiff.trim().length > 0 ? previewDiff : "";
32242
- const message = diff ? `AFT wants to ${action} ${filePath}.
32243
-
32244
- Diff preview:
32245
- ${diff}` : `AFT wants to ${action} ${filePath}.`;
32246
- const confirmed = await extCtx.ui.confirm(`Allow AFT ${action}?`, message, {
32247
- signal: extCtx.signal
32248
- });
32249
- if (!confirmed) {
32250
- throw new Error(`${action}: permission denied`);
32251
- }
32252
- }
32253
32369
  function containsPath(parent, child) {
32254
32370
  const rel = relative4(parent, child);
32255
32371
  return rel === "" || !rel.startsWith("..") && !isAbsolute6(rel);
@@ -32506,11 +32622,6 @@ PDFs aren't supported on the Pi harness yet.`, response);
32506
32622
  filePath: filePathArg,
32507
32623
  content: params.content
32508
32624
  };
32509
- const preview = await callToolCall(bridge, "write", rawArgs, extCtx, { preview: true });
32510
- if (preview.success === false) {
32511
- throw new Error(preview.text || preview.message || "write preview failed");
32512
- }
32513
- await assertMutationPermission(extCtx, "write", filePath, preview.preview_diff);
32514
32625
  const response = await callToolCall(bridge, "write", rawArgs, extCtx);
32515
32626
  if (response.success === false) {
32516
32627
  throw new Error(response.text || response.message || "write failed");
@@ -32557,11 +32668,6 @@ PDFs aren't supported on the Pi harness yet.`, response);
32557
32668
  const occurrence = coerceOptionalInt(params.occurrence, "occurrence", 0, Number.MAX_SAFE_INTEGER);
32558
32669
  if (occurrence !== undefined)
32559
32670
  rawArgs.occurrence = occurrence;
32560
- const preview = await callToolCall(bridge, "edit", rawArgs, extCtx, { preview: true });
32561
- if (preview.success === false) {
32562
- throw new Error(preview.text || preview.message || "edit preview failed");
32563
- }
32564
- await assertMutationPermission(extCtx, "edit", filePath, preview.preview_diff);
32565
32671
  const response = await callToolCall(bridge, "edit", rawArgs, extCtx);
32566
32672
  if (response.success === false) {
32567
32673
  throw new Error(response.text || response.message || "edit failed");
@@ -32942,7 +33048,7 @@ function renderUnifiedDiff(unifiedDiff) {
32942
33048
  }
32943
33049
 
32944
33050
  // src/tools/ast.ts
32945
- var AstLang = StringEnum(["typescript", "tsx", "javascript", "python", "rust", "go", "pascal", "r"], {
33051
+ var AstLang = StringEnum(["typescript", "tsx", "javascript", "python", "rust", "go", "pascal", "r", "objc"], {
32946
33052
  description: "Target language"
32947
33053
  });
32948
33054
  var SearchParams = Type3.Object({
@@ -33194,8 +33300,8 @@ function resolveForegroundWaitMs(configured) {
33194
33300
  var BASH_TRANSPORT_TIMEOUT_MS = 30000;
33195
33301
  var DEFAULT_HARD_TIMEOUT_MS = 30 * 60 * 1000;
33196
33302
  var BASH_TRANSPORT_MARGIN_MS = 1e4;
33197
- function orchestratedTransportTimeoutMs(blockToCompletion, effectiveTimeout, foregroundWaitMs) {
33198
- const waitBudget = blockToCompletion ? effectiveTimeout ?? DEFAULT_HARD_TIMEOUT_MS : foregroundWaitMs;
33303
+ function orchestratedTransportTimeoutMs(blockToCompletion, wait, effectiveTimeout, foregroundWaitMs) {
33304
+ const waitBudget = blockToCompletion || wait ? effectiveTimeout ?? DEFAULT_HARD_TIMEOUT_MS : foregroundWaitMs;
33199
33305
  return waitBudget + BASH_TRANSPORT_MARGIN_MS;
33200
33306
  }
33201
33307
  var BashBaseParams = {
@@ -33208,6 +33314,9 @@ var BashBaseParams = {
33208
33314
  })),
33209
33315
  description: Type4.Optional(Type4.String({
33210
33316
  description: "Human-readable description shown in UI logs. Helps users understand what the command does without reading shell syntax."
33317
+ })),
33318
+ wait: Type4.Optional(Type4.Boolean({
33319
+ description: "When true, run in the foreground without auto-promoting and wait until the command finishes or reaches its timeout. Use only when you know the result is required before doing anything else."
33211
33320
  }))
33212
33321
  };
33213
33322
  var BashBackgroundFlagParam = {
@@ -33316,7 +33425,7 @@ function registerBashTool(pi, ctx, aftSearchRegistered = false) {
33316
33425
  const searchSteer = aftSearchRegistered ? "use `aft_search` (concepts, identifiers, regex, literals), `read`, `aft_outline`, or `aft_zoom` instead" : "use the `grep` tool, `read`, `aft_outline`, or `aft_zoom` instead";
33317
33426
  const bashCfg = resolveBashConfig(ctx.config);
33318
33427
  const compressionSentence = bashCfg.compress ? " Output is compressed by default; pass `compressed: false` for raw output. Piped commands run verbatim and show the pipeline's output; for AFT's test/build summary, run the runner without `| head`, `| tail`, or `| grep`." : "";
33319
- const tasksSentence = bashCfg.background ? ' Commands run in the foreground and return inline; a long-running one auto-promotes to background and delivers a completion reminder when it finishes so for the common "I am waiting on this result" case, just run it and wait, no flags needed. Use `background: true` yourself ONLY when you have other useful work to do while it runs; then `bash_watch` waits on the task (sync blocks until exit/pattern, async notifies) and `bash_status` peeks at it — never background a command and immediately `bash_watch` it (that wastes a turn for what foreground returns in one), and never loop `bash_status` to wait. `pty: true` runs interactive programs (REPLs, TUIs), implies background, and is driven with `bash_status({ output_mode: "screen" })` plus `bash_write`.' : " Commands run in the foreground to completion; `timeout` is the hard kill cap (default 30 minutes).";
33428
+ const tasksSentence = bashCfg.background ? ' Commands run in the foreground and return inline; `wait: true` blocks until a long command finishes instead of auto-promoting use it when you need the result before doing anything else; keep it off otherwise so auto-promote can remind you while you work. Use `background: true` yourself ONLY when you have other useful work to do while it runs; then `bash_watch` waits on the task (sync blocks until exit/pattern, async notifies) and `bash_status` peeks at it — never background a command and immediately `bash_watch` it (that wastes a turn for what foreground returns in one), and never loop `bash_status` to wait. `pty: true` runs interactive programs (REPLs, TUIs), implies background, and is driven with `bash_status({ output_mode: "screen" })` plus `bash_write`.' : " Commands run in the foreground to completion; `timeout` is the hard kill cap (default 30 minutes).";
33320
33429
  pi.registerTool({
33321
33430
  name: "bash",
33322
33431
  label: "bash",
@@ -33339,10 +33448,19 @@ DO NOT use bash for code search or code exploration. If you are about to run gre
33339
33448
  const ptyRows = backgroundDisabled ? undefined : coerceOptionalInt(params.ptyRows, "ptyRows", 1, 60);
33340
33449
  const ptyCols = backgroundDisabled ? undefined : coerceOptionalInt(params.ptyCols, "ptyCols", 1, 140);
33341
33450
  const compressed = coerceBoolean(params.compressed, true);
33342
- const requestedPty = !backgroundDisabled && coerceBoolean(params.pty);
33343
- const effectiveBackground = !backgroundDisabled && (coerceBoolean(params.background) || requestedPty);
33344
- const blockToCompletion = backgroundDisabled;
33345
- const effectiveTimeout = effectiveBackground || backgroundDisabled ? timeout : resolveBashKillTimeout(timeout, foregroundWaitMs);
33451
+ const requestedWait = coerceBoolean(params.wait);
33452
+ const rawRequestedPty = coerceBoolean(params.pty);
33453
+ const rawRequestedBackground = coerceBoolean(params.background);
33454
+ if (requestedWait && rawRequestedPty) {
33455
+ throw new Error("wait:true cannot be used with pty:true because PTY sessions run in background.");
33456
+ }
33457
+ if (requestedWait && rawRequestedBackground) {
33458
+ throw new Error("wait:true cannot be used with background:true.");
33459
+ }
33460
+ const requestedPty = !backgroundDisabled && rawRequestedPty;
33461
+ const effectiveBackground = !backgroundDisabled && (rawRequestedBackground || requestedPty);
33462
+ const blockToCompletion = backgroundDisabled || requestedWait;
33463
+ const effectiveTimeout = requestedWait || effectiveBackground || backgroundDisabled ? timeout : resolveBashKillTimeout(timeout, foregroundWaitMs);
33346
33464
  let spawnContext = {
33347
33465
  command: params.command,
33348
33466
  cwd: params.workdir
@@ -33369,9 +33487,10 @@ DO NOT use bash for code search or code exploration. If you are about to run gre
33369
33487
  pty_rows: ptyRows,
33370
33488
  pty_cols: ptyCols,
33371
33489
  foreground_orchestrate: true,
33372
- block_to_completion: blockToCompletion
33490
+ block_to_completion: blockToCompletion,
33491
+ wait: requestedWait
33373
33492
  }, extCtx, {
33374
- transportTimeoutMs: orchestratedTransportTimeoutMs(blockToCompletion, effectiveTimeout, foregroundWaitMs),
33493
+ transportTimeoutMs: orchestratedTransportTimeoutMs(blockToCompletion, requestedWait, effectiveTimeout, foregroundWaitMs),
33375
33494
  onProgress: ({ text }) => {
33376
33495
  streamed += text;
33377
33496
  const displayText = truncateToVisualLines(streamed, 100);
@@ -34241,7 +34360,7 @@ function registerImportTools(pi, ctx) {
34241
34360
  import { Type as Type8 } from "typebox";
34242
34361
  var InspectParams = Type8.Object({
34243
34362
  sections: Type8.Optional(Type8.Union([Type8.String(), Type8.Array(Type8.String())], {
34244
- description: "Categories to include in detailed drill-down (e.g. 'todos' or ['todos', 'dead_code']). Use 'all' for every active category. Omit for summary-only mode."
34363
+ description: "Categories to include in detailed drill-down (e.g. 'todos' or ['todos', 'dead_code', 'cycles']). Use 'all' for every active category. Omit for summary-only mode."
34245
34364
  })),
34246
34365
  scope: Type8.Optional(Type8.Union([Type8.String(), Type8.Array(Type8.String())], {
34247
34366
  description: "Restrict scan/results to paths under this scope (file or directory, absolute or relative to project root). Tier 1 scopes the scan; Tier 2 scans project-wide and applies scope as a result filter."
@@ -34253,7 +34372,7 @@ var InspectParams = Type8.Object({
34253
34372
  description: "Max drill-down items per category. Default 20, max 100."
34254
34373
  }))
34255
34374
  });
34256
- var TIER2_INSPECT_CATEGORIES = new Set(["dead_code", "unused_exports", "duplicates"]);
34375
+ var TIER2_INSPECT_CATEGORIES = new Set(["dead_code", "unused_exports", "duplicates", "cycles"]);
34257
34376
  var INSPECT_TIER2_RUN_TIMEOUT_MS = 5 * 60000;
34258
34377
  var INSPECT_TIER2_MIN_TRIGGER_INTERVAL_MS = 4 * 60000;
34259
34378
  var runningTier2Categories = new WeakMap;
@@ -34458,7 +34577,8 @@ function buildInspectSections(payload, theme) {
34458
34577
  `metrics ${asNumber2(metrics?.files) ?? 0} files/${asNumber2(metrics?.symbols) ?? 0} symbols`,
34459
34578
  tier2SummaryPart(summary, "dead_code", "dead code"),
34460
34579
  tier2SummaryPart(summary, "unused_exports", "unused exports"),
34461
- tier2SummaryPart(summary, "duplicates", "duplicates")
34580
+ tier2SummaryPart(summary, "duplicates", "duplicates"),
34581
+ tier2SummaryPart(summary, "cycles", "cycles")
34462
34582
  ].filter((part) => Boolean(part));
34463
34583
  const sections = [theme.fg("accent", parts.join(" · "))];
34464
34584
  if (stale > 0 || pending > 0) {
@@ -34495,7 +34615,7 @@ function registerInspectTool(pi, ctx) {
34495
34615
  pi.registerTool({
34496
34616
  name: "aft_inspect",
34497
34617
  label: "inspect",
34498
- description: "Codebase health snapshot. One call returns summary stats for: TODOs, diagnostics, file/symbol metrics, dead code, unused exports, code duplicates. Pass `sections` for per-category drill-down details.\n\n" + "Categories run in tiers — Tier 1 (todos, metrics) return synchronously from cache. Tier 2 (dead_code, unused_exports, duplicates) waits for a fresh reuse scan up to a short deadline; if a category is still scanning the response reports `complete: false` with `pending_categories: [...]` rather than a fabricated clean count. Pi may still trigger a deduped background warmup for categories that remain pending.\n\n" + `Use when: starting work on unfamiliar code, after multi-edit batches to check diagnostics, before a refactor, before review, or to verify cleanup completeness.
34618
+ description: "Codebase health snapshot. One call returns summary stats for: TODOs, diagnostics, file/symbol metrics, dead code, unused exports, code duplicates, and TS/JS import cycles. Pass `sections` for per-category drill-down details.\n\n" + "Categories run in tiers — Tier 1 (todos, metrics) return synchronously from cache. Tier 2 (dead_code, unused_exports, duplicates, cycles) waits for a fresh reuse scan up to a short deadline; if a category is still scanning the response reports `complete: false` with `pending_categories: [...]` rather than a fabricated clean count. Pi may still trigger a deduped background warmup for categories that remain pending. Rust module cycles are out of scope for `cycles`.\n\n" + `Use when: starting work on unfamiliar code, after multi-edit batches to check diagnostics, before a refactor, before review, or to verify cleanup completeness.
34499
34619
 
34500
34620
  ` + "Treat `dead_code` as a hint, not proof: reachability is call-based, so symbols reached only via method dispatch or referenced only in type position may be false positives — verify before deleting.",
34501
34621
  parameters: InspectParams,
@@ -35477,7 +35597,7 @@ function buildWorkflowHints(opts) {
35477
35597
  }
35478
35598
  if (hasBgBash) {
35479
35599
  sections.push([
35480
- `**Long-running commands** (builds, installs, full test suites): run them in the FOREGROUND — \`${bashName}({ command })\` waits and returns the result in ONE step, and if it outlives the short wait window it auto-promotes to background and delivers a completion reminder when it finishes. Don't reach for \`background: true\` for the common "I'm waiting on this result" case — that costs an extra turn.`,
35600
+ `**Long-running commands** (builds, installs, full test suites): run them in the FOREGROUND — use \`${bashName}({ command, wait: true })\` when you know it is long and need the result before anything else; otherwise omit \`wait\` so auto-promote can hand you a reminder while you work.`,
35481
35601
  "- `background: true` is ONLY for when you have OTHER useful work to do while it runs: start it, do the other work, and the completion reminder delivers the result (or spawn a subagent for the side work). Do NOT background a command and then immediately `bash_watch` it — that spends a whole extra turn waiting for something foreground returns in one.",
35482
35602
  "- `bash_watch` is for blocking on an ALREADY-backgrounded task once you've run out of parallel work (sync — the user can interrupt), or reacting to a specific early output line (async: background:true + pattern). Never loop `bash_status` to wait — it's a one-shot inspector."
35483
35603
  ].join(`
@@ -35581,11 +35701,13 @@ var PLUGIN_VERSION = (() => {
35581
35701
  return "0.0.0";
35582
35702
  }
35583
35703
  })();
35584
- var ANNOUNCEMENT_VERSION = "0.43.0";
35704
+ var ANNOUNCEMENT_VERSION = "0.45.0";
35585
35705
  var ANNOUNCEMENT_FEATURES = [
35586
- "Model compatibility: read/write/edit now accept filePath as an alias for path, so models that mix the two up no longer fail validation.",
35587
- `New enabled config toggle: set "enabled": false in a project's .cortexkit/aft.jsonc (or your user config) to turn AFT off there entirely.`,
35588
- "Bash compression honesty fix: empty successful output stays empty instead of being replaced with synthesized text like 'kubectl: no resources found'."
35706
+ "Code Health verified against 12 real repositories: dead code is only reported for languages we can actually analyze (Java/Kotlin now say 'not analyzed' instead of guessing), and generated code (gen/ trees, *_pb.ts, DO NOT EDIT banners) moves out of the headline counts into its own bucket.",
35707
+ "Config files (playwright/eslint/tsup/vitest *.config.ts), Storybook stories, Mocha hooks, and SvelteKit hooks/$lib imports are no longer flagged as dead code.",
35708
+ "Rust module aliases, inline-module calls, and cross-crate pub use re-exports now resolve; Go interface methods (sort.Interface, Bubble Tea) are no longer flagged dead.",
35709
+ "Fixed npx @cortexkit/aft doctor --fix and setup failing to download the binary on fresh installs.",
35710
+ "Bridges now detect an updated aft binary on disk and respawn onto it automatically."
35589
35711
  ];
35590
35712
  var ANNOUNCEMENT_FOOTER = "Join us on Discord: https://discord.gg/DSa65w8wuf";
35591
35713
  var ALL_ONLY_TOOLS = new Set(["aft_callgraph", "aft_delete", "aft_move", "aft_refactor"]);
@@ -1 +1 @@
1
- {"version":3,"file":"discover-files.d.ts","sourceRoot":"","sources":["../../src/shared/discover-files.ts"],"names":[],"mappings":"AAGA,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,aAoC7B,CAAC;AAqBH,6FAA6F;AAC7F,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,SAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA6BxF"}
1
+ {"version":3,"file":"discover-files.d.ts","sourceRoot":"","sources":["../../src/shared/discover-files.ts"],"names":[],"mappings":"AAGA,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,aAsC7B,CAAC;AAqBH,6FAA6F;AAC7F,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,SAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA6BxF"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ast_grep_search + ast_grep_replace — AST-aware pattern search/rewrite.
3
- * 8 languages: typescript, tsx, javascript, python, rust, go, pascal, r.
3
+ * 9 languages: typescript, tsx, javascript, python, rust, go, pascal, r, objc.
4
4
  */
5
5
  import type { AgentToolResult, ExtensionAPI, Theme } from "@earendil-works/pi-coding-agent";
6
6
  import { type Static, Type } from "typebox";
@@ -8,7 +8,7 @@ import type { PluginContext } from "../types.js";
8
8
  import { type RenderContextLike } from "./render-helpers.js";
9
9
  declare const SearchParams: Type.TObject<{
10
10
  pattern: Type.TString;
11
- lang: Type.TUnsafe<"go" | "python" | "r" | "typescript" | "tsx" | "javascript" | "rust" | "pascal">;
11
+ lang: Type.TUnsafe<"go" | "python" | "r" | "typescript" | "tsx" | "javascript" | "rust" | "pascal" | "objc">;
12
12
  paths: Type.TOptional<Type.TArray<Type.TString>>;
13
13
  globs: Type.TOptional<Type.TArray<Type.TString>>;
14
14
  contextLines: Type.TOptional<Type.TNumber>;
@@ -16,7 +16,7 @@ declare const SearchParams: Type.TObject<{
16
16
  declare const ReplaceParams: Type.TObject<{
17
17
  pattern: Type.TString;
18
18
  rewrite: Type.TString;
19
- lang: Type.TUnsafe<"go" | "python" | "r" | "typescript" | "tsx" | "javascript" | "rust" | "pascal">;
19
+ lang: Type.TUnsafe<"go" | "python" | "r" | "typescript" | "tsx" | "javascript" | "rust" | "pascal" | "objc">;
20
20
  paths: Type.TOptional<Type.TArray<Type.TString>>;
21
21
  globs: Type.TOptional<Type.TArray<Type.TString>>;
22
22
  dryRun: Type.TOptional<Type.TBoolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"bash.d.ts","sourceRoot":"","s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,wCAAwC;AACxC,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,sFAI3B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAyC9E"}
1
+ {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/tools/inspect.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAEZ,KAAK,EACN,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,OAAO,EAML,KAAK,iBAAiB,EAIvB,MAAM,qBAAqB,CAAC;AAE7B,QAAA,MAAM,aAAa;;;;EAqBjB,CAAC;AAuPH,wCAAwC;AACxC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CA+C7E;AAED,wCAAwC;AACxC,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,CAAC,OAAO,aAAa,CAAC,EAClC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,yCAe3B;AAED,wCAAwC;AACxC,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,sFAI3B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAyC9E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft-pi",
3
- "version": "0.43.1",
3
+ "version": "0.45.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",
@@ -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.43.1",
26
+ "@cortexkit/aft-bridge": "0.45.0",
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.43.1",
34
- "@cortexkit/aft-darwin-x64": "0.43.1",
35
- "@cortexkit/aft-linux-arm64": "0.43.1",
36
- "@cortexkit/aft-linux-x64": "0.43.1",
37
- "@cortexkit/aft-win32-arm64": "0.43.1",
38
- "@cortexkit/aft-win32-x64": "0.43.1"
33
+ "@cortexkit/aft-darwin-arm64": "0.45.0",
34
+ "@cortexkit/aft-darwin-x64": "0.45.0",
35
+ "@cortexkit/aft-linux-arm64": "0.45.0",
36
+ "@cortexkit/aft-linux-x64": "0.45.0",
37
+ "@cortexkit/aft-win32-arm64": "0.45.0",
38
+ "@cortexkit/aft-win32-x64": "0.45.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@earendil-works/pi-coding-agent": "^0.80.2",