@solongate/proxy 0.78.0 → 0.79.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.
- package/dist/api-client/index.d.ts +4 -0
- package/dist/api-client/keys.d.ts +17 -0
- package/dist/api-client/mcp.d.ts +10 -0
- package/dist/api-client/settings.d.ts +46 -0
- package/dist/commands/alerts.d.ts +1 -0
- package/dist/commands/doctor.d.ts +1 -0
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.js +417 -2
- package/dist/commands/keys.d.ts +1 -0
- package/dist/commands/mcp.d.ts +1 -0
- package/dist/commands/watch.d.ts +1 -0
- package/dist/commands/webhooks.d.ts +1 -0
- package/dist/index.js +563 -82
- package/dist/tui/index.js +55 -5
- package/package.json +1 -1
package/dist/tui/index.js
CHANGED
|
@@ -325,9 +325,15 @@ function dryRun(body) {
|
|
|
325
325
|
var settings_exports = {};
|
|
326
326
|
__export(settings_exports, {
|
|
327
327
|
clearRateLimitHistory: () => clearRateLimitHistory,
|
|
328
|
+
createAlert: () => createAlert,
|
|
329
|
+
createWebhook: () => createWebhook,
|
|
330
|
+
deleteAlert: () => deleteAlert,
|
|
331
|
+
deleteWebhook: () => deleteWebhook,
|
|
332
|
+
getAlerts: () => getAlerts,
|
|
328
333
|
getGuardStatus: () => getGuardStatus,
|
|
329
334
|
getRateLimitHistory: () => getRateLimitHistory,
|
|
330
335
|
getSecurityLayers: () => getSecurityLayers,
|
|
336
|
+
getWebhooks: () => getWebhooks,
|
|
331
337
|
setSecurityLayers: () => setSecurityLayers
|
|
332
338
|
});
|
|
333
339
|
function getSecurityLayers() {
|
|
@@ -345,6 +351,24 @@ function clearRateLimitHistory() {
|
|
|
345
351
|
function getGuardStatus() {
|
|
346
352
|
return request("GET", "/settings/guard-status");
|
|
347
353
|
}
|
|
354
|
+
function getAlerts() {
|
|
355
|
+
return request("GET", "/settings/denial-alerts");
|
|
356
|
+
}
|
|
357
|
+
function createAlert(body) {
|
|
358
|
+
return request("POST", "/settings/denial-alerts", { body });
|
|
359
|
+
}
|
|
360
|
+
function deleteAlert(id) {
|
|
361
|
+
return request("DELETE", "/settings/denial-alerts", { query: { id } });
|
|
362
|
+
}
|
|
363
|
+
function getWebhooks() {
|
|
364
|
+
return request("GET", "/settings/denial-webhook");
|
|
365
|
+
}
|
|
366
|
+
function createWebhook(body) {
|
|
367
|
+
return request("POST", "/settings/denial-webhook", { body });
|
|
368
|
+
}
|
|
369
|
+
function deleteWebhook(id) {
|
|
370
|
+
return request("DELETE", "/settings/denial-webhook", { query: { id } });
|
|
371
|
+
}
|
|
348
372
|
|
|
349
373
|
// src/api-client/stats.ts
|
|
350
374
|
var stats_exports = {};
|
|
@@ -405,8 +429,34 @@ function anomalies(id, limit) {
|
|
|
405
429
|
});
|
|
406
430
|
}
|
|
407
431
|
|
|
432
|
+
// src/api-client/keys.ts
|
|
433
|
+
var keys_exports = {};
|
|
434
|
+
__export(keys_exports, {
|
|
435
|
+
create: () => create2,
|
|
436
|
+
list: () => list3,
|
|
437
|
+
revoke: () => revoke
|
|
438
|
+
});
|
|
439
|
+
function list3() {
|
|
440
|
+
return request("GET", "/keys");
|
|
441
|
+
}
|
|
442
|
+
function create2(name, isLive = true) {
|
|
443
|
+
return request("POST", "/keys", { body: { name, is_live: isLive } });
|
|
444
|
+
}
|
|
445
|
+
function revoke(id) {
|
|
446
|
+
return request("DELETE", `/keys/${encodeURIComponent(id)}`);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// src/api-client/mcp.ts
|
|
450
|
+
var mcp_exports = {};
|
|
451
|
+
__export(mcp_exports, {
|
|
452
|
+
list: () => list4
|
|
453
|
+
});
|
|
454
|
+
function list4() {
|
|
455
|
+
return request("GET", "/mcp-servers");
|
|
456
|
+
}
|
|
457
|
+
|
|
408
458
|
// src/api-client/index.ts
|
|
409
|
-
var api = { policies: policies_exports, settings: settings_exports, stats: stats_exports, audit: audit_exports, agents: agents_exports };
|
|
459
|
+
var api = { policies: policies_exports, settings: settings_exports, stats: stats_exports, audit: audit_exports, agents: agents_exports, keys: keys_exports, mcp: mcp_exports };
|
|
410
460
|
|
|
411
461
|
// src/tui/hooks.ts
|
|
412
462
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
@@ -1291,8 +1341,8 @@ function ruleSummary(r) {
|
|
|
1291
1341
|
return bits.join(" ");
|
|
1292
1342
|
}
|
|
1293
1343
|
function PoliciesPanel({ focused }) {
|
|
1294
|
-
const
|
|
1295
|
-
const policies =
|
|
1344
|
+
const list5 = useLoader(() => api.policies.list());
|
|
1345
|
+
const policies = list5.data?.policies ?? [];
|
|
1296
1346
|
const [view, setView] = useState3("list");
|
|
1297
1347
|
const [pi, setPi] = useState3(0);
|
|
1298
1348
|
const [ri, setRi] = useState3(0);
|
|
@@ -1334,7 +1384,7 @@ function PoliciesPanel({ focused }) {
|
|
|
1334
1384
|
setRules(res.rules);
|
|
1335
1385
|
setDirty(false);
|
|
1336
1386
|
setStatus("\u2713 Saved v" + res._version);
|
|
1337
|
-
|
|
1387
|
+
list5.reload();
|
|
1338
1388
|
} catch (e) {
|
|
1339
1389
|
setStatus("\u2717 " + (e instanceof Error ? e.message : String(e)));
|
|
1340
1390
|
}
|
|
@@ -1404,7 +1454,7 @@ function PoliciesPanel({ focused }) {
|
|
|
1404
1454
|
{ isActive: focused && !editing }
|
|
1405
1455
|
);
|
|
1406
1456
|
if (view === "list") {
|
|
1407
|
-
return /* @__PURE__ */ jsx3(DataView, { loading:
|
|
1457
|
+
return /* @__PURE__ */ jsx3(DataView, { loading: list5.loading && !list5.data, error: list5.error, empty: !!list5.data && policies.length === 0, emptyText: "No policies.", children: /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
|
|
1408
1458
|
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: focused ? "\u2191\u2193 select \xB7 enter open" : "press \u2192 to browse" }),
|
|
1409
1459
|
/* @__PURE__ */ jsx3(Box3, { marginTop: 1, flexDirection: "column", children: policies.map((p, i) => /* @__PURE__ */ jsxs3(Text3, { color: i === pi ? theme.accentBright : void 0, bold: i === pi, children: [
|
|
1410
1460
|
(i === pi ? "\u25B8 " : " ") + truncate(p.name, 26).padEnd(27),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.79.0",
|
|
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": {
|