@atbash/sdk 0.5.8-dev.0 → 0.6.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/browser.d.mts +300 -1
- package/dist/browser.mjs +543 -10
- package/dist/browser.mjs.map +1 -1
- package/dist/index.d.mts +300 -1
- package/dist/index.d.ts +300 -1
- package/dist/index.js +42616 -1127
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42576 -1084
- package/dist/index.mjs.map +1 -1
- package/index.d.ts +24 -0
- package/index.js +4 -0
- package/package.json +12 -14
package/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare function containsSecret(s: string): boolean
|
|
|
6
6
|
|
|
7
7
|
export declare function createMemorySnapshot(entries: any, takenAt: number): any
|
|
8
8
|
|
|
9
|
+
export declare function decryptMemoryContent(ciphertext: Buffer, nonce: Buffer, key: Buffer): string
|
|
10
|
+
|
|
9
11
|
export const DEFAULT_BLOCKCHAIN_RID: string
|
|
10
12
|
|
|
11
13
|
export const DEFAULT_ENDPOINT: string
|
|
@@ -16,10 +18,24 @@ export declare function defaultChromiaNodeUrls(): Array<string>
|
|
|
16
18
|
|
|
17
19
|
export declare function defaultPrivateNodeUrls(): Array<string>
|
|
18
20
|
|
|
21
|
+
export declare function deriveMemoryKey(privkeyHex: string): Buffer
|
|
22
|
+
|
|
19
23
|
export declare function derivePublicKey(s: string): string
|
|
20
24
|
|
|
21
25
|
export declare function diffMemorySnapshots(before: any, after: any): any
|
|
22
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Encrypt UTF-8 plaintext with a 32-byte AES key. Returns
|
|
29
|
+
* `{ ciphertext: Buffer, nonce: Buffer }` — ciphertext has the GCM
|
|
30
|
+
* auth tag appended as the trailing 16 bytes.
|
|
31
|
+
*/
|
|
32
|
+
export interface EncryptedMemoryJs {
|
|
33
|
+
ciphertext: Buffer
|
|
34
|
+
nonce: Buffer
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export declare function encryptMemoryContent(plaintext: string, key: Buffer): EncryptedMemoryJs
|
|
38
|
+
|
|
23
39
|
export declare function generateKeypair(): any
|
|
24
40
|
|
|
25
41
|
export const HONEYCOMB_KEY: string
|
|
@@ -28,6 +44,14 @@ export declare function isValidPrivateKey(s: string): boolean
|
|
|
28
44
|
|
|
29
45
|
export declare function loadAgent(privkey: string): any
|
|
30
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Fast regex pre-filter for memory-poisoning detection. Returns the
|
|
49
|
+
* `MemoryScanResult` shape when a critical/high pattern (or an
|
|
50
|
+
* evasion-character pattern) matches; returns `null` when nothing
|
|
51
|
+
* matched — callers should escalate to the LLM judge.
|
|
52
|
+
*/
|
|
53
|
+
export declare function memoryRegexPreFilter(entry: any): any | null
|
|
54
|
+
|
|
31
55
|
export declare function normalizeForMatching(s: string): string
|
|
32
56
|
|
|
33
57
|
export declare function redactSecrets(s: string): any
|
package/index.js
CHANGED
|
@@ -590,17 +590,21 @@ module.exports = nativeBinding
|
|
|
590
590
|
module.exports.containsEvasionCharacters = nativeBinding.containsEvasionCharacters
|
|
591
591
|
module.exports.containsSecret = nativeBinding.containsSecret
|
|
592
592
|
module.exports.createMemorySnapshot = nativeBinding.createMemorySnapshot
|
|
593
|
+
module.exports.decryptMemoryContent = nativeBinding.decryptMemoryContent
|
|
593
594
|
module.exports.DEFAULT_BLOCKCHAIN_RID = nativeBinding.DEFAULT_BLOCKCHAIN_RID
|
|
594
595
|
module.exports.DEFAULT_ENDPOINT = nativeBinding.DEFAULT_ENDPOINT
|
|
595
596
|
module.exports.DEFAULT_PRIVATE_BLOCKCHAIN_RID = nativeBinding.DEFAULT_PRIVATE_BLOCKCHAIN_RID
|
|
596
597
|
module.exports.defaultChromiaNodeUrls = nativeBinding.defaultChromiaNodeUrls
|
|
597
598
|
module.exports.defaultPrivateNodeUrls = nativeBinding.defaultPrivateNodeUrls
|
|
599
|
+
module.exports.deriveMemoryKey = nativeBinding.deriveMemoryKey
|
|
598
600
|
module.exports.derivePublicKey = nativeBinding.derivePublicKey
|
|
599
601
|
module.exports.diffMemorySnapshots = nativeBinding.diffMemorySnapshots
|
|
602
|
+
module.exports.encryptMemoryContent = nativeBinding.encryptMemoryContent
|
|
600
603
|
module.exports.generateKeypair = nativeBinding.generateKeypair
|
|
601
604
|
module.exports.HONEYCOMB_KEY = nativeBinding.HONEYCOMB_KEY
|
|
602
605
|
module.exports.isValidPrivateKey = nativeBinding.isValidPrivateKey
|
|
603
606
|
module.exports.loadAgent = nativeBinding.loadAgent
|
|
607
|
+
module.exports.memoryRegexPreFilter = nativeBinding.memoryRegexPreFilter
|
|
604
608
|
module.exports.normalizeForMatching = nativeBinding.normalizeForMatching
|
|
605
609
|
module.exports.redactSecrets = nativeBinding.redactSecrets
|
|
606
610
|
module.exports.signJudgeAction = nativeBinding.signJudgeAction
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atbash/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "TypeScript SDK for Atbash — the safety layer that evaluates AI agent actions against operator-defined policies before execution.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atbash",
|
|
@@ -25,17 +25,14 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "SEE LICENSE IN LICENSE",
|
|
27
27
|
"napi": {
|
|
28
|
-
"
|
|
28
|
+
"binaryName": "atbash",
|
|
29
29
|
"packageName": "@atbash/sdk",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"x86_64-pc-windows-msvc"
|
|
37
|
-
]
|
|
38
|
-
}
|
|
30
|
+
"targets": [
|
|
31
|
+
"x86_64-unknown-linux-gnu",
|
|
32
|
+
"aarch64-unknown-linux-gnu",
|
|
33
|
+
"aarch64-apple-darwin",
|
|
34
|
+
"x86_64-pc-windows-msvc"
|
|
35
|
+
]
|
|
39
36
|
},
|
|
40
37
|
"publishConfig": {
|
|
41
38
|
"access": "public",
|
|
@@ -89,8 +86,9 @@
|
|
|
89
86
|
"typescript-eslint": "^8.62.1"
|
|
90
87
|
},
|
|
91
88
|
"optionalDependencies": {
|
|
92
|
-
"@atbash/sdk-linux-x64-gnu": "0.
|
|
93
|
-
"@atbash/sdk-linux-arm64-gnu": "0.
|
|
94
|
-
"@atbash/sdk-darwin-arm64": "0.
|
|
89
|
+
"@atbash/sdk-linux-x64-gnu": "0.6.0",
|
|
90
|
+
"@atbash/sdk-linux-arm64-gnu": "0.6.0",
|
|
91
|
+
"@atbash/sdk-darwin-arm64": "0.6.0",
|
|
92
|
+
"@atbash/sdk-win32-x64-msvc": "0.6.0"
|
|
95
93
|
}
|
|
96
94
|
}
|