@sekuire/sdk 0.1.4
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/README.md +77 -0
- package/dist/agent.d.ts +186 -0
- package/dist/client.d.ts +37 -0
- package/dist/compliance.d.ts +236 -0
- package/dist/config/loader.d.ts +138 -0
- package/dist/crypto.d.ts +60 -0
- package/dist/identity.d.ts +9 -0
- package/dist/index.d.ts +1987 -0
- package/dist/index.esm.js +20089 -0
- package/dist/index.js +20166 -0
- package/dist/llm/anthropic.d.ts +18 -0
- package/dist/llm/google.d.ts +18 -0
- package/dist/llm/index.d.ts +43 -0
- package/dist/llm/ollama.d.ts +17 -0
- package/dist/llm/openai.d.ts +18 -0
- package/dist/llm/types.d.ts +84 -0
- package/dist/logger.d.ts +92 -0
- package/dist/memory/base.d.ts +20 -0
- package/dist/memory/in-memory.d.ts +9 -0
- package/dist/memory/index.d.ts +14 -0
- package/dist/memory/postgres.d.ts +24 -0
- package/dist/memory/redis.d.ts +23 -0
- package/dist/new-agent.d.ts +134 -0
- package/dist/policy-enforcer.d.ts +20 -0
- package/dist/policy.d.ts +20 -0
- package/dist/server.d.ts +33 -0
- package/dist/tools/agent-delegation.d.ts +22 -0
- package/dist/tools/agent-invocation.d.ts +90 -0
- package/dist/tools/base.d.ts +40 -0
- package/dist/tools/calculator.d.ts +5 -0
- package/dist/tools/compliance-operations.d.ts +40 -0
- package/dist/tools/data-formats.d.ts +36 -0
- package/dist/tools/data-operations.d.ts +17 -0
- package/dist/tools/directory-operations.d.ts +46 -0
- package/dist/tools/file-operations.d.ts +46 -0
- package/dist/tools/http-request.d.ts +5 -0
- package/dist/tools/index.d.ts +96 -0
- package/dist/tools/network-operations.d.ts +52 -0
- package/dist/tools/pattern-parser.d.ts +25 -0
- package/dist/tools/system-operations.d.ts +24 -0
- package/dist/tools/utility-operations.d.ts +44 -0
- package/dist/tools/verification-status.d.ts +40 -0
- package/dist/tools/web-search.d.ts +5 -0
- package/dist/types/policy.d.ts +13 -0
- package/dist/types.d.ts +170 -0
- package/dist/utils.d.ts +68 -0
- package/package.json +99 -0
package/dist/crypto.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type HexString, type KeyPair } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Cryptographic utilities for Sekuire protocol
|
|
4
|
+
*/
|
|
5
|
+
export declare class SekuireCrypto {
|
|
6
|
+
/**
|
|
7
|
+
* Generate a new Ed25519 keypair
|
|
8
|
+
*/
|
|
9
|
+
static generateKeyPair(): KeyPair;
|
|
10
|
+
/**
|
|
11
|
+
* Sign a message with a private key
|
|
12
|
+
*/
|
|
13
|
+
static sign(message: string | Uint8Array, privateKeyHex: string): HexString;
|
|
14
|
+
/**
|
|
15
|
+
* Verify a signature
|
|
16
|
+
*/
|
|
17
|
+
static verify(message: string | Uint8Array, signatureHex: string, publicKeyHex: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Calculate Blake3 hash of data
|
|
20
|
+
*/
|
|
21
|
+
static hash(data: string | Uint8Array): HexString;
|
|
22
|
+
/**
|
|
23
|
+
* Calculate Sekuire ID from agent components
|
|
24
|
+
*/
|
|
25
|
+
static calculateSekuireId(params: {
|
|
26
|
+
model: string;
|
|
27
|
+
systemPrompt: string;
|
|
28
|
+
tools: string;
|
|
29
|
+
projectName: string;
|
|
30
|
+
projectVersion: string;
|
|
31
|
+
}): HexString;
|
|
32
|
+
/**
|
|
33
|
+
* Generate a cryptographically secure random nonce (32 bytes)
|
|
34
|
+
*/
|
|
35
|
+
static generateNonce(): HexString;
|
|
36
|
+
/**
|
|
37
|
+
* Convert hex string to Uint8Array
|
|
38
|
+
*/
|
|
39
|
+
static hexToBytes(hex: string): Uint8Array;
|
|
40
|
+
/**
|
|
41
|
+
* Convert Uint8Array to hex string
|
|
42
|
+
*/
|
|
43
|
+
static bytesToHex(bytes: Uint8Array): HexString;
|
|
44
|
+
/**
|
|
45
|
+
* Validate hex string format
|
|
46
|
+
*/
|
|
47
|
+
static isValidHex(hex: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Validate Ed25519 public key format (32 bytes)
|
|
50
|
+
*/
|
|
51
|
+
static isValidPublicKey(hex: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Validate Ed25519 private key format (64 bytes)
|
|
54
|
+
*/
|
|
55
|
+
static isValidPrivateKey(hex: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Validate nonce format (32 bytes)
|
|
58
|
+
*/
|
|
59
|
+
static isValidNonce(hex: string): boolean;
|
|
60
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class AgentIdentity {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly sekuireId: string;
|
|
4
|
+
private readonly privateKey?;
|
|
5
|
+
private readonly publicKey?;
|
|
6
|
+
constructor(name: string, sekuireId: string, privateKey?: string | undefined, publicKey?: string | undefined);
|
|
7
|
+
static load(manifestPath?: string): Promise<AgentIdentity>;
|
|
8
|
+
sign(payload: any): Promise<string>;
|
|
9
|
+
}
|