symbiot 0.23.0 → 0.24.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.
Files changed (2) hide show
  1. package/index.mjs +20 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -638,12 +638,16 @@ function detectHandoffs() {
638
638
  // Orca IDE (any OS): register the repo + open a terminal tab. Two variants —
639
639
  // one that just opens the repo (use Orca's own agent, e.g. GPT), and one that
640
640
  // runs Claude in the tab for Claude users. Not Claude-only.
641
+ // `<orca> open` first: it launches Orca AND blocks until the runtime is
642
+ // reachable, so this works even when Orca is closed (its CLI can't talk to a
643
+ // dead app). Use the full orca-ide path, never bare `orca` (that's a different
644
+ // tool on PATH). If Orca is already up, `open` returns fast.
641
645
  const orca = findOrcaCli();
642
646
  if (orca) {
643
647
  const q = JSON.stringify(orca);
644
648
  agents.unshift(
645
- { label: "Orca IDE — open repo (use your Orca agent)", tmpl: `${q} repo add --path {dir}; ${q} terminal create --worktree path:{dir} --focus`, kind: "agent" },
646
- { label: "Orca IDE — run Claude in a tab", tmpl: `${q} repo add --path {dir}; ${q} terminal create --worktree path:{dir} --command "claude {prompt}" --focus`, kind: "agent" },
649
+ { label: "Orca IDE — open repo (use your Orca agent)", tmpl: `${q} open; ${q} repo add --path {dir}; ${q} terminal create --worktree path:{dir} --focus`, kind: "agent" },
650
+ { label: "Orca IDE — run Claude in a tab", tmpl: `${q} open; ${q} repo add --path {dir}; ${q} terminal create --worktree path:{dir} --command "claude {prompt}" --focus`, kind: "agent" },
647
651
  );
648
652
  }
649
653
  return { agents, editors };
@@ -651,7 +655,20 @@ function detectHandoffs() {
651
655
  const shSingle = (s) => "'" + String(s).replace(/'/g, "'\\''") + "'";
652
656
  const escDq = (s) => String(s).replace(/[\\"$`]/g, "\\$&");
653
657
  const HANDOFF_PROMPT = "Read .symbiot/TASKS.md and implement the unchecked items in this repo. Confirm before anything destructive.";
654
- function handoffCmd() { const cfg = loadConfig(); return cfg.agentCmd || (cfg.ide ? `${cfg.ide} {dir}` : ""); } // ide = legacy
658
+ function handoffCmd() { const cfg = loadConfig(); return migrateOrcaCmd(cfg.agentCmd) || (cfg.ide ? `${cfg.ide} {dir}` : ""); } // ide = legacy
659
+ // An Orca command saved before we learned its CLI needs a running app lacks the
660
+ // `open` step and silently fails when Orca is closed. Patch it in place: insert
661
+ // `<orca> open; ` before the first `repo add`. Idempotent (skips if already there).
662
+ function migrateOrcaCmd(cmd) {
663
+ if (!cmd || typeof cmd !== "string") return cmd;
664
+ if (!/orca-ide/.test(cmd) || !/\brepo add\b/.test(cmd)) return cmd;
665
+ if (/orca-ide("|')?\s+open\b|\bopen;\s/.test(cmd)) return cmd; // already migrated
666
+ const m = cmd.match(/^(\S+|"[^"]*"|'[^']*')\s+repo add/); // the orca binary token
667
+ const bin = m ? m[1] : "";
668
+ const patched = bin ? cmd.replace(/(\S+|"[^"]*"|'[^']*')\s+repo add/, `${bin} open; $1 repo add`) : cmd;
669
+ if (patched !== cmd) { try { const cfg = loadConfig(); if (cfg.agentCmd === cmd) { cfg.agentCmd = patched; saveConfig(cfg); } } catch {} }
670
+ return patched;
671
+ }
655
672
  // Run a shell command as a tracked, logged background job that shows up live in
656
673
  // the Agents tab. Shared by the agent handoff and the local-model setup.
657
674
  function track(name, cmd, cwd, onExit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "symbiot",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
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": {