@lousy-agents/cli 2.5.3 → 2.6.1

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.
@@ -13,7 +13,7 @@
13
13
  "lousy-agents": {
14
14
  "type": "stdio",
15
15
  "command": "npx",
16
- "args": ["-y", "@lousy-agents/cli", "mcp"]
16
+ "args": ["-y", "-p", "@lousy-agents/cli", "lousy-agents-mcp"]
17
17
  }
18
18
  }
19
19
  }
@@ -13,7 +13,7 @@
13
13
  "lousy-agents": {
14
14
  "type": "stdio",
15
15
  "command": "npx",
16
- "args": ["-y", "@lousy-agents/cli", "mcp"]
16
+ "args": ["-y", "-p", "@lousy-agents/cli", "lousy-agents-mcp"]
17
17
  }
18
18
  }
19
19
  }
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.
@@ -29747,6 +29802,137 @@ const CLI_TEMPLATE_DIR = (0,external_node_path_.join)(PROJECT_ROOT, "cli", "copi
29747
29802
  */ function readCliTemplateFile(relativePath) {
29748
29803
  return readTemplateFile(relativePath, CLI_TEMPLATE_DIR);
29749
29804
  }
29805
+ /**
29806
+ * Builds the common filesystem nodes shared across all project types.
29807
+ * Each template has its own versions of these files, but the structure is identical.
29808
+ */ function buildCommonNodes(reader) {
29809
+ return [
29810
+ {
29811
+ type: "file",
29812
+ path: "biome.json",
29813
+ content: reader("biome.template.json")
29814
+ },
29815
+ {
29816
+ type: "file",
29817
+ path: ".gitignore",
29818
+ content: reader("gitignore.template")
29819
+ },
29820
+ {
29821
+ type: "file",
29822
+ path: ".editorconfig",
29823
+ content: reader(".editorconfig")
29824
+ },
29825
+ {
29826
+ type: "file",
29827
+ path: ".nvmrc",
29828
+ content: reader(".nvmrc")
29829
+ },
29830
+ {
29831
+ type: "file",
29832
+ path: ".yamllint",
29833
+ content: reader(".yamllint")
29834
+ },
29835
+ // GitHub copilot instructions
29836
+ {
29837
+ type: "directory",
29838
+ path: ".github"
29839
+ },
29840
+ {
29841
+ type: "directory",
29842
+ path: ".github/instructions"
29843
+ },
29844
+ {
29845
+ type: "file",
29846
+ path: ".github/copilot-instructions.md",
29847
+ content: reader(".github/copilot-instructions.md")
29848
+ },
29849
+ {
29850
+ type: "file",
29851
+ path: ".github/instructions/test.instructions.md",
29852
+ content: reader(".github/instructions/test.instructions.md")
29853
+ },
29854
+ {
29855
+ type: "file",
29856
+ path: ".github/instructions/spec.instructions.md",
29857
+ content: reader(".github/instructions/spec.instructions.md")
29858
+ },
29859
+ {
29860
+ type: "file",
29861
+ path: ".github/instructions/pipeline.instructions.md",
29862
+ content: reader(".github/instructions/pipeline.instructions.md")
29863
+ },
29864
+ {
29865
+ type: "file",
29866
+ path: ".github/instructions/software-architecture.instructions.md",
29867
+ content: reader(".github/instructions/software-architecture.instructions.md")
29868
+ },
29869
+ // GitHub Issue Templates
29870
+ {
29871
+ type: "directory",
29872
+ path: ".github/ISSUE_TEMPLATE"
29873
+ },
29874
+ {
29875
+ type: "file",
29876
+ path: ".github/ISSUE_TEMPLATE/feature-to-spec.yml",
29877
+ content: reader(".github/ISSUE_TEMPLATE/feature-to-spec.yml")
29878
+ },
29879
+ // GitHub Workflows
29880
+ {
29881
+ type: "directory",
29882
+ path: ".github/workflows"
29883
+ },
29884
+ {
29885
+ type: "file",
29886
+ path: ".github/workflows/assign-copilot.yml",
29887
+ content: reader(".github/workflows/assign-copilot.yml")
29888
+ },
29889
+ {
29890
+ type: "file",
29891
+ path: ".github/workflows/ci.yml",
29892
+ content: reader(".github/workflows/ci.yml")
29893
+ },
29894
+ // Specs directory
29895
+ {
29896
+ type: "directory",
29897
+ path: ".github/specs"
29898
+ },
29899
+ {
29900
+ type: "file",
29901
+ path: ".github/specs/README.md",
29902
+ content: reader(".github/specs/README.md")
29903
+ },
29904
+ // VSCode configuration
29905
+ {
29906
+ type: "directory",
29907
+ path: ".vscode"
29908
+ },
29909
+ {
29910
+ type: "file",
29911
+ path: ".vscode/extensions.json",
29912
+ content: reader(".vscode/extensions.json")
29913
+ },
29914
+ {
29915
+ type: "file",
29916
+ path: ".vscode/launch.json",
29917
+ content: reader(".vscode/launch.json")
29918
+ },
29919
+ {
29920
+ type: "file",
29921
+ path: ".vscode/mcp.json",
29922
+ content: reader(".vscode/mcp.json")
29923
+ },
29924
+ // Devcontainer configuration
29925
+ {
29926
+ type: "directory",
29927
+ path: ".devcontainer"
29928
+ },
29929
+ {
29930
+ type: "file",
29931
+ path: ".devcontainer/devcontainer.json",
29932
+ content: reader(".devcontainer/devcontainer.json")
29933
+ }
29934
+ ];
29935
+ }
29750
29936
  /**
29751
29937
  * Cached CLI structure - lazy-loaded on first access
29752
29938
  */ let cachedCliStructure = null;
@@ -29780,120 +29966,7 @@ const CLI_TEMPLATE_DIR = (0,external_node_path_.join)(PROJECT_ROOT, "cli", "copi
29780
29966
  path: "vitest.setup.ts",
29781
29967
  content: readCliTemplateFile("vitest.setup.ts")
29782
29968
  },
29783
- {
29784
- type: "file",
29785
- path: "biome.json",
29786
- content: readCliTemplateFile("biome.template.json")
29787
- },
29788
- {
29789
- type: "file",
29790
- path: ".gitignore",
29791
- content: readCliTemplateFile("gitignore.template")
29792
- },
29793
- {
29794
- type: "file",
29795
- path: ".editorconfig",
29796
- content: readCliTemplateFile(".editorconfig")
29797
- },
29798
- {
29799
- type: "file",
29800
- path: ".nvmrc",
29801
- content: readCliTemplateFile(".nvmrc")
29802
- },
29803
- {
29804
- type: "file",
29805
- path: ".yamllint",
29806
- content: readCliTemplateFile(".yamllint")
29807
- },
29808
- // GitHub copilot instructions
29809
- {
29810
- type: "directory",
29811
- path: ".github"
29812
- },
29813
- {
29814
- type: "directory",
29815
- path: ".github/instructions"
29816
- },
29817
- {
29818
- type: "file",
29819
- path: ".github/copilot-instructions.md",
29820
- content: readCliTemplateFile(".github/copilot-instructions.md")
29821
- },
29822
- {
29823
- type: "file",
29824
- path: ".github/instructions/test.instructions.md",
29825
- content: readCliTemplateFile(".github/instructions/test.instructions.md")
29826
- },
29827
- {
29828
- type: "file",
29829
- path: ".github/instructions/spec.instructions.md",
29830
- content: readCliTemplateFile(".github/instructions/spec.instructions.md")
29831
- },
29832
- {
29833
- type: "file",
29834
- path: ".github/instructions/pipeline.instructions.md",
29835
- content: readCliTemplateFile(".github/instructions/pipeline.instructions.md")
29836
- },
29837
- {
29838
- type: "file",
29839
- path: ".github/instructions/software-architecture.instructions.md",
29840
- content: readCliTemplateFile(".github/instructions/software-architecture.instructions.md")
29841
- },
29842
- // GitHub Issue Templates
29843
- {
29844
- type: "directory",
29845
- path: ".github/ISSUE_TEMPLATE"
29846
- },
29847
- {
29848
- type: "file",
29849
- path: ".github/ISSUE_TEMPLATE/feature-to-spec.yml",
29850
- content: readCliTemplateFile(".github/ISSUE_TEMPLATE/feature-to-spec.yml")
29851
- },
29852
- // GitHub Workflows
29853
- {
29854
- type: "directory",
29855
- path: ".github/workflows"
29856
- },
29857
- {
29858
- type: "file",
29859
- path: ".github/workflows/assign-copilot.yml",
29860
- content: readCliTemplateFile(".github/workflows/assign-copilot.yml")
29861
- },
29862
- {
29863
- type: "file",
29864
- path: ".github/workflows/ci.yml",
29865
- content: readCliTemplateFile(".github/workflows/ci.yml")
29866
- },
29867
- // Specs directory
29868
- {
29869
- type: "directory",
29870
- path: ".github/specs"
29871
- },
29872
- {
29873
- type: "file",
29874
- path: ".github/specs/README.md",
29875
- content: readCliTemplateFile(".github/specs/README.md")
29876
- },
29877
- // VSCode configuration
29878
- {
29879
- type: "directory",
29880
- path: ".vscode"
29881
- },
29882
- {
29883
- type: "file",
29884
- path: ".vscode/extensions.json",
29885
- content: readCliTemplateFile(".vscode/extensions.json")
29886
- },
29887
- {
29888
- type: "file",
29889
- path: ".vscode/launch.json",
29890
- content: readCliTemplateFile(".vscode/launch.json")
29891
- },
29892
- {
29893
- type: "file",
29894
- path: ".vscode/mcp.json",
29895
- content: readCliTemplateFile(".vscode/mcp.json")
29896
- },
29969
+ ...buildCommonNodes(readCliTemplateFile),
29897
29970
  // Source code
29898
29971
  {
29899
29972
  type: "directory",
@@ -29908,16 +29981,6 @@ const CLI_TEMPLATE_DIR = (0,external_node_path_.join)(PROJECT_ROOT, "cli", "copi
29908
29981
  type: "file",
29909
29982
  path: "src/index.test.ts",
29910
29983
  content: readCliTemplateFile("src/index.test.ts")
29911
- },
29912
- // Devcontainer configuration
29913
- {
29914
- type: "directory",
29915
- path: ".devcontainer"
29916
- },
29917
- {
29918
- type: "file",
29919
- path: ".devcontainer/devcontainer.json",
29920
- content: readCliTemplateFile(".devcontainer/devcontainer.json")
29921
29984
  }
29922
29985
  ]
29923
29986
  };
@@ -29939,6 +30002,11 @@ const CLI_TEMPLATE_DIR = (0,external_node_path_.join)(PROJECT_ROOT, "cli", "copi
29939
30002
  /**
29940
30003
  * Cached webapp structure - lazy-loaded on first access
29941
30004
  */ let cachedWebappStructure = null;
30005
+ /**
30006
+ * Helper function to read webapp template files
30007
+ */ function readWebappTemplateFile(relativePath) {
30008
+ return readTemplateFile(relativePath, WEBAPP_TEMPLATE_DIR);
30009
+ }
29942
30010
  /**
29943
30011
  * Builds the webapp project filesystem structure by reading template files
29944
30012
  * This is called lazily only when webapp scaffolding is needed
@@ -29952,137 +30020,29 @@ const CLI_TEMPLATE_DIR = (0,external_node_path_.join)(PROJECT_ROOT, "cli", "copi
29952
30020
  {
29953
30021
  type: "file",
29954
30022
  path: "package.json",
29955
- content: readTemplateFile("package.json")
30023
+ content: readWebappTemplateFile("package.json")
29956
30024
  },
29957
30025
  {
29958
30026
  type: "file",
29959
30027
  path: "tsconfig.json",
29960
- content: readTemplateFile("tsconfig.json")
30028
+ content: readWebappTemplateFile("tsconfig.json")
29961
30029
  },
29962
30030
  {
29963
30031
  type: "file",
29964
30032
  path: "next.config.ts",
29965
- content: readTemplateFile("next.config.ts")
30033
+ content: readWebappTemplateFile("next.config.ts")
29966
30034
  },
29967
30035
  {
29968
30036
  type: "file",
29969
30037
  path: "vitest.config.ts",
29970
- content: readTemplateFile("vitest.config.ts")
30038
+ content: readWebappTemplateFile("vitest.config.ts")
29971
30039
  },
29972
30040
  {
29973
30041
  type: "file",
29974
30042
  path: "vitest.setup.ts",
29975
- content: readTemplateFile("vitest.setup.ts")
29976
- },
29977
- {
29978
- type: "file",
29979
- path: "biome.json",
29980
- content: readTemplateFile("biome.json")
29981
- },
29982
- {
29983
- type: "file",
29984
- path: ".editorconfig",
29985
- content: readTemplateFile(".editorconfig")
29986
- },
29987
- {
29988
- type: "file",
29989
- path: ".nvmrc",
29990
- content: readTemplateFile(".nvmrc")
29991
- },
29992
- {
29993
- type: "file",
29994
- path: ".yamllint",
29995
- content: readTemplateFile(".yamllint")
29996
- },
29997
- // GitHub copilot instructions
29998
- {
29999
- type: "directory",
30000
- path: ".github"
30001
- },
30002
- {
30003
- type: "directory",
30004
- path: ".github/instructions"
30005
- },
30006
- {
30007
- type: "file",
30008
- path: ".github/copilot-instructions.md",
30009
- content: readTemplateFile(".github/copilot-instructions.md")
30010
- },
30011
- {
30012
- type: "file",
30013
- path: ".github/instructions/test.instructions.md",
30014
- content: readTemplateFile(".github/instructions/test.instructions.md")
30015
- },
30016
- {
30017
- type: "file",
30018
- path: ".github/instructions/spec.instructions.md",
30019
- content: readTemplateFile(".github/instructions/spec.instructions.md")
30020
- },
30021
- {
30022
- type: "file",
30023
- path: ".github/instructions/pipeline.instructions.md",
30024
- content: readTemplateFile(".github/instructions/pipeline.instructions.md")
30025
- },
30026
- {
30027
- type: "file",
30028
- path: ".github/instructions/software-architecture.instructions.md",
30029
- content: readTemplateFile(".github/instructions/software-architecture.instructions.md")
30030
- },
30031
- // GitHub Issue Templates
30032
- {
30033
- type: "directory",
30034
- path: ".github/ISSUE_TEMPLATE"
30043
+ content: readWebappTemplateFile("vitest.setup.ts")
30035
30044
  },
30036
- {
30037
- type: "file",
30038
- path: ".github/ISSUE_TEMPLATE/feature-to-spec.yml",
30039
- content: readTemplateFile(".github/ISSUE_TEMPLATE/feature-to-spec.yml")
30040
- },
30041
- // GitHub Workflows
30042
- {
30043
- type: "directory",
30044
- path: ".github/workflows"
30045
- },
30046
- {
30047
- type: "file",
30048
- path: ".github/workflows/assign-copilot.yml",
30049
- content: readTemplateFile(".github/workflows/assign-copilot.yml")
30050
- },
30051
- // Specs directory
30052
- {
30053
- type: "directory",
30054
- path: ".github/specs"
30055
- },
30056
- {
30057
- type: "file",
30058
- path: ".github/specs/README.md",
30059
- content: readTemplateFile(".github/specs/README.md")
30060
- },
30061
- // VSCode configuration
30062
- {
30063
- type: "directory",
30064
- path: ".vscode"
30065
- },
30066
- {
30067
- type: "file",
30068
- path: ".vscode/extensions.json",
30069
- content: readTemplateFile(".vscode/extensions.json")
30070
- },
30071
- {
30072
- type: "file",
30073
- path: ".vscode/launch.json",
30074
- content: readTemplateFile(".vscode/launch.json")
30075
- },
30076
- // Devcontainer configuration
30077
- {
30078
- type: "directory",
30079
- path: ".devcontainer"
30080
- },
30081
- {
30082
- type: "file",
30083
- path: ".devcontainer/devcontainer.json",
30084
- content: readTemplateFile(".devcontainer/devcontainer.json")
30085
- }
30045
+ ...buildCommonNodes(readWebappTemplateFile)
30086
30046
  ]
30087
30047
  };
30088
30048
  return cachedWebappStructure;
@@ -30130,130 +30090,7 @@ const CLI_TEMPLATE_DIR = (0,external_node_path_.join)(PROJECT_ROOT, "cli", "copi
30130
30090
  path: "vitest.setup.ts",
30131
30091
  content: readRestApiTemplateFile("vitest.setup.ts")
30132
30092
  },
30133
- {
30134
- type: "file",
30135
- path: "biome.json",
30136
- content: readRestApiTemplateFile("biome.template.json")
30137
- },
30138
- {
30139
- type: "file",
30140
- path: ".editorconfig",
30141
- content: readRestApiTemplateFile(".editorconfig")
30142
- },
30143
- {
30144
- type: "file",
30145
- path: ".nvmrc",
30146
- content: readRestApiTemplateFile(".nvmrc")
30147
- },
30148
- {
30149
- type: "file",
30150
- path: ".yamllint",
30151
- content: readRestApiTemplateFile(".yamllint")
30152
- },
30153
- {
30154
- type: "file",
30155
- path: ".gitignore",
30156
- content: readRestApiTemplateFile("gitignore.template")
30157
- },
30158
- // GitHub copilot instructions
30159
- {
30160
- type: "directory",
30161
- path: ".github"
30162
- },
30163
- {
30164
- type: "directory",
30165
- path: ".github/instructions"
30166
- },
30167
- {
30168
- type: "file",
30169
- path: ".github/copilot-instructions.md",
30170
- content: readRestApiTemplateFile(".github/copilot-instructions.md")
30171
- },
30172
- {
30173
- type: "file",
30174
- path: ".github/instructions/test.instructions.md",
30175
- content: readRestApiTemplateFile(".github/instructions/test.instructions.md")
30176
- },
30177
- {
30178
- type: "file",
30179
- path: ".github/instructions/spec.instructions.md",
30180
- content: readRestApiTemplateFile(".github/instructions/spec.instructions.md")
30181
- },
30182
- {
30183
- type: "file",
30184
- path: ".github/instructions/pipeline.instructions.md",
30185
- content: readRestApiTemplateFile(".github/instructions/pipeline.instructions.md")
30186
- },
30187
- {
30188
- type: "file",
30189
- path: ".github/instructions/software-architecture.instructions.md",
30190
- content: readRestApiTemplateFile(".github/instructions/software-architecture.instructions.md")
30191
- },
30192
- // GitHub Issue Templates
30193
- {
30194
- type: "directory",
30195
- path: ".github/ISSUE_TEMPLATE"
30196
- },
30197
- {
30198
- type: "file",
30199
- path: ".github/ISSUE_TEMPLATE/feature-to-spec.yml",
30200
- content: readRestApiTemplateFile(".github/ISSUE_TEMPLATE/feature-to-spec.yml")
30201
- },
30202
- // GitHub Workflows
30203
- {
30204
- type: "directory",
30205
- path: ".github/workflows"
30206
- },
30207
- {
30208
- type: "file",
30209
- path: ".github/workflows/assign-copilot.yml",
30210
- content: readRestApiTemplateFile(".github/workflows/assign-copilot.yml")
30211
- },
30212
- {
30213
- type: "file",
30214
- path: ".github/workflows/ci.yml",
30215
- content: readRestApiTemplateFile(".github/workflows/ci.yml")
30216
- },
30217
- // Specs directory
30218
- {
30219
- type: "directory",
30220
- path: ".github/specs"
30221
- },
30222
- {
30223
- type: "file",
30224
- path: ".github/specs/README.md",
30225
- content: readRestApiTemplateFile(".github/specs/README.md")
30226
- },
30227
- // VSCode configuration
30228
- {
30229
- type: "directory",
30230
- path: ".vscode"
30231
- },
30232
- {
30233
- type: "file",
30234
- path: ".vscode/extensions.json",
30235
- content: readRestApiTemplateFile(".vscode/extensions.json")
30236
- },
30237
- {
30238
- type: "file",
30239
- path: ".vscode/launch.json",
30240
- content: readRestApiTemplateFile(".vscode/launch.json")
30241
- },
30242
- {
30243
- type: "file",
30244
- path: ".vscode/mcp.json",
30245
- content: readRestApiTemplateFile(".vscode/mcp.json")
30246
- },
30247
- // Devcontainer configuration
30248
- {
30249
- type: "directory",
30250
- path: ".devcontainer"
30251
- },
30252
- {
30253
- type: "file",
30254
- path: ".devcontainer/devcontainer.json",
30255
- content: readRestApiTemplateFile(".devcontainer/devcontainer.json")
30256
- }
30093
+ ...buildCommonNodes(readRestApiTemplateFile)
30257
30094
  ]
30258
30095
  };
30259
30096
  return cachedRestApiStructure;