import type { CreateTaskOptions, CriterioEmAberto, ITaskProvider, IUserRegistry, LintResult } from '@opentask/taskin-task-manager'; import type { TaskId } from '@opentask/taskin-types'; import { FileSystemGroupRegistry } from './group-registry.js'; import { type Locale } from './i18n.js'; import { type MetadataStyleId } from './metadata-style/index.js'; import type { CreateTaskFileResult, TaskFile } from './task-file.types.js'; import type { ILogger } from './user-registry.js'; /** * Options that are not part of the provider contract but change how this * provider writes. * * @public */ export interface FileSystemTaskProviderOptions { /** * Marking style for files this provider creates. * * Only for creation: an edit follows the style of the file being edited, so * a project that switches the setting does not end up with files half in one * style and half in another. */ readonly metadataStyle?: MetadataStyleId; /** * Onde o registro de grupos mora. Ausente, ao lado do diretorio de tarefas — * o mesmo `.taskin/` que ja guarda o registro de usuarios. */ readonly taskinDir?: string; /** * When set, `lint(fix)` rewrites every file's metadata block into this * style. Left unset — the default — `lint(fix)` normalizes each file within * the style it already uses. */ readonly convertMetadataStyleTo?: MetadataStyleId; /** * Size limit, in KB, for each non-markdown file under the tasks directory. * Files listed in `.taskin/.taskin-attachment-exceptions.json` are exempt. * Unset, there is no limit. */ readonly maxAttachmentKb?: number; } export declare class FileSystemTaskProvider implements ITaskProvider { private tasksDirectory; private userRegistry; private locale; private logger; private metadataStyle; private convertMetadataStyleTo; private maxAttachmentKb; private taskinDir; /** * Os grupos deste projeto, como entidades. * * Exposto porque nem toda fonte tem o conceito: quem consome descobre pela * presenca desta propriedade, em vez de chamar uma operacao que falha. * * @public */ readonly groupRegistry: FileSystemGroupRegistry; constructor(tasksDirectory: string, userRegistry: IUserRegistry, locale?: Locale, logger?: ILogger, options?: FileSystemTaskProviderOptions); /** * Reads the metadata a task file carries, whatever style it is written in * and whichever of the two locales named the fields. */ private readInlineMetadata; /** * The label to write a field under: the one the file already uses, or the * English name. * * Without this, writing `Prioridade` into a file that already says * `Priority` appends a second line instead of updating the first. */ private labelFor; /** * A raiz do projeto: o diretório que contém `TASKS/` e `.taskin/`. * * Derivada do diretório de tasks injetado, e não de `process.cwd()`: o * provider é construído com um caminho explícito e usar o cwd fazia o * `initialize()` semear arquivos em outro lugar quando os dois divergiam. */ private get projectRoot(); initialize(): Promise; /** * Reads the `Assignee:` line as written, before the registry gets a say. * * `getAllTasks` already replaces an unresolvable assignee with a fabricated * temporary user, which is exactly what the lint has to see through. */ private readAssigneeLine; /** * Move as tarefas de um grupo para outro — ou para nenhum. * * `para` ausente significa "sem grupo": a linha `Group:` sai do arquivo. E o * unico lugar que mexe em tarefa quando um grupo e apagado, e devolve quantas * foram afetadas para a operacao nunca ser invisivel. */ /** * Os itens do `## Tasks` que ainda bloqueiam, lidos pelo **mesmo** leitor que * o lint usa (task-073). * * Um segundo parser divergiria, e divergir aqui significa o lint recusar o que * o `finish` acabou de aceitar — pior que nao ter portao. */ getCompletionBlockers(task: TaskFile): Promise; private reassignGroup; private pathExists; findTask(taskId: TaskId): Promise; updateTask(task: TaskFile): Promise; getAllTasks(): Promise; private registryIdOrAsTyped; createTask(options: CreateTaskOptions): Promise; private generateTaskMarkdown; lint(fix?: boolean): Promise; } //# sourceMappingURL=file-system-task-provider.d.ts.map