gaunt-sloth-assistant 1.4.0 → 1.4.2

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.
Files changed (214) hide show
  1. package/README.md +32 -339
  2. package/dist/builtInToolsConfig.d.ts +1 -31
  3. package/dist/builtInToolsConfig.js +1 -142
  4. package/dist/builtInToolsConfig.js.map +1 -1
  5. package/dist/cli.js +2 -2
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/apiCommand.d.ts +1 -1
  8. package/dist/commands/apiCommand.js +4 -4
  9. package/dist/commands/apiCommand.js.map +1 -1
  10. package/dist/commands/askCommand.d.ts +1 -1
  11. package/dist/commands/askCommand.js +7 -6
  12. package/dist/commands/askCommand.js.map +1 -1
  13. package/dist/commands/chatCommand.d.ts +1 -1
  14. package/dist/commands/chatCommand.js +2 -2
  15. package/dist/commands/chatCommand.js.map +1 -1
  16. package/dist/commands/codeCommand.d.ts +1 -1
  17. package/dist/commands/codeCommand.js +2 -2
  18. package/dist/commands/codeCommand.js.map +1 -1
  19. package/dist/commands/commandIntrospection.d.ts +1 -1
  20. package/dist/commands/commandIntrospection.js +1 -1
  21. package/dist/commands/commandIntrospection.js.map +1 -1
  22. package/dist/commands/commandUtils.d.ts +11 -13
  23. package/dist/commands/commandUtils.js +13 -15
  24. package/dist/commands/commandUtils.js.map +1 -1
  25. package/dist/commands/configSetup.d.ts +7 -0
  26. package/dist/commands/configSetup.js +63 -0
  27. package/dist/commands/configSetup.js.map +1 -0
  28. package/dist/commands/getCommand.d.ts +1 -1
  29. package/dist/commands/getCommand.js +3 -3
  30. package/dist/commands/getCommand.js.map +1 -1
  31. package/dist/commands/initCommand.js +4 -3
  32. package/dist/commands/initCommand.js.map +1 -1
  33. package/dist/commands/prCommand.d.ts +1 -1
  34. package/dist/commands/prCommand.js +8 -7
  35. package/dist/commands/prCommand.js.map +1 -1
  36. package/dist/commands/reviewCommand.d.ts +1 -1
  37. package/dist/commands/reviewCommand.js +7 -6
  38. package/dist/commands/reviewCommand.js.map +1 -1
  39. package/dist/config.d.ts +1 -506
  40. package/dist/config.js +1 -432
  41. package/dist/config.js.map +1 -1
  42. package/dist/constants.d.ts +1 -13
  43. package/dist/constants.js +1 -13
  44. package/dist/constants.js.map +1 -1
  45. package/dist/core/GthAgentRunner.d.ts +1 -27
  46. package/dist/core/GthAgentRunner.js +1 -106
  47. package/dist/core/GthAgentRunner.js.map +1 -1
  48. package/dist/core/GthLangChainAgent.d.ts +1 -64
  49. package/dist/core/GthLangChainAgent.js +1 -414
  50. package/dist/core/GthLangChainAgent.js.map +1 -1
  51. package/dist/core/types.d.ts +1 -26
  52. package/dist/core/types.js +1 -15
  53. package/dist/core/types.js.map +1 -1
  54. package/dist/helpers/jira/jiraClient.d.ts +1 -11
  55. package/dist/helpers/jira/jiraClient.js +1 -82
  56. package/dist/helpers/jira/jiraClient.js.map +1 -1
  57. package/dist/helpers/jira/jiraLogWork.d.ts +1 -1
  58. package/dist/helpers/jira/jiraLogWork.js +3 -3
  59. package/dist/helpers/jira/jiraLogWork.js.map +1 -1
  60. package/dist/mcp/OAuthClientProviderImpl.d.ts +1 -37
  61. package/dist/mcp/OAuthClientProviderImpl.js +1 -222
  62. package/dist/mcp/OAuthClientProviderImpl.js.map +1 -1
  63. package/dist/middleware/binaryContentInjectionMiddleware.d.ts +1 -22
  64. package/dist/middleware/binaryContentInjectionMiddleware.js +1 -124
  65. package/dist/middleware/binaryContentInjectionMiddleware.js.map +1 -1
  66. package/dist/middleware/registry.d.ts +1 -34
  67. package/dist/middleware/registry.js +1 -131
  68. package/dist/middleware/registry.js.map +1 -1
  69. package/dist/middleware/reviewRateMiddleware.d.ts +1 -38
  70. package/dist/middleware/reviewRateMiddleware.js +1 -102
  71. package/dist/middleware/reviewRateMiddleware.js.map +1 -1
  72. package/dist/middleware/types.d.ts +1 -92
  73. package/dist/middleware/types.js +1 -8
  74. package/dist/middleware/types.js.map +1 -1
  75. package/dist/modules/a2a/A2AClientWrapper.d.ts +1 -22
  76. package/dist/modules/a2a/A2AClientWrapper.js +1 -62
  77. package/dist/modules/a2a/A2AClientWrapper.js.map +1 -1
  78. package/dist/modules/apiAgUiModule.d.ts +1 -2
  79. package/dist/modules/apiAgUiModule.js +1 -188
  80. package/dist/modules/apiAgUiModule.js.map +1 -1
  81. package/dist/modules/interactiveSessionModule.d.ts +1 -9
  82. package/dist/modules/interactiveSessionModule.js +1 -100
  83. package/dist/modules/interactiveSessionModule.js.map +1 -1
  84. package/dist/modules/questionAnsweringModule.d.ts +1 -8
  85. package/dist/modules/questionAnsweringModule.js +1 -48
  86. package/dist/modules/questionAnsweringModule.js.map +1 -1
  87. package/dist/modules/reviewModule.d.ts +1 -2
  88. package/dist/modules/reviewModule.js +1 -84
  89. package/dist/modules/reviewModule.js.map +1 -1
  90. package/dist/modules/types.d.ts +1 -18
  91. package/dist/modules/types.js +1 -1
  92. package/dist/modules/types.js.map +1 -1
  93. package/dist/presets/anthropic.d.ts +1 -7
  94. package/dist/presets/anthropic.js +1 -33
  95. package/dist/presets/anthropic.js.map +1 -1
  96. package/dist/presets/deepseek.d.ts +1 -4
  97. package/dist/presets/deepseek.js +1 -29
  98. package/dist/presets/deepseek.js.map +1 -1
  99. package/dist/presets/fake.d.ts +1 -3
  100. package/dist/presets/fake.js +1 -11
  101. package/dist/presets/fake.js.map +1 -1
  102. package/dist/presets/google-genai.d.ts +1 -7
  103. package/dist/presets/google-genai.js +1 -33
  104. package/dist/presets/google-genai.js.map +1 -1
  105. package/dist/presets/groq.d.ts +1 -4
  106. package/dist/presets/groq.js +1 -29
  107. package/dist/presets/groq.js.map +1 -1
  108. package/dist/presets/openai.d.ts +1 -5
  109. package/dist/presets/openai.js +1 -45
  110. package/dist/presets/openai.js.map +1 -1
  111. package/dist/presets/openrouter.d.ts +1 -5
  112. package/dist/presets/openrouter.js +1 -56
  113. package/dist/presets/openrouter.js.map +1 -1
  114. package/dist/presets/vertexai.d.ts +1 -7
  115. package/dist/presets/vertexai.js +1 -40
  116. package/dist/presets/vertexai.js.map +1 -1
  117. package/dist/presets/xai.d.ts +1 -4
  118. package/dist/presets/xai.js +1 -29
  119. package/dist/presets/xai.js.map +1 -1
  120. package/dist/providers/file.d.ts +1 -8
  121. package/dist/providers/file.js +1 -19
  122. package/dist/providers/file.js.map +1 -1
  123. package/dist/providers/ghIssueProvider.d.ts +1 -8
  124. package/dist/providers/ghIssueProvider.js +1 -33
  125. package/dist/providers/ghIssueProvider.js.map +1 -1
  126. package/dist/providers/ghPrDiffProvider.d.ts +1 -8
  127. package/dist/providers/ghPrDiffProvider.js +1 -28
  128. package/dist/providers/ghPrDiffProvider.js.map +1 -1
  129. package/dist/providers/jiraIssueLegacyProvider.d.ts +1 -8
  130. package/dist/providers/jiraIssueLegacyProvider.js +1 -73
  131. package/dist/providers/jiraIssueLegacyProvider.js.map +1 -1
  132. package/dist/providers/jiraIssueProvider.d.ts +1 -11
  133. package/dist/providers/jiraIssueProvider.js +1 -61
  134. package/dist/providers/jiraIssueProvider.js.map +1 -1
  135. package/dist/providers/text.d.ts +1 -8
  136. package/dist/providers/text.js +1 -9
  137. package/dist/providers/text.js.map +1 -1
  138. package/dist/providers/types.d.ts +1 -33
  139. package/dist/providers/types.js +1 -1
  140. package/dist/providers/types.js.map +1 -1
  141. package/dist/state/artifactStore.d.ts +1 -21
  142. package/dist/state/artifactStore.js +1 -29
  143. package/dist/state/artifactStore.js.map +1 -1
  144. package/dist/tools/A2AAgentTool.d.ts +1 -24
  145. package/dist/tools/A2AAgentTool.js +1 -36
  146. package/dist/tools/A2AAgentTool.js.map +1 -1
  147. package/dist/tools/GthCustomToolkit.d.ts +1 -41
  148. package/dist/tools/GthCustomToolkit.js +1 -279
  149. package/dist/tools/GthCustomToolkit.js.map +1 -1
  150. package/dist/tools/GthDevToolkit.d.ts +1 -24
  151. package/dist/tools/GthDevToolkit.js +1 -188
  152. package/dist/tools/GthDevToolkit.js.map +1 -1
  153. package/dist/tools/GthFileSystemToolkit.d.ts +1 -36
  154. package/dist/tools/GthFileSystemToolkit.js +1 -775
  155. package/dist/tools/GthFileSystemToolkit.js.map +1 -1
  156. package/dist/tools/binaryUtils.d.ts +1 -13
  157. package/dist/tools/binaryUtils.js +1 -54
  158. package/dist/tools/binaryUtils.js.map +1 -1
  159. package/dist/tools/gthJiraLogWorkTool.d.ts +1 -1
  160. package/dist/tools/gthJiraLogWorkTool.js +3 -3
  161. package/dist/tools/gthJiraLogWorkTool.js.map +1 -1
  162. package/dist/tools/gthStatusUpdateTool.d.ts +1 -2
  163. package/dist/tools/gthStatusUpdateTool.js +1 -14
  164. package/dist/tools/gthStatusUpdateTool.js.map +1 -1
  165. package/dist/tools/gthWebFetchTool.d.ts +1 -2
  166. package/dist/tools/gthWebFetchTool.js +1 -46
  167. package/dist/tools/gthWebFetchTool.js.map +1 -1
  168. package/dist/tools/showA2UISurfaceTool.d.ts +1 -9
  169. package/dist/tools/showA2UISurfaceTool.js +1 -24
  170. package/dist/tools/showA2UISurfaceTool.js.map +1 -1
  171. package/dist/utils/ProgressIndicator.d.ts +1 -7
  172. package/dist/utils/ProgressIndicator.js +1 -25
  173. package/dist/utils/ProgressIndicator.js.map +1 -1
  174. package/dist/utils/aiignoreUtils.d.ts +1 -29
  175. package/dist/utils/aiignoreUtils.js +1 -82
  176. package/dist/utils/aiignoreUtils.js.map +1 -1
  177. package/dist/utils/binaryOutputUtils.d.ts +1 -13
  178. package/dist/utils/binaryOutputUtils.js +1 -137
  179. package/dist/utils/binaryOutputUtils.js.map +1 -1
  180. package/dist/utils/consoleUtils.d.ts +1 -76
  181. package/dist/utils/consoleUtils.js +1 -229
  182. package/dist/utils/consoleUtils.js.map +1 -1
  183. package/dist/utils/debugUtils.d.ts +1 -20
  184. package/dist/utils/debugUtils.js +1 -88
  185. package/dist/utils/debugUtils.js.map +1 -1
  186. package/dist/utils/fileUtils.d.ts +1 -75
  187. package/dist/utils/fileUtils.js +1 -230
  188. package/dist/utils/fileUtils.js.map +1 -1
  189. package/dist/utils/globalConfigUtils.d.ts +1 -28
  190. package/dist/utils/globalConfigUtils.js +1 -60
  191. package/dist/utils/globalConfigUtils.js.map +1 -1
  192. package/dist/utils/llmUtils.d.ts +1 -39
  193. package/dist/utils/llmUtils.js +1 -152
  194. package/dist/utils/llmUtils.js.map +1 -1
  195. package/dist/utils/mcpUtils.d.ts +1 -13
  196. package/dist/utils/mcpUtils.js +1 -224
  197. package/dist/utils/mcpUtils.js.map +1 -1
  198. package/dist/utils/stringUtils.d.ts +1 -4
  199. package/dist/utils/stringUtils.js +1 -9
  200. package/dist/utils/stringUtils.js.map +1 -1
  201. package/dist/utils/systemUtils.d.ts +1 -63
  202. package/dist/utils/systemUtils.js +1 -206
  203. package/dist/utils/systemUtils.js.map +1 -1
  204. package/dist/utils/vertexaiUtils.d.ts +1 -2
  205. package/dist/utils/vertexaiUtils.js +1 -17
  206. package/dist/utils/vertexaiUtils.js.map +1 -1
  207. package/package.json +17 -49
  208. package/.gsloth.backstory.md +0 -17
  209. package/.gsloth.chat.md +0 -11
  210. package/.gsloth.code.md +0 -27
  211. package/.gsloth.guidelines.md +0 -1
  212. package/.gsloth.review.md +0 -15
  213. package/.gsloth.system.md +0 -10
  214. package/LICENSE +0 -7
package/README.md CHANGED
@@ -1,358 +1,51 @@
1
- # Gaunt Sloth Assistant
2
- [![Tests and Lint](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [![Integration Tests](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/integration-tests.yml/badge.svg?event=push)](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/integration-tests.yml)
1
+ # gaunt-sloth-assistant
3
2
 
4
- Gaunt Sloth Assistant is a command-line AI assistant for CI/CD workflows, code reviews, and DIY projects. It supports PR and diff reviews with requirements context, code and diff Q&A, interactive chat and coding sessions, and controlled automation through predefined tools and JSON or JavaScript configuration.
3
+ The main CLI application for Gaunt Sloth.
5
4
 
6
- ![GSloth Banner](assets/gaunt-sloth-logo.png)
5
+ ## Contents
7
6
 
8
- Based on [LangChain.js](https://github.com/langchain-ai/langchainjs)
7
+ - CLI entry point and commander-based command registration
8
+ - Commands: `ask`, `review`, `pr`, `chat`, `code`, `init`, `get`, `api`
9
+ - Command utilities and config setup
10
+ - Vendor package wiring (all LangChain provider packages)
11
+ - Integration tests
9
12
 
10
- [Documentation](https://gaunt-sloth-assistant.github.io/docs/) | [Official Site](https://gaunt-sloth-assistant.github.io/) | [NPM](https://www.npmjs.com/package/gaunt-sloth-assistant) | [GitHub](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant)
13
+ ## CLI Binaries
11
14
 
12
- ## Why?
15
+ The package registers four equivalent binary aliases:
13
16
 
14
- Gaunt Sloth's promise is that it is small, extendable, cross-platform and can itself be a dependency in your project.
17
+ - `gaunt-sloth-assistant`
18
+ - `gaunt-sloth`
19
+ - `gsloth`
20
+ - `gth`
15
21
 
16
- The GSloth was initially built as a code review tool, fetching PR contents and Jira contents before feeding them to
17
- the LLM, but we ourselves found many more use cases which we initially did not anticipate; for example,
18
- we may have it as a dependency in an MCP project, allowing us to quickly spin it up to simulate or test some use cases.
22
+ ## Dependencies
19
23
 
20
- The promise of Gaunt Sloth:
24
+ - `@gaunt-sloth/core`
25
+ - `@gaunt-sloth/tools`
26
+ - `@gaunt-sloth/api`
27
+ - `@gaunt-sloth/review`
28
+ - `commander`
29
+ - All LangChain vendor packages (anthropic, google-genai, groq, openai, vertexai, xai, etc.)
21
30
 
22
- - **Minimum dependencies**. Ideally, we aim to only have CommanderJS and some packages from LangChainJS and LangGraphJS.
23
- - **Extensibility**. Feel free to write some JS and create your Tool, Provider or connect to the MCP server of your choice.
24
- - **No vendor lock-in**. Just BYO API keys.
25
- - **Easy installation via NPM**.
26
- - **All prompts are editable** via markdown files.
31
+ This is the only package in the workspace that pulls in AI vendor dependencies directly. All other packages treat vendors as optional peers.
27
32
 
28
- ## What GSloth does
33
+ ## Re-exports
29
34
 
30
- Unlike autonomous coding agents or hosted review services, GSloth is a **configuration-driven CLI tool** that you wire into your own workflows and pipelines. You choose the model, the provider, the prompts, and the tools — GSloth orchestrates them.
31
-
32
- **Controlled automation**
33
- - Define custom shell tools (deployments, migrations, test runs) in JSON config with parameter validation
34
- - Connect to MCP servers, including remote servers with OAuth
35
- - Communicate with external AI agents via the A2A protocol
36
-
37
- **Model experimentation**
38
- - Swap models and providers through config — no code changes needed
39
- - Works with Anthropic, Google (Vertex AI, AI Studio), OpenAI, Groq, DeepSeek, xAI, OpenRouter, local models (LM Studio, Ollama), and any LangChain-compatible provider
40
- - Customizable middleware pipeline (prompt caching, summarization, or your own)
41
- - All system prompts are editable markdown files
42
-
43
- **Code reviews and PR workflows**
44
- - Review PRs with requirement context pulled from GitHub issues or Jira (`gsloth pr 42 12`)
45
- - Review local diffs before committing (`git --no-pager diff | gsloth review`)
46
- - Run automated reviews in CI/CD — post results as PR comments via GitHub Actions
47
-
48
- **Q&A, chat, and coding sessions**
49
- - Ask questions about specific files (`gsloth ask "explain this" -f utils.js`)
50
- - Interactive chat and coding sessions with filesystem access
51
-
52
- **Output handling**
53
- - Saves all responses to timestamped files (override with `-w/--write-output-to-file`)
54
- - Materializes binary model outputs (e.g. generated images) as local files
55
-
56
- ### To make GSloth work, you need an **API key** from some AI provider, such as:
57
-
58
- - OpenRouter
59
- - Groq;
60
- - DeepSeek;
61
- - Google AI Studio and Google Vertex AI;
62
- - Anthropic;
63
- - OpenAI (and other providers using OpenAI format, such as Inception);
64
- - Local AI: LM Studio, Ollama, llama.cpp (Via OpenAI compatibitlity)
65
- - Ollama with JS config (some of the models, see https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/discussions/107)
66
- - xAI;
67
-
68
- `*` Any other provider supported by LangChain.JS should also work with [JS config](./docs/CONFIGURATION.md#javascript-configuration).
69
-
70
- ## Commands Overview
71
-
72
- `gth` and `gsloth` commands are used interchangeably, both `gsloth pr 42` and `gth pr 42` do the same thing.
73
-
74
- For detailed information about all commands, see [docs/COMMANDS.md](./docs/COMMANDS.md).
75
-
76
- ### Global Flags
77
-
78
- These apply to every command:
79
- - `--config <path>` – load a specific config file without moving directories
80
- - `-i, --identity-profile <name>` – switch to another profile under `.gsloth/.gsloth-settings/<name>/`
81
- - `-w, --write-output-to-file <value>` – control response files (`true` by default, use `-wn`/`-w0` for false, or pass a filename)
82
- - `--verbose` – enable verbose LangChain/LangGraph logs (useful when debugging prompts)
83
-
84
- ### Available Commands:
85
-
86
- - **`init`** - Initialize Gaunt Sloth in your project (auto-detects API keys when called without arguments)
87
- - **`get`** - Inspect the effective prompt or provider-backed input used by another command
88
- - **`pr`** - ⚠️ This feature requires GitHub CLI to be installed. Review pull requests with optional requirement integration (GitHub issues or Jira).
89
- - **`review`** - Review any diff or content from various sources
90
- - **`ask`** - Ask questions about code or programming topics
91
- - **`chat`** - Start an interactive chat session
92
- - **`code`** - Write code interactively with full project context
93
-
94
- ### Quick Examples:
95
-
96
- **Initialize project:**
97
- ```bash
98
- gsloth init # Auto-detect API keys and select provider
99
- gsloth init anthropic # Or specify provider directly
100
- ```
101
-
102
- **Review PR with requirements:**
103
- ```bash
104
- gsloth pr 42 23 # Review PR #42 with GitHub issue #23
105
- ```
106
-
107
- **Inspect command inputs:**
108
- ```bash
109
- gsloth get pr prompt
110
- gsloth get pr content 42
111
- gsloth get review requirements PROJ-123
112
- ```
113
-
114
- **Review local changes:**
115
- ```bash
116
- git --no-pager diff | gsloth review
117
- ```
118
-
119
- **Review changes between a specific tag and the HEAD:**
120
- ```bash
121
- git --no-pager diff v0.8.3..HEAD | gth review
122
- ```
123
-
124
- **Review diff between head and previous release and head using a specific requirements provider (GitHub issue 38), not the one which is configured by default:
125
- ```bash
126
- git --no-pager diff v0.8.10 HEAD | npx gth review --requirements-provider github -r 38
127
- ```
128
-
129
- **Ask questions:**
130
- ```bash
131
- gsloth ask "What does this function do?" -f utils.js
132
- ```
133
-
134
- **Write release notes:**
135
- ```bash
136
- git --no-pager diff v0.8.3..HEAD | gth ask "inspect existing release notes in release-notes/v0_8_2.md; inspect provided diff and write release notes to v0_8_4.md"
137
- ```
138
-
139
- To write this to filesystem, you'd need to add filesystem access to the *ask* command in `.gsloth.config.json`.
140
-
141
- ```json
142
- {"llm": {"type": "vertexai", "model": "gemini-2.5-pro"}, "commands": {"ask": {"filesystem": "all"}}}
143
- ```
144
-
145
- *You can improve this significantly by modifying project guidelines in `.gsloth.guidelines.md` or maybe with keeping instructions in file and feeding it in with `-f`.
146
-
147
-
148
- **Interactive sessions:**
149
- ```bash
150
- gsloth chat # Start chat session
151
- gsloth code # Start coding session
152
- ```
153
- Running `gsloth` with no subcommand also drops you into `chat`.
35
+ `gaunt-sloth-assistant` re-exports public APIs from the sub-packages for backward compatibility. Consumers that previously imported directly from `gaunt-sloth-assistant` continue to work without changes.
154
36
 
155
37
  ## Installation
156
38
 
157
- Tested with Node 24 LTS.
158
-
159
- ### NPM
160
39
  ```bash
161
- npm install gaunt-sloth-assistant -g
162
- ```
163
-
164
- ## Configuration
165
-
166
- > Gaunt Sloth currently only functions from the directory which has a configuration file (`.gsloth.config.js`, `.gsloth.config.json`, or `.gsloth.config.mjs`) and `.gsloth.guidelines.md`. Configuration files can be located in the project root or in the `.gsloth/.gsloth-settings/` directory.
167
- >
168
- > You can also specify a path to a configuration file directly using the `-c` or `--config` global flag, for example `gth -c /path/to/your/config.json ask "who are you?"`
169
- > Note, however, is that project guidelines are going to be used from current directory if they exist and simple install dir prompt is going to be used if nothing found.
170
-
171
- Configuration can be created with `gsloth init [vendor]` command.
172
- Currently, openrouter, anthropic, groq, deepseek, openai, google-genai, vertexai and xai can be configured with `gsloth init [vendor]`.
173
- For OpenAI-compatible providers like Inception, use `gsloth init openai` and modify the configuration.
174
-
175
- More detailed information on configuration can be found in [CONFIGURATION.md](./docs/CONFIGURATION.md)
176
-
177
- Gaunt Sloth also supports `.aiignore` for excluding files from filesystem tools, with overrides via config.
178
-
179
- ### Custom Tools
180
-
181
- Gaunt Sloth supports defining custom shell commands that the AI can execute. These custom tools:
182
- - Work across all commands (`pr`, `review`, `code`, `ask`, `chat`)
183
- - Can be configured globally or per-command
184
- - Support parameters with security validation
185
- - Are useful for deployments, migrations, automation, and more
186
-
187
- **Example configuration:**
188
- ```json
189
- {
190
- "llm": {"type": "vertexai", "model": "gemini-2.5-pro"},
191
- "customTools": {
192
- "deploy": {
193
- "command": "npm run deploy",
194
- "description": "Deploy the application"
195
- },
196
- "run_migration": {
197
- "command": "npm run migrate -- ${name}",
198
- "description": "Run a database migration",
199
- "parameters": {
200
- "name": {"description": "Migration name"}
201
- }
202
- }
203
- }
204
- }
40
+ npm install -g gaunt-sloth-assistant
205
41
  ```
206
42
 
207
- See [Custom Tools Configuration](./docs/CONFIGURATION.md#custom-tools-configuration) for complete documentation.
208
-
209
- ### Google GenAI (AI Studio)
210
-
211
- ```bash
212
- cd ./your-project
213
- gsloth init google-genai
214
- ```
215
- Make sure you either define `GOOGLE_API_KEY` environment variable or edit your configuration file and set up your key.
216
- It is recommended to obtain API key from Google AI Studio official website rather than from a reseller.
217
-
218
- ### Google Vertex AI
219
-
220
- ```bash
221
- cd ./your-project
222
- gsloth init vertexai
223
- gcloud auth login
224
- gcloud auth application-default login
225
- ```
226
-
227
- As of 19 Nov 2025, Gemini 3 on Vertex AI works with `global` and `us-central1` locations when using the default `aiplatform.googleapis.com` endpoint.
228
- However, regional endpoints (e.g., `us-central-aiplatform.googleapis.com`) currently return 404 for Gemini 3.
229
- Example config:
230
- ```json
231
- {
232
- "llm": {
233
- "type": "vertexai",
234
- "model": "gemini-3-pro-preview",
235
- "location": "global"
236
- }
237
- }
238
- ```
239
-
240
- ### Open Router
241
-
242
- ```bash
243
- cd ./your-project
244
- gsloth init openrouter
245
- ```
246
-
247
- Make sure you either define `OPEN_ROUTER_API_KEY` environment variable or edit your configuration file and set up your key.
248
-
249
- ### Anthropic
250
-
251
- ```bash
252
- cd ./your-project
253
- gsloth init anthropic
254
- ```
255
-
256
- Make sure you either define `ANTHROPIC_API_KEY` environment variable or edit your configuration file and set up your key.
257
-
258
- ### Groq
259
- ```bash
260
- cd ./your-project
261
- gsloth init groq
262
- ```
263
- Make sure you either define `GROQ_API_KEY` environment variable or edit your configuration file and set up your key.
264
-
265
- ### DeepSeek
266
- ```bash
267
- cd ./your-project
268
- gsloth init deepseek
269
- ```
270
- Make sure you either define `DEEPSEEK_API_KEY` environment variable or edit your configuration file and set up your key.
271
- It is recommended to obtain API key from DeepSeek official website rather than from a reseller.
272
-
273
- ### OpenAI
274
- ```bash
275
- cd ./your-project
276
- gsloth init openai
277
- ```
278
- Make sure you either define `OPENAI_API_KEY` environment variable or edit your configuration file and set up your key.
279
-
280
- ### LM Studio
281
- LM Studio provides a local OpenAI-compatible server for running models on your machine:
282
- ```bash
283
- cd ./your-project
284
- gsloth init openai
285
- ```
286
- Then edit your configuration file to point to LM Studio (default: `http://127.0.0.1:1234/v1`).
287
- Use any string for the API key (e.g., `"none"`) - LM Studio doesn't validate it.
288
-
289
- **Important:** The model must support tool calling. Tested models include gpt-oss, granite, nemotron, seed, and qwen3.
290
-
291
- See [CONFIGURATION.md](./docs/CONFIGURATION.md#lm-studio) for detailed setup.
292
-
293
- ### OpenAI-compatible providers (Inception, etc.)
294
- For providers using OpenAI-compatible APIs:
295
- ```bash
296
- cd ./your-project
297
- gsloth init openai
298
- ```
299
- Then edit your configuration to add custom base URL and API key. See [CONFIGURATION.md](./docs/CONFIGURATION.md) for examples.
300
-
301
- ### xAI
302
- ```bash
303
- cd ./your-project
304
- gsloth init xai
305
- ```
306
- Make sure you either define `XAI_API_KEY` environment variable or edit your configuration file and set up your key.
307
-
308
- ### Other AI providers
309
- Any other AI provider supported by Langchain.js can be configured with js [Config](./docs/CONFIGURATION.md).
310
- For example, Ollama can be set up with JS config (some of the models, see https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/discussions/107)
311
-
312
- ### JavaScript Configuration with Custom Middleware and Tools
313
- JavaScript configs enable advanced customization including custom middleware and tools that aren't available in JSON configs. See the [JavaScript config example](./examples/js-config/README.md) for a complete demonstration of creating custom logging middleware and custom tools.
314
-
315
- ## Integration with GitHub Workflows / Actions
316
-
317
- Example GitHub workflows integration can be found in [.github/workflows/review.yml;](.github/workflows/review.yml)
318
- this example workflow performs AI review on any pushes to Pull Request, resulting in a comment left by,
319
- GitHub actions bot.
320
-
321
- ## MCP (Model Context Protocol) Servers
322
-
323
- Gaunt Sloth supports connecting to MCP servers, including those requiring OAuth authentication.
324
-
325
- This has been tested with the Atlassian Jira MCP server.
326
- See the [MCP configuration section](./docs/CONFIGURATION.md#model-context-protocol-mcp) for detailed setup instructions, or the [Jira MCP example](./examples/jira-mcp) for a working configuration.
327
-
328
- If you experience issues with the MCP auth try finding `.gsloth` dir in your home directory,
329
- and delete JSON file matching the server you are trying to connect to,
330
- for example for atlassian MCP the file would be `~/.gsloth/.gsloth-auth/mcp.atlassian.com_v1_sse.json`
331
-
332
- ## A2A (Agent-to-Agent) Protocol Support (Experimental)
333
-
334
- Gaunt Sloth supports the [A2A protocol](https://a2a-protocol.org/) for connecting to external AI agents. See [CONFIGURATION.md](./docs/CONFIGURATION.md#a2a-agent-to-agent-protocol-support-experimental) for setup instructions.
335
-
336
- ## Uninstall
337
- Uninstall global NPM package:
338
- ```bash
339
- npm uninstall -g gaunt-sloth-assistant
340
- ```
341
-
342
- Remove global config (if any)
343
- ```bash
344
- rm -r ~/.gsloth
345
- ```
346
-
347
- Remove configs from project (if necessary)
348
- ```bash
349
- rm -r ./.gsloth*
350
- ```
43
+ For full usage documentation see the [root README](../../README.md) and [docs/COMMANDS.md](../../docs/COMMANDS.md).
351
44
 
352
- ## Contributing
353
- Contributions are welcome through GitHub Issues and pull requests.
354
- For contributor workflow, local setup, testing expectations, and PR guidance, see [CONTRIBUTING.md](./CONTRIBUTING.md).
355
- Project participation is also covered by the [Code of Conduct](./CODE_OF_CONDUCT.md).
45
+ ## Related packages
356
46
 
357
- ## License
358
- License is [MIT](https://opensource.org/license/mit). See [LICENSE](LICENSE)
47
+ - [`@gaunt-sloth/core`](../core) — Core utilities, config, and agent infrastructure
48
+ - [`@gaunt-sloth/tools`](../tools) Built-in tools, filesystem toolkit, and middleware registry
49
+ - [`@gaunt-sloth/api`](../api) — API server, AG-UI, MCP, and A2A integration
50
+ - [`@gaunt-sloth/review`](../review) — Review and Q&A modules with standalone CLI
51
+ - [`gaunt-sloth-assistant`](../assistant) — Main CLI application (this package)
@@ -1,31 +1 @@
1
- import { StructuredToolInterface } from '@langchain/core/tools';
2
- import { GthConfig } from '#src/config.js';
3
- import { GthCommand } from '#src/core/types.js';
4
- /**
5
- * Available built-in tools may be configured in JSON config, see `builtInTools` of {@link GthConfig}.
6
- *
7
- * Does not include `filesystem`, because filesystem has its own config in {@link GthConfig}.
8
- */
9
- export declare const AVAILABLE_BUILT_IN_TOOLS: {
10
- /**
11
- * Reference tool. Simply prints provided argument to the screen.
12
- */
13
- readonly gth_status_update: "#src/tools/gthStatusUpdateTool.js";
14
- /**
15
- * Tool allowing to log work against a specific Jira issue.
16
- * Needs JIRA_CLOUD_ID, JIRA_USERNAME and JIRA_API_PAT_TOKEN environment variables
17
- */
18
- readonly gth_jira_log_work: "#src/tools/gthJiraLogWorkTool.js";
19
- /**
20
- * Web fetch tool.
21
- */
22
- readonly gth_web_fetch: "#src/tools/gthWebFetchTool.js";
23
- /**
24
- * A2UI Surface Tool. Allows the LLM to return A2UI JSONL payloads streamed as TOOL_CALL_ARGS events.
25
- */
26
- readonly show_a2ui_surface: "#src/tools/showA2UISurfaceTool.js";
27
- };
28
- /**
29
- * Get default tools based on filesystem and built-in tools configuration
30
- */
31
- export declare function getDefaultTools(config: GthConfig, command?: GthCommand): Promise<StructuredToolInterface[]>;
1
+ export * from '@gaunt-sloth/tools/builtInToolsConfig.js';
@@ -1,143 +1,2 @@
1
- /**
2
- * @packageDocumentation
3
- * Built-in tools config. {@link AVAILABLE_BUILT_IN_TOOLS} has a list of available tools.
4
- */
5
- import GthFileSystemToolkit from '#src/tools/GthFileSystemToolkit.js';
6
- import { displayWarning } from '#src/utils/consoleUtils.js';
7
- import { getCurrentWorkDir } from '#src/utils/systemUtils.js';
8
- import GthDevToolkit from '#src/tools/GthDevToolkit.js';
9
- import GthCustomToolkit from '#src/tools/GthCustomToolkit.js';
10
- /**
11
- * Available built-in tools may be configured in JSON config, see `builtInTools` of {@link GthConfig}.
12
- *
13
- * Does not include `filesystem`, because filesystem has its own config in {@link GthConfig}.
14
- */
15
- export const AVAILABLE_BUILT_IN_TOOLS = {
16
- /**
17
- * Reference tool. Simply prints provided argument to the screen.
18
- */
19
- gth_status_update: '#src/tools/gthStatusUpdateTool.js',
20
- /**
21
- * Tool allowing to log work against a specific Jira issue.
22
- * Needs JIRA_CLOUD_ID, JIRA_USERNAME and JIRA_API_PAT_TOKEN environment variables
23
- */
24
- gth_jira_log_work: '#src/tools/gthJiraLogWorkTool.js',
25
- /**
26
- * Web fetch tool.
27
- */
28
- gth_web_fetch: '#src/tools/gthWebFetchTool.js',
29
- /**
30
- * A2UI Surface Tool. Allows the LLM to return A2UI JSONL payloads streamed as TOOL_CALL_ARGS events.
31
- */
32
- show_a2ui_surface: '#src/tools/showA2UISurfaceTool.js',
33
- };
34
- /**
35
- * Get default tools based on filesystem and built-in tools configuration
36
- */
37
- export async function getDefaultTools(config, command) {
38
- const filesystemTools = filterFilesystemTools(config.filesystem, config.aiignore, config.binaryFormats);
39
- const builtInTools = await getBuiltInTools(config);
40
- const devTools = await filterDevTools(command, config.commands?.code?.devTools);
41
- const customTools = getCustomTools(config, command);
42
- return [...filesystemTools, ...devTools, ...customTools, ...builtInTools];
43
- }
44
- async function filterDevTools(command, devToolConfig) {
45
- if (command != 'code' || !devToolConfig) {
46
- return [];
47
- }
48
- const toolkit = new GthDevToolkit(devToolConfig);
49
- return [...toolkit.getTools()];
50
- }
51
- /**
52
- * Get custom tools based on configuration.
53
- * Supports global customTools and per-command overrides.
54
- */
55
- function getCustomTools(config, command) {
56
- // Determine which custom tools to use
57
- let toolsConfig;
58
- if (command && config.commands?.[command]) {
59
- const cmdConfig = config.commands[command];
60
- // Check if command has customTools override
61
- if ('customTools' in cmdConfig) {
62
- toolsConfig = cmdConfig.customTools;
63
- }
64
- else {
65
- // No override, use root-level
66
- toolsConfig = config.customTools;
67
- }
68
- }
69
- else {
70
- // No command specified or no command config, use root-level
71
- toolsConfig = config.customTools;
72
- }
73
- // If explicitly disabled or empty, return no tools
74
- if (toolsConfig === false || !toolsConfig || Object.keys(toolsConfig).length === 0) {
75
- return [];
76
- }
77
- // Create toolkit with the determined config
78
- const toolkit = new GthCustomToolkit(toolsConfig);
79
- return toolkit.getTools();
80
- }
81
- /**
82
- * Filter filesystem tools based on configuration
83
- */
84
- function filterFilesystemTools(filesystemConfig, aiignoreConfig, binaryFormats) {
85
- const toolkit = new GthFileSystemToolkit({
86
- allowedDirectories: [getCurrentWorkDir()],
87
- aiignoreConfig,
88
- binaryFormats,
89
- });
90
- if (filesystemConfig === 'all') {
91
- return toolkit.getTools();
92
- }
93
- if (filesystemConfig === 'none') {
94
- return [];
95
- }
96
- if (filesystemConfig === 'read') {
97
- // Read-only: only allow read operations
98
- return toolkit.getFilteredTools(['read']);
99
- }
100
- if (!Array.isArray(filesystemConfig)) {
101
- return toolkit.getTools();
102
- }
103
- if (filesystemConfig.includes('all')) {
104
- return toolkit.getTools();
105
- }
106
- // Handle an array of specific tool names or 'read'/'all'
107
- const allowedTools = filesystemConfig.includes('read')
108
- ? toolkit.getFilteredTools(['read'])
109
- : [];
110
- // Also allow specific tool names
111
- const allowedToolNames = new Set(filesystemConfig.filter((name) => name !== 'read' && name !== 'all'));
112
- const specificNamedTools = toolkit.getTools().filter((tool) => {
113
- return tool.name && allowedToolNames.has(tool.name);
114
- });
115
- // Combine and deduplicate
116
- const allAllowedTools = [...allowedTools, ...specificNamedTools];
117
- return allAllowedTools.filter((tool, index, arr) => arr.findIndex((t) => t.name === tool.name) === index);
118
- }
119
- /**
120
- * Get built-in tools based on configuration
121
- */
122
- async function getBuiltInTools(config) {
123
- const tools = [];
124
- if (!config.builtInTools) {
125
- return tools;
126
- }
127
- for (const toolName of config.builtInTools) {
128
- if (toolName in AVAILABLE_BUILT_IN_TOOLS) {
129
- try {
130
- const tool = await import(AVAILABLE_BUILT_IN_TOOLS[toolName]);
131
- tools.push(tool.get(config));
132
- }
133
- catch (error) {
134
- displayWarning(`Failed to load built-in tool '${toolName}': ${error}`);
135
- }
136
- }
137
- else {
138
- displayWarning(`Unknown built-in tool: ${toolName}`);
139
- }
140
- }
141
- return tools;
142
- }
1
+ export * from '@gaunt-sloth/tools/builtInToolsConfig.js';
143
2
  //# sourceMappingURL=builtInToolsConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"builtInToolsConfig.js","sourceRoot":"","sources":["../src/builtInToolsConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,oBAAoB,MAAM,oCAAoC,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAE9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;;OAEG;IACH,iBAAiB,EAAE,mCAAmC;IACtD;;;OAGG;IACH,iBAAiB,EAAE,kCAAkC;IACrD;;OAEG;IACH,aAAa,EAAE,+BAA+B;IAC9C;;OAEG;IACH,iBAAiB,EAAE,mCAAmC;CAC9C,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAiB,EACjB,OAAoB;IAEpB,MAAM,eAAe,GAAG,qBAAqB,CAC3C,MAAM,CAAC,UAAU,EACjB,MAAM,CAAC,QAA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,MAAM,KAAK,EAAE,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;aAAM,CAAC;YACN,cAAc,CAAC,0BAA0B,QAAQ,EAAE,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"builtInToolsConfig.js","sourceRoot":"","sources":["../src/builtInToolsConfig.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC"}
package/dist/cli.js CHANGED
@@ -7,8 +7,8 @@ import { chatCommand } from '#src/commands/chatCommand.js';
7
7
  import { codeCommand } from '#src/commands/codeCommand.js';
8
8
  import { apiCommand } from '#src/commands/apiCommand.js';
9
9
  import { getCommand } from '#src/commands/getCommand.js';
10
- import { argv, getSlothVersion, readStdin } from '#src/utils/systemUtils.js';
11
- import { coerceBooleanOrString } from '#src/utils/consoleUtils.js';
10
+ import { argv, getSlothVersion, readStdin } from '@gaunt-sloth/core/utils/systemUtils.js';
11
+ import { coerceBooleanOrString } from '@gaunt-sloth/core/utils/consoleUtils.js';
12
12
  const program = new Command();
13
13
  program
14
14
  .name('gsloth')
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE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E;AAC7E,MAAM,OAAO,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;AACnD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;IAC1B,kBAAkB,CAAC,iBAAiB,GAAG,OAAO,CAAC;AACjD,CAAC;AAED,sEAAsE;AACtE,WAAW,CAAC,OAAO,CAAC,CAAC;AACrB,aAAa,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AAC3C,SAAS,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACvC,UAAU,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACxC,WAAW,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACzC,WAAW,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACzC,UAAU,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACxC,UAAU,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AAExC,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { Command } from 'commander';
2
- import { CommandLineConfigOverrides } from '#src/config.js';
2
+ import { CommandLineConfigOverrides } from '@gaunt-sloth/core/config.js';
3
3
  export declare function apiCommand(program: Command, commandLineConfigOverrides: CommandLineConfigOverrides): void;
@@ -1,6 +1,6 @@
1
- import { initConfig } from '#src/config.js';
2
- import { displayError } from '#src/utils/consoleUtils.js';
3
- import { setExitCode } from '#src/utils/systemUtils.js';
1
+ import { initConfig } from '@gaunt-sloth/core/config.js';
2
+ import { displayError } from '@gaunt-sloth/core/utils/consoleUtils.js';
3
+ import { setExitCode } from '@gaunt-sloth/core/utils/systemUtils.js';
4
4
  export function apiCommand(program, commandLineConfigOverrides) {
5
5
  const api = program.command('api').description('Start an API server for Gaunt Sloth');
6
6
  api
@@ -13,7 +13,7 @@ export function apiCommand(program, commandLineConfigOverrides) {
13
13
  const port = options.port
14
14
  ? parseInt(options.port, 10)
15
15
  : (config.commands?.api?.port ?? 3000);
16
- const { startAgUiServer } = await import('#src/modules/apiAgUiModule.js');
16
+ const { startAgUiServer } = await import('@gaunt-sloth/api/modules/apiAgUiModule.js');
17
17
  await startAgUiServer(config, port);
18
18
  }
19
19
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"apiCommand.js","sourceRoot":"","sources":["../../src/commands/apiCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,UAAU,UAAU,CACxB,OAAgB,EAChB,0BAAsD;IAEtD,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,qCAAqC,CAAC,CAAC;IAEtF,GAAG;SACA,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,qCAAqC,CAAC;SAClD,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC;SAC5C,MAAM,CAAC,KAAK,EAAE,OAA0B,EAAE,EAAE;QAC3C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,0BAA0B,CAAC,CAAC;YAC5D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI;gBACvB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;gBAC5B,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC;YAEzC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;YAC1E,MAAM,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,YAAY,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC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AM,CAAC,KAAK,CAAC,CAAC,CAAC;YACrE,WAAW,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Command } from 'commander';
2
- import { CommandLineConfigOverrides } from '#src/config.js';
2
+ import { CommandLineConfigOverrides } from '@gaunt-sloth/core/config.js';
3
3
  /**
4
4
  * Adds the ask command to the program
5
5
  * @param program - The commander program