import { type Goal } from '../../infra/goals/schema.js'; export type PermissionHeading = '許可' | '毎回確認' | '拒否'; export type PermissionScope = { readonly kind: 'project'; readonly projectDirectory: string; } | { readonly kind: 'workspace'; readonly workspaceId: string; } | { readonly kind: 'global'; } | { readonly kind: 'goal'; readonly repositoryDirectory: string; readonly goalId: string; }; export type WritablePermissionScope = Exclude; interface PermissionTarget { readonly scope: PermissionScope['kind']; readonly filePath: string; } export interface PermissionSection { readonly heading: PermissionHeading; /** UTF-16 offsets of the body in the unmodified content, excluding the heading line. */ readonly start: number; readonly end: number; } export interface ScopedPermissionFile extends PermissionTarget { readonly content: string; readonly sections: readonly PermissionSection[]; readonly inquiryId?: string; } export type ScopedPermissionsResult = { readonly ok: true; readonly files: readonly ScopedPermissionFile[]; } | { readonly ok: false; readonly error: unknown; }; export declare function readScopedPermissions(input: { readonly projectDirectory?: string; readonly workspaceId?: string; readonly goal?: { readonly repositoryDirectory: string; readonly record: Goal; }; }): Promise; /** TUIで人が確定した一文の保存用。AIのツール登録には接続しない。 */ export declare function appendScopedPermission(input: { readonly scope: WritablePermissionScope; readonly heading: PermissionHeading; readonly sentence: string; }): Promise; export {}; //# sourceMappingURL=scopedPermissionStorage.d.ts.map