@lousy-agents/cli 2.5.3 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11799,6 +11799,60 @@ const consola = dist_createConsola();
11799
11799
  return new FileSystemAgentFileGateway();
11800
11800
  }
11801
11801
 
11802
+ ;// CONCATENATED MODULE: ./src/gateways/claude-file-gateway.ts
11803
+ /**
11804
+ * Gateway interface for Claude Code file operations.
11805
+ * Handles reading and writing .claude/settings.json and CLAUDE.md files.
11806
+ */
11807
+
11808
+
11809
+ /**
11810
+ * File system implementation of ClaudeFileGateway
11811
+ */ class FileSystemClaudeFileGateway {
11812
+ async readSettings(targetDir) {
11813
+ const settingsPath = join(targetDir, ".claude", "settings.json");
11814
+ if (!await fileExists(settingsPath)) {
11815
+ return null;
11816
+ }
11817
+ try {
11818
+ const content = await readFile(settingsPath, "utf-8");
11819
+ return JSON.parse(content);
11820
+ } catch {
11821
+ // If JSON parsing fails, treat as if file doesn't exist
11822
+ return null;
11823
+ }
11824
+ }
11825
+ async writeSettings(targetDir, settings) {
11826
+ const claudeDir = join(targetDir, ".claude");
11827
+ const settingsPath = join(claudeDir, "settings.json");
11828
+ // Ensure .claude directory exists
11829
+ await mkdir(claudeDir, {
11830
+ recursive: true
11831
+ });
11832
+ // Write with 2-space indentation and trailing newline
11833
+ const content = `${JSON.stringify(settings, null, 2)}\n`;
11834
+ await writeFile(settingsPath, content, "utf-8");
11835
+ }
11836
+ async readDocumentation(targetDir) {
11837
+ const docPath = join(targetDir, "CLAUDE.md");
11838
+ if (!await fileExists(docPath)) {
11839
+ return null;
11840
+ }
11841
+ return readFile(docPath, "utf-8");
11842
+ }
11843
+ async writeDocumentation(targetDir, content) {
11844
+ const docPath = join(targetDir, "CLAUDE.md");
11845
+ // Ensure content has trailing newline
11846
+ const normalizedContent = content.endsWith("\n") ? content : `${content}\n`;
11847
+ await writeFile(docPath, normalizedContent, "utf-8");
11848
+ }
11849
+ }
11850
+ /**
11851
+ * Factory function to create a Claude file gateway
11852
+ */ function createClaudeFileGateway() {
11853
+ return new FileSystemClaudeFileGateway();
11854
+ }
11855
+
11802
11856
  ;// CONCATENATED MODULE: ./src/entities/copilot-setup.ts
11803
11857
  /**
11804
11858
  * Core domain entities for the Copilot Setup Steps feature.
@@ -15082,6 +15136,7 @@ var dist = __webpack_require__(1198);
15082
15136
 
15083
15137
 
15084
15138
 
15139
+
15085
15140
  ;// CONCATENATED MODULE: ./src/use-cases/candidate-builder.ts
15086
15141
  /**
15087
15142
  * Use case for building setup step candidates from environment detection.