/** * sharedInstructionsNote.ts (BRA-388) * * When a project transitions from solo to shared (a `share_project` grant is * created or revoked), the project's generated instructions were almost * certainly written assuming a single owner-operator. This module keeps a * "Shared Workspace" note in sync inside `projects//instructions/*.md` * so the instructions name the current collaborator(s), establish * shared-workspace filing rules, and warn against sole-ownership assumptions * written elsewhere in the document. * * The note is idempotent: it lives between START/END markers so re-syncing * (on every grant/revoke) replaces it in place rather than duplicating it. * When no active collaborators remain, the note is removed entirely. */ import type { StorageClient } from "../storage/client.js"; interface CollaboratorLine { label: string; permissions: "read_write" | "read_only"; } /** * Returns updated markdown with the Shared Workspace note applied: replaced * in place if present, appended if not, or removed entirely if there are no * active collaborators. */ export declare function applySharedWorkspaceSection(content: string, projectSlug: string, collaborators: CollaboratorLine[]): string; export interface SyncSharedInstructionsResult { collaborators: string[]; updated: string[]; skipped: string[]; } /** * Re-renders the Shared Workspace note in every existing * `projects//instructions/.md` file for a project, based on * the project's current set of active grantees. Safe to call on both grant * creation and revocation. Non-fatal by design — callers should treat * failures here as best-effort and not block the underlying share/unshare * operation. */ export declare function syncSharedInstructionsNote(drive: StorageClient, ownerSubject: string, projectPath: string): Promise; export {}; //# sourceMappingURL=sharedInstructionsNote.d.ts.map