UNPKG

@artinet/sdk

Version:

A TypeScript SDK for building collaborative AI agents.

33 lines (32 loc) 958 B
/** * Copyright 2025 The Artinet Project * SPDX-License-Identifier: Apache-2.0 */ /** * Generates a timestamp in ISO 8601 format. * @returns The current timestamp as a string. */ export declare function getCurrentTimestamp(): string; /** * Sleeps for a given number of milliseconds. * @param ms - The number of milliseconds to sleep. * @returns A promise that resolves when the sleep is complete. * * @example * ```typescript * await sleep(1000); * ``` */ export declare function sleep(ms: number): Promise<void>; /** * Formats a JSON object into a string with indentation. * @param json - The JSON object to format. * @returns A string representation of the JSON object. */ export declare function formatJson(json: object): string; /** * Formats an error into a standard error object for logging. * @param error - The error to format. * @returns A standard error object. */ export declare function formatError(error: unknown): Error;