@solongate/proxy 0.83.0 → 0.83.1

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.
@@ -8,5 +8,13 @@ export interface Me {
8
8
  name?: string;
9
9
  slug?: string;
10
10
  } | null;
11
+ /**
12
+ * Present only for a guest account, and carrying only whether the allowance is
13
+ * spent. The size of it and how much is left are the operator's numbers and
14
+ * are not sent here.
15
+ */
16
+ guest?: {
17
+ exhausted?: boolean;
18
+ } | null;
11
19
  }
12
20
  export declare function me(): Promise<Me>;
package/dist/index.js CHANGED
@@ -12288,6 +12288,21 @@ function App() {
12288
12288
  const rawEmail = cur?.email ?? "";
12289
12289
  const isGuestAccount2 = rawEmail.endsWith("@anonymous.solongate.invalid");
12290
12290
  const acctLabel2 = !cur ? "not logged in" : isGuestAccount2 ? "Anonymous" : rawEmail || cur.user || cur.project || `account \u2026${cur.apiKey.slice(-4)}`;
12291
+ const [guestSpent, setGuestSpent] = useState9(false);
12292
+ useEffect8(() => {
12293
+ if (!isGuestAccount2) {
12294
+ setGuestSpent(false);
12295
+ return;
12296
+ }
12297
+ let alive = true;
12298
+ api.auth.me().then((r) => {
12299
+ if (alive) setGuestSpent(r.guest?.exhausted === true);
12300
+ }).catch(() => {
12301
+ });
12302
+ return () => {
12303
+ alive = false;
12304
+ };
12305
+ }, [isGuestAccount2, cur?.apiKey]);
12291
12306
  useEffect8(() => {
12292
12307
  if (!cur || cur.email) return;
12293
12308
  let alive = true;
@@ -12373,8 +12388,13 @@ function App() {
12373
12388
  /* @__PURE__ */ jsxs9(Text9, { wrap: "truncate", children: [
12374
12389
  /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: "account: " }),
12375
12390
  /* @__PURE__ */ jsx9(Text9, { color: locked ? theme.warn : theme.accentBright, bold: true, children: acctLabel2 }),
12376
- locked ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 log in from Settings to unlock the dataroom" }) : accounts.length > 1 ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: ` (${acctIdx + 1}/${accounts.length} \xB7 a switch \xB7 Settings to manage)` }) : /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 Settings to add another" }),
12377
- update2.kind === "updating" ? /* @__PURE__ */ jsx9(Text9, { color: theme.warn, children: ` \u2191 updating to v${update2.version}\u2026` }) : update2.kind === "updated" ? /* @__PURE__ */ jsx9(Text9, { color: theme.ok, bold: true, children: ` \u2191 v${update2.version} installed \u2014 restart (q, then solongate) to apply` }) : null
12391
+ locked ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 log in from Settings to unlock the dataroom" }) : guestSpent ? (
12392
+ // Said on this line rather than on a new one: every panel budgets its
12393
+ // height against a fixed shell, so one more line up here silently clips
12394
+ // a row off whichever panel is open.
12395
+ /* @__PURE__ */ jsx9(Text9, { color: theme.bad, bold: true, children: " \xB7 allowance used up \xB7 every call denied \xB7 create an account to carry on" })
12396
+ ) : accounts.length > 1 ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: ` (${acctIdx + 1}/${accounts.length} \xB7 a switch \xB7 Settings to manage)` }) : /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 Settings to add another" }),
12397
+ update2.kind === "updating" ? /* @__PURE__ */ jsx9(Text9, { color: theme.warn, children: ` \u2191 updating to v${update2.version}\u2026` }) : update2.kind === "updated" ? /* @__PURE__ */ jsx9(Text9, { color: theme.ok, bold: true, children: ` \u2191 v${update2.version} installed \xB7 restart (q, then solongate) to apply` }) : null
12378
12398
  ] }),
12379
12399
  /* @__PURE__ */ jsxs9(Box9, { marginTop: 1, flexGrow: 1, children: [
12380
12400
  /* @__PURE__ */ jsx9(Box9, { flexDirection: "column", flexShrink: 0, width: 16, borderStyle: "round", borderColor: focus === "nav" ? theme.accent : "gray", paddingX: 1, children: SECTIONS.map((s, i) => {
package/dist/tui/index.js CHANGED
@@ -5460,6 +5460,21 @@ function App() {
5460
5460
  const rawEmail = cur?.email ?? "";
5461
5461
  const isGuestAccount2 = rawEmail.endsWith("@anonymous.solongate.invalid");
5462
5462
  const acctLabel2 = !cur ? "not logged in" : isGuestAccount2 ? "Anonymous" : rawEmail || cur.user || cur.project || `account \u2026${cur.apiKey.slice(-4)}`;
5463
+ const [guestSpent, setGuestSpent] = useState9(false);
5464
+ useEffect8(() => {
5465
+ if (!isGuestAccount2) {
5466
+ setGuestSpent(false);
5467
+ return;
5468
+ }
5469
+ let alive = true;
5470
+ api.auth.me().then((r) => {
5471
+ if (alive) setGuestSpent(r.guest?.exhausted === true);
5472
+ }).catch(() => {
5473
+ });
5474
+ return () => {
5475
+ alive = false;
5476
+ };
5477
+ }, [isGuestAccount2, cur?.apiKey]);
5463
5478
  useEffect8(() => {
5464
5479
  if (!cur || cur.email) return;
5465
5480
  let alive = true;
@@ -5545,8 +5560,13 @@ function App() {
5545
5560
  /* @__PURE__ */ jsxs9(Text9, { wrap: "truncate", children: [
5546
5561
  /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: "account: " }),
5547
5562
  /* @__PURE__ */ jsx9(Text9, { color: locked ? theme.warn : theme.accentBright, bold: true, children: acctLabel2 }),
5548
- locked ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 log in from Settings to unlock the dataroom" }) : accounts.length > 1 ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: ` (${acctIdx + 1}/${accounts.length} \xB7 a switch \xB7 Settings to manage)` }) : /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 Settings to add another" }),
5549
- update2.kind === "updating" ? /* @__PURE__ */ jsx9(Text9, { color: theme.warn, children: ` \u2191 updating to v${update2.version}\u2026` }) : update2.kind === "updated" ? /* @__PURE__ */ jsx9(Text9, { color: theme.ok, bold: true, children: ` \u2191 v${update2.version} installed \u2014 restart (q, then solongate) to apply` }) : null
5563
+ locked ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 log in from Settings to unlock the dataroom" }) : guestSpent ? (
5564
+ // Said on this line rather than on a new one: every panel budgets its
5565
+ // height against a fixed shell, so one more line up here silently clips
5566
+ // a row off whichever panel is open.
5567
+ /* @__PURE__ */ jsx9(Text9, { color: theme.bad, bold: true, children: " \xB7 allowance used up \xB7 every call denied \xB7 create an account to carry on" })
5568
+ ) : accounts.length > 1 ? /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: ` (${acctIdx + 1}/${accounts.length} \xB7 a switch \xB7 Settings to manage)` }) : /* @__PURE__ */ jsx9(Text9, { color: theme.dim, children: " \xB7 Settings to add another" }),
5569
+ update2.kind === "updating" ? /* @__PURE__ */ jsx9(Text9, { color: theme.warn, children: ` \u2191 updating to v${update2.version}\u2026` }) : update2.kind === "updated" ? /* @__PURE__ */ jsx9(Text9, { color: theme.ok, bold: true, children: ` \u2191 v${update2.version} installed \xB7 restart (q, then solongate) to apply` }) : null
5550
5570
  ] }),
5551
5571
  /* @__PURE__ */ jsxs9(Box9, { marginTop: 1, flexGrow: 1, children: [
5552
5572
  /* @__PURE__ */ jsx9(Box9, { flexDirection: "column", flexShrink: 0, width: 16, borderStyle: "round", borderColor: focus === "nav" ? theme.accent : "gray", paddingX: 1, children: SECTIONS.map((s, i) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.83.0",
3
+ "version": "0.83.1",
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": {