@cortexkit/aft-pi 0.37.2 → 0.39.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/index.d.ts.map +1 -1
- package/dist/index.js +229 -80
- package/dist/shared/status.d.ts.map +1 -1
- package/dist/shutdown-hooks.d.ts +14 -0
- package/dist/shutdown-hooks.d.ts.map +1 -1
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/ast.d.ts +3 -3
- package/dist/tools/ast.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAcH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AASpE,OAAO,EACL,KAAK,SAAS,EACd,aAAa,EAId,MAAM,aAAa,CAAC;AA8DrB,KAAK,mBAAmB,GAAG;IACzB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9C,CAAC;AAEF,iBAAS,4BAA4B,CACnC,OAAO,EAAE,MAAM,mBAAmB,GAAG,SAAS,EAC9C,sBAAsB,GAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAgB,IAOrE,eAAe,MAAM,EAAE,YAAY,MAAM,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyCjF;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAcH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AASpE,OAAO,EACL,KAAK,SAAS,EACd,aAAa,EAId,MAAM,aAAa,CAAC;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E,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,CA+e9D;AAED,eAAO,MAAM,QAAQ;;;;;;CAMpB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11688,25 +11688,26 @@ function maybeAppendConflictsHint(output) {
|
|
|
11688
11688
|
return output;
|
|
11689
11689
|
return output + CONFLICT_HINT;
|
|
11690
11690
|
}
|
|
11691
|
-
function
|
|
11692
|
-
const
|
|
11693
|
-
if (
|
|
11694
|
-
return false;
|
|
11695
|
-
const afterCd = peelLeadingCdAnd(trimmed);
|
|
11696
|
-
if (afterCd === null)
|
|
11697
|
-
return false;
|
|
11698
|
-
const firstStage = firstPipelineStage(afterCd);
|
|
11699
|
-
if (firstStage === null)
|
|
11700
|
-
return false;
|
|
11701
|
-
const firstToken = readShellToken(firstStage, skipSpaces(firstStage, 0));
|
|
11702
|
-
if (firstToken === null)
|
|
11691
|
+
function commandInvokesCodeSearch(command) {
|
|
11692
|
+
const statements = splitTopLevelStatements(command);
|
|
11693
|
+
if (statements === null)
|
|
11703
11694
|
return false;
|
|
11704
|
-
|
|
11695
|
+
for (const statement of statements) {
|
|
11696
|
+
const firstStage = firstPipelineStage(statement);
|
|
11697
|
+
if (firstStage === null)
|
|
11698
|
+
continue;
|
|
11699
|
+
const firstToken = readShellToken(firstStage, skipSpaces(firstStage, 0));
|
|
11700
|
+
if (firstToken === null)
|
|
11701
|
+
continue;
|
|
11702
|
+
if (firstToken.token === "grep" || firstToken.token === "rg")
|
|
11703
|
+
return true;
|
|
11704
|
+
}
|
|
11705
|
+
return false;
|
|
11705
11706
|
}
|
|
11706
11707
|
function maybeAppendGrepSearchHint(output, command, aftSearchRegistered) {
|
|
11707
11708
|
if (output === "")
|
|
11708
11709
|
return output;
|
|
11709
|
-
if (!
|
|
11710
|
+
if (!commandInvokesCodeSearch(command))
|
|
11710
11711
|
return output;
|
|
11711
11712
|
if (output.includes(GREP_SEARCH_HINT_PREFIX))
|
|
11712
11713
|
return output;
|
|
@@ -11715,21 +11716,78 @@ function maybeAppendGrepSearchHint(output, command, aftSearchRegistered) {
|
|
|
11715
11716
|
|
|
11716
11717
|
${hint}`;
|
|
11717
11718
|
}
|
|
11718
|
-
function
|
|
11719
|
-
const
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11719
|
+
function splitTopLevelStatements(command) {
|
|
11720
|
+
const statements = [];
|
|
11721
|
+
let start = 0;
|
|
11722
|
+
let quote = "none";
|
|
11723
|
+
let escaped = false;
|
|
11724
|
+
let inBacktick = false;
|
|
11725
|
+
let parenDepth = 0;
|
|
11726
|
+
for (let index = 0;index < command.length; index++) {
|
|
11727
|
+
const ch = command[index];
|
|
11728
|
+
if (escaped) {
|
|
11729
|
+
escaped = false;
|
|
11730
|
+
continue;
|
|
11731
|
+
}
|
|
11732
|
+
if (quote === "single") {
|
|
11733
|
+
if (ch === "'")
|
|
11734
|
+
quote = "none";
|
|
11735
|
+
continue;
|
|
11736
|
+
}
|
|
11737
|
+
if (quote === "double") {
|
|
11738
|
+
if (ch === "\\")
|
|
11739
|
+
escaped = true;
|
|
11740
|
+
else if (ch === '"')
|
|
11741
|
+
quote = "none";
|
|
11742
|
+
continue;
|
|
11743
|
+
}
|
|
11744
|
+
if (inBacktick) {
|
|
11745
|
+
if (ch === "`")
|
|
11746
|
+
inBacktick = false;
|
|
11747
|
+
continue;
|
|
11748
|
+
}
|
|
11749
|
+
if (ch === "\\") {
|
|
11750
|
+
escaped = true;
|
|
11751
|
+
continue;
|
|
11752
|
+
}
|
|
11753
|
+
if (ch === "'") {
|
|
11754
|
+
quote = "single";
|
|
11755
|
+
continue;
|
|
11756
|
+
}
|
|
11757
|
+
if (ch === '"') {
|
|
11758
|
+
quote = "double";
|
|
11759
|
+
continue;
|
|
11760
|
+
}
|
|
11761
|
+
if (ch === "`") {
|
|
11762
|
+
inBacktick = true;
|
|
11763
|
+
continue;
|
|
11764
|
+
}
|
|
11765
|
+
if (ch === "(") {
|
|
11766
|
+
parenDepth++;
|
|
11767
|
+
continue;
|
|
11768
|
+
}
|
|
11769
|
+
if (ch === ")") {
|
|
11770
|
+
if (parenDepth > 0)
|
|
11771
|
+
parenDepth--;
|
|
11772
|
+
continue;
|
|
11773
|
+
}
|
|
11774
|
+
if (parenDepth > 0)
|
|
11775
|
+
continue;
|
|
11776
|
+
const next = command[index + 1];
|
|
11777
|
+
if (ch === "&" && next === "&" || ch === "|" && next === "|") {
|
|
11778
|
+
statements.push(command.slice(start, index));
|
|
11779
|
+
index++;
|
|
11780
|
+
start = index + 1;
|
|
11781
|
+
} else if (ch === ";" || ch === `
|
|
11782
|
+
` || ch === "&") {
|
|
11783
|
+
statements.push(command.slice(start, index));
|
|
11784
|
+
start = index + 1;
|
|
11785
|
+
}
|
|
11786
|
+
}
|
|
11787
|
+
if (quote !== "none" || inBacktick || escaped)
|
|
11726
11788
|
return null;
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
const afterDir = skipSpaces(command, dir.end);
|
|
11730
|
-
if (!command.startsWith("&&", afterDir))
|
|
11731
|
-
return command;
|
|
11732
|
-
return command.slice(afterDir + 2).trim();
|
|
11789
|
+
statements.push(command.slice(start));
|
|
11790
|
+
return statements;
|
|
11733
11791
|
}
|
|
11734
11792
|
function firstPipelineStage(command) {
|
|
11735
11793
|
let quote = "none";
|
|
@@ -14327,37 +14385,67 @@ var GREP_GUARD_FLAGS = new Set([
|
|
|
14327
14385
|
function maybeStripCompressorPipe(command, compressionEnabled) {
|
|
14328
14386
|
if (!compressionEnabled)
|
|
14329
14387
|
return { command, stripped: false };
|
|
14330
|
-
|
|
14331
|
-
return { command, stripped: false };
|
|
14332
|
-
const chain = splitTopLevelAndChain(command);
|
|
14388
|
+
const chain = splitTopLevelCommandChain(command);
|
|
14333
14389
|
if (chain === null)
|
|
14334
14390
|
return { command, stripped: false };
|
|
14335
|
-
|
|
14336
|
-
const
|
|
14337
|
-
const
|
|
14338
|
-
|
|
14391
|
+
let stripped = false;
|
|
14392
|
+
const droppedFilterChains = [];
|
|
14393
|
+
const rebuilt = chain.map(({ segment, separator }) => {
|
|
14394
|
+
const result = stripSinglePipelineSegment(segment);
|
|
14395
|
+
if (result.stripped) {
|
|
14396
|
+
stripped = true;
|
|
14397
|
+
droppedFilterChains.push(result.filters);
|
|
14398
|
+
}
|
|
14399
|
+
return `${result.segment}${separator}`;
|
|
14400
|
+
}).join("");
|
|
14401
|
+
if (!stripped)
|
|
14339
14402
|
return { command, stripped: false };
|
|
14403
|
+
return {
|
|
14404
|
+
command: rebuilt,
|
|
14405
|
+
stripped: true,
|
|
14406
|
+
note: formatStripNote(droppedFilterChains)
|
|
14407
|
+
};
|
|
14408
|
+
}
|
|
14409
|
+
function stripSinglePipelineSegment(segment) {
|
|
14410
|
+
const leading = /^\s*/.exec(segment)?.[0] ?? "";
|
|
14411
|
+
const trailing = /\s*$/.exec(segment)?.[0] ?? "";
|
|
14412
|
+
const coreStart = leading.length;
|
|
14413
|
+
const coreEnd = segment.length - trailing.length;
|
|
14414
|
+
if (coreEnd <= coreStart)
|
|
14415
|
+
return { segment, stripped: false };
|
|
14416
|
+
const core = segment.slice(coreStart, coreEnd);
|
|
14417
|
+
if (containsUnsplittableConstruct(core))
|
|
14418
|
+
return { segment, stripped: false };
|
|
14419
|
+
if (hasUnquotedBackground(core))
|
|
14420
|
+
return { segment, stripped: false };
|
|
14421
|
+
const stages = splitTopLevelPipeline(core);
|
|
14422
|
+
if (stages.length < 2)
|
|
14423
|
+
return { segment, stripped: false };
|
|
14340
14424
|
const firstStage = stages[0]?.trim() ?? "";
|
|
14341
14425
|
if (!isCompressorHandledRunner(firstStage))
|
|
14342
|
-
return {
|
|
14426
|
+
return { segment, stripped: false };
|
|
14343
14427
|
const filterStages = stages.slice(1).map((stage) => stage.trim());
|
|
14344
14428
|
for (const stage of filterStages) {
|
|
14345
14429
|
if (!filterStageIsSafeToDrop(stage))
|
|
14346
|
-
return {
|
|
14430
|
+
return { segment, stripped: false };
|
|
14347
14431
|
}
|
|
14348
|
-
const filters = filterStages.join(" | ");
|
|
14349
|
-
const rebuilt = [...prefix, firstStage].join(" && ");
|
|
14350
14432
|
return {
|
|
14351
|
-
|
|
14433
|
+
segment: `${leading}${firstStage}${trailing}`,
|
|
14352
14434
|
stripped: true,
|
|
14353
|
-
|
|
14435
|
+
filters: filterStages.join(" | ")
|
|
14354
14436
|
};
|
|
14355
14437
|
}
|
|
14356
|
-
function
|
|
14438
|
+
function formatStripNote(droppedFilterChains) {
|
|
14439
|
+
const filters = droppedFilterChains.map((filter) => `\`| ${filter}\``).join(", ");
|
|
14440
|
+
return `[AFT dropped ${filters} (compressed:false to keep)]`;
|
|
14441
|
+
}
|
|
14442
|
+
function splitTopLevelCommandChain(command) {
|
|
14357
14443
|
const segments = [];
|
|
14358
14444
|
let start = 0;
|
|
14359
14445
|
let quote = null;
|
|
14360
14446
|
let escaped = false;
|
|
14447
|
+
let inBacktick = false;
|
|
14448
|
+
let parenDepth = 0;
|
|
14361
14449
|
for (let index = 0;index < command.length; index++) {
|
|
14362
14450
|
const char = command[index];
|
|
14363
14451
|
const next = command[index + 1];
|
|
@@ -14365,6 +14453,13 @@ function splitTopLevelAndChain(command) {
|
|
|
14365
14453
|
escaped = false;
|
|
14366
14454
|
continue;
|
|
14367
14455
|
}
|
|
14456
|
+
if (inBacktick) {
|
|
14457
|
+
if (char === "\\")
|
|
14458
|
+
escaped = true;
|
|
14459
|
+
else if (char === "`")
|
|
14460
|
+
inBacktick = false;
|
|
14461
|
+
continue;
|
|
14462
|
+
}
|
|
14368
14463
|
if (char === "\\" && quote !== "'") {
|
|
14369
14464
|
escaped = true;
|
|
14370
14465
|
continue;
|
|
@@ -14378,26 +14473,47 @@ function splitTopLevelAndChain(command) {
|
|
|
14378
14473
|
quote = char;
|
|
14379
14474
|
continue;
|
|
14380
14475
|
}
|
|
14381
|
-
if (char === "
|
|
14382
|
-
|
|
14383
|
-
start = index + 2;
|
|
14384
|
-
index++;
|
|
14476
|
+
if (char === "`") {
|
|
14477
|
+
inBacktick = true;
|
|
14385
14478
|
continue;
|
|
14386
14479
|
}
|
|
14387
|
-
if (char === "
|
|
14388
|
-
|
|
14389
|
-
|
|
14390
|
-
|
|
14480
|
+
if (char === "(") {
|
|
14481
|
+
parenDepth++;
|
|
14482
|
+
continue;
|
|
14483
|
+
}
|
|
14484
|
+
if (char === ")") {
|
|
14485
|
+
if (parenDepth === 0)
|
|
14486
|
+
return null;
|
|
14487
|
+
parenDepth--;
|
|
14488
|
+
continue;
|
|
14489
|
+
}
|
|
14490
|
+
if (parenDepth > 0)
|
|
14491
|
+
continue;
|
|
14391
14492
|
if (char === `
|
|
14392
14493
|
` || char === "\r")
|
|
14393
14494
|
return null;
|
|
14394
|
-
if (char === "
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
|
|
14495
|
+
if (char === "#" && (index === 0 || command[index - 1] === " " || command[index - 1] === "\t"))
|
|
14496
|
+
return null;
|
|
14497
|
+
if (char === "&" && next === "&") {
|
|
14498
|
+
segments.push({ segment: command.slice(start, index), separator: "&&" });
|
|
14499
|
+
start = index + 2;
|
|
14500
|
+
index++;
|
|
14501
|
+
continue;
|
|
14502
|
+
}
|
|
14503
|
+
if (char === "|" && next === "|") {
|
|
14504
|
+
segments.push({ segment: command.slice(start, index), separator: "||" });
|
|
14505
|
+
start = index + 2;
|
|
14506
|
+
index++;
|
|
14507
|
+
continue;
|
|
14508
|
+
}
|
|
14509
|
+
if (char === ";") {
|
|
14510
|
+
segments.push({ segment: command.slice(start, index), separator: ";" });
|
|
14511
|
+
start = index + 1;
|
|
14398
14512
|
}
|
|
14399
14513
|
}
|
|
14400
|
-
|
|
14514
|
+
if (escaped || quote || inBacktick || parenDepth !== 0)
|
|
14515
|
+
return null;
|
|
14516
|
+
segments.push({ segment: command.slice(start), separator: "" });
|
|
14401
14517
|
return segments;
|
|
14402
14518
|
}
|
|
14403
14519
|
function splitTopLevelPipeline(command) {
|
|
@@ -14460,13 +14576,13 @@ function isCompressorHandledRunner(stage) {
|
|
|
14460
14576
|
args = args.slice(1);
|
|
14461
14577
|
const sub = args[0];
|
|
14462
14578
|
const subNext = args[1];
|
|
14463
|
-
return sub === "test" || sub === "run" &&
|
|
14579
|
+
return sub === "test" || sub === "run" && isJsVerificationScript(subNext);
|
|
14464
14580
|
}
|
|
14465
14581
|
if (first === "npm" || first === "pnpm") {
|
|
14466
|
-
return second === "test" || second === "run" &&
|
|
14582
|
+
return second === "test" || second === "run" && isJsVerificationScript(third);
|
|
14467
14583
|
}
|
|
14468
14584
|
if (first === "yarn") {
|
|
14469
|
-
return
|
|
14585
|
+
return isJsVerificationScript(second) || second === "run" && isJsVerificationScript(third);
|
|
14470
14586
|
}
|
|
14471
14587
|
if (first === "deno")
|
|
14472
14588
|
return ["test", "lint", "check", "bench"].includes(second ?? "");
|
|
@@ -14544,8 +14660,10 @@ function hasBuildTask(args, tasks) {
|
|
|
14544
14660
|
}
|
|
14545
14661
|
return sawAllowed;
|
|
14546
14662
|
}
|
|
14547
|
-
function
|
|
14548
|
-
|
|
14663
|
+
function isJsVerificationScript(token) {
|
|
14664
|
+
if (!token)
|
|
14665
|
+
return false;
|
|
14666
|
+
return token.startsWith("test") || token === "typecheck" || token.startsWith("typecheck:");
|
|
14549
14667
|
}
|
|
14550
14668
|
var XCODEBUILD_VALUE_FLAGS = new Set([
|
|
14551
14669
|
"-scheme",
|
|
@@ -15700,7 +15818,7 @@ import {
|
|
|
15700
15818
|
// package.json
|
|
15701
15819
|
var package_default = {
|
|
15702
15820
|
name: "@cortexkit/aft-pi",
|
|
15703
|
-
version: "0.
|
|
15821
|
+
version: "0.39.0",
|
|
15704
15822
|
type: "module",
|
|
15705
15823
|
description: "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
|
|
15706
15824
|
main: "dist/index.js",
|
|
@@ -15723,7 +15841,7 @@ var package_default = {
|
|
|
15723
15841
|
"test:unit": "bun test src/__tests__ --path-ignore-patterns 'src/__tests__/e2e/**'"
|
|
15724
15842
|
},
|
|
15725
15843
|
dependencies: {
|
|
15726
|
-
"@cortexkit/aft-bridge": "0.
|
|
15844
|
+
"@cortexkit/aft-bridge": "0.39.0",
|
|
15727
15845
|
"@xterm/headless": "^5.5.0",
|
|
15728
15846
|
"comment-json": "^5.0.0",
|
|
15729
15847
|
diff: "^8.0.4",
|
|
@@ -15731,12 +15849,12 @@ var package_default = {
|
|
|
15731
15849
|
zod: "^4.1.8"
|
|
15732
15850
|
},
|
|
15733
15851
|
optionalDependencies: {
|
|
15734
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
15735
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
15736
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
15737
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
15738
|
-
"@cortexkit/aft-win32-arm64": "0.
|
|
15739
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
15852
|
+
"@cortexkit/aft-darwin-arm64": "0.39.0",
|
|
15853
|
+
"@cortexkit/aft-darwin-x64": "0.39.0",
|
|
15854
|
+
"@cortexkit/aft-linux-arm64": "0.39.0",
|
|
15855
|
+
"@cortexkit/aft-linux-x64": "0.39.0",
|
|
15856
|
+
"@cortexkit/aft-win32-arm64": "0.39.0",
|
|
15857
|
+
"@cortexkit/aft-win32-x64": "0.39.0"
|
|
15740
15858
|
},
|
|
15741
15859
|
devDependencies: {
|
|
15742
15860
|
"@earendil-works/pi-coding-agent": "*",
|
|
@@ -15945,7 +16063,7 @@ function formatStatusDialogMessage(status) {
|
|
|
15945
16063
|
lines.push("", "Disk usage", `- trigram index: ${formatBytes(status.disk.trigram_disk_bytes)}`, `- semantic index: ${formatBytes(status.disk.semantic_disk_bytes)}`, "", "Runtime", `- LSP servers: ${formatCount(status.lsp_servers)}`, `- symbol cache: ${formatCount(status.symbol_cache.local_entries)} local / ${formatCount(status.symbol_cache.warm_entries)} warm`);
|
|
15946
16064
|
if (status.status_bar) {
|
|
15947
16065
|
const sb = status.status_bar;
|
|
15948
|
-
lines.push("", `Code Health${sb.tier2_stale ? " (~ stale)" : ""}`, `- errors: ${formatCount(sb.errors)}`, `- warnings: ${formatCount(sb.warnings)}`, `- duplicates: ${formatCount(sb.duplicates)}`, `- todos: ${formatCount(sb.todos)}`);
|
|
16066
|
+
lines.push("", `Code Health${sb.tier2_stale ? " (~ stale)" : ""}`, `- errors: ${formatCount(sb.errors)}`, `- warnings: ${formatCount(sb.warnings)}`, `- dead code: ${formatCount(sb.dead_code)}`, `- unused exports: ${formatCount(sb.unused_exports)}`, `- duplicates: ${formatCount(sb.duplicates)}`, `- todos: ${formatCount(sb.todos)}`);
|
|
15949
16067
|
}
|
|
15950
16068
|
if (status.storage_dir ?? status.disk.storage_dir) {
|
|
15951
16069
|
lines.push(`- storage dir: ${status.storage_dir ?? status.disk.storage_dir}`);
|
|
@@ -15972,7 +16090,7 @@ var optionalInt = (_min, _max) => Type.Optional(Type.Any({ description: "(intege
|
|
|
15972
16090
|
function coerceOptionalInt(v, paramName, min, max) {
|
|
15973
16091
|
if (v === undefined || v === null || v === "")
|
|
15974
16092
|
return;
|
|
15975
|
-
if (typeof v === "number" && (v === 0
|
|
16093
|
+
if (typeof v === "number" && (!Number.isFinite(v) || v === 0 && min > 0))
|
|
15976
16094
|
return;
|
|
15977
16095
|
const n = typeof v === "string" ? Number(v) : v;
|
|
15978
16096
|
if (typeof n !== "number" || !Number.isInteger(n)) {
|
|
@@ -16042,7 +16160,15 @@ ${candidates.map((candidate) => ` - ${candidate}`).join(`
|
|
|
16042
16160
|
`);
|
|
16043
16161
|
}
|
|
16044
16162
|
function collectStructuredExtras(response) {
|
|
16045
|
-
const reserved = new Set([
|
|
16163
|
+
const reserved = new Set([
|
|
16164
|
+
"id",
|
|
16165
|
+
"success",
|
|
16166
|
+
"code",
|
|
16167
|
+
"message",
|
|
16168
|
+
"data",
|
|
16169
|
+
"status_bar",
|
|
16170
|
+
"bg_completions"
|
|
16171
|
+
]);
|
|
16046
16172
|
const extras = {};
|
|
16047
16173
|
for (const [key, value] of Object.entries(response)) {
|
|
16048
16174
|
if (reserved.has(key))
|
|
@@ -32490,6 +32616,12 @@ async function runCleanups(reason) {
|
|
|
32490
32616
|
}
|
|
32491
32617
|
}));
|
|
32492
32618
|
}
|
|
32619
|
+
var SIGNAL_EXIT_CODES = { SIGINT: 130, SIGTERM: 143, SIGHUP: 129 };
|
|
32620
|
+
var SIGNAL_CLEANUP_TIMEOUT_MS = 5000;
|
|
32621
|
+
function shouldForceExit(otherListenerCount) {
|
|
32622
|
+
return otherListenerCount === 0;
|
|
32623
|
+
}
|
|
32624
|
+
var signalShutdownStarted = false;
|
|
32493
32625
|
function installProcessHandlers() {
|
|
32494
32626
|
const state = getState();
|
|
32495
32627
|
if (state.installed)
|
|
@@ -32497,9 +32629,27 @@ function installProcessHandlers() {
|
|
|
32497
32629
|
state.installed = true;
|
|
32498
32630
|
const signals = ["SIGTERM", "SIGINT", "SIGHUP"];
|
|
32499
32631
|
for (const sig of signals) {
|
|
32500
|
-
|
|
32501
|
-
|
|
32502
|
-
|
|
32632
|
+
const handler = () => {
|
|
32633
|
+
const others = process.listenerCount(sig) - 1;
|
|
32634
|
+
if (!shouldForceExit(others)) {
|
|
32635
|
+
const names = process.listeners(sig).filter((fn) => fn !== handler).map((fn) => fn.name || fn.toString().slice(0, 80).replace(/\s+/g, " ")).join(" | ");
|
|
32636
|
+
log2(`${sig}: deferring termination to ${others} other listener(s); cleanup only. Others: ${names}`);
|
|
32637
|
+
runCleanups(sig);
|
|
32638
|
+
return;
|
|
32639
|
+
}
|
|
32640
|
+
if (signalShutdownStarted) {
|
|
32641
|
+
process.exit(SIGNAL_EXIT_CODES[sig]);
|
|
32642
|
+
}
|
|
32643
|
+
signalShutdownStarted = true;
|
|
32644
|
+
process.exitCode = SIGNAL_EXIT_CODES[sig];
|
|
32645
|
+
const timeout = new Promise((resolve3) => {
|
|
32646
|
+
setTimeout(resolve3, SIGNAL_CLEANUP_TIMEOUT_MS);
|
|
32647
|
+
});
|
|
32648
|
+
Promise.race([runCleanups(sig), timeout]).finally(() => {
|
|
32649
|
+
process.exit(SIGNAL_EXIT_CODES[sig]);
|
|
32650
|
+
});
|
|
32651
|
+
};
|
|
32652
|
+
process.on(sig, handler);
|
|
32503
32653
|
}
|
|
32504
32654
|
process.on("beforeExit", () => {
|
|
32505
32655
|
runCleanups("beforeExit");
|
|
@@ -33257,7 +33407,7 @@ function renderUnifiedDiff(unifiedDiff) {
|
|
|
33257
33407
|
}
|
|
33258
33408
|
|
|
33259
33409
|
// src/tools/ast.ts
|
|
33260
|
-
var AstLang = StringEnum(["typescript", "tsx", "javascript", "python", "rust", "go"], {
|
|
33410
|
+
var AstLang = StringEnum(["typescript", "tsx", "javascript", "python", "rust", "go", "pascal"], {
|
|
33261
33411
|
description: "Target language"
|
|
33262
33412
|
});
|
|
33263
33413
|
var SearchParams = Type3.Object({
|
|
@@ -36108,12 +36258,11 @@ var PLUGIN_VERSION = (() => {
|
|
|
36108
36258
|
return "0.0.0";
|
|
36109
36259
|
}
|
|
36110
36260
|
})();
|
|
36111
|
-
var ANNOUNCEMENT_VERSION = "0.
|
|
36261
|
+
var ANNOUNCEMENT_VERSION = "0.39.0";
|
|
36112
36262
|
var ANNOUNCEMENT_FEATURES = [
|
|
36113
|
-
"
|
|
36114
|
-
"
|
|
36115
|
-
"
|
|
36116
|
-
"Background bash reminders are right-sized: failures keep head + tail context, successes show a short tail, and compressors never print a success summary for a non-zero exit."
|
|
36263
|
+
"Accurate Rust dead code: constructors and associated functions reached through receiver-type inference are no longer mis-reported as dead.",
|
|
36264
|
+
"Code Health scans reparse only the file you changed instead of the whole project on every edit — a single-file edit dropped from ~3s of scan work to ~130ms on this repo, byte-identical results.",
|
|
36265
|
+
"R language support in outline, zoom, and the AST tools."
|
|
36117
36266
|
];
|
|
36118
36267
|
var ANNOUNCEMENT_FOOTER = "Join us on Discord: https://discord.gg/DSa65w8wuf";
|
|
36119
36268
|
var ALL_ONLY_TOOLS = new Set(["aft_callgraph", "aft_delete", "aft_move", "aft_refactor"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/shared/status.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,0BAA0B,CAAC;IACpC,OAAO,EAAE,0BAA0B,CAAC;CACrC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,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E,MAAM,CAAC;IACpB,YAAY,EAAE;QACZ,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,iEAAiE;IACjE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4DAA4D;IAC5D,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,wEAAwE;IACxE,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAsED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAKvF;AAED,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/E;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAajD;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,iBAAiB,CAiEpF;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAiF3E;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAmFtE"}
|
package/dist/shutdown-hooks.d.ts
CHANGED
|
@@ -12,6 +12,20 @@
|
|
|
12
12
|
* once per Node process, even if the Pi extension loads multiple times.
|
|
13
13
|
*/
|
|
14
14
|
type Cleanup = () => Promise<void> | void;
|
|
15
|
+
/** Conventional exit codes for fatal signals (128 + signal number). */
|
|
16
|
+
export declare const SIGNAL_EXIT_CODES: {
|
|
17
|
+
readonly SIGINT: 130;
|
|
18
|
+
readonly SIGTERM: 143;
|
|
19
|
+
readonly SIGHUP: 129;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Registering ANY listener for SIGINT/SIGTERM/SIGHUP disables Node/Bun's
|
|
23
|
+
* default terminate-on-signal behavior. If AFT's listener is the only one,
|
|
24
|
+
* the default was suppressed solely by us, so we must exit or the host hangs
|
|
25
|
+
* forever. If the host or another extension also listens, terminating is
|
|
26
|
+
* their call. Mirror of the OpenCode plugin's shutdown-hooks contract.
|
|
27
|
+
*/
|
|
28
|
+
export declare function shouldForceExit(otherListenerCount: number): boolean;
|
|
15
29
|
/** Register a shutdown cleanup. Returns an unregister function. */
|
|
16
30
|
export declare function registerShutdownCleanup(fn: Cleanup): () => void;
|
|
17
31
|
export declare function __shutdownCleanupCountForTests(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shutdown-hooks.d.ts","sourceRoot":"","sources":["../src/shutdown-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,KAAK,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"shutdown-hooks.d.ts","sourceRoot":"","sources":["../src/shutdown-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,KAAK,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAuC1C,uEAAuE;AACvE,eAAO,MAAM,iBAAiB;;;;CAAsD,CAAC;AAKrF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAEnE;AAmDD,mEAAmE;AACnE,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,IAAI,CAO/D;AAED,wBAAgB,8BAA8B,IAAI,MAAM,CAEvD;AAED,wBAAgB,+BAA+B,IAAI,IAAI,CAGtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,8BACC,CAAC;AAExD,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,OAAO,EACV,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,8BACC,CAAC;AAExD,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,OAAO,EACV,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,SAAS,CAepB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMpD;AAID,OAAO,EAAE,+BAA+B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,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGvF"}
|
package/dist/tools/ast.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ast_grep_search + ast_grep_replace — AST-aware pattern search/rewrite.
|
|
3
|
-
*
|
|
3
|
+
* 7 languages: typescript, tsx, javascript, python, rust, go, pascal.
|
|
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" | "typescript" | "tsx" | "javascript" | "rust">;
|
|
11
|
+
lang: Type.TUnsafe<"go" | "python" | "typescript" | "tsx" | "javascript" | "rust" | "pascal">;
|
|
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" | "typescript" | "tsx" | "javascript" | "rust">;
|
|
19
|
+
lang: Type.TUnsafe<"go" | "python" | "typescript" | "tsx" | "javascript" | "rust" | "pascal">;
|
|
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>;
|
package/dist/tools/ast.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/tools/ast.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,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,EASL,KAAK,iBAAiB,EAMvB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/tools/ast.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,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,EASL,KAAK,iBAAiB,EAMvB,MAAM,qBAAqB,CAAC;AAS7B,QAAA,MAAM,YAAY;;;;;;EAehB,CAAC;AAEH,QAAA,MAAM,aAAa;;;;;;;EAOjB,CAAC;AAEH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AA4DD,wCAAwC;AACxC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAqD/E;AAED,wCAAwC;AACxC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAmDhF;AAED,wCAAwC;AACxC,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,iBAAiB,GAAG,kBAAkB,EAChD,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,EAChE,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,yCAa3B;AAED,wCAAwC;AACxC,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,iBAAiB,GAAG,kBAAkB,EAChD,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,sFAiB3B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CA0FhG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.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,7 +23,7 @@
|
|
|
23
23
|
"test:unit": "bun test src/__tests__ --path-ignore-patterns 'src/__tests__/e2e/**'"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cortexkit/aft-bridge": "0.
|
|
26
|
+
"@cortexkit/aft-bridge": "0.39.0",
|
|
27
27
|
"@xterm/headless": "^5.5.0",
|
|
28
28
|
"comment-json": "^5.0.0",
|
|
29
29
|
"diff": "^8.0.4",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"zod": "^4.1.8"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
35
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
36
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
37
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
38
|
-
"@cortexkit/aft-win32-arm64": "0.
|
|
39
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
34
|
+
"@cortexkit/aft-darwin-arm64": "0.39.0",
|
|
35
|
+
"@cortexkit/aft-darwin-x64": "0.39.0",
|
|
36
|
+
"@cortexkit/aft-linux-arm64": "0.39.0",
|
|
37
|
+
"@cortexkit/aft-linux-x64": "0.39.0",
|
|
38
|
+
"@cortexkit/aft-win32-arm64": "0.39.0",
|
|
39
|
+
"@cortexkit/aft-win32-x64": "0.39.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@earendil-works/pi-coding-agent": "*",
|