@cortexkit/aft-pi 0.49.0 → 0.49.2
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/bg-notifications.d.ts +1 -0
- package/dist/bg-notifications.d.ts.map +1 -1
- package/dist/index.js +157 -53
- package/dist/tools/inspect.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bg-notifications.d.ts","sourceRoot":"","sources":["../src/bg-notifications.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAG3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,E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AAE,YAAY,EAAE,GACtB,OAAO,CAAC,YAAY,EAAE,GAAG,SAAS,CAAC,CAyDrC;AAED,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,YAAY,GAAG;IAAE,OAAO,EAAE,sBAAsB,CAAA;CAAE,GAC/D,OAAO,CAAC,IAAI,CAAC,CAGf;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,YAAY,GAAG;IAAE,OAAO,EAAE,sBAAsB,CAAA;CAAE,GAC/D,OAAO,CAAC,IAAI,CAAC,CAGf;AAwED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CASjF;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,SAAS,qBAAqB,EAAE,GAAG,MAAM,CAQ7F;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,GAAG,MAAM,CAWxF;AAcD,wBAAgB,kCAAkC,IAAI,IAAI,CAKzD;AAoRD,wBAAgB,wBAAwB,CAAC,GAAG,GAAE,MAAmB,GAAG,IAAI,CAQvE"}
|
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
|
-
|
|
8038
|
-
|
|
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:
|
|
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() -
|
|
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
|
|
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() -
|
|
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
|
|
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
|
|
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
|
|
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() -
|
|
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 (!
|
|
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 =
|
|
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 (
|
|
12125
|
+
if (hasAppendContent)
|
|
12079
12126
|
modes.push("appendContent");
|
|
12080
|
-
if (
|
|
12127
|
+
if (hasEdits)
|
|
12081
12128
|
modes.push("edits");
|
|
12082
|
-
if (
|
|
12129
|
+
if (hasSymbol)
|
|
12083
12130
|
modes.push("symbol/content");
|
|
12084
|
-
if (
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
16309
|
+
version: "0.49.2",
|
|
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.
|
|
16332
|
+
"@cortexkit/aft-bridge": "0.49.2",
|
|
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.
|
|
16252
|
-
"@cortexkit/aft-darwin-x64": "0.49.
|
|
16253
|
-
"@cortexkit/aft-linux-arm64": "0.49.
|
|
16254
|
-
"@cortexkit/aft-linux-x64": "0.49.
|
|
16255
|
-
"@cortexkit/aft-win32-arm64": "0.49.
|
|
16256
|
-
"@cortexkit/aft-win32-x64": "0.49.
|
|
16339
|
+
"@cortexkit/aft-darwin-arm64": "0.49.2",
|
|
16340
|
+
"@cortexkit/aft-darwin-x64": "0.49.2",
|
|
16341
|
+
"@cortexkit/aft-linux-arm64": "0.49.2",
|
|
16342
|
+
"@cortexkit/aft-linux-x64": "0.49.2",
|
|
16343
|
+
"@cortexkit/aft-win32-arm64": "0.49.2",
|
|
16344
|
+
"@cortexkit/aft-win32-x64": "0.49.2"
|
|
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
|
|
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
|
|
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 (
|
|
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 (!
|
|
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 =
|
|
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 (
|
|
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 (
|
|
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
|
|
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 (
|
|
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 (!
|
|
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
|
|
33258
|
+
return statSync8(candidate).isFile();
|
|
33171
33259
|
} catch {
|
|
33172
33260
|
return false;
|
|
33173
33261
|
}
|
|
@@ -35994,11 +36082,23 @@ function diagnosticsSummaryPart(summary) {
|
|
|
35994
36082
|
const hasCounts = [errors3, warnings, info, hints].some((value) => value !== undefined);
|
|
35995
36083
|
const counts = `${errors3 ?? 0} errors/${warnings ?? 0} warnings/${info ?? 0} info/${hints ?? 0} hints`;
|
|
35996
36084
|
const status = asString2(section.status);
|
|
36085
|
+
const provisionalCounts = asRecord3(section.provisional_counts);
|
|
36086
|
+
const provisionalValues = provisionalCounts ? [
|
|
36087
|
+
asNumber2(provisionalCounts.errors),
|
|
36088
|
+
asNumber2(provisionalCounts.warnings),
|
|
36089
|
+
asNumber2(provisionalCounts.info),
|
|
36090
|
+
asNumber2(provisionalCounts.hints)
|
|
36091
|
+
] : [];
|
|
36092
|
+
const provisionalText = provisionalCounts ? ` (${provisionalValues[0] ?? 0} errors/${provisionalValues[1] ?? 0} warnings/${provisionalValues[2] ?? 0} info/${provisionalValues[3] ?? 0} hints)` : "";
|
|
36093
|
+
const provisionalFraming = `provisional — analyzer not ready; counts excluded from E/W${provisionalText}`;
|
|
35997
36094
|
if (status === "pending") {
|
|
35998
|
-
return
|
|
36095
|
+
return `diagnostics ${provisionalFraming} — still pending (servers: ${diagnosticsServerSummary(section)}); wait for the LSP update and use the next normal aft_inspect, not repeated polling`;
|
|
35999
36096
|
}
|
|
36000
36097
|
if (status === "incomplete") {
|
|
36001
|
-
return
|
|
36098
|
+
return `diagnostics ${provisionalFraming} (incomplete — servers: ${diagnosticsServerSummary(section)})`;
|
|
36099
|
+
}
|
|
36100
|
+
if (provisionalCounts) {
|
|
36101
|
+
return `diagnostics ${provisionalFraming}`;
|
|
36002
36102
|
}
|
|
36003
36103
|
if (hasCounts) {
|
|
36004
36104
|
return `diagnostics ${counts}`;
|
|
@@ -36015,11 +36115,15 @@ function diagnosticLocation(diagnostic) {
|
|
|
36015
36115
|
return `${file2}:${line}`;
|
|
36016
36116
|
return `${file2}:${line}:${column}`;
|
|
36017
36117
|
}
|
|
36018
|
-
function diagnosticsDetailSection(details) {
|
|
36118
|
+
function diagnosticsDetailSection(details, summary) {
|
|
36019
36119
|
const diagnostics = asRecords2(details?.diagnostics);
|
|
36020
36120
|
if (diagnostics.length === 0)
|
|
36021
36121
|
return;
|
|
36022
|
-
const
|
|
36122
|
+
const diagnosticsSummary = asRecord3(summary?.diagnostics);
|
|
36123
|
+
const provisional = asString2(diagnosticsSummary?.status) === "pending" || asString2(diagnosticsSummary?.status) === "incomplete" || asRecord3(diagnosticsSummary?.provisional_counts) !== undefined;
|
|
36124
|
+
const lines = [
|
|
36125
|
+
provisional ? "diagnostics (provisional — analyzer not ready; counts excluded from E/W)" : "diagnostics"
|
|
36126
|
+
];
|
|
36023
36127
|
for (const diagnostic of diagnostics) {
|
|
36024
36128
|
const severity = asString2(diagnostic.severity) ?? "information";
|
|
36025
36129
|
const message = asString2(diagnostic.message) ?? "(no message)";
|
|
@@ -36157,7 +36261,7 @@ function buildInspectSections(payload, theme) {
|
|
|
36157
36261
|
if (details) {
|
|
36158
36262
|
const names = Object.keys(details);
|
|
36159
36263
|
sections.push(names.length > 0 ? `details: ${names.join(", ")}` : theme.fg("muted", "No drill-down details returned."));
|
|
36160
|
-
const diagnosticsDetails = diagnosticsDetailSection(details);
|
|
36264
|
+
const diagnosticsDetails = diagnosticsDetailSection(details, summary);
|
|
36161
36265
|
if (diagnosticsDetails)
|
|
36162
36266
|
sections.push(diagnosticsDetails);
|
|
36163
36267
|
}
|
|
@@ -37363,11 +37467,11 @@ var PLUGIN_VERSION = (() => {
|
|
|
37363
37467
|
return "0.0.0";
|
|
37364
37468
|
}
|
|
37365
37469
|
})();
|
|
37366
|
-
var ANNOUNCEMENT_VERSION = "0.49.
|
|
37470
|
+
var ANNOUNCEMENT_VERSION = "0.49.2";
|
|
37367
37471
|
var ANNOUNCEMENT_FEATURES = [
|
|
37368
|
-
"
|
|
37369
|
-
"
|
|
37370
|
-
"
|
|
37472
|
+
"No more zombie tasks: background commands die with their session — reclaimed worktrees and aborted calls both terminate their process groups, while deliberately backgrounded tasks keep surviving restarts.",
|
|
37473
|
+
"aft_inspect stops crying wolf: diagnostics from a still-warming analyzer no longer count as errors (rust-analyzer's readiness signal is now consumed), so E-counts match what the compiler actually says.",
|
|
37474
|
+
"Piped commands can't hide failures: when an upstream command fails behind a successful pipe tail, the output says so. Plus zoom into nested JSON paths, range hints on large reads, and better edit errors (thanks @iceteaSA)."
|
|
37371
37475
|
];
|
|
37372
37476
|
var ANNOUNCEMENT_FOOTER = "Join us on Discord: https://discord.gg/DSa65w8wuf";
|
|
37373
37477
|
var pendingEagerWarnings = new Map;
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AA8QH,wCAAwC;AACxC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAoD7E;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.49.
|
|
3
|
+
"version": "0.49.2",
|
|
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.
|
|
26
|
+
"@cortexkit/aft-bridge": "0.49.2",
|
|
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.
|
|
34
|
-
"@cortexkit/aft-darwin-x64": "0.49.
|
|
35
|
-
"@cortexkit/aft-linux-arm64": "0.49.
|
|
36
|
-
"@cortexkit/aft-linux-x64": "0.49.
|
|
37
|
-
"@cortexkit/aft-win32-arm64": "0.49.
|
|
38
|
-
"@cortexkit/aft-win32-x64": "0.49.
|
|
33
|
+
"@cortexkit/aft-darwin-arm64": "0.49.2",
|
|
34
|
+
"@cortexkit/aft-darwin-x64": "0.49.2",
|
|
35
|
+
"@cortexkit/aft-linux-arm64": "0.49.2",
|
|
36
|
+
"@cortexkit/aft-linux-x64": "0.49.2",
|
|
37
|
+
"@cortexkit/aft-win32-arm64": "0.49.2",
|
|
38
|
+
"@cortexkit/aft-win32-x64": "0.49.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@earendil-works/pi-coding-agent": "^0.80.2",
|