/** * @fractary/core - Default Configuration Templates * * Provides default configuration templates for initializing new projects. * Used by both CLI and agents to ensure consistent config generation. */ import type { CoreYamlConfig, FileConfig } from '../common/yaml-config'; /** * Options for generating default configuration */ export interface DefaultConfigOptions { /** Work tracking platform */ workPlatform?: 'github' | 'jira' | 'linear'; /** Repository platform */ repoPlatform?: 'github'; /** File storage handler */ fileHandler?: 'local' | 's3'; /** GitHub/GitLab owner/organization */ owner?: string; /** Repository name */ repo?: string; /** * S3 bucket name (if using S3). * When not provided and fileHandler is 's3', defaults to `dev.{repo}`. * The dev bucket is intended for development artifacts (docs, logs, specs) * that don't belong to test or production environments. */ s3Bucket?: string; /** AWS region (if using S3) */ awsRegion?: string; } /** * Supported cloud storage providers for cloud-init */ export type CloudProvider = 's3' | 'r2'; /** * Scope of cloud storage enablement * * - 'archives': Only archive handlers are cloud-backed (writes stay local for speed) * - 'all': Both write and archive handlers are cloud-backed */ export type CloudScope = 'archives' | 'all'; /** * Options for generating cloud-enabled file handler configuration. * * Used by the `cloud-init` command to upgrade an existing local-storage * configuration to use a cloud provider (S3 or R2). */ export interface CloudConfigOptions { /** Cloud storage provider */ provider: CloudProvider; /** Bucket name for storage */ bucket: string; /** AWS region (required for S3, ignored for R2) */ region?: string; /** Cloudflare account ID (required for R2, ignored for S3) */ accountId?: string; /** * Which handlers to cloud-enable. * - 'archives' (default): Only archive handlers use cloud storage; writes stay local for speed. * - 'all': Both write and archive handlers use cloud storage. */ scope?: CloudScope; /** Existing FileConfig to merge with (preserves local paths for write handlers in 'archives' scope) */ existingConfig?: FileConfig; } /** * Generate a full default configuration with all plugins * * @param options Configuration options * @returns Complete CoreYamlConfig with all sections * * @example * ```typescript * // With explicit bucket * const config = getDefaultConfig({ * workPlatform: 'github', * owner: 'myorg', * repo: 'my-project', * fileHandler: 's3', * s3Bucket: 'my-bucket', * }); * * // Bucket auto-derived as 'dev.my-project' from repo name * const config2 = getDefaultConfig({ * owner: 'myorg', * repo: 'my-project', * fileHandler: 's3', * }); * ``` */ export declare function getDefaultConfig(options?: DefaultConfigOptions): CoreYamlConfig; /** * Generate a minimal configuration with only essential settings * * @param options Configuration options * @returns Minimal CoreYamlConfig with work and repo sections only * * @example * ```typescript * const config = getMinimalConfig({ * workPlatform: 'github', * owner: 'myorg', * repo: 'my-project', * }); * ``` */ export declare function getMinimalConfig(options?: DefaultConfigOptions): CoreYamlConfig; /** * Generate a cloud-enabled file configuration by upgrading existing handlers. * * When scope is 'archives' (the default), only the archive handlers (logs-archive, * docs-archive) are switched to the cloud provider. Write handlers remain local, * preserving fast local writes while ensuring durable cloud-backed archival. * * When scope is 'all', both write and archive handlers use cloud storage. * * @param options Cloud configuration options * @returns FileConfig with cloud-backed handlers * * @example * ```typescript * // Upgrade archives to S3 (writes stay local) * const fileConfig = getCloudFileConfig({ * provider: 's3', * bucket: 'dev.my-project', * region: 'us-east-1', * scope: 'archives', * }); * * // Upgrade everything to R2 * const fileConfig2 = getCloudFileConfig({ * provider: 'r2', * bucket: 'my-project-files', * accountId: 'abc123', * scope: 'all', * }); * ``` */ export declare function getCloudFileConfig(options: CloudConfigOptions): FileConfig; //# sourceMappingURL=defaults.d.ts.map