@atbash/sdk 0.3.20 → 0.3.22

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/index.cjs CHANGED
@@ -193,11 +193,11 @@ async function shutdownTelemetry() {
193
193
  var { createClient, encryption: encryption2, newSignatureProvider } = import_postchain_client2.default;
194
194
  var DEFAULT_ENDPOINT = "https://atbash.ai";
195
195
  var DEFAULT_CHROMIA_NODE_URLS = [
196
- "https://node6.testnet.chromia.com:7740",
197
- "https://node7.testnet.chromia.com:7740",
198
- "https://node8.testnet.chromia.com:7740"
196
+ "https://node0.testnet.chromia.com:7740",
197
+ "https://node1.testnet.chromia.com:7740",
198
+ "https://node3.testnet.chromia.com:7740"
199
199
  ];
200
- var DEFAULT_BLOCKCHAIN_RID = "3CF2566BF0E606C8D6F9360566DB2FE3BC254C39451BAEB6D736E916D677486A";
200
+ var DEFAULT_BLOCKCHAIN_RID = "209138D78F83E49838921CEDF27DA46DEF2FB20466354BD75DFAB7DDCA6F2517";
201
201
  function isValidPrivateKey(hex) {
202
202
  return /^[0-9a-fA-F]{64}$/.test(hex);
203
203
  }
@@ -921,10 +921,25 @@ function createAtbashClient(config = {}) {
921
921
  };
922
922
  }
923
923
  if (action === "allow") {
924
- const surfacedVerdict = result.verdict === "ALLOW" || result.verdict === "HOLD" || result.verdict === "BLOCK" ? result.verdict : "ALLOW";
924
+ if (result.verdict === "HOLD") {
925
+ return {
926
+ allow: false,
927
+ verdict: "HOLD",
928
+ reason: result.reason,
929
+ toolCallId: result.tool_call_id
930
+ };
931
+ }
932
+ if (result.verdict === "BLOCK") {
933
+ return {
934
+ allow: false,
935
+ verdict: "BLOCK",
936
+ reason: result.reason,
937
+ toolCallId: result.tool_call_id
938
+ };
939
+ }
925
940
  return {
926
941
  allow: true,
927
- verdict: surfacedVerdict,
942
+ verdict: "ALLOW",
928
943
  reason: result.reason,
929
944
  toolCallId: result.tool_call_id
930
945
  };
@@ -1051,11 +1066,17 @@ var BEHAVIOR_PATTERNS = [
1051
1066
  re: /\b(?:no need to|don'?t need to|not necessary to|unnecessary to)\b.*\b(?:check|verify|validate|scan|review|confirm|authenticate)\b/i,
1052
1067
  description: "attempts to normalize skipping verification"
1053
1068
  },
1069
+ {
1070
+ type: "safety_bypass",
1071
+ severity: "high",
1072
+ re: /\[\s*(?:VERIFIED|SAFE|APPROVED|TRUSTED|AUTHORIZED|CLEARED|WHITELISTED)\s*\]/i,
1073
+ description: "stores a verdict-influencing meta-tag that could be prepended to action text to bypass AI evaluation"
1074
+ },
1054
1075
  /* ── Privilege escalation ── */
1055
1076
  {
1056
1077
  type: "privilege_escalation",
1057
1078
  severity: "critical",
1058
- re: /\b(?:admin|administrator|root|superuser|sudo|elevated)\b.*\b(?:privilege|permission|access|role|clearance|authority)\b.*\b(?:granted|approved|confirmed|given|assigned)\b/i,
1079
+ re: /\b(?:admin|administrator|root|superuser|sudo|elevated)\b.*\b(?:privileges?|permissions?|access|roles?|clearance|authority)\b.*\b(?:granted|approved|confirmed|given|assigned)\b/i,
1059
1080
  description: "claims elevated privileges were granted"
1060
1081
  },
1061
1082
  {
package/dist/index.d.cts CHANGED
@@ -193,7 +193,7 @@ interface AtbashClientConfig {
193
193
 
194
194
  declare const DEFAULT_ENDPOINT = "https://atbash.ai";
195
195
  declare const DEFAULT_CHROMIA_NODE_URLS: string[];
196
- declare const DEFAULT_BLOCKCHAIN_RID = "3CF2566BF0E606C8D6F9360566DB2FE3BC254C39451BAEB6D736E916D677486A";
196
+ declare const DEFAULT_BLOCKCHAIN_RID = "209138D78F83E49838921CEDF27DA46DEF2FB20466354BD75DFAB7DDCA6F2517";
197
197
  declare function isValidPrivateKey(hex: string): boolean;
198
198
  declare function derivePublicKey(privKeyHex: string): string;
199
199
  declare function generateKeyPair(): {
package/dist/index.d.ts CHANGED
@@ -193,7 +193,7 @@ interface AtbashClientConfig {
193
193
 
194
194
  declare const DEFAULT_ENDPOINT = "https://atbash.ai";
195
195
  declare const DEFAULT_CHROMIA_NODE_URLS: string[];
196
- declare const DEFAULT_BLOCKCHAIN_RID = "3CF2566BF0E606C8D6F9360566DB2FE3BC254C39451BAEB6D736E916D677486A";
196
+ declare const DEFAULT_BLOCKCHAIN_RID = "209138D78F83E49838921CEDF27DA46DEF2FB20466354BD75DFAB7DDCA6F2517";
197
197
  declare function isValidPrivateKey(hex: string): boolean;
198
198
  declare function derivePublicKey(privKeyHex: string): string;
199
199
  declare function generateKeyPair(): {
package/dist/index.js CHANGED
@@ -117,11 +117,11 @@ async function shutdownTelemetry() {
117
117
  var { createClient, encryption: encryption2, newSignatureProvider } = postchain2;
118
118
  var DEFAULT_ENDPOINT = "https://atbash.ai";
119
119
  var DEFAULT_CHROMIA_NODE_URLS = [
120
- "https://node6.testnet.chromia.com:7740",
121
- "https://node7.testnet.chromia.com:7740",
122
- "https://node8.testnet.chromia.com:7740"
120
+ "https://node0.testnet.chromia.com:7740",
121
+ "https://node1.testnet.chromia.com:7740",
122
+ "https://node3.testnet.chromia.com:7740"
123
123
  ];
124
- var DEFAULT_BLOCKCHAIN_RID = "3CF2566BF0E606C8D6F9360566DB2FE3BC254C39451BAEB6D736E916D677486A";
124
+ var DEFAULT_BLOCKCHAIN_RID = "209138D78F83E49838921CEDF27DA46DEF2FB20466354BD75DFAB7DDCA6F2517";
125
125
  function isValidPrivateKey(hex) {
126
126
  return /^[0-9a-fA-F]{64}$/.test(hex);
127
127
  }
@@ -845,10 +845,25 @@ function createAtbashClient(config = {}) {
845
845
  };
846
846
  }
847
847
  if (action === "allow") {
848
- const surfacedVerdict = result.verdict === "ALLOW" || result.verdict === "HOLD" || result.verdict === "BLOCK" ? result.verdict : "ALLOW";
848
+ if (result.verdict === "HOLD") {
849
+ return {
850
+ allow: false,
851
+ verdict: "HOLD",
852
+ reason: result.reason,
853
+ toolCallId: result.tool_call_id
854
+ };
855
+ }
856
+ if (result.verdict === "BLOCK") {
857
+ return {
858
+ allow: false,
859
+ verdict: "BLOCK",
860
+ reason: result.reason,
861
+ toolCallId: result.tool_call_id
862
+ };
863
+ }
849
864
  return {
850
865
  allow: true,
851
- verdict: surfacedVerdict,
866
+ verdict: "ALLOW",
852
867
  reason: result.reason,
853
868
  toolCallId: result.tool_call_id
854
869
  };
@@ -975,11 +990,17 @@ var BEHAVIOR_PATTERNS = [
975
990
  re: /\b(?:no need to|don'?t need to|not necessary to|unnecessary to)\b.*\b(?:check|verify|validate|scan|review|confirm|authenticate)\b/i,
976
991
  description: "attempts to normalize skipping verification"
977
992
  },
993
+ {
994
+ type: "safety_bypass",
995
+ severity: "high",
996
+ re: /\[\s*(?:VERIFIED|SAFE|APPROVED|TRUSTED|AUTHORIZED|CLEARED|WHITELISTED)\s*\]/i,
997
+ description: "stores a verdict-influencing meta-tag that could be prepended to action text to bypass AI evaluation"
998
+ },
978
999
  /* ── Privilege escalation ── */
979
1000
  {
980
1001
  type: "privilege_escalation",
981
1002
  severity: "critical",
982
- re: /\b(?:admin|administrator|root|superuser|sudo|elevated)\b.*\b(?:privilege|permission|access|role|clearance|authority)\b.*\b(?:granted|approved|confirmed|given|assigned)\b/i,
1003
+ re: /\b(?:admin|administrator|root|superuser|sudo|elevated)\b.*\b(?:privileges?|permissions?|access|roles?|clearance|authority)\b.*\b(?:granted|approved|confirmed|given|assigned)\b/i,
983
1004
  description: "claims elevated privileges were granted"
984
1005
  },
985
1006
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atbash/sdk",
3
- "version": "0.3.20",
3
+ "version": "0.3.22",
4
4
  "description": "Atbash SDK — control boundary before the last irreversible step in an agent workflow",
5
5
  "homepage": "https://atbash.ai",
6
6
  "author": "Atbash",