@cortexkit/aft-pi 0.38.0 → 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.
@@ -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;AAsDD,iBAAS,wBAAwB,CAC/B,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,iBAAiB,GAAG,UAAU,CAAC,GACtD,OAAO,CAGT;AAED,iBAAS,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9E;AASD,iBAAe,iCAAiC,CAAC,OAAO,EAAE;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,IAAI,CAAC,OAAO,uBAAuB,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;IACnE,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,a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E,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 commandLeadsWithCodeSearch(command) {
11692
- const trimmed = command.trim();
11693
- if (!trimmed)
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
- return firstToken.token === "grep" || firstToken.token === "rg";
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 (!commandLeadsWithCodeSearch(command))
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 peelLeadingCdAnd(command) {
11719
- const first = readShellToken(command, skipSpaces(command, 0));
11720
- if (first === null)
11721
- return null;
11722
- if (first.token !== "cd")
11723
- return command;
11724
- const dir = readShellToken(command, skipSpaces(command, first.end));
11725
- if (dir === null)
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
- if (!dir.token)
11728
- return command;
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";
@@ -15760,7 +15818,7 @@ import {
15760
15818
  // package.json
15761
15819
  var package_default = {
15762
15820
  name: "@cortexkit/aft-pi",
15763
- version: "0.38.0",
15821
+ version: "0.39.0",
15764
15822
  type: "module",
15765
15823
  description: "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
15766
15824
  main: "dist/index.js",
@@ -15783,7 +15841,7 @@ var package_default = {
15783
15841
  "test:unit": "bun test src/__tests__ --path-ignore-patterns 'src/__tests__/e2e/**'"
15784
15842
  },
15785
15843
  dependencies: {
15786
- "@cortexkit/aft-bridge": "0.38.0",
15844
+ "@cortexkit/aft-bridge": "0.39.0",
15787
15845
  "@xterm/headless": "^5.5.0",
15788
15846
  "comment-json": "^5.0.0",
15789
15847
  diff: "^8.0.4",
@@ -15791,12 +15849,12 @@ var package_default = {
15791
15849
  zod: "^4.1.8"
15792
15850
  },
15793
15851
  optionalDependencies: {
15794
- "@cortexkit/aft-darwin-arm64": "0.38.0",
15795
- "@cortexkit/aft-darwin-x64": "0.38.0",
15796
- "@cortexkit/aft-linux-arm64": "0.38.0",
15797
- "@cortexkit/aft-linux-x64": "0.38.0",
15798
- "@cortexkit/aft-win32-arm64": "0.38.0",
15799
- "@cortexkit/aft-win32-x64": "0.38.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"
15800
15858
  },
15801
15859
  devDependencies: {
15802
15860
  "@earendil-works/pi-coding-agent": "*",
@@ -36200,12 +36258,11 @@ var PLUGIN_VERSION = (() => {
36200
36258
  return "0.0.0";
36201
36259
  }
36202
36260
  })();
36203
- var ANNOUNCEMENT_VERSION = "0.38.0";
36261
+ var ANNOUNCEMENT_VERSION = "0.39.0";
36204
36262
  var ANNOUNCEMENT_FEATURES = [
36205
- "Code Health you can trust: dead code and unused exports are back in the status displays, rebuilt on a real TS/JS module-graph engine (oxc) barrel re-exports, entry points, and dynamic imports resolve correctly now.",
36206
- "Tools stay responsive during builds: filesystem events are processed off the request thread, so a cargo/webpack compile no longer queues your tool calls behind an event flood.",
36207
- "Pascal support in outline, zoom, and the AST tools.",
36208
- "Transient environment errors (schema fetch timeouts) no longer count as code errors in the status bar."
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."
36209
36266
  ];
36210
36267
  var ANNOUNCEMENT_FOOTER = "Join us on Discord: https://discord.gg/DSa65w8wuf";
36211
36268
  var ALL_ONLY_TOOLS = new Set(["aft_callgraph", "aft_delete", "aft_move", "aft_refactor"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft-pi",
3
- "version": "0.38.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.38.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.38.0",
35
- "@cortexkit/aft-darwin-x64": "0.38.0",
36
- "@cortexkit/aft-linux-arm64": "0.38.0",
37
- "@cortexkit/aft-linux-x64": "0.38.0",
38
- "@cortexkit/aft-win32-arm64": "0.38.0",
39
- "@cortexkit/aft-win32-x64": "0.38.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": "*",