oysterun 1.5.0-beta.8 → 1.5.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 (34) hide show
  1. package/dev/client/web/index.html +143 -34
  2. package/dev/client/web-chat/dist/assets/{ReactPrism-CnWaHTwG.js → ReactPrism-CypUjQ9u.js} +1 -1
  3. package/dev/client/web-chat/dist/assets/ReactPrism-CypUjQ9u.js.map +1 -0
  4. package/dev/client/web-chat/dist/assets/index-B9fWrEk-.js.map +1 -1
  5. package/dev/client/web-chat/dist/assets/{index-Bk7cN522.js → index-BzoSTFwx.js} +1 -1
  6. package/dev/client/web-chat/dist/assets/index-BzoSTFwx.js.map +1 -0
  7. package/dev/client/web-chat/dist/assets/{index-Ca6_kdF9.js → index-C1V1LCfL.js} +2 -2
  8. package/dev/client/web-chat/dist/assets/index-C1V1LCfL.js.map +1 -0
  9. package/dev/client/web-chat/dist/assets/{index-GA-8pt0s.js → index-DJTSj_fm.js} +77 -77
  10. package/dev/client/web-chat/dist/assets/index-DJTSj_fm.js.map +1 -0
  11. package/dev/client/web-chat/dist/assets/{pdf-C_iV1r1i.js → pdf-YN8Fh_XI.js} +3 -3
  12. package/dev/client/web-chat/dist/assets/pdf-YN8Fh_XI.js.map +1 -0
  13. package/dev/client/web-chat/dist/assets/{web-Dwq5XDl2.js → web-B-z4yUUc.js} +1 -1
  14. package/dev/client/web-chat/dist/assets/web-B-z4yUUc.js.map +1 -0
  15. package/dev/client/web-chat/dist/assets/{web-BBXKV3Qt.js → web-D5ic2-57.js} +1 -1
  16. package/dev/client/web-chat/dist/assets/web-D5ic2-57.js.map +1 -0
  17. package/dev/client/web-chat/dist/index.html +1 -1
  18. package/docs/routec/dev/npm_native_dependency_install.md +24 -15
  19. package/docs/routec/form_UI_fields.md +2 -2
  20. package/docs/routec/hyperlink.md +21 -0
  21. package/docs/routec/prev_page_map.md +29 -4
  22. package/host-service/complete-message-notification-predicate.mjs +3 -4
  23. package/host-service/package.json +1 -1
  24. package/host-service/routec-matrix-storage-adapter.mjs +6 -3
  25. package/host-service/server.mjs +25 -8
  26. package/package.json +1 -1
  27. package/tool_scripts/install_oysterun_update.mjs +55 -13
  28. package/dev/client/web-chat/dist/assets/ReactPrism-CnWaHTwG.js.map +0 -1
  29. package/dev/client/web-chat/dist/assets/index-Bk7cN522.js.map +0 -1
  30. package/dev/client/web-chat/dist/assets/index-Ca6_kdF9.js.map +0 -1
  31. package/dev/client/web-chat/dist/assets/index-GA-8pt0s.js.map +0 -1
  32. package/dev/client/web-chat/dist/assets/pdf-C_iV1r1i.js.map +0 -1
  33. package/dev/client/web-chat/dist/assets/web-BBXKV3Qt.js.map +0 -1
  34. package/dev/client/web-chat/dist/assets/web-Dwq5XDl2.js.map +0 -1
@@ -636,6 +636,14 @@
636
636
  grid-template-columns: repeat(2, minmax(0, 1fr));
637
637
  }
638
638
 
639
+ .host-update-beta-run-action {
640
+ display: inline-flex;
641
+ align-items: center;
642
+ justify-content: center;
643
+ gap: 8px;
644
+ min-width: 0;
645
+ }
646
+
639
647
  .host-preferences-section-status {
640
648
  display: inline-flex;
641
649
  align-items: center;
@@ -9116,12 +9124,19 @@
9116
9124
  Check Beta
9117
9125
  </button>
9118
9126
  <button
9119
- class="btn-ghost"
9127
+ class="btn-ghost host-update-beta-run-action"
9120
9128
  type="button"
9121
9129
  id="host-update-beta-run-btn"
9122
9130
  onClick=${call("runOysterunBetaUpdate")}
9123
9131
  >
9124
- Install Beta & Restart
9132
+ <span
9133
+ class="host-preferences-section-spinner hidden"
9134
+ id="host-update-beta-run-spinner"
9135
+ aria-hidden="true"
9136
+ ></span>
9137
+ <span id="host-update-beta-run-label">
9138
+ Install Beta & Restart
9139
+ </span>
9125
9140
  </button>
9126
9141
  </div>
9127
9142
  </div>
@@ -14957,6 +14972,7 @@ Waiting for Claude login output…</pre
14957
14972
  ) {
14958
14973
  const normalized = normalizeClientRoute(route);
14959
14974
  return (
14975
+ normalized.screen === "chat" ||
14960
14976
  normalized.screen === "file-preview" ||
14961
14977
  (normalized.screen === "mail" && Boolean(normalized.mailId)) ||
14962
14978
  (normalized.screen === "folder-picker" &&
@@ -21441,7 +21457,11 @@ Waiting for Claude login output…</pre
21441
21457
  replaceHistory: opts.replaceHistory === true,
21442
21458
  });
21443
21459
  } else if (normalized.screen === "chat") {
21444
- openCleanChatDocumentRoute(normalized);
21460
+ // The semantic Chat entry already exists. Replace it with the
21461
+ // tokenized clean-chat document instead of adding a duplicate layer.
21462
+ openCleanChatDocumentRoute(normalized, {
21463
+ replaceHistory: true,
21464
+ });
21445
21465
  return;
21446
21466
  } else if (normalized.screen === "agent-profile") {
21447
21467
  const liveSession = await loadLiveSessionContext(
@@ -22950,7 +22970,13 @@ Waiting for Claude login output…</pre
22950
22970
  ? data.oysterun_route
22951
22971
  : "";
22952
22972
  if (url && url.startsWith("/app")) {
22953
- window.location.assign(url);
22973
+ recordDashboardBootDiagnostic("notification_navigation", {
22974
+ navigation_source: "dashboard_capacitor_remote_push_action",
22975
+ navigation_method: "location_replace",
22976
+ target_path: url,
22977
+ history_length: window.history.length,
22978
+ });
22979
+ window.location.replace(url);
22954
22980
  }
22955
22981
  }
22956
22982
  );
@@ -23088,7 +23114,14 @@ Waiting for Claude login output…</pre
23088
23114
  const extra = notification?.extra || {};
23089
23115
  const url = typeof extra.url === "string" ? extra.url : "";
23090
23116
  if (url && url.startsWith("/app")) {
23091
- window.location.assign(url);
23117
+ recordDashboardBootDiagnostic("notification_navigation", {
23118
+ navigation_source:
23119
+ "dashboard_capacitor_local_notification_action",
23120
+ navigation_method: "location_replace",
23121
+ target_path: url,
23122
+ history_length: window.history.length,
23123
+ });
23124
+ window.location.replace(url);
23092
23125
  }
23093
23126
  }
23094
23127
  );
@@ -23394,8 +23427,14 @@ Waiting for Claude login output…</pre
23394
23427
  onClick: () => {
23395
23428
  window.focus();
23396
23429
  if (normalized.sessionId) {
23430
+ const parsedNotificationRoute = normalizeClientRoute(
23431
+ parseClientRoute(normalized.url)
23432
+ );
23397
23433
  openCleanChatDocumentRoute(
23398
- buildChatRoute(normalized.sessionId)
23434
+ parsedNotificationRoute.screen === "chat"
23435
+ ? parsedNotificationRoute
23436
+ : buildChatRoute(normalized.sessionId),
23437
+ { replaceHistory: true }
23399
23438
  );
23400
23439
  }
23401
23440
  },
@@ -24232,6 +24271,15 @@ Waiting for Claude login output…</pre
24232
24271
  return isConfirmedDashboardAuthRejection(err);
24233
24272
  }
24234
24273
 
24274
+ async function handleHostPreferencesAuthFailure(err) {
24275
+ if (!isUnauthorizedError(err)) return false;
24276
+ await doLogout({
24277
+ skipApi: true,
24278
+ ...buildExpiredSessionLogoutOptions(),
24279
+ });
24280
+ return true;
24281
+ }
24282
+
24235
24283
  async function api(method, path, body, extraOpts = {}) {
24236
24284
  const authToken = syncTokenFromStorage();
24237
24285
  const isFormData =
@@ -32923,7 +32971,7 @@ Waiting for Claude login output…</pre
32923
32971
  return buildSessionChatPath(sessionId);
32924
32972
  }
32925
32973
 
32926
- function openCleanChatDocumentRoute(route) {
32974
+ function openCleanChatDocumentRoute(route, opts = {}) {
32927
32975
  const normalizedRoute =
32928
32976
  typeof route === "string"
32929
32977
  ? buildChatRoute(route)
@@ -32940,7 +32988,20 @@ Waiting for Claude login output…</pre
32940
32988
  throw new Error("Clean chat handoff requires a Host session route.");
32941
32989
  }
32942
32990
  showAuthCheckingState(OYSTERUN_ORIGINAL_TRANSITION_COPY);
32943
- window.location.assign(target);
32991
+ recordDashboardBootDiagnostic("clean_chat_handoff", {
32992
+ navigation_source: "dashboard_restore_chat_route",
32993
+ navigation_method:
32994
+ opts.replaceHistory === true
32995
+ ? "location_replace"
32996
+ : "location_assign",
32997
+ target_path: serializeClientRoute(normalizedRoute),
32998
+ history_length: window.history.length,
32999
+ });
33000
+ if (opts.replaceHistory === true) {
33001
+ window.location.replace(target);
33002
+ } else {
33003
+ window.location.assign(target);
33004
+ }
32944
33005
  return target;
32945
33006
  }
32946
33007
 
@@ -33644,13 +33705,7 @@ Waiting for Claude login output…</pre
33644
33705
  });
33645
33706
  applyProviderCatalogData(data);
33646
33707
  } catch (err) {
33647
- if (isUnauthorizedError(err)) {
33648
- await doLogout({
33649
- skipApi: true,
33650
- ...buildExpiredSessionLogoutOptions(),
33651
- });
33652
- return;
33653
- }
33708
+ if (await handleHostPreferencesAuthFailure(err)) return;
33654
33709
  providerCatalogState = {
33655
33710
  ...providerCatalogState,
33656
33711
  loading: false,
@@ -34987,6 +35042,47 @@ Waiting for Claude login output…</pre
34987
35042
  appSoundToggle?.toggleAttribute("disabled", disabled);
34988
35043
  }
34989
35044
 
35045
+ function getHostPreferencesBetaRunControlState({
35046
+ pageDisabled = false,
35047
+ betaUpdateChecking = false,
35048
+ updateRunning = false,
35049
+ updateOperationBlocking = false,
35050
+ updateConfirmationVisible = false,
35051
+ betaUpdateCanRun = false,
35052
+ } = {}) {
35053
+ const checking = betaUpdateChecking === true;
35054
+ return {
35055
+ disabled:
35056
+ pageDisabled ||
35057
+ checking ||
35058
+ updateRunning ||
35059
+ updateOperationBlocking ||
35060
+ updateConfirmationVisible ||
35061
+ !betaUpdateCanRun,
35062
+ label: checking
35063
+ ? "Checking Beta..."
35064
+ : updateRunning
35065
+ ? "Installing..."
35066
+ : "Install Beta & Restart",
35067
+ spinnerVisible: checking,
35068
+ };
35069
+ }
35070
+
35071
+ function getHostPreferencesReloadControlState({
35072
+ loading = false,
35073
+ saving = false,
35074
+ basicPreferencesUnavailable = false,
35075
+ } = {}) {
35076
+ return {
35077
+ disabled: loading || saving,
35078
+ label: loading
35079
+ ? "Loading..."
35080
+ : basicPreferencesUnavailable
35081
+ ? "Retry"
35082
+ : "Reload",
35083
+ };
35084
+ }
35085
+
34990
35086
  function renderHostPreferences() {
34991
35087
  const pathInput = $("host-default-browse-path");
34992
35088
  if (
@@ -35305,7 +35401,7 @@ Waiting for Claude login output…</pre
35305
35401
  setText("host-update-beta-status", betaUpdateStatus);
35306
35402
  setVisible(
35307
35403
  "host-update-beta-spinner",
35308
- betaUpdateVisible && betaUpdatePending
35404
+ betaUpdateVisible && hostPreferencesState.betaUpdateRefreshing
35309
35405
  );
35310
35406
  const updatePhase = getOysterunUpdatePhase(update);
35311
35407
  setText("host-update-phase", updatePhase);
@@ -35410,16 +35506,20 @@ Waiting for Claude login output…</pre
35410
35506
  }
35411
35507
  const betaUpdateRunButton = $("host-update-beta-run-btn");
35412
35508
  if (betaUpdateRunButton) {
35413
- betaUpdateRunButton.disabled =
35414
- disabled ||
35415
- hostPreferencesState.betaUpdateChecking ||
35416
- hostPreferencesState.updateRunning ||
35417
- updateOperationBlocking ||
35418
- updateConfirmationVisible ||
35419
- !betaUpdateCanRun;
35420
- betaUpdateRunButton.textContent = hostPreferencesState.updateRunning
35421
- ? "Installing..."
35422
- : "Install Beta & Restart";
35509
+ const betaRunControl = getHostPreferencesBetaRunControlState({
35510
+ pageDisabled: disabled,
35511
+ betaUpdateChecking: hostPreferencesState.betaUpdateChecking,
35512
+ updateRunning: hostPreferencesState.updateRunning,
35513
+ updateOperationBlocking,
35514
+ updateConfirmationVisible,
35515
+ betaUpdateCanRun,
35516
+ });
35517
+ betaUpdateRunButton.disabled = betaRunControl.disabled;
35518
+ setText("host-update-beta-run-label", betaRunControl.label);
35519
+ setVisible(
35520
+ "host-update-beta-run-spinner",
35521
+ betaRunControl.spinnerVisible
35522
+ );
35423
35523
  }
35424
35524
  setVisible(
35425
35525
  "host-update-confirmation",
@@ -35608,7 +35708,16 @@ Waiting for Claude login output…</pre
35608
35708
  !isProviderPermissionDebugModeDropdownEnabled()
35609
35709
  );
35610
35710
  $("host-preferences-clear-btn")?.toggleAttribute("disabled", disabled);
35611
- $("host-preferences-reload-btn")?.toggleAttribute("disabled", disabled);
35711
+ const reloadControl = getHostPreferencesReloadControlState({
35712
+ loading: hostPreferencesState.loading,
35713
+ saving: hostPreferencesState.saving,
35714
+ basicPreferencesUnavailable,
35715
+ });
35716
+ const reloadButton = $("host-preferences-reload-btn");
35717
+ if (reloadButton) {
35718
+ reloadButton.disabled = reloadControl.disabled;
35719
+ reloadButton.textContent = reloadControl.label;
35720
+ }
35612
35721
  $("host-open-permissions-btn")?.toggleAttribute("disabled", disabled);
35613
35722
  refreshHostPreferencesSaveButton();
35614
35723
  renderHostClaudeAuthCard();
@@ -35630,13 +35739,7 @@ Waiting for Claude login output…</pre
35630
35739
  void checkOysterunBetaUpdate({ quiet: true, background: true });
35631
35740
  }
35632
35741
  } catch (err) {
35633
- if (isUnauthorizedError(err)) {
35634
- await doLogout({
35635
- skipApi: true,
35636
- ...buildExpiredSessionLogoutOptions(),
35637
- });
35638
- return;
35639
- }
35742
+ if (await handleHostPreferencesAuthFailure(err)) return;
35640
35743
  hostPreferencesState = {
35641
35744
  ...hostPreferencesState,
35642
35745
  loading: false,
@@ -35680,6 +35783,7 @@ Waiting for Claude login output…</pre
35680
35783
  };
35681
35784
  renderHostPreferences();
35682
35785
  } catch (err) {
35786
+ if (await handleHostPreferencesAuthFailure(err)) return;
35683
35787
  hostPreferencesState = {
35684
35788
  ...hostPreferencesState,
35685
35789
  loginQrLoading: false,
@@ -35726,6 +35830,7 @@ Waiting for Claude login output…</pre
35726
35830
  };
35727
35831
  startHostRestartHandoff(data, "restart");
35728
35832
  } catch (err) {
35833
+ if (await handleHostPreferencesAuthFailure(err)) return;
35729
35834
  hostPreferencesState = {
35730
35835
  ...hostPreferencesState,
35731
35836
  restartLoading: false,
@@ -35773,6 +35878,7 @@ Waiting for Claude login output…</pre
35773
35878
  };
35774
35879
  renderHostPreferences();
35775
35880
  } catch (err) {
35881
+ if (await handleHostPreferencesAuthFailure(err)) return;
35776
35882
  hostPreferencesState = {
35777
35883
  ...hostPreferencesState,
35778
35884
  updateChecking: false,
@@ -35838,6 +35944,7 @@ Waiting for Claude login output…</pre
35838
35944
  };
35839
35945
  renderHostPreferences();
35840
35946
  } catch (err) {
35947
+ if (await handleHostPreferencesAuthFailure(err)) return;
35841
35948
  hostPreferencesState = {
35842
35949
  ...hostPreferencesState,
35843
35950
  betaUpdateChecking: false,
@@ -36032,6 +36139,7 @@ Waiting for Claude login output…</pre
36032
36139
  };
36033
36140
  startHostRestartHandoff(normalized, confirmationMode);
36034
36141
  } catch (err) {
36142
+ if (await handleHostPreferencesAuthFailure(err)) return;
36035
36143
  hostPreferencesState = {
36036
36144
  ...hostPreferencesState,
36037
36145
  updateRunning: false,
@@ -36241,6 +36349,7 @@ Waiting for Claude login output…</pre
36241
36349
  );
36242
36350
  }
36243
36351
  } catch (err) {
36352
+ if (await handleHostPreferencesAuthFailure(err)) return;
36244
36353
  hostPreferencesState = {
36245
36354
  ...hostPreferencesState,
36246
36355
  saving: false,
@@ -1,4 +1,4 @@
1
- import{g as ee,c as Y,r as K,j as Z}from"./index-GA-8pt0s.js";var X={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
1
+ import{g as ee,c as Y,r as K,j as Z}from"./index-DJTSj_fm.js";var X={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
2
2
  * Prism: Lightweight, robust, elegant syntax highlighting
3
3
  *
4
4
  * @license MIT <https://opensource.org/licenses/MIT>