@solongate/proxy 0.82.85 → 0.82.87

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/index.js CHANGED
@@ -11857,7 +11857,8 @@ function SettingsPanel({
11857
11857
  }
11858
11858
  const loading = !locked && (localQ.loading && !localQ.data || whQ.loading && !whQ.data || alertQ.loading && !alertQ.data || guardQ.loading && !guardQ.data || selfQ.loading && !selfQ.data);
11859
11859
  const rawError = locked ? null : localQ.error ?? whQ.error ?? alertQ.error ?? guardQ.error ?? selfQ.error;
11860
- const authError = rawError && /invalid api key|authentication|401|unauthor/i.test(rawError) ? rawError : null;
11860
+ const authError = rawError && /invalid api key|authentication|401|unauthor|not logged in/i.test(rawError) ? rawError : null;
11861
+ const noKey = !!authError && /not logged in/i.test(authError);
11861
11862
  const error = authError ? null : rawError;
11862
11863
  const onOff = (on) => on ? /* @__PURE__ */ jsx8(Text8, { color: theme.ok, children: "on " }) : /* @__PURE__ */ jsx8(Text8, { color: theme.dim, children: "off" });
11863
11864
  const chanOf = (rule) => [...rule.emails ?? [], ...(rule.telegram ?? []).map((t) => "tg " + t)].join(", ") || "\u2014";
@@ -12053,7 +12054,10 @@ function SettingsPanel({
12053
12054
  const moreBelow = Math.max(0, lineEls.length - (startL + budget));
12054
12055
  return /* @__PURE__ */ jsx8(DataView, { loading, error, children: /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
12055
12056
  /* @__PURE__ */ jsx8(Text8, { wrap: "truncate", color: theme.dim, children: focused ? `\u2191\u2193 move \xB7 enter act \xB7 m toggle \xB7 t test \xB7 e edit \xB7 x remove \xB7 d delete \xB7 n add${moreAbove ? ` \xB7 \u25B2${moreAbove}` : ""}${moreBelow ? ` \xB7 \u25BC${moreBelow}` : ""}` : "press \u2192 to configure" }),
12056
- authError ? /* @__PURE__ */ jsx8(Text8, { wrap: "truncate", color: theme.bad, children: truncate2("\u2717 this device's key is invalid or was revoked \u2014 press x on the account below to remove it, then + add account to pair again", cols) }) : null,
12057
+ authError ? /* @__PURE__ */ jsx8(Text8, { wrap: "truncate", color: theme.bad, children: truncate2(
12058
+ noKey ? "\u2717 this device is not paired yet \u2014 press + add account below to sign in and pair it" : "\u2717 this device's key is invalid or was revoked \u2014 press x on the account below to remove it, then + add account to pair again",
12059
+ cols
12060
+ ) }) : null,
12057
12061
  editing ? /* @__PURE__ */ jsxs8(Box8, { children: [
12058
12062
  /* @__PURE__ */ jsx8(Text8, { color: theme.warn, children: editing === "path" ? "local log path: " : "webhook url: " }),
12059
12063
  /* @__PURE__ */ jsx8(TextInput6, { value: input, onChange: setInput, onSubmit: submitInput })
@@ -12158,7 +12162,8 @@ function App() {
12158
12162
  const cur = accounts[acctIdx];
12159
12163
  const rawEmail = cur?.email ?? "";
12160
12164
  const isGuestAccount = rawEmail.endsWith("@anonymous.solongate.invalid");
12161
- const acctLabel2 = cur ? isGuestAccount ? "Anonymous" : rawEmail || cur.user || cur.project || `account \u2026${cur.apiKey.slice(-4)}` : "not logged in";
12165
+ const hasKey = isAuthenticated();
12166
+ const acctLabel2 = !cur ? "not logged in" : !hasKey ? "signed out" : isGuestAccount ? "Anonymous" : rawEmail || cur.user || cur.project || `account \u2026${cur.apiKey.slice(-4)}`;
12162
12167
  useEffect8(() => {
12163
12168
  if (!cur || cur.email) return;
12164
12169
  let alive = true;
@@ -12193,7 +12198,7 @@ function App() {
12193
12198
  setViewKey(next?.apiKey);
12194
12199
  setViewNonce((n) => n + 1);
12195
12200
  };
12196
- const locked = accounts.length === 0;
12201
+ const locked = accounts.length === 0 || !hasKey;
12197
12202
  const effectiveSection = locked ? SETTINGS_SECTION : section;
12198
12203
  useInput8((input, key) => {
12199
12204
  if (help) {
package/dist/tui/index.js CHANGED
@@ -5073,7 +5073,8 @@ function SettingsPanel({
5073
5073
  }
5074
5074
  const loading = !locked && (localQ.loading && !localQ.data || whQ.loading && !whQ.data || alertQ.loading && !alertQ.data || guardQ.loading && !guardQ.data || selfQ.loading && !selfQ.data);
5075
5075
  const rawError = locked ? null : localQ.error ?? whQ.error ?? alertQ.error ?? guardQ.error ?? selfQ.error;
5076
- const authError = rawError && /invalid api key|authentication|401|unauthor/i.test(rawError) ? rawError : null;
5076
+ const authError = rawError && /invalid api key|authentication|401|unauthor|not logged in/i.test(rawError) ? rawError : null;
5077
+ const noKey = !!authError && /not logged in/i.test(authError);
5077
5078
  const error = authError ? null : rawError;
5078
5079
  const onOff = (on) => on ? /* @__PURE__ */ jsx8(Text8, { color: theme.ok, children: "on " }) : /* @__PURE__ */ jsx8(Text8, { color: theme.dim, children: "off" });
5079
5080
  const chanOf = (rule) => [...rule.emails ?? [], ...(rule.telegram ?? []).map((t) => "tg " + t)].join(", ") || "\u2014";
@@ -5269,7 +5270,10 @@ function SettingsPanel({
5269
5270
  const moreBelow = Math.max(0, lineEls.length - (startL + budget));
5270
5271
  return /* @__PURE__ */ jsx8(DataView, { loading, error, children: /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
5271
5272
  /* @__PURE__ */ jsx8(Text8, { wrap: "truncate", color: theme.dim, children: focused ? `\u2191\u2193 move \xB7 enter act \xB7 m toggle \xB7 t test \xB7 e edit \xB7 x remove \xB7 d delete \xB7 n add${moreAbove ? ` \xB7 \u25B2${moreAbove}` : ""}${moreBelow ? ` \xB7 \u25BC${moreBelow}` : ""}` : "press \u2192 to configure" }),
5272
- authError ? /* @__PURE__ */ jsx8(Text8, { wrap: "truncate", color: theme.bad, children: truncate("\u2717 this device's key is invalid or was revoked \u2014 press x on the account below to remove it, then + add account to pair again", cols) }) : null,
5273
+ authError ? /* @__PURE__ */ jsx8(Text8, { wrap: "truncate", color: theme.bad, children: truncate(
5274
+ noKey ? "\u2717 this device is not paired yet \u2014 press + add account below to sign in and pair it" : "\u2717 this device's key is invalid or was revoked \u2014 press x on the account below to remove it, then + add account to pair again",
5275
+ cols
5276
+ ) }) : null,
5273
5277
  editing ? /* @__PURE__ */ jsxs8(Box8, { children: [
5274
5278
  /* @__PURE__ */ jsx8(Text8, { color: theme.warn, children: editing === "path" ? "local log path: " : "webhook url: " }),
5275
5279
  /* @__PURE__ */ jsx8(TextInput6, { value: input, onChange: setInput, onSubmit: submitInput })
@@ -5351,7 +5355,8 @@ function App() {
5351
5355
  const cur = accounts[acctIdx];
5352
5356
  const rawEmail = cur?.email ?? "";
5353
5357
  const isGuestAccount = rawEmail.endsWith("@anonymous.solongate.invalid");
5354
- const acctLabel2 = cur ? isGuestAccount ? "Anonymous" : rawEmail || cur.user || cur.project || `account \u2026${cur.apiKey.slice(-4)}` : "not logged in";
5358
+ const hasKey = isAuthenticated();
5359
+ const acctLabel2 = !cur ? "not logged in" : !hasKey ? "signed out" : isGuestAccount ? "Anonymous" : rawEmail || cur.user || cur.project || `account \u2026${cur.apiKey.slice(-4)}`;
5355
5360
  useEffect8(() => {
5356
5361
  if (!cur || cur.email) return;
5357
5362
  let alive = true;
@@ -5386,7 +5391,7 @@ function App() {
5386
5391
  setViewKey(next?.apiKey);
5387
5392
  setViewNonce((n) => n + 1);
5388
5393
  };
5389
- const locked = accounts.length === 0;
5394
+ const locked = accounts.length === 0 || !hasKey;
5390
5395
  const effectiveSection = locked ? SETTINGS_SECTION : section;
5391
5396
  useInput8((input, key) => {
5392
5397
  if (help) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.82.85",
3
+ "version": "0.82.87",
4
4
  "description": "AI tool security proxy: protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. No code changes required.",
5
5
  "type": "module",
6
6
  "bin": {