@solongate/proxy 0.81.38 → 0.81.39

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
@@ -10034,6 +10034,8 @@ function App() {
10034
10034
  if (accounts.length < 2) return;
10035
10035
  viewAccount(accounts[(acctIdx + 1) % accounts.length]);
10036
10036
  };
10037
+ const locked = accounts.length === 0;
10038
+ const effectiveSection = locked ? ACCOUNTS_SECTION : section;
10037
10039
  useInput8((input, key) => {
10038
10040
  if (help) {
10039
10041
  setHelp(false);
@@ -10043,6 +10045,12 @@ function App() {
10043
10045
  setHelp(true);
10044
10046
  return;
10045
10047
  }
10048
+ if (locked) {
10049
+ if (key.rightArrow || key.return || key.tab) setFocus("panel");
10050
+ else if (key.escape) setFocus("nav");
10051
+ else if (input === "q" && focus === "nav") exit();
10052
+ return;
10053
+ }
10046
10054
  if (focus === "nav") {
10047
10055
  if (key.upArrow) setSection((n) => (n - 1 + SECTIONS.length) % SECTIONS.length);
10048
10056
  else if (key.downArrow) setSection((n) => (n + 1) % SECTIONS.length);
@@ -10055,7 +10063,7 @@ function App() {
10055
10063
  }
10056
10064
  });
10057
10065
  const { cols, rows } = useTermSize();
10058
- const current = SECTIONS[section];
10066
+ const current = SECTIONS[effectiveSection];
10059
10067
  if (help) return /* @__PURE__ */ jsx9(HelpOverlay, { cols, rows });
10060
10068
  if (current.label === "Live" && focus === "panel") {
10061
10069
  return /* @__PURE__ */ jsx9(Box9, { flexDirection: "column", width: cols, height: rows, children: /* @__PURE__ */ jsx9(LivePanel, { active: true, focused: true }, viewNonce) });
@@ -10066,14 +10074,18 @@ function App() {
10066
10074
  /* @__PURE__ */ jsx9(Banner, { cols }),
10067
10075
  /* @__PURE__ */ jsxs9(Text9, { wrap: "truncate", children: [
10068
10076
  /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: "account: " }),
10069
- /* @__PURE__ */ jsx9(Text9, { color: theme.accentBright, bold: true, children: acctLabel }),
10070
- accounts.length > 1 ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: ` (${acctIdx + 1}/${accounts.length} \xB7 a switch \xB7 Accounts to manage)` }) : accounts.length === 1 ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 Accounts to add another" }) : null
10077
+ /* @__PURE__ */ jsx9(Text9, { color: locked ? theme.warn : theme.accentBright, bold: true, children: acctLabel }),
10078
+ locked ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 log in from Accounts to unlock the dataroom" }) : accounts.length > 1 ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: ` (${acctIdx + 1}/${accounts.length} \xB7 a switch \xB7 Accounts to manage)` }) : /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 Accounts to add another" })
10071
10079
  ] }),
10072
10080
  /* @__PURE__ */ jsxs9(Box9, { marginTop: 1, flexGrow: 1, children: [
10073
- /* @__PURE__ */ jsx9(Box9, { flexDirection: "column", width: 16, borderStyle: "round", borderColor: focus === "nav" ? theme.accent : "gray", paddingX: 1, children: SECTIONS.map((s, i) => /* @__PURE__ */ jsx9(Text9, { color: i === section ? theme.accentBright : void 0, bold: i === section, children: (i === section ? "\u25B8 " : " ") + s.label }, s.label)) }),
10081
+ /* @__PURE__ */ jsx9(Box9, { flexDirection: "column", width: 16, borderStyle: "round", borderColor: focus === "nav" ? theme.accent : "gray", paddingX: 1, children: SECTIONS.map((s, i) => {
10082
+ const isCur = i === effectiveSection;
10083
+ const disabled = locked && s.label !== "Accounts";
10084
+ return /* @__PURE__ */ jsx9(Text9, { color: isCur ? theme.accentBright : disabled ? theme.dim : void 0, bold: isCur, dimColor: disabled, children: (isCur ? "\u25B8 " : disabled ? "\u2298 " : " ") + s.label }, s.label);
10085
+ }) }),
10074
10086
  /* @__PURE__ */ jsx9(Box9, { flexGrow: 1, borderStyle: "round", borderColor: focus === "panel" ? theme.accent : "gray", paddingX: 1, paddingY: 0, children: panelBody })
10075
10087
  ] }, viewNonce),
10076
- /* @__PURE__ */ jsx9(Box9, { children: focus === "nav" ? /* @__PURE__ */ jsx9(KeyHints, { hints: [["\u2191\u2193", "section"], ["\u2192/enter", "open"], ...accounts.length > 1 ? [["a", "account"]] : [], ["?", "help"], ["q", "quit"]] }) : /* @__PURE__ */ jsx9(KeyHints, { hints: [["\u2190/esc", "back"], ["\u2191\u2193", "in-panel"], ["space/s", "act"]] }) })
10088
+ /* @__PURE__ */ jsx9(Box9, { children: locked ? /* @__PURE__ */ jsx9(KeyHints, { hints: [["\u2192/enter", "open Accounts"], ["n", "log in"], ["q", "quit"]] }) : focus === "nav" ? /* @__PURE__ */ jsx9(KeyHints, { hints: [["\u2191\u2193", "section"], ["\u2192/enter", "open"], ...accounts.length > 1 ? [["a", "account"]] : [], ["?", "help"], ["q", "quit"]] }) : /* @__PURE__ */ jsx9(KeyHints, { hints: [["\u2190/esc", "back"], ["\u2191\u2193", "in-panel"], ["space/s", "act"]] }) })
10077
10089
  ] });
10078
10090
  }
10079
10091
  function HelpOverlay({ cols, rows }) {
package/dist/tui/index.js CHANGED
@@ -3344,6 +3344,8 @@ function App() {
3344
3344
  if (accounts.length < 2) return;
3345
3345
  viewAccount(accounts[(acctIdx + 1) % accounts.length]);
3346
3346
  };
3347
+ const locked = accounts.length === 0;
3348
+ const effectiveSection = locked ? ACCOUNTS_SECTION : section;
3347
3349
  useInput8((input, key) => {
3348
3350
  if (help) {
3349
3351
  setHelp(false);
@@ -3353,6 +3355,12 @@ function App() {
3353
3355
  setHelp(true);
3354
3356
  return;
3355
3357
  }
3358
+ if (locked) {
3359
+ if (key.rightArrow || key.return || key.tab) setFocus("panel");
3360
+ else if (key.escape) setFocus("nav");
3361
+ else if (input === "q" && focus === "nav") exit();
3362
+ return;
3363
+ }
3356
3364
  if (focus === "nav") {
3357
3365
  if (key.upArrow) setSection((n) => (n - 1 + SECTIONS.length) % SECTIONS.length);
3358
3366
  else if (key.downArrow) setSection((n) => (n + 1) % SECTIONS.length);
@@ -3365,7 +3373,7 @@ function App() {
3365
3373
  }
3366
3374
  });
3367
3375
  const { cols, rows } = useTermSize();
3368
- const current = SECTIONS[section];
3376
+ const current = SECTIONS[effectiveSection];
3369
3377
  if (help) return /* @__PURE__ */ jsx9(HelpOverlay, { cols, rows });
3370
3378
  if (current.label === "Live" && focus === "panel") {
3371
3379
  return /* @__PURE__ */ jsx9(Box9, { flexDirection: "column", width: cols, height: rows, children: /* @__PURE__ */ jsx9(LivePanel, { active: true, focused: true }, viewNonce) });
@@ -3376,14 +3384,18 @@ function App() {
3376
3384
  /* @__PURE__ */ jsx9(Banner, { cols }),
3377
3385
  /* @__PURE__ */ jsxs9(Text9, { wrap: "truncate", children: [
3378
3386
  /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: "account: " }),
3379
- /* @__PURE__ */ jsx9(Text9, { color: theme.accentBright, bold: true, children: acctLabel }),
3380
- accounts.length > 1 ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: ` (${acctIdx + 1}/${accounts.length} \xB7 a switch \xB7 Accounts to manage)` }) : accounts.length === 1 ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 Accounts to add another" }) : null
3387
+ /* @__PURE__ */ jsx9(Text9, { color: locked ? theme.warn : theme.accentBright, bold: true, children: acctLabel }),
3388
+ locked ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 log in from Accounts to unlock the dataroom" }) : accounts.length > 1 ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: ` (${acctIdx + 1}/${accounts.length} \xB7 a switch \xB7 Accounts to manage)` }) : /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 Accounts to add another" })
3381
3389
  ] }),
3382
3390
  /* @__PURE__ */ jsxs9(Box9, { marginTop: 1, flexGrow: 1, children: [
3383
- /* @__PURE__ */ jsx9(Box9, { flexDirection: "column", width: 16, borderStyle: "round", borderColor: focus === "nav" ? theme.accent : "gray", paddingX: 1, children: SECTIONS.map((s, i) => /* @__PURE__ */ jsx9(Text9, { color: i === section ? theme.accentBright : void 0, bold: i === section, children: (i === section ? "\u25B8 " : " ") + s.label }, s.label)) }),
3391
+ /* @__PURE__ */ jsx9(Box9, { flexDirection: "column", width: 16, borderStyle: "round", borderColor: focus === "nav" ? theme.accent : "gray", paddingX: 1, children: SECTIONS.map((s, i) => {
3392
+ const isCur = i === effectiveSection;
3393
+ const disabled = locked && s.label !== "Accounts";
3394
+ return /* @__PURE__ */ jsx9(Text9, { color: isCur ? theme.accentBright : disabled ? theme.dim : void 0, bold: isCur, dimColor: disabled, children: (isCur ? "\u25B8 " : disabled ? "\u2298 " : " ") + s.label }, s.label);
3395
+ }) }),
3384
3396
  /* @__PURE__ */ jsx9(Box9, { flexGrow: 1, borderStyle: "round", borderColor: focus === "panel" ? theme.accent : "gray", paddingX: 1, paddingY: 0, children: panelBody })
3385
3397
  ] }, viewNonce),
3386
- /* @__PURE__ */ jsx9(Box9, { children: focus === "nav" ? /* @__PURE__ */ jsx9(KeyHints, { hints: [["\u2191\u2193", "section"], ["\u2192/enter", "open"], ...accounts.length > 1 ? [["a", "account"]] : [], ["?", "help"], ["q", "quit"]] }) : /* @__PURE__ */ jsx9(KeyHints, { hints: [["\u2190/esc", "back"], ["\u2191\u2193", "in-panel"], ["space/s", "act"]] }) })
3398
+ /* @__PURE__ */ jsx9(Box9, { children: locked ? /* @__PURE__ */ jsx9(KeyHints, { hints: [["\u2192/enter", "open Accounts"], ["n", "log in"], ["q", "quit"]] }) : focus === "nav" ? /* @__PURE__ */ jsx9(KeyHints, { hints: [["\u2191\u2193", "section"], ["\u2192/enter", "open"], ...accounts.length > 1 ? [["a", "account"]] : [], ["?", "help"], ["q", "quit"]] }) : /* @__PURE__ */ jsx9(KeyHints, { hints: [["\u2190/esc", "back"], ["\u2191\u2193", "in-panel"], ["space/s", "act"]] }) })
3387
3399
  ] });
3388
3400
  }
3389
3401
  var HELP = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.81.38",
3
+ "version": "0.81.39",
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": {