/** * 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). */ /** * The peaks-managed snippet appended to the consumer project's * `.peaks/.gitignore` so the local-only settings file never lands * in a commit. Marked with a managed-by header so we can detect (and * not double-append) on subsequent inits. */ export declare const PEAKS_GITIGNORE_HEADER = "# >>> peaks-loop managed snippet (slice 2.0.1-bug3) \u2014 do not edit by hand"; export declare const PEAKS_GITIGNORE_FOOTER = "# <<< peaks-loop managed snippet"; /** * 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-loop 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-code/references/anchoring-and-session-info.md`. * * is now ALSO drift-checked (via `templateContentMatches`) so stale * on-disk copies from earlier peaks-loop 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; }; }>;