@r-33/opencode 0.4.7-rc.28 → 0.4.7-rc.29

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.
@@ -7976,7 +7976,8 @@ var v2StatusSurface = (context) => v2IntegrationSurface(context)?.oauth?.status;
7976
7976
  var v2GuidedSurfaceTry = (deps) => {
7977
7977
  const integration = v2IntegrationSurface(deps.context);
7978
7978
  if (integration === void 0) {
7979
- return { kind: "quiet" };
7979
+ deps.toast({ message: V2_CONNECT_COPY.manualFallback });
7980
+ return { kind: "manual" };
7980
7981
  }
7981
7982
  const connect = v2ConnectSurface(deps.context);
7982
7983
  const status = v2StatusSurface(deps.context);
@@ -8302,6 +8303,25 @@ var registerV2BootReentry = (deps) => {
8302
8303
  });
8303
8304
  };
8304
8305
 
8306
+ // src/tui-entry/v2-boot-session-probe/v2-boot-session-probe.ts
8307
+ var v2BootSessionProbe = async (deps) => {
8308
+ const get = deps.integrationGet;
8309
+ if (get !== void 0) {
8310
+ const info = await get().then(
8311
+ (value) => value,
8312
+ () => void 0
8313
+ );
8314
+ if ((info?.data.connections?.length ?? 0) > 0) {
8315
+ return "alive";
8316
+ }
8317
+ }
8318
+ const token = await deps.readStoredToken().then(
8319
+ (value) => value,
8320
+ () => void 0
8321
+ );
8322
+ return token !== void 0 ? "alive" : "dead";
8323
+ };
8324
+
8305
8325
  // src/tui-entry/v2-session-watch/v2-session-watch.ts
8306
8326
  init_abortable_sleep2();
8307
8327
  var watchV2SessionBecomeAlive = (deps) => {
@@ -8550,16 +8570,30 @@ var createV2Tui = () => ({
8550
8570
  directory,
8551
8571
  outsideWorktree: "return-undefined"
8552
8572
  }) !== void 0;
8573
+ const storedRoute33Token = () => {
8574
+ const box = context.storage?.store("route33_auth", {
8575
+ initial: {}
8576
+ })[0];
8577
+ const value = box?.value;
8578
+ if (typeof value === "string") {
8579
+ return Promise.resolve(value);
8580
+ }
8581
+ if (typeof value === "object" && value !== null && "value" in value && typeof value.value === "string") {
8582
+ return Promise.resolve(value.value);
8583
+ }
8584
+ return Promise.resolve(void 0);
8585
+ };
8553
8586
  const sessionProbe = async () => {
8554
8587
  const get = context.client?.integration?.get;
8555
- if (get === void 0) {
8556
- return "alive";
8557
- }
8558
- const info = await get({
8559
- integrationID: "route33",
8560
- ...location === void 0 ? {} : { location }
8561
- }).catch(() => void 0);
8562
- return (info?.data.connections?.length ?? 0) > 0 ? "alive" : "dead";
8588
+ return v2BootSessionProbe({
8589
+ ...get === void 0 ? {} : {
8590
+ integrationGet: async () => get({
8591
+ integrationID: "route33",
8592
+ ...location === void 0 ? {} : { location }
8593
+ })
8594
+ },
8595
+ readStoredToken: storedRoute33Token
8596
+ });
8563
8597
  };
8564
8598
  const globalFallback = async () => {
8565
8599
  if (detectWorktreeRoot(directory) !== void 0) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r-33/opencode",
3
- "version": "0.4.7-rc.28",
3
+ "version": "0.4.7-rc.29",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",