UNPKG

remcode

Version:

Turn your AI assistant into a codebase expert. Intelligent code analysis, semantic search, and software engineering guidance through MCP integration.

82 lines (81 loc) 2.27 kB
/** * Secret configuration */ export interface SecretConfig { name: string; value: string; description: string; required?: boolean; } /** * Secret operation result */ export interface SecretOperationResult { success: boolean; secretName: string; error?: string; } /** * Secret operation summary */ export interface SecretsOperationSummary { total: number; successful: number; failed: number; results: SecretOperationResult[]; } /** * Class to manage GitHub repository secrets for Remcode */ export declare class SecretsManager { private octokit; private token; /** * Constructor * @param githubToken GitHub API token */ constructor(githubToken?: string); /** * Configure required repository secrets * @param owner Repository owner * @param repo Repository name * @returns Summary of secret operations */ configureRepositorySecrets(owner: string, repo: string): Promise<SecretsOperationSummary>; /** * Get required secrets for Remcode * @returns List of required secrets */ getRequiredSecrets(): SecretConfig[]; /** * Set a repository secret in GitHub * @param owner Repository owner * @param repo Repository name * @param secret Secret configuration * @returns Secret operation result */ private setRepositorySecret; /** * Encrypt a secret value using sodium for GitHub * @param publicKey Base64-encoded public key * @param secretValue Secret value to encrypt * @returns Base64-encoded encrypted secret */ private encryptSecret; /** * Check if a repository has a specific secret * @param owner Repository owner * @param repo Repository name * @param secretName Secret name to check * @returns True if the secret exists */ hasRepositorySecret(owner: string, repo: string, secretName: string): Promise<boolean>; /** * Delete a repository secret * @param owner Repository owner * @param repo Repository name * @param secretName Secret name to delete * @returns True if the secret was deleted */ deleteRepositorySecret(owner: string, repo: string, secretName: string): Promise<boolean>; }