sharkbait 1.0.17 → 1.0.19

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.
Files changed (2) hide show
  1. package/dist/cli.js +57 -12
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -8746,7 +8746,7 @@ ${event.consolidated}`,
8746
8746
  }
8747
8747
 
8748
8748
  // src/version.ts
8749
- var VERSION = "1.0.17";
8749
+ var VERSION = "1.0.19";
8750
8750
 
8751
8751
  // src/agent/start-chat.ts
8752
8752
  async function startChat(options = {}) {
@@ -8956,6 +8956,7 @@ function SetupWizardWithCallback({ onComplete }) {
8956
8956
  const [saving, setSaving] = useState3(false);
8957
8957
  const [beadsInstallStatus, setBeadsInstallStatus] = useState3("pending");
8958
8958
  const [beadsInstallError, setBeadsInstallError] = useState3(null);
8959
+ const [beadsVersion, setBeadsVersion] = useState3(null);
8959
8960
  useEffect3(() => {
8960
8961
  loadExistingConfig();
8961
8962
  }, []);
@@ -9163,21 +9164,55 @@ function SetupWizardWithCallback({ onComplete }) {
9163
9164
  `;
9164
9165
  await writeFile4(join8(configDir2, ".env"), envContent);
9165
9166
  if (state.enableBeads) {
9166
- let bdAvailable = false;
9167
+ let bdVersion = null;
9167
9168
  try {
9168
- execSync("bd --version", { stdio: "ignore" });
9169
- bdAvailable = true;
9169
+ bdVersion = execSync("bd --version", { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
9170
9170
  } catch {}
9171
- if (!bdAvailable) {
9171
+ if (!bdVersion) {
9172
9172
  setBeadsInstallStatus("installing");
9173
9173
  try {
9174
- execSync("npm install -g @beads/bd", { stdio: "ignore", timeout: 60000 });
9175
- setBeadsInstallStatus("installed");
9174
+ if (process.platform === "win32") {
9175
+ const beadsVer = "0.57.0";
9176
+ const beadsDir = join8(homedir4(), "AppData", "Local", "beads");
9177
+ const bdExe = join8(beadsDir, "bd.exe");
9178
+ const zipUrl = `https://github.com/steveyegge/beads/releases/download/v${beadsVer}/beads_${beadsVer}_windows_amd64.zip`;
9179
+ const zipPath = join8(beadsDir, "beads.zip");
9180
+ execSync(`mkdir "${beadsDir}" 2>nul & echo ok`, { stdio: "ignore", shell: "cmd.exe" });
9181
+ execSync(`curl -fsSL -o "${zipPath}" "${zipUrl}"`, { stdio: "ignore", timeout: 120000 });
9182
+ execSync(`tar -xf "${zipPath}" -C "${beadsDir}"`, { stdio: "ignore", timeout: 30000 });
9183
+ try {
9184
+ execSync(`del "${zipPath}"`, { stdio: "ignore", shell: "cmd.exe" });
9185
+ } catch {}
9186
+ if (existsSync6(bdExe)) {
9187
+ try {
9188
+ const currentPath = execSync(`powershell -Command "[Environment]::GetEnvironmentVariable('PATH','User')"`, { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
9189
+ if (!currentPath.toLowerCase().includes(beadsDir.toLowerCase())) {
9190
+ execSync(`powershell -Command "[Environment]::SetEnvironmentVariable('PATH','${beadsDir};' + [Environment]::GetEnvironmentVariable('PATH','User'),'User')"`, { stdio: "ignore" });
9191
+ }
9192
+ } catch {}
9193
+ bdVersion = execSync(`"${bdExe}" --version`, { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
9194
+ }
9195
+ } else {
9196
+ try {
9197
+ execSync("curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash", { stdio: "ignore", timeout: 120000 });
9198
+ } catch {
9199
+ execSync("npm install -g @beads/bd", { stdio: "ignore", timeout: 120000 });
9200
+ }
9201
+ bdVersion = execSync("bd --version", { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
9202
+ }
9203
+ if (bdVersion) {
9204
+ setBeadsVersion(bdVersion);
9205
+ setBeadsInstallStatus("installed");
9206
+ } else {
9207
+ setBeadsInstallStatus("failed");
9208
+ setBeadsInstallError("bd installed but not found in PATH");
9209
+ }
9176
9210
  } catch (installErr) {
9177
9211
  setBeadsInstallStatus("failed");
9178
9212
  setBeadsInstallError(installErr instanceof Error ? installErr.message : String(installErr));
9179
9213
  }
9180
9214
  } else {
9215
+ setBeadsVersion(bdVersion);
9181
9216
  setBeadsInstallStatus("skipped");
9182
9217
  }
9183
9218
  } else {
@@ -9746,14 +9781,16 @@ function SetupWizardWithCallback({ onComplete }) {
9746
9781
  color: colors.success,
9747
9782
  children: [
9748
9783
  icons.success,
9749
- " Beads (bd) installed successfully"
9784
+ " Beads (bd) installed",
9785
+ beadsVersion ? ` — ${beadsVersion}` : ""
9750
9786
  ]
9751
9787
  }, undefined, true, undefined, this),
9752
9788
  beadsInstallStatus === "skipped" && /* @__PURE__ */ jsxDEV13(Text13, {
9753
9789
  color: colors.textMuted,
9754
9790
  children: [
9755
9791
  icons.success,
9756
- " Beads (bd) already installed"
9792
+ " Beads (bd) already installed",
9793
+ beadsVersion ? ` — ${beadsVersion}` : ""
9757
9794
  ]
9758
9795
  }, undefined, true, undefined, this),
9759
9796
  beadsInstallStatus === "failed" && /* @__PURE__ */ jsxDEV13(Fragment3, {
@@ -9764,12 +9801,20 @@ function SetupWizardWithCallback({ onComplete }) {
9764
9801
  }, undefined, false, undefined, this),
9765
9802
  /* @__PURE__ */ jsxDEV13(Text13, {
9766
9803
  color: colors.text,
9767
- children: " npm install -g @beads/bd"
9804
+ children: " curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash"
9805
+ }, undefined, false, undefined, this),
9806
+ /* @__PURE__ */ jsxDEV13(Text13, {
9807
+ color: colors.textDim,
9808
+ children: " Or: npm install -g @beads/bd"
9809
+ }, undefined, false, undefined, this),
9810
+ /* @__PURE__ */ jsxDEV13(Text13, {
9811
+ color: colors.textDim,
9812
+ children: " Or: brew install beads"
9768
9813
  }, undefined, false, undefined, this),
9769
9814
  beadsInstallError && /* @__PURE__ */ jsxDEV13(Text13, {
9770
9815
  color: colors.textDim,
9771
9816
  children: [
9772
- " ",
9817
+ " Error: ",
9773
9818
  beadsInstallError
9774
9819
  ]
9775
9820
  }, undefined, true, undefined, this)
@@ -9985,7 +10030,7 @@ ${"━".repeat(60)}`);
9985
10030
  }
9986
10031
 
9987
10032
  // src/version.ts
9988
- var VERSION2 = "1.0.17";
10033
+ var VERSION2 = "1.0.19";
9989
10034
 
9990
10035
  // src/ui/logo.tsx
9991
10036
  import { Box as Box14, Text as Text14 } from "ink";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sharkbait",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "AI-powered coding assistant for the command line. Uses OpenAI Responses API (not Chat). Autonomous agents, parallel code reviews, 36 tools.",
5
5
  "type": "module",
6
6
  "main": "./dist/cli.js",