gaunt-sloth-assistant 1.4.1 → 1.5.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.
Files changed (213) hide show
  1. package/README.md +32 -339
  2. package/package.json +17 -49
  3. package/.gsloth.backstory.md +0 -17
  4. package/.gsloth.chat.md +0 -11
  5. package/.gsloth.code.md +0 -27
  6. package/.gsloth.guidelines.md +0 -1
  7. package/.gsloth.review.md +0 -15
  8. package/.gsloth.system.md +0 -10
  9. package/LICENSE +0 -7
  10. package/dist/builtInToolsConfig.d.ts +0 -31
  11. package/dist/builtInToolsConfig.js +0 -143
  12. package/dist/builtInToolsConfig.js.map +0 -1
  13. package/dist/cli.d.ts +0 -1
  14. package/dist/cli.js +0 -60
  15. package/dist/cli.js.map +0 -1
  16. package/dist/commands/apiCommand.d.ts +0 -3
  17. package/dist/commands/apiCommand.js +0 -25
  18. package/dist/commands/apiCommand.js.map +0 -1
  19. package/dist/commands/askCommand.d.ts +0 -8
  20. package/dist/commands/askCommand.js +0 -38
  21. package/dist/commands/askCommand.js.map +0 -1
  22. package/dist/commands/chatCommand.d.ts +0 -3
  23. package/dist/commands/chatCommand.js +0 -24
  24. package/dist/commands/chatCommand.js.map +0 -1
  25. package/dist/commands/codeCommand.d.ts +0 -3
  26. package/dist/commands/codeCommand.js +0 -19
  27. package/dist/commands/codeCommand.js.map +0 -1
  28. package/dist/commands/commandIntrospection.d.ts +0 -11
  29. package/dist/commands/commandIntrospection.js +0 -57
  30. package/dist/commands/commandIntrospection.js.map +0 -1
  31. package/dist/commands/commandUtils.d.ts +0 -25
  32. package/dist/commands/commandUtils.js +0 -51
  33. package/dist/commands/commandUtils.js.map +0 -1
  34. package/dist/commands/getCommand.d.ts +0 -3
  35. package/dist/commands/getCommand.js +0 -45
  36. package/dist/commands/getCommand.js.map +0 -1
  37. package/dist/commands/initCommand.d.ts +0 -16
  38. package/dist/commands/initCommand.js +0 -89
  39. package/dist/commands/initCommand.js.map +0 -1
  40. package/dist/commands/prCommand.d.ts +0 -3
  41. package/dist/commands/prCommand.js +0 -60
  42. package/dist/commands/prCommand.js.map +0 -1
  43. package/dist/commands/reviewCommand.d.ts +0 -3
  44. package/dist/commands/reviewCommand.js +0 -50
  45. package/dist/commands/reviewCommand.js.map +0 -1
  46. package/dist/config.d.ts +0 -506
  47. package/dist/config.js +0 -433
  48. package/dist/config.js.map +0 -1
  49. package/dist/constants.d.ts +0 -13
  50. package/dist/constants.js +0 -14
  51. package/dist/constants.js.map +0 -1
  52. package/dist/core/GthAgentRunner.d.ts +0 -27
  53. package/dist/core/GthAgentRunner.js +0 -107
  54. package/dist/core/GthAgentRunner.js.map +0 -1
  55. package/dist/core/GthLangChainAgent.d.ts +0 -64
  56. package/dist/core/GthLangChainAgent.js +0 -415
  57. package/dist/core/GthLangChainAgent.js.map +0 -1
  58. package/dist/core/types.d.ts +0 -26
  59. package/dist/core/types.js +0 -16
  60. package/dist/core/types.js.map +0 -1
  61. package/dist/helpers/jira/jiraClient.d.ts +0 -11
  62. package/dist/helpers/jira/jiraClient.js +0 -83
  63. package/dist/helpers/jira/jiraClient.js.map +0 -1
  64. package/dist/helpers/jira/jiraLogWork.d.ts +0 -2
  65. package/dist/helpers/jira/jiraLogWork.js +0 -53
  66. package/dist/helpers/jira/jiraLogWork.js.map +0 -1
  67. package/dist/mcp/OAuthClientProviderImpl.d.ts +0 -37
  68. package/dist/mcp/OAuthClientProviderImpl.js +0 -223
  69. package/dist/mcp/OAuthClientProviderImpl.js.map +0 -1
  70. package/dist/middleware/binaryContentInjectionMiddleware.d.ts +0 -22
  71. package/dist/middleware/binaryContentInjectionMiddleware.js +0 -125
  72. package/dist/middleware/binaryContentInjectionMiddleware.js.map +0 -1
  73. package/dist/middleware/registry.d.ts +0 -34
  74. package/dist/middleware/registry.js +0 -132
  75. package/dist/middleware/registry.js.map +0 -1
  76. package/dist/middleware/reviewRateMiddleware.d.ts +0 -38
  77. package/dist/middleware/reviewRateMiddleware.js +0 -103
  78. package/dist/middleware/reviewRateMiddleware.js.map +0 -1
  79. package/dist/middleware/types.d.ts +0 -92
  80. package/dist/middleware/types.js +0 -9
  81. package/dist/middleware/types.js.map +0 -1
  82. package/dist/modules/a2a/A2AClientWrapper.d.ts +0 -22
  83. package/dist/modules/a2a/A2AClientWrapper.js +0 -63
  84. package/dist/modules/a2a/A2AClientWrapper.js.map +0 -1
  85. package/dist/modules/apiAgUiModule.d.ts +0 -2
  86. package/dist/modules/apiAgUiModule.js +0 -189
  87. package/dist/modules/apiAgUiModule.js.map +0 -1
  88. package/dist/modules/interactiveSessionModule.d.ts +0 -9
  89. package/dist/modules/interactiveSessionModule.js +0 -101
  90. package/dist/modules/interactiveSessionModule.js.map +0 -1
  91. package/dist/modules/questionAnsweringModule.d.ts +0 -8
  92. package/dist/modules/questionAnsweringModule.js +0 -49
  93. package/dist/modules/questionAnsweringModule.js.map +0 -1
  94. package/dist/modules/reviewModule.d.ts +0 -2
  95. package/dist/modules/reviewModule.js +0 -85
  96. package/dist/modules/reviewModule.js.map +0 -1
  97. package/dist/modules/types.d.ts +0 -18
  98. package/dist/modules/types.js +0 -2
  99. package/dist/modules/types.js.map +0 -1
  100. package/dist/presets/anthropic.d.ts +0 -7
  101. package/dist/presets/anthropic.js +0 -34
  102. package/dist/presets/anthropic.js.map +0 -1
  103. package/dist/presets/deepseek.d.ts +0 -4
  104. package/dist/presets/deepseek.js +0 -30
  105. package/dist/presets/deepseek.js.map +0 -1
  106. package/dist/presets/fake.d.ts +0 -3
  107. package/dist/presets/fake.js +0 -12
  108. package/dist/presets/fake.js.map +0 -1
  109. package/dist/presets/google-genai.d.ts +0 -7
  110. package/dist/presets/google-genai.js +0 -34
  111. package/dist/presets/google-genai.js.map +0 -1
  112. package/dist/presets/groq.d.ts +0 -4
  113. package/dist/presets/groq.js +0 -30
  114. package/dist/presets/groq.js.map +0 -1
  115. package/dist/presets/openai.d.ts +0 -5
  116. package/dist/presets/openai.js +0 -46
  117. package/dist/presets/openai.js.map +0 -1
  118. package/dist/presets/openrouter.d.ts +0 -5
  119. package/dist/presets/openrouter.js +0 -57
  120. package/dist/presets/openrouter.js.map +0 -1
  121. package/dist/presets/vertexai.d.ts +0 -7
  122. package/dist/presets/vertexai.js +0 -41
  123. package/dist/presets/vertexai.js.map +0 -1
  124. package/dist/presets/xai.d.ts +0 -4
  125. package/dist/presets/xai.js +0 -30
  126. package/dist/presets/xai.js.map +0 -1
  127. package/dist/providers/file.d.ts +0 -8
  128. package/dist/providers/file.js +0 -20
  129. package/dist/providers/file.js.map +0 -1
  130. package/dist/providers/ghIssueProvider.d.ts +0 -8
  131. package/dist/providers/ghIssueProvider.js +0 -34
  132. package/dist/providers/ghIssueProvider.js.map +0 -1
  133. package/dist/providers/ghPrDiffProvider.d.ts +0 -8
  134. package/dist/providers/ghPrDiffProvider.js +0 -29
  135. package/dist/providers/ghPrDiffProvider.js.map +0 -1
  136. package/dist/providers/jiraIssueLegacyProvider.d.ts +0 -8
  137. package/dist/providers/jiraIssueLegacyProvider.js +0 -74
  138. package/dist/providers/jiraIssueLegacyProvider.js.map +0 -1
  139. package/dist/providers/jiraIssueProvider.d.ts +0 -11
  140. package/dist/providers/jiraIssueProvider.js +0 -62
  141. package/dist/providers/jiraIssueProvider.js.map +0 -1
  142. package/dist/providers/text.d.ts +0 -8
  143. package/dist/providers/text.js +0 -10
  144. package/dist/providers/text.js.map +0 -1
  145. package/dist/providers/types.d.ts +0 -33
  146. package/dist/providers/types.js +0 -2
  147. package/dist/providers/types.js.map +0 -1
  148. package/dist/state/artifactStore.d.ts +0 -21
  149. package/dist/state/artifactStore.js +0 -30
  150. package/dist/state/artifactStore.js.map +0 -1
  151. package/dist/tools/A2AAgentTool.d.ts +0 -24
  152. package/dist/tools/A2AAgentTool.js +0 -37
  153. package/dist/tools/A2AAgentTool.js.map +0 -1
  154. package/dist/tools/GthCustomToolkit.d.ts +0 -41
  155. package/dist/tools/GthCustomToolkit.js +0 -280
  156. package/dist/tools/GthCustomToolkit.js.map +0 -1
  157. package/dist/tools/GthDevToolkit.d.ts +0 -24
  158. package/dist/tools/GthDevToolkit.js +0 -189
  159. package/dist/tools/GthDevToolkit.js.map +0 -1
  160. package/dist/tools/GthFileSystemToolkit.d.ts +0 -36
  161. package/dist/tools/GthFileSystemToolkit.js +0 -776
  162. package/dist/tools/GthFileSystemToolkit.js.map +0 -1
  163. package/dist/tools/binaryUtils.d.ts +0 -13
  164. package/dist/tools/binaryUtils.js +0 -55
  165. package/dist/tools/binaryUtils.js.map +0 -1
  166. package/dist/tools/gthJiraLogWorkTool.d.ts +0 -3
  167. package/dist/tools/gthJiraLogWorkTool.js +0 -37
  168. package/dist/tools/gthJiraLogWorkTool.js.map +0 -1
  169. package/dist/tools/gthStatusUpdateTool.d.ts +0 -2
  170. package/dist/tools/gthStatusUpdateTool.js +0 -15
  171. package/dist/tools/gthStatusUpdateTool.js.map +0 -1
  172. package/dist/tools/gthWebFetchTool.d.ts +0 -2
  173. package/dist/tools/gthWebFetchTool.js +0 -47
  174. package/dist/tools/gthWebFetchTool.js.map +0 -1
  175. package/dist/tools/showA2UISurfaceTool.d.ts +0 -9
  176. package/dist/tools/showA2UISurfaceTool.js +0 -25
  177. package/dist/tools/showA2UISurfaceTool.js.map +0 -1
  178. package/dist/utils/ProgressIndicator.d.ts +0 -7
  179. package/dist/utils/ProgressIndicator.js +0 -26
  180. package/dist/utils/ProgressIndicator.js.map +0 -1
  181. package/dist/utils/aiignoreUtils.d.ts +0 -29
  182. package/dist/utils/aiignoreUtils.js +0 -83
  183. package/dist/utils/aiignoreUtils.js.map +0 -1
  184. package/dist/utils/binaryOutputUtils.d.ts +0 -13
  185. package/dist/utils/binaryOutputUtils.js +0 -138
  186. package/dist/utils/binaryOutputUtils.js.map +0 -1
  187. package/dist/utils/consoleUtils.d.ts +0 -76
  188. package/dist/utils/consoleUtils.js +0 -230
  189. package/dist/utils/consoleUtils.js.map +0 -1
  190. package/dist/utils/debugUtils.d.ts +0 -20
  191. package/dist/utils/debugUtils.js +0 -89
  192. package/dist/utils/debugUtils.js.map +0 -1
  193. package/dist/utils/fileUtils.d.ts +0 -75
  194. package/dist/utils/fileUtils.js +0 -231
  195. package/dist/utils/fileUtils.js.map +0 -1
  196. package/dist/utils/globalConfigUtils.d.ts +0 -28
  197. package/dist/utils/globalConfigUtils.js +0 -61
  198. package/dist/utils/globalConfigUtils.js.map +0 -1
  199. package/dist/utils/llmUtils.d.ts +0 -39
  200. package/dist/utils/llmUtils.js +0 -153
  201. package/dist/utils/llmUtils.js.map +0 -1
  202. package/dist/utils/mcpUtils.d.ts +0 -13
  203. package/dist/utils/mcpUtils.js +0 -225
  204. package/dist/utils/mcpUtils.js.map +0 -1
  205. package/dist/utils/stringUtils.d.ts +0 -4
  206. package/dist/utils/stringUtils.js +0 -10
  207. package/dist/utils/stringUtils.js.map +0 -1
  208. package/dist/utils/systemUtils.d.ts +0 -63
  209. package/dist/utils/systemUtils.js +0 -207
  210. package/dist/utils/systemUtils.js.map +0 -1
  211. package/dist/utils/vertexaiUtils.d.ts +0 -2
  212. package/dist/utils/vertexaiUtils.js +0 -18
  213. package/dist/utils/vertexaiUtils.js.map +0 -1
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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaunt-sloth-assistant",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": "Andrew Kondratev",
@@ -10,6 +10,10 @@
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant.git"
12
12
  },
13
+ "bugs": {
14
+ "url": "https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/issues"
15
+ },
16
+ "homepage": "https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant#readme",
13
17
  "keywords": [
14
18
  "ai",
15
19
  "agent",
@@ -22,17 +26,7 @@
22
26
  "npm": ">=11.0.0"
23
27
  },
24
28
  "scripts": {
25
- "clean": "tsc -b -clean",
26
- "build": "tsc -b -clean && tsc",
27
- "test": "npm run build && npx tsc -p spec/tsconfig.json --noEmit && vitest run",
28
- "it": "npm run build && node it.js",
29
- "it-verbose": "npm run build && GSLOTH_IT_VERBOSE=1 node it.js",
30
- "lint": "eslint . --ext .js,.ts",
31
- "lint-n-fix": "eslint . --ext .js,.ts --fix",
32
- "format": "prettier --write 'src/**/*.{js,ts}'",
33
- "prepare": "npm run build",
34
- "typedoc": "typedoc",
35
- "chat": "node cli.js"
29
+ "build": "tsc"
36
30
  },
37
31
  "bin": {
38
32
  "gaunt-sloth-assistant": "cli.js",
@@ -41,44 +35,18 @@
41
35
  "gth": "cli.js"
42
36
  },
43
37
  "dependencies": {
44
- "@a2a-js/sdk": "^0.3.13",
45
- "@ag-ui/core": "^0.0.47",
46
- "@ag-ui/encoder": "^0.0.47",
47
- "@langchain/anthropic": "^1.3.25",
48
- "@langchain/core": "^1.1.35",
49
- "@langchain/deepseek": "^1.0.18",
50
- "@langchain/google": "^0.1.8",
51
- "@langchain/groq": "^1.1.5",
52
- "@langchain/langgraph": "^1.2.5",
53
- "@langchain/mcp-adapters": "^1.1.3",
38
+ "@gaunt-sloth/api": "^0.0.3",
39
+ "@gaunt-sloth/core": "^0.0.4",
40
+ "@gaunt-sloth/review": "^0.0.4",
41
+ "@gaunt-sloth/tools": "^0.0.1",
42
+ "@langchain/anthropic": "^1.3.28",
43
+ "@langchain/core": "^1.1.42",
44
+ "@langchain/deepseek": "^1.0.25",
45
+ "@langchain/google": "^0.1.11",
46
+ "@langchain/groq": "^1.2.0",
54
47
  "@langchain/openai": "^1.2.0",
55
- "@langchain/xai": "^1.3.10",
56
- "@modelcontextprotocol/sdk": "^1.27.1",
57
- "commander": "^14.0.3",
58
- "diff": "^8.0.3",
59
- "express": "^5.2.1",
60
- "langchain": "^1.2.36",
61
- "minimatch": "^10.2.4"
62
- },
63
- "devDependencies": {
64
- "@eslint/js": "^10.0.1",
65
- "@types/express": "^5.0.6",
66
- "@types/node": "^24.12.0",
67
- "@typescript-eslint/eslint-plugin": "^8.57.1",
68
- "@typescript-eslint/parser": "^8.57.1",
69
- "eslint": "^10.1.0",
70
- "eslint-config-prettier": "^10.1.8",
71
- "eslint-plugin-prettier": "^5.5.5",
72
- "globals": "^17.4.0",
73
- "jiti": "^2.6.1",
74
- "prettier": "^3.8.1",
75
- "typedoc": "^0.28.17",
76
- "typescript": "^5.9.3",
77
- "vitest": "^4.1.0"
78
- },
79
- "overrides": {
80
- "rimraf": "^6.1.0",
81
- "minimatch": "^10.2.4"
48
+ "@langchain/xai": "^1.3.17",
49
+ "commander": "^14.0.3"
82
50
  },
83
51
  "imports": {
84
52
  "#src/*.js": "./dist/*.js"
@@ -1,17 +0,0 @@
1
- Your name is Gaunt Sloth, a programmer with comprehensive expertise across programming languages. Maintain a
2
- professional, direct communication style. Begin responses with substance, not pleasantries or self-promotion.
3
-
4
- Your priority is code correctness and bug prevention over social niceties, though you remain courteous in all
5
- interactions. Focus on technical accuracy and practical solutions.
6
-
7
- Use visual indicators when providing feedback:
8
-
9
- - ✅ for correct implementations (and approvals)
10
- - ⚠️ for potential issues or areas needing attention
11
- - ❌ for errors or problematic approaches (and rejections)
12
-
13
- You may enhance communication with relevant emojis throughout your responses to improve clarity and readability,
14
- but do not include foolish smiley faces.
15
-
16
- Never include decorative emojis within code snippets — only use them in code when they're part of the actual
17
- logic, string literals, or were present in the original code being discussed.
package/.gsloth.chat.md DELETED
@@ -1,11 +0,0 @@
1
- # Chat Mode Instructions
2
-
3
- You are a helpful AI assistant engaged in a conversational chat session. Your role is to:
4
-
5
- - Provide informative, accurate, and helpful responses to user queries
6
- - Maintain context throughout the conversation
7
- - Be conversational and friendly while remaining professional
8
- - Ask clarifying questions when needed to better understand the user's intent
9
- - Provide examples and explanations when appropriate
10
-
11
- Remember that this is an interactive chat session, so keep your responses concise and engaging. Focus on being helpful while maintaining a natural conversational flow.
package/.gsloth.code.md DELETED
@@ -1,27 +0,0 @@
1
- # Code Mode Instructions
2
-
3
- You are an AI coding assistant with full file system access within the user's project. Your role is to:
4
-
5
- - Help write, modify, and debug code
6
- - Understand and work with the existing codebase
7
- - Follow project conventions and best practices
8
- - Create, read, update, and delete files as needed to complete coding tasks
9
- - Run commands and scripts to test and validate changes
10
- - Provide clear explanations of the changes you make
11
-
12
- You have access to the entire project directory and can:
13
- - Navigate the file system
14
- - Read and analyze existing code
15
- - Make modifications to implement features or fix bugs
16
- - Create new files and directories as needed
17
- - Execute commands to run tests, build the project or run static analysis (lint)
18
-
19
- Focus on writing clean, maintainable code that follows the project's established patterns and conventions. Always test your changes when possible and explain what you're doing and why.
20
-
21
- ## Running tests
22
-
23
- - When working on functionality always prefer running a single test, over the entire suite;
24
- - Abstain from running tests in circles, run the test once, if it fails — inspect the output carefully and try to fix it;
25
- - Run full tests suite as a penultimate step, when everything is fixed, but before running the lint;
26
- - Run lint only as a final step when everything else is fixed;
27
- - If nothing seems to work, ask for user's assistance;
@@ -1 +0,0 @@
1
-
package/.gsloth.review.md DELETED
@@ -1,15 +0,0 @@
1
- If requirements were provided, first check that the implemented code implements these requirements.
2
- Document that you checked the code to implement requirements.
3
- Reject the change if it appears to implement something else instead of required change.
4
-
5
- Provide specific feedback on any areas of concern or suggestions for improvement.
6
- Please categorize your feedback (e.g., "Bug," "Suggestion," "Nitpick").
7
-
8
- Important! In the end, conclude if you would recommend approving this PR or not.
9
- Use ✅⚠️❌ symbols to highlight your feedback appropriately.
10
-
11
- Finish with a short 1-2 sentence summary that captures the overall state of the review.
12
-
13
- Thank you for your thorough review!
14
-
15
- Important! You are likely to be dealing with git diff below, please don't confuse removed and added lines.
package/.gsloth.system.md DELETED
@@ -1,10 +0,0 @@
1
- # Filesystem Context
2
-
3
- When the user mentions directories and files without specifying an exact location, this is likely referring to files in the current working directory (`.`).
4
-
5
- For example:
6
- - "Read the config file" likely means a configuration file in the current directory
7
- - "Check the tests" likely refers to test files in the current project
8
- - "Look at the source code" typically means source files in the current directory structure
9
-
10
- Always consider the current working directory as the default context for file operations unless the user specifies an absolute path or different location.
package/LICENSE DELETED
@@ -1,7 +0,0 @@
1
- Copyright 2025-present Andrew Kondratev
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
7
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,31 +0,0 @@
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[]>;