import { z } from 'zod'; import { type CredentialChainOptions } from '@hasna/contracts/client'; /** Test injection for the accounts credential chain (keychain runner, tier-1 key). */ export interface ResolveAccountsStoreOptions { credentials?: CredentialChainOptions; } /** Minimal profile record — the fields economy's attribution reads. */ declare const profileSchema: z.ZodObject<{ name: z.ZodString; tool: z.ZodString; email: z.ZodOptional; displayName: z.ZodOptional; dir: z.ZodString; description: z.ZodOptional; createdAt: z.ZodString; lastUsedAt: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; tool: string; dir: string; createdAt: string; description?: string | undefined; email?: string | undefined; displayName?: string | undefined; lastUsedAt?: string | undefined; }, { name: string; tool: string; dir: string; createdAt: string; description?: string | undefined; email?: string | undefined; displayName?: string | undefined; lastUsedAt?: string | undefined; }>; /** Minimal tool definition — economy reads `id` and `envVar` (dir matching). */ declare const toolDefSchema: z.ZodObject<{ id: z.ZodString; label: z.ZodString; envVar: z.ZodString; defaultDir: z.ZodString; bin: z.ZodString; }, "strip", z.ZodTypeAny, { label: string; id: string; envVar: string; defaultDir: string; bin: string; }, { label: string; id: string; envVar: string; defaultDir: string; bin: string; }>; export type Profile = z.infer; export type ToolDef = z.infer; /** * The minimal store surface economy uses for attribution. Both transports * (local JSON and accounts-serve API) implement it. */ export interface AccountsStore { readonly transport: 'local' | 'api'; listProfiles(tool?: string): Promise; findProfile(name: string, tool?: string): Promise; currentProfile(tool: string): Promise; listTools(): Promise; } /** The profile name last applied to a tool's live default paths, if any. */ export declare function appliedProfileName(toolId: string): string | undefined; /** * Resolve the active registry store for this process — the credential chain * alone: the API transport when `@hasna/contracts` resolves an accounts * credential for this environment (env `HASNA_ACCOUNTS_API_KEY` / legacy * `ACCOUNTS_API_KEY`, the accounts credentials file, or the Keychain, with the * authority defaulted to the fleet gateway `https://api.hasna.com/accounts`), * else the local JSON registry. Retired `*_STORAGE_MODE` / `*_MODE` variables * are a hard error so a half-migrated deployment fails loudly instead of * silently reading the wrong dataset. */ export declare function resolveStore(env?: NodeJS.ProcessEnv, options?: ResolveAccountsStoreOptions): AccountsStore; export {}; //# sourceMappingURL=accounts-store.d.ts.map