@atbash/sdk 0.10.13-dev.0 → 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/LICENSE +202 -28
- package/NOTICE +10 -0
- package/README.md +172 -30
- package/THIRD-PARTY-NOTICES +10256 -0
- package/dist/browser.d.mts +695 -78
- package/dist/browser.mjs +1162 -635
- package/dist/index.d.mts +695 -78
- package/dist/index.d.ts +695 -78
- package/dist/index.js +2392 -41891
- package/dist/index.mjs +3205 -42740
- package/index.d.ts +56 -24
- package/index.js +177 -88
- package/package.json +18 -8
- package/dist/browser.mjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
package/index.d.ts
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Which binding artifact the generated loader actually loaded: `'native'` for
|
|
6
|
+
* a native addon, otherwise the `platformArchABI` of the WASI flavor. Every
|
|
7
|
+
* flavor napi-rs can build is listed, because `NAPI_RS_NATIVE_LIBRARY_PATH`
|
|
8
|
+
* can point the loader at a WASI artifact this package does not build itself.
|
|
9
|
+
*/
|
|
10
|
+
export declare const __napiBindingTarget: 'native' | 'wasm32-wasi' | 'wasm32-wasip1'
|
|
11
|
+
|
|
3
12
|
export interface AddAgentMemoryArgsJs {
|
|
4
13
|
agent_pubkey: Buffer
|
|
5
14
|
content_cipher: Buffer
|
|
6
15
|
nonce: Buffer
|
|
7
16
|
score: number
|
|
17
|
+
file_path: string
|
|
8
18
|
}
|
|
9
19
|
|
|
10
20
|
export interface AgentAuthJs {
|
|
@@ -14,27 +24,32 @@ export interface AgentAuthJs {
|
|
|
14
24
|
|
|
15
25
|
export interface AgentPubkeyOnlyQueryJs {
|
|
16
26
|
agent_pubkey_hex: string
|
|
27
|
+
file_path?: string
|
|
17
28
|
}
|
|
18
29
|
|
|
19
|
-
export
|
|
30
|
+
export declare function applyMemoryEdits(current: string, edits: Array<MemoryEditJs>): string
|
|
31
|
+
|
|
32
|
+
export declare const ARG_AGENT_PUBKEY: string
|
|
20
33
|
|
|
21
|
-
export const
|
|
34
|
+
export declare const ARG_FILE_PATH: string
|
|
22
35
|
|
|
23
|
-
export declare
|
|
36
|
+
export declare const ARG_ID: string
|
|
37
|
+
|
|
38
|
+
export declare function buildAddAgentMemoryArgs(agentPubkeyHex: string, contentCipher: Buffer, nonce: Buffer, score: number, filePath: string): AddAgentMemoryArgsJs
|
|
24
39
|
|
|
25
40
|
export declare function buildEncryptedToolcallArgs(toolCallId: string, action: string, context: string, toolName: string, toolArgsJson: string, orgEncryptionPubKeyHex: string): EncryptedToolCallArgsJs
|
|
26
41
|
|
|
27
|
-
export declare function
|
|
42
|
+
export declare function buildGetActiveAgentMemoryQuery(agentPubkeyHex: string, filePath?: string | undefined | null): AgentPubkeyOnlyQueryJs
|
|
28
43
|
|
|
29
|
-
export declare function
|
|
44
|
+
export declare function buildGetActiveMemoryIdQuery(agentPubkeyHex: string, filePath?: string | undefined | null): AgentPubkeyOnlyQueryJs
|
|
30
45
|
|
|
31
|
-
export declare function
|
|
46
|
+
export declare function buildGetAgentMemoryByIdQuery(agentPubkeyHex: string, id: number): MemoryByIdQueryJs
|
|
32
47
|
|
|
33
|
-
export declare function
|
|
48
|
+
export declare function buildGetAgentMemoryHistoryQuery(agentPubkeyHex: string, filePath?: string | undefined | null): AgentPubkeyOnlyQueryJs
|
|
34
49
|
|
|
35
|
-
export declare function buildGetAgentMemoryRollbackHistoryQuery(agentPubkeyHex: string): AgentPubkeyOnlyQueryJs
|
|
50
|
+
export declare function buildGetAgentMemoryRollbackHistoryQuery(agentPubkeyHex: string, filePath?: string | undefined | null): AgentPubkeyOnlyQueryJs
|
|
36
51
|
|
|
37
|
-
export declare function
|
|
52
|
+
export declare function buildGetRecentAgentMemoryQuery(agentPubkeyHex: string, filePath?: string | undefined | null): AgentPubkeyOnlyQueryJs
|
|
38
53
|
|
|
39
54
|
export declare function buildRollbackAgentMemoryArgs(agentPubkeyHex: string, toId: number, reason: string): RollbackAgentMemoryArgsJs
|
|
40
55
|
|
|
@@ -73,13 +88,11 @@ export declare function decryptForOrg(payload: Buffer, orgPrivKeyHex: string, aa
|
|
|
73
88
|
|
|
74
89
|
export declare function decryptMemoryContent(ciphertext: Buffer, nonce: Buffer, key: Buffer): string
|
|
75
90
|
|
|
76
|
-
export const
|
|
77
|
-
|
|
78
|
-
export const DEFAULT_ENDPOINT: string
|
|
91
|
+
export declare const DEFAULT_ENDPOINT: string
|
|
79
92
|
|
|
80
|
-
export const DEFAULT_PRIVATE_BLOCKCHAIN_RID: string
|
|
93
|
+
export declare const DEFAULT_PRIVATE_BLOCKCHAIN_RID: string
|
|
81
94
|
|
|
82
|
-
export declare function
|
|
95
|
+
export declare function defaultAgentHomeDirs(): Array<string>
|
|
83
96
|
|
|
84
97
|
export declare function defaultMemoryPathPatterns(): Array<string>
|
|
85
98
|
|
|
@@ -97,7 +110,7 @@ export declare function derivePublicKey(s: string): string
|
|
|
97
110
|
|
|
98
111
|
export declare function diffMemorySnapshots(before: MemorySnapshotJs, after: MemorySnapshotJs): MemoryDiffResultJs
|
|
99
112
|
|
|
100
|
-
export const ECIES_FORMAT_VERSION: number
|
|
113
|
+
export declare const ECIES_FORMAT_VERSION: number
|
|
101
114
|
|
|
102
115
|
export declare function encryptedLength(plaintextByteLength: number): number
|
|
103
116
|
|
|
@@ -119,10 +132,14 @@ export declare function encryptForOrg(plaintext: string, orgPubKeyHex: string, a
|
|
|
119
132
|
|
|
120
133
|
export declare function encryptMemoryContent(plaintext: string, key: Buffer): EncryptedMemoryJs
|
|
121
134
|
|
|
135
|
+
export declare function extractMemoryEdits(event: any, ctx: any): Array<MemoryEditJs>
|
|
136
|
+
|
|
122
137
|
export declare function formatEntryForScan(entry: MemoryEntryJs, hasEvasion: boolean): string
|
|
123
138
|
|
|
124
139
|
export declare function generateKeypair(): KeyPairJs
|
|
125
140
|
|
|
141
|
+
export declare function isSafeMemorySlot(slot: string): boolean
|
|
142
|
+
|
|
126
143
|
export declare function isValidPrivateKey(s: string): boolean
|
|
127
144
|
|
|
128
145
|
export interface JudgeSignatureCheckJs {
|
|
@@ -163,6 +180,11 @@ export interface MemoryDiffResultJs {
|
|
|
163
180
|
anomalies: Array<MemoryAnomalyJs>
|
|
164
181
|
}
|
|
165
182
|
|
|
183
|
+
export interface MemoryEditJs {
|
|
184
|
+
old_text: string
|
|
185
|
+
new_text: string
|
|
186
|
+
}
|
|
187
|
+
|
|
166
188
|
export interface MemoryEntryJs {
|
|
167
189
|
key: string
|
|
168
190
|
value: string
|
|
@@ -172,6 +194,8 @@ export interface MemoryEntryJs {
|
|
|
172
194
|
|
|
173
195
|
export declare function memoryScanContext(): string
|
|
174
196
|
|
|
197
|
+
export declare function memorySlotForPath(path: string, userHome: string, root?: string | undefined | null, extraHomes?: Array<string> | undefined | null): string | null
|
|
198
|
+
|
|
175
199
|
export interface MemorySnapshotJs {
|
|
176
200
|
entries: Array<MemoryEntryJs>
|
|
177
201
|
takenAt: number
|
|
@@ -187,11 +211,11 @@ export declare function normalizeActionForHash(action: string): string
|
|
|
187
211
|
|
|
188
212
|
export declare function normalizeForMatching(s: string): string
|
|
189
213
|
|
|
190
|
-
export const OP_ADD_AGENT_MEMORY: string
|
|
214
|
+
export declare const OP_ADD_AGENT_MEMORY: string
|
|
191
215
|
|
|
192
|
-
export const OP_LOG_TOOL_CALL: string
|
|
216
|
+
export declare const OP_LOG_TOOL_CALL: string
|
|
193
217
|
|
|
194
|
-
export const OP_ROLLBACK_AGENT_MEMORY: string
|
|
218
|
+
export declare const OP_ROLLBACK_AGENT_MEMORY: string
|
|
195
219
|
|
|
196
220
|
export declare function parseActiveMemoryId(value: any): number | null
|
|
197
221
|
|
|
@@ -212,20 +236,21 @@ export declare function parseRollbackRows(value: any): Array<RawRollbackRowJs>
|
|
|
212
236
|
|
|
213
237
|
export declare function parseScoreFromReason(reason: string): ParsedScoreJs
|
|
214
238
|
|
|
215
|
-
export const
|
|
239
|
+
export declare const QUERY_GET_ACTIVE_AGENT_MEMORY: string
|
|
216
240
|
|
|
217
|
-
export const
|
|
241
|
+
export declare const QUERY_GET_ACTIVE_MEMORY_ID: string
|
|
218
242
|
|
|
219
|
-
export const QUERY_GET_AGENT_MEMORY_BY_ID: string
|
|
243
|
+
export declare const QUERY_GET_AGENT_MEMORY_BY_ID: string
|
|
220
244
|
|
|
221
|
-
export const QUERY_GET_AGENT_MEMORY_HISTORY: string
|
|
245
|
+
export declare const QUERY_GET_AGENT_MEMORY_HISTORY: string
|
|
222
246
|
|
|
223
|
-
export const QUERY_GET_AGENT_MEMORY_ROLLBACK_HISTORY: string
|
|
247
|
+
export declare const QUERY_GET_AGENT_MEMORY_ROLLBACK_HISTORY: string
|
|
224
248
|
|
|
225
|
-
export const
|
|
249
|
+
export declare const QUERY_GET_RECENT_AGENT_MEMORY: string
|
|
226
250
|
|
|
227
251
|
export interface RawMemoryRowJs {
|
|
228
252
|
id: number
|
|
253
|
+
file_path: string
|
|
229
254
|
content_cipher: Buffer
|
|
230
255
|
nonce: Buffer
|
|
231
256
|
score: number
|
|
@@ -237,6 +262,7 @@ export interface RawMemoryRowJs {
|
|
|
237
262
|
export interface RawRollbackRowJs {
|
|
238
263
|
from_id: number
|
|
239
264
|
to_id: number
|
|
265
|
+
file_path: string
|
|
240
266
|
reason: string
|
|
241
267
|
signer: Buffer
|
|
242
268
|
created_at: number
|
|
@@ -267,14 +293,20 @@ export interface SecretMatchJs {
|
|
|
267
293
|
length: number
|
|
268
294
|
}
|
|
269
295
|
|
|
296
|
+
export declare function signAddAgentMemory(agentPubkeyHex: string, contentCipher: Buffer, nonce: Buffer, score: number, filePath: string, privkey: string, blockchainRid: string): string
|
|
297
|
+
|
|
270
298
|
export declare function signEncryptedToolCall(toolCallId: string, action: string, context: string, toolName: string, toolArgsJson: string, orgEncryptionPubKeyHex: string, privkeyHex: string, blockchainRidHex: string): string
|
|
271
299
|
|
|
272
300
|
export declare function signJudgeAction(judgmentId: string, action: string, context: string, extra: string, privkey: string, blockchainRid: string): string
|
|
273
301
|
|
|
274
302
|
export declare function signLogToolCall(toolCallId: string, action: string, context: string, toolName: string, toolArgsJson: string, privkey: string, blockchainRid: string): string
|
|
275
303
|
|
|
304
|
+
export declare function signRollbackAgentMemory(agentPubkeyHex: string, toId: number, reason: string, privkey: string, blockchainRid: string): string
|
|
305
|
+
|
|
276
306
|
export declare function validateAgentPubkeyHex(pubkeyHex: string): Buffer
|
|
277
307
|
|
|
308
|
+
export declare function validateFilePath(filePath: string): string
|
|
309
|
+
|
|
278
310
|
export declare function validateMemoryId(id: number): void
|
|
279
311
|
|
|
280
312
|
export declare function validateMemoryNonce(nonce: Buffer): void
|