@silmaril-security/sdk 0.10.3 → 0.11.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/CHANGELOG.md +11 -2
- package/README.md +4 -4
- package/dist/adapters/deepagents.d.cts +1 -1
- package/dist/adapters/deepagents.d.ts +1 -1
- package/dist/adapters/langchain.d.cts +1 -1
- package/dist/adapters/langchain.d.ts +1 -1
- package/dist/adapters/vercel-v4.d.cts +1 -1
- package/dist/adapters/vercel-v4.d.ts +1 -1
- package/dist/adapters/vercel.d.cts +1 -1
- package/dist/adapters/vercel.d.ts +1 -1
- package/dist/{firewall-BXM2BWEr.d.cts → firewall-BD4YdAmB.d.cts} +4 -4
- package/dist/{firewall-BXM2BWEr.d.ts → firewall-BD4YdAmB.d.ts} +4 -4
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HookLabel, B as BlockResult, R as ReviewLevel } from './firewall-
|
|
2
|
-
export { A as ALL_HOOKS, C as ClassificationMetadata, a as ClassifyBatchOptions, b as ClassifyEvent, c as ClassifyOptions, D as DEFAULT_HOOKS, d as DEFAULT_TIMEOUT_MS, F as FIREWALL_HOOK_TO_LABEL, e as Firewall, f as FirewallHook, g as FirewallMiddleware, h as FirewallMode, i as FirewallOptions, G as GovernanceAction, j as GovernanceContext, k as GovernanceDecision, l as GovernanceResource, m as GovernanceResourceKind, n as HARMFUL_OUTCOMES, o as HarmfulOutcome, I as INPUT_HOOKS, K as KnownHarmfulOutcome, p as KnownPrimaryOutcome, L as LangChainAdapterOptions, q as LangChainFirewallHandler, M as MiddlewareOptions, O as OUTCOME_DESCRIPTIONS, r as OUTPUT_HOOKS, s as Outcome, P as PRIMARY_OUTCOMES, t as Prediction, u as PrimaryOutcome, v as ProtectOptions, U as UnknownOutcome, w as isHarmfulOutcome, x as isPrimaryOutcome, y as normalizeHarmfulOutcome, z as normalizeHarmfulOutcomeMap, E as normalizePrimaryOutcome, J as prependHook, N as prependToolName, Q as resolveHooks } from './firewall-
|
|
1
|
+
import { H as HookLabel, B as BlockResult, R as ReviewLevel } from './firewall-BD4YdAmB.cjs';
|
|
2
|
+
export { A as ALL_HOOKS, C as ClassificationMetadata, a as ClassifyBatchOptions, b as ClassifyEvent, c as ClassifyOptions, D as DEFAULT_HOOKS, d as DEFAULT_TIMEOUT_MS, F as FIREWALL_HOOK_TO_LABEL, e as Firewall, f as FirewallHook, g as FirewallMiddleware, h as FirewallMode, i as FirewallOptions, G as GovernanceAction, j as GovernanceContext, k as GovernanceDecision, l as GovernanceResource, m as GovernanceResourceKind, n as HARMFUL_OUTCOMES, o as HarmfulOutcome, I as INPUT_HOOKS, K as KnownHarmfulOutcome, p as KnownPrimaryOutcome, L as LangChainAdapterOptions, q as LangChainFirewallHandler, M as MiddlewareOptions, O as OUTCOME_DESCRIPTIONS, r as OUTPUT_HOOKS, s as Outcome, P as PRIMARY_OUTCOMES, t as Prediction, u as PrimaryOutcome, v as ProtectOptions, U as UnknownOutcome, w as isHarmfulOutcome, x as isPrimaryOutcome, y as normalizeHarmfulOutcome, z as normalizeHarmfulOutcomeMap, E as normalizePrimaryOutcome, J as prependHook, N as prependToolName, Q as resolveHooks } from './firewall-BD4YdAmB.cjs';
|
|
3
3
|
|
|
4
4
|
interface MalformedInputDetails {
|
|
5
5
|
field?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HookLabel, B as BlockResult, R as ReviewLevel } from './firewall-
|
|
2
|
-
export { A as ALL_HOOKS, C as ClassificationMetadata, a as ClassifyBatchOptions, b as ClassifyEvent, c as ClassifyOptions, D as DEFAULT_HOOKS, d as DEFAULT_TIMEOUT_MS, F as FIREWALL_HOOK_TO_LABEL, e as Firewall, f as FirewallHook, g as FirewallMiddleware, h as FirewallMode, i as FirewallOptions, G as GovernanceAction, j as GovernanceContext, k as GovernanceDecision, l as GovernanceResource, m as GovernanceResourceKind, n as HARMFUL_OUTCOMES, o as HarmfulOutcome, I as INPUT_HOOKS, K as KnownHarmfulOutcome, p as KnownPrimaryOutcome, L as LangChainAdapterOptions, q as LangChainFirewallHandler, M as MiddlewareOptions, O as OUTCOME_DESCRIPTIONS, r as OUTPUT_HOOKS, s as Outcome, P as PRIMARY_OUTCOMES, t as Prediction, u as PrimaryOutcome, v as ProtectOptions, U as UnknownOutcome, w as isHarmfulOutcome, x as isPrimaryOutcome, y as normalizeHarmfulOutcome, z as normalizeHarmfulOutcomeMap, E as normalizePrimaryOutcome, J as prependHook, N as prependToolName, Q as resolveHooks } from './firewall-
|
|
1
|
+
import { H as HookLabel, B as BlockResult, R as ReviewLevel } from './firewall-BD4YdAmB.js';
|
|
2
|
+
export { A as ALL_HOOKS, C as ClassificationMetadata, a as ClassifyBatchOptions, b as ClassifyEvent, c as ClassifyOptions, D as DEFAULT_HOOKS, d as DEFAULT_TIMEOUT_MS, F as FIREWALL_HOOK_TO_LABEL, e as Firewall, f as FirewallHook, g as FirewallMiddleware, h as FirewallMode, i as FirewallOptions, G as GovernanceAction, j as GovernanceContext, k as GovernanceDecision, l as GovernanceResource, m as GovernanceResourceKind, n as HARMFUL_OUTCOMES, o as HarmfulOutcome, I as INPUT_HOOKS, K as KnownHarmfulOutcome, p as KnownPrimaryOutcome, L as LangChainAdapterOptions, q as LangChainFirewallHandler, M as MiddlewareOptions, O as OUTCOME_DESCRIPTIONS, r as OUTPUT_HOOKS, s as Outcome, P as PRIMARY_OUTCOMES, t as Prediction, u as PrimaryOutcome, v as ProtectOptions, U as UnknownOutcome, w as isHarmfulOutcome, x as isPrimaryOutcome, y as normalizeHarmfulOutcome, z as normalizeHarmfulOutcomeMap, E as normalizePrimaryOutcome, J as prependHook, N as prependToolName, Q as resolveHooks } from './firewall-BD4YdAmB.js';
|
|
3
3
|
|
|
4
4
|
interface MalformedInputDetails {
|
|
5
5
|
field?: string;
|
package/dist/index.js
CHANGED
|
@@ -1404,7 +1404,7 @@ var Outcome = {
|
|
|
1404
1404
|
StoryScriptGeneration: "story_script_generation",
|
|
1405
1405
|
GameGeneration: "game_generation",
|
|
1406
1406
|
WebsiteGeneration: "website_generation",
|
|
1407
|
-
|
|
1407
|
+
Abuse: "abuse",
|
|
1408
1408
|
TraditionalAiAbuse: "traditional_ai_abuse"
|
|
1409
1409
|
};
|
|
1410
1410
|
var PRIMARY_OUTCOMES = [
|
|
@@ -1418,7 +1418,7 @@ var PRIMARY_OUTCOMES = [
|
|
|
1418
1418
|
Outcome.StoryScriptGeneration,
|
|
1419
1419
|
Outcome.GameGeneration,
|
|
1420
1420
|
Outcome.WebsiteGeneration,
|
|
1421
|
-
Outcome.
|
|
1421
|
+
Outcome.Abuse,
|
|
1422
1422
|
Outcome.TraditionalAiAbuse
|
|
1423
1423
|
];
|
|
1424
1424
|
var HARMFUL_OUTCOMES = [
|
|
@@ -1431,7 +1431,7 @@ var HARMFUL_OUTCOMES = [
|
|
|
1431
1431
|
Outcome.StoryScriptGeneration,
|
|
1432
1432
|
Outcome.GameGeneration,
|
|
1433
1433
|
Outcome.WebsiteGeneration,
|
|
1434
|
-
Outcome.
|
|
1434
|
+
Outcome.Abuse,
|
|
1435
1435
|
Outcome.TraditionalAiAbuse
|
|
1436
1436
|
];
|
|
1437
1437
|
var OUTCOME_DESCRIPTIONS = {
|
|
@@ -1445,7 +1445,7 @@ var OUTCOME_DESCRIPTIONS = {
|
|
|
1445
1445
|
[Outcome.StoryScriptGeneration]: "Requests generation of narrative prose, dialogue, scripts, or story artifacts.",
|
|
1446
1446
|
[Outcome.GameGeneration]: "Requests generation of a game, quest, level, mechanic, or playable experience.",
|
|
1447
1447
|
[Outcome.WebsiteGeneration]: "Requests generation of a website, landing page, storefront, or web experience.",
|
|
1448
|
-
[Outcome.
|
|
1448
|
+
[Outcome.Abuse]: "Requests content or actions that violate the tenant's acceptable-use policy.",
|
|
1449
1449
|
[Outcome.TraditionalAiAbuse]: "Requests unsafe AI assistance outside the concrete security outcome classes."
|
|
1450
1450
|
};
|
|
1451
1451
|
var PRIMARY_OUTCOME_SET = new Set(PRIMARY_OUTCOMES);
|
|
@@ -1527,7 +1527,7 @@ function sanitizeText(text) {
|
|
|
1527
1527
|
}
|
|
1528
1528
|
|
|
1529
1529
|
// src/firewall.ts
|
|
1530
|
-
var SDK_VERSION = "0.
|
|
1530
|
+
var SDK_VERSION = "0.11.0";
|
|
1531
1531
|
var DEFAULT_TIMEOUT_MS = 1e4;
|
|
1532
1532
|
var DEFAULT_MAX_RETRIES = 5;
|
|
1533
1533
|
var MAX_BACKOFF_SECONDS = 30;
|