/* auto-generated by NAPI-RS */ /* eslint-disable */ export interface AddAgentMemoryArgsJs { agent_pubkey: Buffer content_cipher: Buffer nonce: Buffer score: number } export interface AgentAuthJs { privkey: string pubkey: string } export interface AgentPubkeyOnlyQueryJs { agent_pubkey_hex: string } export const ARG_AGENT_PUBKEY: string export const ARG_ID: string export declare function buildAddAgentMemoryArgs(agentPubkeyHex: string, contentCipher: Buffer, nonce: Buffer, score: number): AddAgentMemoryArgsJs export declare function buildEncryptedToolcallArgs(toolCallId: string, action: string, context: string, toolName: string, toolArgsJson: string, orgEncryptionPubKeyHex: string): EncryptedToolCallArgsJs export declare function buildGetActiveMemoryIdQuery(agentPubkeyHex: string): AgentPubkeyOnlyQueryJs export declare function buildGetAgentMemoryByIdQuery(agentPubkeyHex: string, id: number): MemoryByIdQueryJs export declare function buildGetAgentMemoryHistoryQuery(agentPubkeyHex: string): AgentPubkeyOnlyQueryJs export declare function buildGetAgentMemoryQuery(agentPubkeyHex: string): AgentPubkeyOnlyQueryJs export declare function buildGetAgentMemoryRollbackHistoryQuery(agentPubkeyHex: string): AgentPubkeyOnlyQueryJs export declare function buildGetAllAgentMemoryQuery(agentPubkeyHex: string): AgentPubkeyOnlyQueryJs export declare function buildRollbackAgentMemoryArgs(agentPubkeyHex: string, toId: number, reason: string): RollbackAgentMemoryArgsJs export declare function buildScanRequest(entry: MemoryEntryJs): ScanRequestJs /** * Named `claimHashHex` on the JS side to match the pure-TS name the * dashboard's ported implementation uses. */ export declare function claimHashHex(toolName: string, action: string, context: string, toolArgsJson: string): string export declare function classifyMemoryRead(event: any, ctx: any, opts?: ClassifyReadOptionsJs | undefined | null): boolean export declare function classifyMemoryWrite(event: any, ctx: any, opts?: ClassifyWriteOptionsJs | undefined | null): MemoryEntryJs | null export interface ClassifyReadOptionsJs { readToolNames?: Array patterns?: Array genericReadToolNames?: Array } export interface ClassifyWriteOptionsJs { patterns?: Array toolNames?: Array } export declare function computeActionHash(action: string): string export declare function containsEvasionCharacters(s: string): boolean export declare function containsSecret(s: string): boolean export declare function createMemorySnapshot(entries: Array, takenAt: number): MemorySnapshotJs export declare function decryptForOrg(payload: Buffer, orgPrivKeyHex: string, aad: string, domain?: string | undefined | null): string export declare function decryptMemoryContent(ciphertext: Buffer, nonce: Buffer, key: Buffer): string export const DEFAULT_BLOCKCHAIN_RID: string export const DEFAULT_ENDPOINT: string export const DEFAULT_PRIVATE_BLOCKCHAIN_RID: string export declare function defaultChromiaNodeUrls(): Array export declare function defaultMemoryPathPatterns(): Array export declare function defaultMemoryReadToolNames(): Array export declare function defaultMemoryWriteToolNames(): Array export declare function defaultPrivateNodeUrls(): Array export declare function defaultScoreForVerdict(verdict: string): number export declare function deriveMemoryKey(privkeyHex: string): Buffer export declare function derivePublicKey(s: string): string export declare function diffMemorySnapshots(before: MemorySnapshotJs, after: MemorySnapshotJs): MemoryDiffResultJs export const ECIES_FORMAT_VERSION: number export declare function encryptedLength(plaintextByteLength: number): number export interface EncryptedMemoryJs { ciphertext: Buffer nonce: Buffer } /** Columns of `log_tool_call` — `tool_name` stays readable for filtering. */ export interface EncryptedToolCallArgsJs { tool_call_id: string action_text: string action_context: string tool_name: string tool_args_json: string } export declare function encryptForOrg(plaintext: string, orgPubKeyHex: string, aad: string, domain?: string | undefined | null): Buffer export declare function encryptMemoryContent(plaintext: string, key: Buffer): EncryptedMemoryJs export declare function formatEntryForScan(entry: MemoryEntryJs, hasEvasion: boolean): string export declare function generateKeypair(): KeyPairJs export const HONEYCOMB_KEY: string export declare function isValidPrivateKey(s: string): boolean export interface JudgeSignatureCheckJs { ok: boolean reason?: string } export interface KeyPairJs { priv_key: string pub_key: string } export declare function loadAgent(privkey: string): AgentAuthJs export declare function mapVerdict(actionType: string, confidence: number, threshold: number): string export interface MemoryAnomalyJs { /** * Anomaly kind — see `AnomalyType` in the core. Emitted as `type` in JS * to match the serde `#[serde(rename = "type")]` on the core struct. */ type: string severity: string description: string entries: Array } export interface MemoryByIdQueryJs { agent_pubkey_hex: string id: number } export interface MemoryDiffResultJs { safe: boolean added: Array removed: Array modified: Array anomalies: Array } export interface MemoryEntryJs { key: string value: string source?: string timestamp?: number } export declare function memoryScanContext(): string export interface MemorySnapshotJs { entries: Array takenAt: number } export interface ModifiedEntryJs { key: string before: string after: string } export declare function normalizeActionForHash(action: string): string export declare function normalizeForMatching(s: string): string export const OP_ADD_AGENT_MEMORY: string export const OP_LOG_TOOL_CALL: string export const OP_ROLLBACK_AGENT_MEMORY: string export declare function parseActiveMemoryId(value: any): number | null export declare function parseByteArrayField(value: any): Buffer export interface ParsedScoreJs { score?: number clean_reason: string } export declare function parseMemoryRow(value: any): RawMemoryRowJs export declare function parseMemoryRows(value: any): Array export declare function parseRollbackRow(value: any): RawRollbackRowJs export declare function parseRollbackRows(value: any): Array export declare function parseScoreFromReason(reason: string): ParsedScoreJs export const QUERY_GET_ACTIVE_MEMORY_ID: string export const QUERY_GET_AGENT_MEMORY: string export const QUERY_GET_AGENT_MEMORY_BY_ID: string export const QUERY_GET_AGENT_MEMORY_HISTORY: string export const QUERY_GET_AGENT_MEMORY_ROLLBACK_HISTORY: string export const QUERY_GET_ALL_AGENT_MEMORY: string export interface RawMemoryRowJs { id: number content_cipher: Buffer nonce: Buffer score: number is_active: boolean created_at: number updated_at: number } export interface RawRollbackRowJs { from_id: number to_id: number reason: string signer: Buffer created_at: number } export interface RedactResultJs { redacted: string found: Array } export declare function redactSecrets(s: string): RedactResultJs export interface RollbackAgentMemoryArgsJs { agent_pubkey: Buffer to_id: number reason: string } export interface ScanRequestJs { prompt: string context: string redaction: RedactResultJs has_evasion: boolean } export interface SecretMatchJs { kind: string length: number } export declare function signEncryptedToolCall(toolCallId: string, action: string, context: string, toolName: string, toolArgsJson: string, orgEncryptionPubKeyHex: string, privkeyHex: string, blockchainRidHex: string): string export declare function signJudgeAction(judgmentId: string, action: string, context: string, extra: string, privkey: string, blockchainRid: string): string export declare function signLogToolCall(toolCallId: string, action: string, context: string, toolName: string, toolArgsJson: string, privkey: string, blockchainRid: string): string export declare function validateAgentPubkeyHex(pubkeyHex: string): Buffer export declare function validateMemoryId(id: number): void export declare function validateMemoryNonce(nonce: Buffer): void export declare function validateRollbackReason(reason: string): void export declare function validateScore(score: number): void export declare function verifyJudgeResponseSignature(body: Buffer, signatureHex: string | undefined | null, pubkeyHex: string): JudgeSignatureCheckJs export declare function verifySignature(body: Buffer, signatureHex: string, pubkeyHex: string): boolean