@atbash/sdk 0.17.0-dev.0 → 0.19.0-dev.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/LICENSE +202 -28
- package/NOTICE +10 -0
- package/README.md +76 -13
- package/THIRD-PARTY-NOTICES +10256 -0
- package/dist/browser.d.mts +323 -50
- package/dist/browser.mjs +231 -69
- package/dist/index.d.mts +323 -50
- package/dist/index.d.ts +323 -50
- package/dist/index.js +1072 -41482
- package/dist/index.mjs +2728 -43169
- package/index.d.ts +19 -0
- package/index.js +61 -54
- package/package.json +13 -8
package/index.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export interface AgentPubkeyOnlyQueryJs {
|
|
|
27
27
|
file_path?: string
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
export declare function applyMemoryEdits(current: string, edits: Array<MemoryEditJs>): string
|
|
31
|
+
|
|
30
32
|
export declare const ARG_AGENT_PUBKEY: string
|
|
31
33
|
|
|
32
34
|
export declare const ARG_FILE_PATH: string
|
|
@@ -92,6 +94,8 @@ export declare const DEFAULT_ENDPOINT: string
|
|
|
92
94
|
|
|
93
95
|
export declare const DEFAULT_PRIVATE_BLOCKCHAIN_RID: string
|
|
94
96
|
|
|
97
|
+
export declare function defaultAgentHomeDirs(): Array<string>
|
|
98
|
+
|
|
95
99
|
export declare function defaultChromiaNodeUrls(): Array<string>
|
|
96
100
|
|
|
97
101
|
export declare function defaultMemoryPathPatterns(): Array<string>
|
|
@@ -132,10 +136,14 @@ export declare function encryptForOrg(plaintext: string, orgPubKeyHex: string, a
|
|
|
132
136
|
|
|
133
137
|
export declare function encryptMemoryContent(plaintext: string, key: Buffer): EncryptedMemoryJs
|
|
134
138
|
|
|
139
|
+
export declare function extractMemoryEdits(event: any, ctx: any): Array<MemoryEditJs>
|
|
140
|
+
|
|
135
141
|
export declare function formatEntryForScan(entry: MemoryEntryJs, hasEvasion: boolean): string
|
|
136
142
|
|
|
137
143
|
export declare function generateKeypair(): KeyPairJs
|
|
138
144
|
|
|
145
|
+
export declare function isSafeMemorySlot(slot: string): boolean
|
|
146
|
+
|
|
139
147
|
export declare function isValidPrivateKey(s: string): boolean
|
|
140
148
|
|
|
141
149
|
export interface JudgeSignatureCheckJs {
|
|
@@ -176,6 +184,11 @@ export interface MemoryDiffResultJs {
|
|
|
176
184
|
anomalies: Array<MemoryAnomalyJs>
|
|
177
185
|
}
|
|
178
186
|
|
|
187
|
+
export interface MemoryEditJs {
|
|
188
|
+
old_text: string
|
|
189
|
+
new_text: string
|
|
190
|
+
}
|
|
191
|
+
|
|
179
192
|
export interface MemoryEntryJs {
|
|
180
193
|
key: string
|
|
181
194
|
value: string
|
|
@@ -185,6 +198,8 @@ export interface MemoryEntryJs {
|
|
|
185
198
|
|
|
186
199
|
export declare function memoryScanContext(): string
|
|
187
200
|
|
|
201
|
+
export declare function memorySlotForPath(path: string, userHome: string, root?: string | undefined | null, extraHomes?: Array<string> | undefined | null): string | null
|
|
202
|
+
|
|
188
203
|
export interface MemorySnapshotJs {
|
|
189
204
|
entries: Array<MemoryEntryJs>
|
|
190
205
|
takenAt: number
|
|
@@ -282,12 +297,16 @@ export interface SecretMatchJs {
|
|
|
282
297
|
length: number
|
|
283
298
|
}
|
|
284
299
|
|
|
300
|
+
export declare function signAddAgentMemory(agentPubkeyHex: string, contentCipher: Buffer, nonce: Buffer, score: number, filePath: string, privkey: string, blockchainRid: string): string
|
|
301
|
+
|
|
285
302
|
export declare function signEncryptedToolCall(toolCallId: string, action: string, context: string, toolName: string, toolArgsJson: string, orgEncryptionPubKeyHex: string, privkeyHex: string, blockchainRidHex: string): string
|
|
286
303
|
|
|
287
304
|
export declare function signJudgeAction(judgmentId: string, action: string, context: string, extra: string, privkey: string, blockchainRid: string): string
|
|
288
305
|
|
|
289
306
|
export declare function signLogToolCall(toolCallId: string, action: string, context: string, toolName: string, toolArgsJson: string, privkey: string, blockchainRid: string): string
|
|
290
307
|
|
|
308
|
+
export declare function signRollbackAgentMemory(agentPubkeyHex: string, toId: number, reason: string, privkey: string, blockchainRid: string): string
|
|
309
|
+
|
|
291
310
|
export declare function validateAgentPubkeyHex(pubkeyHex: string): Buffer
|
|
292
311
|
|
|
293
312
|
export declare function validateFilePath(filePath: string): string
|
package/index.js
CHANGED
|
@@ -89,8 +89,8 @@ function requireNative() {
|
|
|
89
89
|
try {
|
|
90
90
|
const binding = require('@atbash/sdk-android-arm64')
|
|
91
91
|
const bindingPackageVersion = require('@atbash/sdk-android-arm64/package.json').version
|
|
92
|
-
if (bindingPackageVersion !== '0.
|
|
93
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
92
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
93
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
94
94
|
}
|
|
95
95
|
return binding
|
|
96
96
|
} catch (e) {
|
|
@@ -105,8 +105,8 @@ function requireNative() {
|
|
|
105
105
|
try {
|
|
106
106
|
const binding = require('@atbash/sdk-android-arm-eabi')
|
|
107
107
|
const bindingPackageVersion = require('@atbash/sdk-android-arm-eabi/package.json').version
|
|
108
|
-
if (bindingPackageVersion !== '0.
|
|
109
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
108
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
109
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
110
110
|
}
|
|
111
111
|
return binding
|
|
112
112
|
} catch (e) {
|
|
@@ -126,8 +126,8 @@ function requireNative() {
|
|
|
126
126
|
try {
|
|
127
127
|
const binding = require('@atbash/sdk-win32-x64-gnu')
|
|
128
128
|
const bindingPackageVersion = require('@atbash/sdk-win32-x64-gnu/package.json').version
|
|
129
|
-
if (bindingPackageVersion !== '0.
|
|
130
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
129
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
130
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
131
131
|
}
|
|
132
132
|
return binding
|
|
133
133
|
} catch (e) {
|
|
@@ -142,8 +142,8 @@ function requireNative() {
|
|
|
142
142
|
try {
|
|
143
143
|
const binding = require('@atbash/sdk-win32-x64-msvc')
|
|
144
144
|
const bindingPackageVersion = require('@atbash/sdk-win32-x64-msvc/package.json').version
|
|
145
|
-
if (bindingPackageVersion !== '0.
|
|
146
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
145
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
146
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
147
147
|
}
|
|
148
148
|
return binding
|
|
149
149
|
} catch (e) {
|
|
@@ -159,8 +159,8 @@ function requireNative() {
|
|
|
159
159
|
try {
|
|
160
160
|
const binding = require('@atbash/sdk-win32-ia32-msvc')
|
|
161
161
|
const bindingPackageVersion = require('@atbash/sdk-win32-ia32-msvc/package.json').version
|
|
162
|
-
if (bindingPackageVersion !== '0.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
162
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
163
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
164
164
|
}
|
|
165
165
|
return binding
|
|
166
166
|
} catch (e) {
|
|
@@ -175,8 +175,8 @@ function requireNative() {
|
|
|
175
175
|
try {
|
|
176
176
|
const binding = require('@atbash/sdk-win32-arm64-msvc')
|
|
177
177
|
const bindingPackageVersion = require('@atbash/sdk-win32-arm64-msvc/package.json').version
|
|
178
|
-
if (bindingPackageVersion !== '0.
|
|
179
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
178
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
179
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
180
180
|
}
|
|
181
181
|
return binding
|
|
182
182
|
} catch (e) {
|
|
@@ -194,8 +194,8 @@ function requireNative() {
|
|
|
194
194
|
try {
|
|
195
195
|
const binding = require('@atbash/sdk-darwin-universal')
|
|
196
196
|
const bindingPackageVersion = require('@atbash/sdk-darwin-universal/package.json').version
|
|
197
|
-
if (bindingPackageVersion !== '0.
|
|
198
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
197
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
198
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
199
199
|
}
|
|
200
200
|
return binding
|
|
201
201
|
} catch (e) {
|
|
@@ -210,8 +210,8 @@ function requireNative() {
|
|
|
210
210
|
try {
|
|
211
211
|
const binding = require('@atbash/sdk-darwin-x64')
|
|
212
212
|
const bindingPackageVersion = require('@atbash/sdk-darwin-x64/package.json').version
|
|
213
|
-
if (bindingPackageVersion !== '0.
|
|
214
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
213
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
214
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
215
215
|
}
|
|
216
216
|
return binding
|
|
217
217
|
} catch (e) {
|
|
@@ -226,8 +226,8 @@ function requireNative() {
|
|
|
226
226
|
try {
|
|
227
227
|
const binding = require('@atbash/sdk-darwin-arm64')
|
|
228
228
|
const bindingPackageVersion = require('@atbash/sdk-darwin-arm64/package.json').version
|
|
229
|
-
if (bindingPackageVersion !== '0.
|
|
230
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
229
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
230
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
231
231
|
}
|
|
232
232
|
return binding
|
|
233
233
|
} catch (e) {
|
|
@@ -246,8 +246,8 @@ function requireNative() {
|
|
|
246
246
|
try {
|
|
247
247
|
const binding = require('@atbash/sdk-freebsd-x64')
|
|
248
248
|
const bindingPackageVersion = require('@atbash/sdk-freebsd-x64/package.json').version
|
|
249
|
-
if (bindingPackageVersion !== '0.
|
|
250
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
249
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
250
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
251
251
|
}
|
|
252
252
|
return binding
|
|
253
253
|
} catch (e) {
|
|
@@ -262,8 +262,8 @@ function requireNative() {
|
|
|
262
262
|
try {
|
|
263
263
|
const binding = require('@atbash/sdk-freebsd-arm64')
|
|
264
264
|
const bindingPackageVersion = require('@atbash/sdk-freebsd-arm64/package.json').version
|
|
265
|
-
if (bindingPackageVersion !== '0.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
265
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
266
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
267
267
|
}
|
|
268
268
|
return binding
|
|
269
269
|
} catch (e) {
|
|
@@ -283,8 +283,8 @@ function requireNative() {
|
|
|
283
283
|
try {
|
|
284
284
|
const binding = require('@atbash/sdk-linux-x64-musl')
|
|
285
285
|
const bindingPackageVersion = require('@atbash/sdk-linux-x64-musl/package.json').version
|
|
286
|
-
if (bindingPackageVersion !== '0.
|
|
287
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
286
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
287
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
288
288
|
}
|
|
289
289
|
return binding
|
|
290
290
|
} catch (e) {
|
|
@@ -299,8 +299,8 @@ function requireNative() {
|
|
|
299
299
|
try {
|
|
300
300
|
const binding = require('@atbash/sdk-linux-x64-gnu')
|
|
301
301
|
const bindingPackageVersion = require('@atbash/sdk-linux-x64-gnu/package.json').version
|
|
302
|
-
if (bindingPackageVersion !== '0.
|
|
303
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
302
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
303
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
304
304
|
}
|
|
305
305
|
return binding
|
|
306
306
|
} catch (e) {
|
|
@@ -317,8 +317,8 @@ function requireNative() {
|
|
|
317
317
|
try {
|
|
318
318
|
const binding = require('@atbash/sdk-linux-arm64-musl')
|
|
319
319
|
const bindingPackageVersion = require('@atbash/sdk-linux-arm64-musl/package.json').version
|
|
320
|
-
if (bindingPackageVersion !== '0.
|
|
321
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
320
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
321
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
322
322
|
}
|
|
323
323
|
return binding
|
|
324
324
|
} catch (e) {
|
|
@@ -333,8 +333,8 @@ function requireNative() {
|
|
|
333
333
|
try {
|
|
334
334
|
const binding = require('@atbash/sdk-linux-arm64-gnu')
|
|
335
335
|
const bindingPackageVersion = require('@atbash/sdk-linux-arm64-gnu/package.json').version
|
|
336
|
-
if (bindingPackageVersion !== '0.
|
|
337
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
336
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
337
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
338
338
|
}
|
|
339
339
|
return binding
|
|
340
340
|
} catch (e) {
|
|
@@ -351,8 +351,8 @@ function requireNative() {
|
|
|
351
351
|
try {
|
|
352
352
|
const binding = require('@atbash/sdk-linux-arm-musleabihf')
|
|
353
353
|
const bindingPackageVersion = require('@atbash/sdk-linux-arm-musleabihf/package.json').version
|
|
354
|
-
if (bindingPackageVersion !== '0.
|
|
355
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
354
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
355
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
356
356
|
}
|
|
357
357
|
return binding
|
|
358
358
|
} catch (e) {
|
|
@@ -367,8 +367,8 @@ function requireNative() {
|
|
|
367
367
|
try {
|
|
368
368
|
const binding = require('@atbash/sdk-linux-arm-gnueabihf')
|
|
369
369
|
const bindingPackageVersion = require('@atbash/sdk-linux-arm-gnueabihf/package.json').version
|
|
370
|
-
if (bindingPackageVersion !== '0.
|
|
371
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
370
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
371
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
372
372
|
}
|
|
373
373
|
return binding
|
|
374
374
|
} catch (e) {
|
|
@@ -385,8 +385,8 @@ function requireNative() {
|
|
|
385
385
|
try {
|
|
386
386
|
const binding = require('@atbash/sdk-linux-loong64-musl')
|
|
387
387
|
const bindingPackageVersion = require('@atbash/sdk-linux-loong64-musl/package.json').version
|
|
388
|
-
if (bindingPackageVersion !== '0.
|
|
389
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
388
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
389
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
390
390
|
}
|
|
391
391
|
return binding
|
|
392
392
|
} catch (e) {
|
|
@@ -401,8 +401,8 @@ function requireNative() {
|
|
|
401
401
|
try {
|
|
402
402
|
const binding = require('@atbash/sdk-linux-loong64-gnu')
|
|
403
403
|
const bindingPackageVersion = require('@atbash/sdk-linux-loong64-gnu/package.json').version
|
|
404
|
-
if (bindingPackageVersion !== '0.
|
|
405
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
404
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
405
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
406
406
|
}
|
|
407
407
|
return binding
|
|
408
408
|
} catch (e) {
|
|
@@ -419,8 +419,8 @@ function requireNative() {
|
|
|
419
419
|
try {
|
|
420
420
|
const binding = require('@atbash/sdk-linux-riscv64-musl')
|
|
421
421
|
const bindingPackageVersion = require('@atbash/sdk-linux-riscv64-musl/package.json').version
|
|
422
|
-
if (bindingPackageVersion !== '0.
|
|
423
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
422
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
423
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
424
424
|
}
|
|
425
425
|
return binding
|
|
426
426
|
} catch (e) {
|
|
@@ -435,8 +435,8 @@ function requireNative() {
|
|
|
435
435
|
try {
|
|
436
436
|
const binding = require('@atbash/sdk-linux-riscv64-gnu')
|
|
437
437
|
const bindingPackageVersion = require('@atbash/sdk-linux-riscv64-gnu/package.json').version
|
|
438
|
-
if (bindingPackageVersion !== '0.
|
|
439
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
438
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
439
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
440
440
|
}
|
|
441
441
|
return binding
|
|
442
442
|
} catch (e) {
|
|
@@ -452,8 +452,8 @@ function requireNative() {
|
|
|
452
452
|
try {
|
|
453
453
|
const binding = require('@atbash/sdk-linux-ppc64-gnu')
|
|
454
454
|
const bindingPackageVersion = require('@atbash/sdk-linux-ppc64-gnu/package.json').version
|
|
455
|
-
if (bindingPackageVersion !== '0.
|
|
456
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
455
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
456
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
457
457
|
}
|
|
458
458
|
return binding
|
|
459
459
|
} catch (e) {
|
|
@@ -468,8 +468,8 @@ function requireNative() {
|
|
|
468
468
|
try {
|
|
469
469
|
const binding = require('@atbash/sdk-linux-s390x-gnu')
|
|
470
470
|
const bindingPackageVersion = require('@atbash/sdk-linux-s390x-gnu/package.json').version
|
|
471
|
-
if (bindingPackageVersion !== '0.
|
|
472
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
471
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
472
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
473
473
|
}
|
|
474
474
|
return binding
|
|
475
475
|
} catch (e) {
|
|
@@ -488,8 +488,8 @@ function requireNative() {
|
|
|
488
488
|
try {
|
|
489
489
|
const binding = require('@atbash/sdk-openharmony-arm64')
|
|
490
490
|
const bindingPackageVersion = require('@atbash/sdk-openharmony-arm64/package.json').version
|
|
491
|
-
if (bindingPackageVersion !== '0.
|
|
492
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
491
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
492
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
493
493
|
}
|
|
494
494
|
return binding
|
|
495
495
|
} catch (e) {
|
|
@@ -504,8 +504,8 @@ function requireNative() {
|
|
|
504
504
|
try {
|
|
505
505
|
const binding = require('@atbash/sdk-openharmony-x64')
|
|
506
506
|
const bindingPackageVersion = require('@atbash/sdk-openharmony-x64/package.json').version
|
|
507
|
-
if (bindingPackageVersion !== '0.
|
|
508
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
507
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
508
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
509
509
|
}
|
|
510
510
|
return binding
|
|
511
511
|
} catch (e) {
|
|
@@ -520,8 +520,8 @@ function requireNative() {
|
|
|
520
520
|
try {
|
|
521
521
|
const binding = require('@atbash/sdk-openharmony-arm')
|
|
522
522
|
const bindingPackageVersion = require('@atbash/sdk-openharmony-arm/package.json').version
|
|
523
|
-
if (bindingPackageVersion !== '0.
|
|
524
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
523
|
+
if (bindingPackageVersion !== '0.17.0-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
524
|
+
throw new Error(`Native binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
525
525
|
}
|
|
526
526
|
return binding
|
|
527
527
|
} catch (e) {
|
|
@@ -661,8 +661,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
661
661
|
if (!candidateFailed) {
|
|
662
662
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
663
663
|
const bindingPackageVersion = require('@atbash/sdk-wasm32-wasi/package.json').version
|
|
664
|
-
if (bindingPackageVersion !== '0.
|
|
665
|
-
throw new Error(`WASI binding package version mismatch, expected 0.
|
|
664
|
+
if (bindingPackageVersion !== '0.17.0-dev.0') {
|
|
665
|
+
throw new Error(`WASI binding package version mismatch, expected 0.17.0-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
wasiBinding = require('@atbash/sdk-wasm32-wasi')
|
|
@@ -778,6 +778,7 @@ function __napiStampBindingTarget(exportsObject, target) {
|
|
|
778
778
|
// linked import resolves to `undefined`.
|
|
779
779
|
module.exports.__napiBindingTarget = __napiStampBindingTarget(nativeBinding, __napiLoadedBindingTarget)
|
|
780
780
|
module.exports = nativeBinding
|
|
781
|
+
module.exports.applyMemoryEdits = nativeBinding.applyMemoryEdits
|
|
781
782
|
module.exports.ARG_AGENT_PUBKEY = nativeBinding.ARG_AGENT_PUBKEY
|
|
782
783
|
module.exports.ARG_FILE_PATH = nativeBinding.ARG_FILE_PATH
|
|
783
784
|
module.exports.ARG_ID = nativeBinding.ARG_ID
|
|
@@ -803,6 +804,7 @@ module.exports.decryptMemoryContent = nativeBinding.decryptMemoryContent
|
|
|
803
804
|
module.exports.DEFAULT_BLOCKCHAIN_RID = nativeBinding.DEFAULT_BLOCKCHAIN_RID
|
|
804
805
|
module.exports.DEFAULT_ENDPOINT = nativeBinding.DEFAULT_ENDPOINT
|
|
805
806
|
module.exports.DEFAULT_PRIVATE_BLOCKCHAIN_RID = nativeBinding.DEFAULT_PRIVATE_BLOCKCHAIN_RID
|
|
807
|
+
module.exports.defaultAgentHomeDirs = nativeBinding.defaultAgentHomeDirs
|
|
806
808
|
module.exports.defaultChromiaNodeUrls = nativeBinding.defaultChromiaNodeUrls
|
|
807
809
|
module.exports.defaultMemoryPathPatterns = nativeBinding.defaultMemoryPathPatterns
|
|
808
810
|
module.exports.defaultMemoryReadToolNames = nativeBinding.defaultMemoryReadToolNames
|
|
@@ -816,12 +818,15 @@ module.exports.ECIES_FORMAT_VERSION = nativeBinding.ECIES_FORMAT_VERSION
|
|
|
816
818
|
module.exports.encryptedLength = nativeBinding.encryptedLength
|
|
817
819
|
module.exports.encryptForOrg = nativeBinding.encryptForOrg
|
|
818
820
|
module.exports.encryptMemoryContent = nativeBinding.encryptMemoryContent
|
|
821
|
+
module.exports.extractMemoryEdits = nativeBinding.extractMemoryEdits
|
|
819
822
|
module.exports.formatEntryForScan = nativeBinding.formatEntryForScan
|
|
820
823
|
module.exports.generateKeypair = nativeBinding.generateKeypair
|
|
824
|
+
module.exports.isSafeMemorySlot = nativeBinding.isSafeMemorySlot
|
|
821
825
|
module.exports.isValidPrivateKey = nativeBinding.isValidPrivateKey
|
|
822
826
|
module.exports.loadAgent = nativeBinding.loadAgent
|
|
823
827
|
module.exports.mapVerdict = nativeBinding.mapVerdict
|
|
824
828
|
module.exports.memoryScanContext = nativeBinding.memoryScanContext
|
|
829
|
+
module.exports.memorySlotForPath = nativeBinding.memorySlotForPath
|
|
825
830
|
module.exports.normalizeActionForHash = nativeBinding.normalizeActionForHash
|
|
826
831
|
module.exports.normalizeForMatching = nativeBinding.normalizeForMatching
|
|
827
832
|
module.exports.OP_ADD_AGENT_MEMORY = nativeBinding.OP_ADD_AGENT_MEMORY
|
|
@@ -841,9 +846,11 @@ module.exports.QUERY_GET_AGENT_MEMORY_HISTORY = nativeBinding.QUERY_GET_AGENT_ME
|
|
|
841
846
|
module.exports.QUERY_GET_AGENT_MEMORY_ROLLBACK_HISTORY = nativeBinding.QUERY_GET_AGENT_MEMORY_ROLLBACK_HISTORY
|
|
842
847
|
module.exports.QUERY_GET_RECENT_AGENT_MEMORY = nativeBinding.QUERY_GET_RECENT_AGENT_MEMORY
|
|
843
848
|
module.exports.redactSecrets = nativeBinding.redactSecrets
|
|
849
|
+
module.exports.signAddAgentMemory = nativeBinding.signAddAgentMemory
|
|
844
850
|
module.exports.signEncryptedToolCall = nativeBinding.signEncryptedToolCall
|
|
845
851
|
module.exports.signJudgeAction = nativeBinding.signJudgeAction
|
|
846
852
|
module.exports.signLogToolCall = nativeBinding.signLogToolCall
|
|
853
|
+
module.exports.signRollbackAgentMemory = nativeBinding.signRollbackAgentMemory
|
|
847
854
|
module.exports.validateAgentPubkeyHex = nativeBinding.validateAgentPubkeyHex
|
|
848
855
|
module.exports.validateFilePath = nativeBinding.validateFilePath
|
|
849
856
|
module.exports.validateMemoryId = nativeBinding.validateMemoryId
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atbash/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0-dev.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",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"default": "./index.js"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
"license": "
|
|
26
|
+
"license": "Apache-2.0",
|
|
27
27
|
"napi": {
|
|
28
28
|
"binaryName": "atbash",
|
|
29
29
|
"packageName": "@atbash/sdk",
|
|
@@ -48,7 +48,9 @@
|
|
|
48
48
|
"index.d.ts",
|
|
49
49
|
"*.node",
|
|
50
50
|
"README.md",
|
|
51
|
-
"LICENSE"
|
|
51
|
+
"LICENSE",
|
|
52
|
+
"NOTICE",
|
|
53
|
+
"THIRD-PARTY-NOTICES"
|
|
52
54
|
],
|
|
53
55
|
"scripts": {
|
|
54
56
|
"build:native": "napi build --platform --release",
|
|
@@ -68,8 +70,11 @@
|
|
|
68
70
|
},
|
|
69
71
|
"dependencies": {
|
|
70
72
|
"@opentelemetry/api": "^1.9.1",
|
|
73
|
+
"@opentelemetry/api-logs": "^0.223.0",
|
|
74
|
+
"@opentelemetry/exporter-logs-otlp-http": "^0.223.0",
|
|
71
75
|
"@opentelemetry/exporter-metrics-otlp-http": "^0.219.0",
|
|
72
76
|
"@opentelemetry/resources": "^2.7.1",
|
|
77
|
+
"@opentelemetry/sdk-logs": "^0.223.0",
|
|
73
78
|
"@opentelemetry/sdk-metrics": "^2.7.1"
|
|
74
79
|
},
|
|
75
80
|
"devDependencies": {
|
|
@@ -90,10 +95,10 @@
|
|
|
90
95
|
"typescript-eslint": "^8.62.1"
|
|
91
96
|
},
|
|
92
97
|
"optionalDependencies": {
|
|
93
|
-
"@atbash/sdk-linux-x64-gnu": "0.
|
|
94
|
-
"@atbash/sdk-linux-arm64-gnu": "0.
|
|
95
|
-
"@atbash/sdk-linux-x64-musl": "0.
|
|
96
|
-
"@atbash/sdk-darwin-arm64": "0.
|
|
97
|
-
"@atbash/sdk-win32-x64-msvc": "0.
|
|
98
|
+
"@atbash/sdk-linux-x64-gnu": "0.19.0-dev.0",
|
|
99
|
+
"@atbash/sdk-linux-arm64-gnu": "0.19.0-dev.0",
|
|
100
|
+
"@atbash/sdk-linux-x64-musl": "0.19.0-dev.0",
|
|
101
|
+
"@atbash/sdk-darwin-arm64": "0.19.0-dev.0",
|
|
102
|
+
"@atbash/sdk-win32-x64-msvc": "0.19.0-dev.0"
|
|
98
103
|
}
|
|
99
104
|
}
|