symbiot 0.4.0 → 0.4.1

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 (3) hide show
  1. package/README.md +5 -0
  2. package/index.mjs +24 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -29,6 +29,11 @@ Chrome/Chromium/Edge/Brave (`--app` mode), otherwise a normal tab. Tabs for
29
29
  Week / Standup / Todo, a Copy button, and a Settings panel to pick your AI. No
30
30
  Electron, no install — it's the same CLI. Press Ctrl+C (or click Quit) to stop.
31
31
 
32
+ **Cross-platform:** the app works on **Linux, macOS, and Windows** — the server
33
+ and UI are just a local web page. The chrome-less window is detected per-OS
34
+ (PATH on Linux, the `/Applications` bundle on macOS, `Program Files` on Windows);
35
+ where no Chromium-family browser is found it opens your default browser instead.
36
+
32
37
  ## Install
33
38
 
34
39
  ```bash
package/index.mjs CHANGED
@@ -544,12 +544,33 @@ function readBody(req) {
544
544
  });
545
545
  }
546
546
  function onPath(cands) { for (const cc of cands) { if (sh(`command -v ${cc} 2>/dev/null`).trim()) return cc; } return null; }
547
+ // Find a Chromium-family browser for the chrome-less --app window, per OS.
548
+ function chromeBinary() {
549
+ const p = process.platform;
550
+ const exists = (f) => { try { return existsSync(f) ? f : null; } catch { return null; } };
551
+ if (p === "darwin") {
552
+ return ["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
553
+ "/Applications/Chromium.app/Contents/MacOS/Chromium",
554
+ "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",
555
+ "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"].map(exists).find(Boolean) || null;
556
+ }
557
+ if (p === "win32") {
558
+ const bases = [process.env.PROGRAMFILES, process.env["PROGRAMFILES(X86)"], process.env.LOCALAPPDATA].filter(Boolean);
559
+ const rels = ["Google\\Chrome\\Application\\chrome.exe", "Chromium\\Application\\chrome.exe",
560
+ "Microsoft\\Edge\\Application\\msedge.exe", "BraveSoftware\\Brave-Browser\\Application\\brave.exe"];
561
+ for (const base of bases) for (const r of rels) { const f = exists(join(base, r)); if (f) return f; }
562
+ const w = sh("where chrome 2>NUL").split(/\r?\n/).map((s) => s.trim()).find(Boolean);
563
+ return w || null;
564
+ }
565
+ return onPath(["google-chrome", "google-chrome-stable", "chromium", "chromium-browser", "brave-browser", "microsoft-edge"]);
566
+ }
547
567
  function openApp(url) {
548
568
  try {
549
- const chrome = onPath(["google-chrome", "google-chrome-stable", "chromium", "chromium-browser", "brave-browser", "microsoft-edge"]);
569
+ const chrome = chromeBinary();
550
570
  if (chrome) { spawn(chrome, [`--app=${url}`, "--new-window"], { detached: true, stdio: "ignore" }).unref(); return "app window"; }
551
- const opener = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
552
- spawn(opener, [url], { detached: true, stdio: "ignore", shell: process.platform === "win32" }).unref();
571
+ // fall back to the OS default browser (a normal tab) — still fully functional
572
+ if (process.platform === "win32") { spawn("cmd", ["/c", "start", "", url], { detached: true, stdio: "ignore" }).unref(); return "browser tab"; }
573
+ spawn(process.platform === "darwin" ? "open" : "xdg-open", [url], { detached: true, stdio: "ignore" }).unref();
553
574
  return "browser tab";
554
575
  } catch { return null; }
555
576
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "symbiot",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Your week, written from your real work. Reads your local git and writes it up with the AI of your choice — Claude, OpenAI, Gemini, or a local model.",
5
5
  "type": "module",
6
6
  "bin": {