orchestrating 0.1.16 → 0.1.18

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/bin/orch +13 -3
  2. package/package.json +1 -1
package/bin/orch CHANGED
@@ -368,7 +368,7 @@ if (adapter) {
368
368
  promptParts.push(arg);
369
369
  }
370
370
  }
371
- const prompt = promptParts.join(" ") || (adapterFlags.continue ? "continue" : "hello");
371
+ const prompt = promptParts.join(" ") || (adapterFlags.continue ? "Session resumed via orchestrat.ing. Do not take any action — wait for the next message." : "hello");
372
372
 
373
373
  // Session reuse: persist session ID per cwd so `-c` reconnects the same dashboard session
374
374
  const SESSION_FILE = path.join(process.cwd(), ".orch-session");
@@ -928,8 +928,18 @@ async function connectWs() {
928
928
  if (msg.type === "error") {
929
929
  process.stderr.write(`${RED}Server error: ${msg.error}${RESET}\n`);
930
930
  if (/unauthorized|auth|token/i.test(msg.error || "")) {
931
- process.stderr.write(`${RED}Run 'orch login' to authenticate.${RESET}\n`);
932
- authFailed = true;
931
+ // Try to refresh token before giving up
932
+ refreshAuthToken().then((refreshed) => {
933
+ if (refreshed) {
934
+ authToken = refreshed;
935
+ process.stderr.write(`${DIM}[orch] Token refreshed, reconnecting…${RESET}\n`);
936
+ authFailed = false;
937
+ connectWs();
938
+ } else {
939
+ process.stderr.write(`${RED}Run 'orch login' to authenticate.${RESET}\n`);
940
+ authFailed = true;
941
+ }
942
+ });
933
943
  }
934
944
  return;
935
945
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestrating",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "Stream terminal sessions to the orchestrat.ing dashboard",
5
5
  "type": "module",
6
6
  "bin": {