import type { EnvVarInput } from "@stigmer/sdk";
import type { Environment } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/api_pb";
/**
 * Input for adding or updating specific variables in an environment.
 *
 * Only the variables included in this request are affected — existing
 * variables not mentioned are preserved unchanged. This avoids the
 * read-modify-write pattern that destroys redacted secrets.
 */
export interface UpdateEnvironmentVariablesInput {
    /** The environment resource ID. */
    readonly environmentId: string;
    /** Variables to add or update. Keys that already exist are overwritten. */
    readonly variables: Record<string, EnvVarInput>;
}
/** Return value of {@link useUpdateEnvironmentVariables}. */
export interface UseUpdateEnvironmentVariablesReturn {
    /** Add or update variables in an environment. Resolves with the updated resource. */
    readonly updateVariables: (input: UpdateEnvironmentVariablesInput) => Promise<Environment>;
    /** `true` while the update request is in flight. */
    readonly isUpdatingVariables: boolean;
    /** Error from the last failed update, or `null` when healthy. */
    readonly error: Error | null;
    /** Reset `error` to `null`. */
    readonly clearError: () => void;
}
/**
 * Behavior hook that wraps `environment.updateVariables()` with
 * loading/error state.
 *
 * Performs a server-side merge of the supplied variables into the
 * environment's `spec.data`. Only the keys included in the request
 * are affected — existing variables not mentioned are preserved.
 * Secret values are encrypted server-side before persistence.
 *
 * Returns the full {@link Environment} proto (with secrets redacted)
 * so callers can immediately reference the latest state.
 *
 * This is a Layer 1 building-block hook for the **Environment Flow**
 * — incremental variable management without a full-resource update
 * cycle.
 *
 * @example
 * ```tsx
 * const { updateVariables, isUpdatingVariables, error } =
 *   useUpdateEnvironmentVariables();
 *
 * const env = await updateVariables({
 *   environmentId: "env-abc123",
 *   variables: {
 *     API_KEY: { value: "sk-new-...", isSecret: true },
 *     APP_NAME: { value: "my-app" },
 *   },
 * });
 * ```
 */
export declare function useUpdateEnvironmentVariables(): UseUpdateEnvironmentVariablesReturn;
//# sourceMappingURL=useUpdateEnvironmentVariables.d.ts.map