free-pi-cli 0.4.4 → 0.4.5

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.js CHANGED
@@ -27,4 +27,4 @@ if (err) {
27
27
  console.error(err);
28
28
  process.exit(1);
29
29
  }
30
- await import("./main-4wwh354d.js");
30
+ await import("./main-r61kpjqw.js");
@@ -45,7 +45,7 @@ function openBrowser(url, platform = process.platform, spawnImpl = spawn) {
45
45
  // package.json
46
46
  var package_default = {
47
47
  name: "free-pi-cli",
48
- version: "0.4.4",
48
+ version: "0.4.5",
49
49
  description: "Free, ad-supported distribution of the pi coding agent. Inference paid for by ads.",
50
50
  license: "MIT",
51
51
  type: "module",
@@ -6602,6 +6602,12 @@ function installFooterRightAlign(mode) {
6602
6602
 
6603
6603
  // src/changelog.ts
6604
6604
  var CHANGELOG_HIGHLIGHTS = [
6605
+ {
6606
+ version: "0.4.5",
6607
+ highlights: [
6608
+ "New /reverse-engineer-anything command: loads REA reverse-engineering tools (apps, binaries, APKs, websites) into the session. For lawful, authorized analysis only."
6609
+ ]
6610
+ },
6605
6611
  {
6606
6612
  version: "0.4.4",
6607
6613
  highlights: [
@@ -6848,6 +6854,33 @@ async function showUsage(opts, ctx) {
6848
6854
  const r = await fetchUsageText(opts);
6849
6855
  ctx.ui.notify(r.text, r.ok ? "info" : "error");
6850
6856
  }
6857
+ var REA_ARGS = ["-y", "rea-agents@6.7.0", "mcp"];
6858
+ var REA_DESCRIPTION = "Reverse-engineering tools (REA): native binaries, JS/Electron apps, APKs, .NET, websites. Use for lawful, authorized analysis only.";
6859
+ var REA_NODE_RANGE = "^22.19.0, ^24.11.0, or >=26.0.0";
6860
+ function reaSupportsNode(version) {
6861
+ const [major = 0, minor = 0] = version.split(".").map(Number);
6862
+ return major >= 26 || major === 24 && minor >= 11 || major === 22 && minor >= 19;
6863
+ }
6864
+ function loadRea(pi, opts, ctx) {
6865
+ const nodeVersion = opts.nodeVersion ?? process.versions.node;
6866
+ if (!reaSupportsNode(nodeVersion)) {
6867
+ ctx.ui.notify(`REA needs Node ${REA_NODE_RANGE}; you are on Node ${nodeVersion}. Update Node and restart free-pi-cli.`, "error");
6868
+ return;
6869
+ }
6870
+ if (pi.getMcpServers().some((s) => s.name === "rea")) {
6871
+ ctx.ui.notify("REA is already loaded in this session.", "info");
6872
+ return;
6873
+ }
6874
+ const win = (opts.platform ?? process.platform) === "win32";
6875
+ const server = opts.reaServer ?? (win ? { command: "cmd.exe", args: ["/d", "/c", "npx", ...REA_ARGS] } : { command: "npx", args: REA_ARGS });
6876
+ try {
6877
+ pi.registerMcpServer("rea", { ...server, exposure: "codemode", description: REA_DESCRIPTION, timeout: 300 });
6878
+ } catch {
6879
+ ctx.ui.notify("Couldn't load REA in this session.", "error");
6880
+ return;
6881
+ }
6882
+ ctx.ui.notify("Loading REA (reverse-engineering tools) for this session. The first run downloads rea-agents, so it can take a minute. Deep native analysis needs your own Hopper, Ghidra, or IDA install.", "info");
6883
+ }
6851
6884
  function createFreePiCommandsExtension(opts) {
6852
6885
  return {
6853
6886
  name: "free-pi-commands",
@@ -6885,6 +6918,10 @@ function createFreePiCommandsExtension(opts) {
6885
6918
  description: "Open the free-pi Privacy Policy in your browser.",
6886
6919
  handler: (_args, ctx) => openPrivacyPolicy(opts, ctx)
6887
6920
  });
6921
+ pi.registerCommand("reverse-engineer-anything", {
6922
+ description: "Load reverse-engineering tools (REA: binaries, apps, APKs, websites) for this session.",
6923
+ handler: async (_args, ctx) => loadRea(pi, opts, ctx)
6924
+ });
6888
6925
  }
6889
6926
  };
6890
6927
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-pi-cli",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Free, ad-supported distribution of the pi coding agent. Inference paid for by ads.",
5
5
  "license": "MIT",
6
6
  "type": "module",