@ursalock/agent 0.4.0 → 0.4.2
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.d.ts +2 -24
- package/dist/index.js +1 -6
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Collection } from '@ursalock/client';
|
|
2
2
|
export { Collection, Document, ListOptions, SyncResult } from '@ursalock/client';
|
|
3
|
+
export { base64ToBytes, bytesToBase64 } from '@ursalock/crypto';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* AgentVault - Headless SDK for AI agents
|
|
@@ -114,27 +115,4 @@ declare function createAgentVaultFromMasterKey(options: {
|
|
|
114
115
|
masterKey: string;
|
|
115
116
|
}): Promise<AgentVault>;
|
|
116
117
|
|
|
117
|
-
|
|
118
|
-
* Base64 encoding utilities for Node.js
|
|
119
|
-
*
|
|
120
|
-
* Agents receive encryption keys as base64 strings (for easy serialization)
|
|
121
|
-
* and need to convert them to Uint8Array for crypto operations.
|
|
122
|
-
*/
|
|
123
|
-
/**
|
|
124
|
-
* Decode base64 string to Uint8Array
|
|
125
|
-
* Uses Node.js Buffer API (not available in browser)
|
|
126
|
-
*
|
|
127
|
-
* @param base64 - Base64-encoded string
|
|
128
|
-
* @returns Raw bytes as Uint8Array
|
|
129
|
-
*/
|
|
130
|
-
declare function base64ToBytes(base64: string): Uint8Array;
|
|
131
|
-
/**
|
|
132
|
-
* Encode Uint8Array to base64 string
|
|
133
|
-
* Uses Node.js Buffer API (not available in browser)
|
|
134
|
-
*
|
|
135
|
-
* @param bytes - Raw bytes
|
|
136
|
-
* @returns Base64-encoded string
|
|
137
|
-
*/
|
|
138
|
-
declare function bytesToBase64(bytes: Uint8Array): string;
|
|
139
|
-
|
|
140
|
-
export { AgentVault, type AgentVaultOptions, base64ToBytes, bytesToBase64, createAgentVaultFromMasterKey };
|
|
118
|
+
export { AgentVault, type AgentVaultOptions, createAgentVaultFromMasterKey };
|
package/dist/index.js
CHANGED
|
@@ -3,12 +3,7 @@ import { DocumentClient } from "@ursalock/client";
|
|
|
3
3
|
import { deriveVaultKeys } from "@ursalock/crypto";
|
|
4
4
|
|
|
5
5
|
// src/types.ts
|
|
6
|
-
|
|
7
|
-
return new Uint8Array(Buffer.from(base64, "base64"));
|
|
8
|
-
}
|
|
9
|
-
function bytesToBase64(bytes) {
|
|
10
|
-
return Buffer.from(bytes).toString("base64");
|
|
11
|
-
}
|
|
6
|
+
import { base64ToBytes, bytesToBase64 } from "@ursalock/crypto";
|
|
12
7
|
|
|
13
8
|
// src/agent-vault.ts
|
|
14
9
|
var AgentVault = class {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ursalock/agent",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Headless Node.js SDK for AI agents to read/write encrypted documents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"typecheck": "tsc --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@ursalock/crypto": "^0.4.
|
|
26
|
-
"@ursalock/client": "^0.4.
|
|
25
|
+
"@ursalock/crypto": "^0.4.2",
|
|
26
|
+
"@ursalock/client": "^0.4.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"tsup": "^8.0.0",
|