@solongate/proxy 0.81.52 → 0.81.53
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/settings.d.ts +3 -0
- package/dist/commands/index.js +4 -0
- package/dist/index.js +19 -5
- package/dist/tui/index.js +19 -5
- package/package.json +1 -1
|
@@ -82,6 +82,9 @@ export declare function createWebhook(body: {
|
|
|
82
82
|
export declare function deleteWebhook(id: string): Promise<{
|
|
83
83
|
ok: true;
|
|
84
84
|
}>;
|
|
85
|
+
export declare function sendTestWebhook(id: string): Promise<{
|
|
86
|
+
delivered: boolean;
|
|
87
|
+
}>;
|
|
85
88
|
export declare function updateWebhook(id: string, patch: {
|
|
86
89
|
enabled?: boolean;
|
|
87
90
|
events?: DenialWebhook['events'];
|
package/dist/commands/index.js
CHANGED
|
@@ -221,6 +221,7 @@ __export(settings_exports, {
|
|
|
221
221
|
getSecurityLayers: () => getSecurityLayers,
|
|
222
222
|
getSelfProtection: () => getSelfProtection,
|
|
223
223
|
getWebhooks: () => getWebhooks,
|
|
224
|
+
sendTestWebhook: () => sendTestWebhook,
|
|
224
225
|
setAlertEnabled: () => setAlertEnabled,
|
|
225
226
|
setLocalLogs: () => setLocalLogs,
|
|
226
227
|
setSecurityLayers: () => setSecurityLayers,
|
|
@@ -275,6 +276,9 @@ function createWebhook(body) {
|
|
|
275
276
|
function deleteWebhook(id) {
|
|
276
277
|
return request("DELETE", "/settings/denial-webhook", { query: { id } });
|
|
277
278
|
}
|
|
279
|
+
function sendTestWebhook(id) {
|
|
280
|
+
return request("POST", "/settings/denial-webhook/send-test", { body: { id } });
|
|
281
|
+
}
|
|
278
282
|
function updateWebhook(id, patch) {
|
|
279
283
|
return request("PATCH", "/settings/denial-webhook", { body: { id, ...patch } });
|
|
280
284
|
}
|
package/dist/index.js
CHANGED
|
@@ -7394,6 +7394,7 @@ __export(settings_exports, {
|
|
|
7394
7394
|
getSecurityLayers: () => getSecurityLayers,
|
|
7395
7395
|
getSelfProtection: () => getSelfProtection,
|
|
7396
7396
|
getWebhooks: () => getWebhooks,
|
|
7397
|
+
sendTestWebhook: () => sendTestWebhook,
|
|
7397
7398
|
setAlertEnabled: () => setAlertEnabled,
|
|
7398
7399
|
setLocalLogs: () => setLocalLogs,
|
|
7399
7400
|
setSecurityLayers: () => setSecurityLayers,
|
|
@@ -7448,6 +7449,9 @@ function createWebhook(body) {
|
|
|
7448
7449
|
function deleteWebhook(id) {
|
|
7449
7450
|
return request("DELETE", "/settings/denial-webhook", { query: { id } });
|
|
7450
7451
|
}
|
|
7452
|
+
function sendTestWebhook(id) {
|
|
7453
|
+
return request("POST", "/settings/denial-webhook/send-test", { body: { id } });
|
|
7454
|
+
}
|
|
7451
7455
|
function updateWebhook(id, patch) {
|
|
7452
7456
|
return request("PATCH", "/settings/denial-webhook", { body: { id, ...patch } });
|
|
7453
7457
|
}
|
|
@@ -10233,10 +10237,20 @@ function SettingsPanel({
|
|
|
10233
10237
|
setSel((n) => Math.min(rowsAll.length - 1, n + 1));
|
|
10234
10238
|
setConfirmDel(null);
|
|
10235
10239
|
} else if (key.return || inp === " ") activate(cur);
|
|
10236
|
-
else if (inp === "m"
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
+
else if (inp === "m") {
|
|
10241
|
+
if (cur.kind === "acct") {
|
|
10242
|
+
const ok = setActiveAccount({ apiKey: cur.acc.apiKey, apiUrl: cur.acc.apiUrl });
|
|
10243
|
+
setMsg(ok ? { text: `\u2713 ${acctLabel(cur.acc)} is now the ACTIVE key (guard + logging)`, level: "ok" } : { text: "\u2717 could not set active", level: "bad" });
|
|
10244
|
+
refreshAccounts();
|
|
10245
|
+
} else if (cur.kind === "wh" || cur.kind === "alert" || cur.kind === "ll-enabled" || cur.kind === "ll-server") activate(cur);
|
|
10246
|
+
} else if (inp === "t" && cur.kind === "wh") {
|
|
10247
|
+
run12(
|
|
10248
|
+
"test event sent \u2014 check your endpoint",
|
|
10249
|
+
() => api.settings.sendTestWebhook(cur.wh.id).then((r) => {
|
|
10250
|
+
if (!r.delivered) throw new Error("endpoint rejected the test (non-2xx response)");
|
|
10251
|
+
}),
|
|
10252
|
+
whQ.reload
|
|
10253
|
+
);
|
|
10240
10254
|
} else if (inp === "n") beginLogin();
|
|
10241
10255
|
else if (inp === "e" && cur.kind === "wh") {
|
|
10242
10256
|
const next = EVENTS[(EVENTS.indexOf(cur.wh.events) + 1) % EVENTS.length];
|
|
@@ -10296,7 +10310,7 @@ function SettingsPanel({
|
|
|
10296
10310
|
return i >= start && i < start + listBudget;
|
|
10297
10311
|
};
|
|
10298
10312
|
return /* @__PURE__ */ jsx7(DataView, { loading, error, children: /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
10299
|
-
/* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: focused ? "\u2191\u2193 move \xB7 enter
|
|
10313
|
+
/* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: focused ? "\u2191\u2193 move \xB7 enter/m act \xB7 t test webhook \xB7 n add account \xB7 e events \xB7 d delete \xB7 r refresh" : "press \u2192 to configure" }),
|
|
10300
10314
|
editing ? /* @__PURE__ */ jsxs7(Box7, { children: [
|
|
10301
10315
|
/* @__PURE__ */ jsx7(Text7, { color: theme.warn, children: editing === "path" ? "local log path: " : editing === "wh-url" ? "webhook url: " : "channel (slack url / email / telegram id): " }),
|
|
10302
10316
|
/* @__PURE__ */ jsx7(TextInput5, { value: input, onChange: setInput, onSubmit: submitInput })
|
package/dist/tui/index.js
CHANGED
|
@@ -550,6 +550,7 @@ __export(settings_exports, {
|
|
|
550
550
|
getSecurityLayers: () => getSecurityLayers,
|
|
551
551
|
getSelfProtection: () => getSelfProtection,
|
|
552
552
|
getWebhooks: () => getWebhooks,
|
|
553
|
+
sendTestWebhook: () => sendTestWebhook,
|
|
553
554
|
setAlertEnabled: () => setAlertEnabled,
|
|
554
555
|
setLocalLogs: () => setLocalLogs,
|
|
555
556
|
setSecurityLayers: () => setSecurityLayers,
|
|
@@ -604,6 +605,9 @@ function createWebhook(body) {
|
|
|
604
605
|
function deleteWebhook(id) {
|
|
605
606
|
return request("DELETE", "/settings/denial-webhook", { query: { id } });
|
|
606
607
|
}
|
|
608
|
+
function sendTestWebhook(id) {
|
|
609
|
+
return request("POST", "/settings/denial-webhook/send-test", { body: { id } });
|
|
610
|
+
}
|
|
607
611
|
function updateWebhook(id, patch) {
|
|
608
612
|
return request("PATCH", "/settings/denial-webhook", { body: { id, ...patch } });
|
|
609
613
|
}
|
|
@@ -3347,10 +3351,20 @@ function SettingsPanel({
|
|
|
3347
3351
|
setSel((n) => Math.min(rowsAll.length - 1, n + 1));
|
|
3348
3352
|
setConfirmDel(null);
|
|
3349
3353
|
} else if (key.return || inp === " ") activate(cur);
|
|
3350
|
-
else if (inp === "m"
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
+
else if (inp === "m") {
|
|
3355
|
+
if (cur.kind === "acct") {
|
|
3356
|
+
const ok = setActiveAccount({ apiKey: cur.acc.apiKey, apiUrl: cur.acc.apiUrl });
|
|
3357
|
+
setMsg(ok ? { text: `\u2713 ${acctLabel(cur.acc)} is now the ACTIVE key (guard + logging)`, level: "ok" } : { text: "\u2717 could not set active", level: "bad" });
|
|
3358
|
+
refreshAccounts();
|
|
3359
|
+
} else if (cur.kind === "wh" || cur.kind === "alert" || cur.kind === "ll-enabled" || cur.kind === "ll-server") activate(cur);
|
|
3360
|
+
} else if (inp === "t" && cur.kind === "wh") {
|
|
3361
|
+
run(
|
|
3362
|
+
"test event sent \u2014 check your endpoint",
|
|
3363
|
+
() => api.settings.sendTestWebhook(cur.wh.id).then((r) => {
|
|
3364
|
+
if (!r.delivered) throw new Error("endpoint rejected the test (non-2xx response)");
|
|
3365
|
+
}),
|
|
3366
|
+
whQ.reload
|
|
3367
|
+
);
|
|
3354
3368
|
} else if (inp === "n") beginLogin();
|
|
3355
3369
|
else if (inp === "e" && cur.kind === "wh") {
|
|
3356
3370
|
const next = EVENTS[(EVENTS.indexOf(cur.wh.events) + 1) % EVENTS.length];
|
|
@@ -3410,7 +3424,7 @@ function SettingsPanel({
|
|
|
3410
3424
|
return i >= start && i < start + listBudget;
|
|
3411
3425
|
};
|
|
3412
3426
|
return /* @__PURE__ */ jsx7(DataView, { loading, error, children: /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
3413
|
-
/* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: focused ? "\u2191\u2193 move \xB7 enter
|
|
3427
|
+
/* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: focused ? "\u2191\u2193 move \xB7 enter/m act \xB7 t test webhook \xB7 n add account \xB7 e events \xB7 d delete \xB7 r refresh" : "press \u2192 to configure" }),
|
|
3414
3428
|
editing ? /* @__PURE__ */ jsxs7(Box7, { children: [
|
|
3415
3429
|
/* @__PURE__ */ jsx7(Text7, { color: theme.warn, children: editing === "path" ? "local log path: " : editing === "wh-url" ? "webhook url: " : "channel (slack url / email / telegram id): " }),
|
|
3416
3430
|
/* @__PURE__ */ jsx7(TextInput5, { value: input, onChange: setInput, onSubmit: submitInput })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.81.
|
|
3
|
+
"version": "0.81.53",
|
|
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": {
|