import { t as CapabilityFactory } from "../core-CSZf27yz.js";

//#region ../app/capabilities/accounts/contract.d.ts
type CapabilityId = 'email' | 'calendar' | 'ai';
interface CredentialField {
  type: 'string';
  minLength?: number;
  description?: string;
}
interface CredentialsSchema {
  type: 'object';
  properties: Record<string, CredentialField>;
  required?: string[];
}
interface ProviderInfo {
  id: string;
  name: string;
  authKind: 'form' | 'interactive' | 'none';
  builtin?: boolean;
  capabilities: CapabilityId[];
  credentialsSchema?: CredentialsSchema;
}
type AccountOrigin = {
  kind: 'cloud';
} | {
  kind: 'device';
  label: string;
};
interface AccountInfo {
  accountId: string;
  providerId: string;
  enabled: CapabilityId[];
  config: Partial<Record<CapabilityId, unknown>>;
  lastError?: string;
  origin?: AccountOrigin;
}
interface AccountsAdmin {
  listProviders(input: Record<string, never>): Promise<ProviderInfo[]>;
  listAccounts(input: Record<string, never>): Promise<AccountInfo[]>;
  connect(input: {
    providerId: string;
    credentials?: Record<string, string>;
  }): Promise<{
    accountId: string;
  }>;
  setEnabled(input: {
    accountId: string;
    capability: CapabilityId;
    enabled: boolean;
    config?: unknown;
  }): Promise<void>;
  disconnect(input: {
    accountId: string;
  }): Promise<void>;
}
//#endregion
//#region ../app/capabilities/settings/contract.d.ts
interface UsageResource {
  used: number;
  limit: number | null;
  remaining: number | null;
  exceeded: boolean;
  fraction: number;
}
interface UsageWindow extends UsageResource {
  resetsAt: number | null;
}
interface UsageSnapshot {
  tier: string;
  aiBurst: UsageWindow;
  aiWeekly: UsageWindow;
  storage: UsageResource;
  aiTokens: number;
  aiRequests: number;
}
interface UserProfile {
  id: string;
  name?: string;
  avatarUrl?: string;
}
interface AgentSoul {
  name: string;
  gender: 'female' | 'male' | null;
  avatar: string | null;
  body: string;
  seeded: boolean;
}
interface AvatarInfo {
  ref: string;
  label: string;
  builtin: boolean;
  preview: string;
  files: string[];
}
interface UserFacts {
  name: string;
  birthDate: string;
  gender: 'female' | 'male' | null;
}
interface GeneratedSoul {
  body: string;
  firstWords?: string;
}
interface SettingsCapability {
  'accounts.listProviders': AccountsAdmin['listProviders'];
  'accounts.listAccounts': AccountsAdmin['listAccounts'];
  'accounts.connect': AccountsAdmin['connect'];
  'accounts.setEnabled': AccountsAdmin['setEnabled'];
  'accounts.disconnect': AccountsAdmin['disconnect'];
  'host.usage'(input: Record<string, never>): Promise<UsageSnapshot>;
  'host.user'(input: Record<string, never>): Promise<UserProfile | null>;
  'host.version'(input: Record<string, never>): Promise<string>;
  'agent.readSoul'(input: Record<string, never>): Promise<AgentSoul>;
  'agent.writeSoul'(input: {
    name?: string;
    gender?: 'female' | 'male';
    body?: string;
    avatar?: string;
  }): Promise<void>;
  'agent.listAvatars'(input: Record<string, never>): Promise<AvatarInfo[]>;
  'agent.putAvatarFile'(input: {
    avatar: string;
    name: string;
    bytes: Uint8Array | null;
  }): Promise<void>;
  'agent.readProfile'(input: Record<string, never>): Promise<UserFacts>;
  'agent.writeProfile'(input: {
    name?: string;
    birthDate?: string;
    gender?: 'female' | 'male' | null;
  }): Promise<void>;
  'agent.generateSoul'(input: {
    name: string;
    gender: 'female' | 'male';
    archetype?: string;
    user?: {
      birthDate?: string;
      gender?: 'female' | 'male' | null;
    };
  }): Promise<GeneratedSoul>;
  'appearance.readWallpaper'(input: Record<string, never>): Promise<Uint8Array | null>;
  'appearance.writeWallpaper'(input: {
    bytes: Uint8Array | null;
  }): Promise<void>;
}
//#endregion
//#region ../app/capabilities/settings/index.d.ts
declare const settings: CapabilityFactory<"settings", SettingsCapability, Record<never, never>>;
//#endregion
export { type AccountInfo, type AccountOrigin, type AgentSoul, type AvatarInfo, type CapabilityId, type CredentialField, type CredentialsSchema, type GeneratedSoul, type ProviderInfo, type SettingsCapability, type UsageResource, type UsageSnapshot, type UsageWindow, type UserFacts, type UserProfile, settings };
//# sourceMappingURL=settings.d.ts.map