@vellumai/vellum-gateway 0.10.8-staging.1 → 0.10.8
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/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { describe, test, expect, mock, afterEach } from "bun:test";
|
|
1
|
+
import { describe, test, expect, mock, afterEach, beforeEach } from "bun:test";
|
|
2
2
|
import { createHmac } from "node:crypto";
|
|
3
3
|
import type { GatewayConfig } from "../config.js";
|
|
4
4
|
import type { CredentialCache } from "../credential-cache.js";
|
|
5
5
|
import type { ConfigFileCache } from "../config-file-cache.js";
|
|
6
6
|
import { credentialKey } from "../credential-key.js";
|
|
7
7
|
import { initSigningKey } from "../auth/token-service.js";
|
|
8
|
+
import {
|
|
9
|
+
initAdmissionPolicyCache,
|
|
10
|
+
resetAdmissionPolicyCache,
|
|
11
|
+
} from "../risk/admission-policy-cache.js";
|
|
12
|
+
import { initGatewayDb, resetGatewayDb } from "../db/connection.js";
|
|
8
13
|
|
|
9
14
|
const TEST_SIGNING_KEY = Buffer.from("test-signing-key-at-least-32-bytes-long");
|
|
10
15
|
initSigningKey(TEST_SIGNING_KEY);
|
|
@@ -52,9 +57,21 @@ const { createTwilioStatusWebhookHandler } =
|
|
|
52
57
|
|
|
53
58
|
const AUTH_TOKEN = "test-twilio-auth-token";
|
|
54
59
|
|
|
60
|
+
beforeEach(async () => {
|
|
61
|
+
// The voice webhook resolves the phone admission floor (channel-trust-floors
|
|
62
|
+
// is on by default); init the cache fresh per test like the other webhook
|
|
63
|
+
// handler tests.
|
|
64
|
+
resetGatewayDb();
|
|
65
|
+
resetAdmissionPolicyCache();
|
|
66
|
+
await initGatewayDb();
|
|
67
|
+
initAdmissionPolicyCache();
|
|
68
|
+
});
|
|
69
|
+
|
|
55
70
|
afterEach(() => {
|
|
56
71
|
fetchMock = mock(async () => new Response());
|
|
57
72
|
logCalls.length = 0;
|
|
73
|
+
resetAdmissionPolicyCache();
|
|
74
|
+
resetGatewayDb();
|
|
58
75
|
});
|
|
59
76
|
|
|
60
77
|
function findLogCall(message: string): {
|
|
@@ -343,8 +343,8 @@
|
|
|
343
343
|
"scope": "assistant",
|
|
344
344
|
"key": "channel-trust-floors",
|
|
345
345
|
"label": "Channel Trust Floors",
|
|
346
|
-
"description": "Expose the Channel Trust Floors settings card (per-channel inbound admission policy) on the Privacy settings page. When off, the card is hidden and channels fall back to their default admission floors.
|
|
347
|
-
"defaultEnabled":
|
|
346
|
+
"description": "Expose the Channel Trust Floors settings card (per-channel inbound admission policy) on the Privacy settings page. When off, the card is hidden and channels fall back to their default admission floors. On by default; disable to hide the card.",
|
|
347
|
+
"defaultEnabled": true
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
350
|
"id": "mcp-add-server",
|