@solarisdk/mcp 0.4.2 → 0.4.3

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/browser.js CHANGED
@@ -453,6 +453,32 @@ export function makeBrowserToolset(cfg, reg, deps = defaultDeps) {
453
453
  next: "You are signed in — carry on. No human was needed.",
454
454
  });
455
455
  }
456
+ // The chain could not sign in and ALREADY OPENED a handoff for us.
457
+ // Falling through here would POST /handoff for a session that now
458
+ // has one open, which the gateway correctly refuses with 409
459
+ // HandoffAlreadyOpen -- and the url we were just handed would be
460
+ // thrown away, leaving an open handoff that nobody can reach and a
461
+ // session frozen until it expires. Use what we were given.
462
+ if (r.outcome === "human_required" && r.handoffUrl) {
463
+ try {
464
+ await e.browser.close();
465
+ }
466
+ catch {
467
+ /* the gateway is severing this socket anyway */
468
+ }
469
+ return text({
470
+ mode: "hot",
471
+ handoffId: r.handoffId,
472
+ url: r.handoffUrl,
473
+ // Why the password manager could not do this unaided. Surfaced
474
+ // because otherwise a mis-configured site is indistinguishable
475
+ // from an unsupported one.
476
+ ...(r.reason ? { autoLoginFailed: r.reason } : {}),
477
+ ...(r.setupRequired && r.setupUrl ? { setupUrl: r.setupUrl } : {}),
478
+ next: "Show the url to the user, then call solari_browser_await_login. " +
479
+ "Your access to this session is revoked until they finish.",
480
+ });
481
+ }
456
482
  // Nothing is configured for this site. Remember the setup link so
457
483
  // it can be offered alongside the handoff below — the user is
458
484
  // already being interrupted, so this is the cheapest possible
@@ -112358,7 +112358,7 @@ var SolariClient = class {
112358
112358
  };
112359
112359
 
112360
112360
  // src/version.ts
112361
- var VERSION = "0.4.2";
112361
+ var VERSION = "0.4.3";
112362
112362
 
112363
112363
  // node_modules/puppeteer-core/lib/esm/puppeteer/index.js
112364
112364
  init_index_browser();
@@ -113978,6 +113978,23 @@ function makeBrowserToolset(cfg, reg, deps = defaultDeps) {
113978
113978
  next: "You are signed in \u2014 carry on. No human was needed."
113979
113979
  });
113980
113980
  }
113981
+ if (r.outcome === "human_required" && r.handoffUrl) {
113982
+ try {
113983
+ await e.browser.close();
113984
+ } catch {
113985
+ }
113986
+ return text({
113987
+ mode: "hot",
113988
+ handoffId: r.handoffId,
113989
+ url: r.handoffUrl,
113990
+ // Why the password manager could not do this unaided. Surfaced
113991
+ // because otherwise a mis-configured site is indistinguishable
113992
+ // from an unsupported one.
113993
+ ...r.reason ? { autoLoginFailed: r.reason } : {},
113994
+ ...r.setupRequired && r.setupUrl ? { setupUrl: r.setupUrl } : {},
113995
+ next: "Show the url to the user, then call solari_browser_await_login. Your access to this session is revoked until they finish."
113996
+ });
113997
+ }
113981
113998
  if (r.setupRequired && r.setupUrl) setupUrl = r.setupUrl;
113982
113999
  }
113983
114000
  } catch {
@@ -111027,7 +111027,7 @@ var SolariClient = class {
111027
111027
  };
111028
111028
 
111029
111029
  // src/version.ts
111030
- var VERSION = "0.4.2";
111030
+ var VERSION = "0.4.3";
111031
111031
 
111032
111032
  // node_modules/puppeteer-core/lib/esm/puppeteer/index.js
111033
111033
  init_index_browser();
@@ -112647,6 +112647,23 @@ function makeBrowserToolset(cfg, reg, deps = defaultDeps) {
112647
112647
  next: "You are signed in \u2014 carry on. No human was needed."
112648
112648
  });
112649
112649
  }
112650
+ if (r.outcome === "human_required" && r.handoffUrl) {
112651
+ try {
112652
+ await e.browser.close();
112653
+ } catch {
112654
+ }
112655
+ return text({
112656
+ mode: "hot",
112657
+ handoffId: r.handoffId,
112658
+ url: r.handoffUrl,
112659
+ // Why the password manager could not do this unaided. Surfaced
112660
+ // because otherwise a mis-configured site is indistinguishable
112661
+ // from an unsupported one.
112662
+ ...r.reason ? { autoLoginFailed: r.reason } : {},
112663
+ ...r.setupRequired && r.setupUrl ? { setupUrl: r.setupUrl } : {},
112664
+ next: "Show the url to the user, then call solari_browser_await_login. Your access to this session is revoked until they finish."
112665
+ });
112666
+ }
112650
112667
  if (r.setupRequired && r.setupUrl) setupUrl = r.setupUrl;
112651
112668
  }
112652
112669
  } catch {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.4.2";
1
+ export declare const VERSION = "0.4.3";
package/dist/version.js CHANGED
@@ -8,4 +8,4 @@
8
8
  // `test/version.test.mjs` FAILS the build if it ever drifts from package.json.
9
9
  //
10
10
  // KEEP IN SYNC WITH sdk/mcp/package.json "version".
11
- export const VERSION = "0.4.2";
11
+ export const VERSION = "0.4.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solarisdk/mcp",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Model Context Protocol server for the Solari cloud browser, sandboxes + desktops \u2014 drive them from Claude Desktop/Cowork, Claude Code, Cursor, etc.",
5
5
  "type": "module",
6
6
  "bin": {