/** * Workspace Service -- consumer `.claude/settings.local.json` materialization. * * v2.18.3 file-split: this module is the extracted sub-tree of the * pre-split `workspace-service.ts`. It hosts the 3 helpers * (`materializeClaudeSettingsLocal`, `writeOfflineTemplateCopy`, * `upsertPeaksGitignoreSnippet`) plus the `PEAKS_GITIGNORE_*` * constants. The high-level `initWorkspace` orchestrator lives in * the parent module and calls into this sibling. Function signatures * and behaviour are unchanged (verbatim move). */ /** * Materialize the consumer-project `.claude/settings.local.json` and * ensure the consumer's `.peaks/.gitignore` covers it. Returns a * `claudeSettings` descriptor that the caller surfaces in the JSON * envelope. * * The function is idempotent: re-running on an already-materialized * project is a no-op (the file is rewritten only when its content * diverges from the current peaks-cli release's template, which * keeps the consumer up to date as the template evolves). * * Even when the caller passes `noClaudeHooks: true`, the function * still writes a copy of the template at * `.peaks/.claude-settings-template.json` so the user has an offline * recovery path: copy the file contents into * `.claude/settings.local.json` manually. The recovery path is * documented in * `skills/peaks-solo/references/anchoring-and-session-info.md`. * * Slice 2026-06-13-selfheal-claude-settings-template: the offline copy * is now ALSO drift-checked (via `templateContentMatches`) so stale * on-disk copies from earlier peaks-cli releases (which lacked the * `node -e "..."` wrapper) get refreshed automatically on the next * init. The action taken on the offline copy is surfaced in * `claudeSettings.offlineTemplate.action`. */ export declare function materializeClaudeSettingsLocal(projectRoot: string, noClaudeHooks: boolean): Promise<{ action: 'written' | 'refreshed' | 'already-current' | 'skipped'; path: string; offlineTemplate: { action: 'written' | 'refreshed' | 'already-current'; path: string; }; }>;