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.
- package/README.md +32 -339
- package/dist/builtInToolsConfig.d.ts +1 -31
- package/dist/builtInToolsConfig.js +1 -142
- package/dist/builtInToolsConfig.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/apiCommand.d.ts +1 -1
- package/dist/commands/apiCommand.js +4 -4
- package/dist/commands/apiCommand.js.map +1 -1
- package/dist/commands/askCommand.d.ts +1 -1
- package/dist/commands/askCommand.js +7 -6
- package/dist/commands/askCommand.js.map +1 -1
- package/dist/commands/chatCommand.d.ts +1 -1
- package/dist/commands/chatCommand.js +2 -2
- package/dist/commands/chatCommand.js.map +1 -1
- package/dist/commands/codeCommand.d.ts +1 -1
- package/dist/commands/codeCommand.js +2 -2
- package/dist/commands/codeCommand.js.map +1 -1
- package/dist/commands/commandIntrospection.d.ts +1 -1
- package/dist/commands/commandIntrospection.js +1 -1
- package/dist/commands/commandIntrospection.js.map +1 -1
- package/dist/commands/commandUtils.d.ts +11 -13
- package/dist/commands/commandUtils.js +13 -15
- package/dist/commands/commandUtils.js.map +1 -1
- package/dist/commands/configSetup.d.ts +7 -0
- package/dist/commands/configSetup.js +63 -0
- package/dist/commands/configSetup.js.map +1 -0
- package/dist/commands/getCommand.d.ts +1 -1
- package/dist/commands/getCommand.js +3 -3
- package/dist/commands/getCommand.js.map +1 -1
- package/dist/commands/initCommand.js +4 -3
- package/dist/commands/initCommand.js.map +1 -1
- package/dist/commands/prCommand.d.ts +1 -1
- package/dist/commands/prCommand.js +8 -7
- package/dist/commands/prCommand.js.map +1 -1
- package/dist/commands/reviewCommand.d.ts +1 -1
- package/dist/commands/reviewCommand.js +7 -6
- package/dist/commands/reviewCommand.js.map +1 -1
- package/dist/config.d.ts +1 -506
- package/dist/config.js +1 -432
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +1 -13
- package/dist/constants.js +1 -13
- package/dist/constants.js.map +1 -1
- package/dist/core/GthAgentRunner.d.ts +1 -27
- package/dist/core/GthAgentRunner.js +1 -106
- package/dist/core/GthAgentRunner.js.map +1 -1
- package/dist/core/GthLangChainAgent.d.ts +1 -64
- package/dist/core/GthLangChainAgent.js +1 -414
- package/dist/core/GthLangChainAgent.js.map +1 -1
- package/dist/core/types.d.ts +1 -26
- package/dist/core/types.js +1 -15
- package/dist/core/types.js.map +1 -1
- package/dist/helpers/jira/jiraClient.d.ts +1 -11
- package/dist/helpers/jira/jiraClient.js +1 -82
- package/dist/helpers/jira/jiraClient.js.map +1 -1
- package/dist/helpers/jira/jiraLogWork.d.ts +1 -1
- package/dist/helpers/jira/jiraLogWork.js +3 -3
- package/dist/helpers/jira/jiraLogWork.js.map +1 -1
- package/dist/mcp/OAuthClientProviderImpl.d.ts +1 -37
- package/dist/mcp/OAuthClientProviderImpl.js +1 -222
- package/dist/mcp/OAuthClientProviderImpl.js.map +1 -1
- package/dist/middleware/binaryContentInjectionMiddleware.d.ts +1 -22
- package/dist/middleware/binaryContentInjectionMiddleware.js +1 -124
- package/dist/middleware/binaryContentInjectionMiddleware.js.map +1 -1
- package/dist/middleware/registry.d.ts +1 -34
- package/dist/middleware/registry.js +1 -131
- package/dist/middleware/registry.js.map +1 -1
- package/dist/middleware/reviewRateMiddleware.d.ts +1 -38
- package/dist/middleware/reviewRateMiddleware.js +1 -102
- package/dist/middleware/reviewRateMiddleware.js.map +1 -1
- package/dist/middleware/types.d.ts +1 -92
- package/dist/middleware/types.js +1 -8
- package/dist/middleware/types.js.map +1 -1
- package/dist/modules/a2a/A2AClientWrapper.d.ts +1 -22
- package/dist/modules/a2a/A2AClientWrapper.js +1 -62
- package/dist/modules/a2a/A2AClientWrapper.js.map +1 -1
- package/dist/modules/apiAgUiModule.d.ts +1 -2
- package/dist/modules/apiAgUiModule.js +1 -188
- package/dist/modules/apiAgUiModule.js.map +1 -1
- package/dist/modules/interactiveSessionModule.d.ts +1 -9
- package/dist/modules/interactiveSessionModule.js +1 -100
- package/dist/modules/interactiveSessionModule.js.map +1 -1
- package/dist/modules/questionAnsweringModule.d.ts +1 -8
- package/dist/modules/questionAnsweringModule.js +1 -48
- package/dist/modules/questionAnsweringModule.js.map +1 -1
- package/dist/modules/reviewModule.d.ts +1 -2
- package/dist/modules/reviewModule.js +1 -84
- package/dist/modules/reviewModule.js.map +1 -1
- package/dist/modules/types.d.ts +1 -18
- package/dist/modules/types.js +1 -1
- package/dist/modules/types.js.map +1 -1
- package/dist/presets/anthropic.d.ts +1 -7
- package/dist/presets/anthropic.js +1 -33
- package/dist/presets/anthropic.js.map +1 -1
- package/dist/presets/deepseek.d.ts +1 -4
- package/dist/presets/deepseek.js +1 -29
- package/dist/presets/deepseek.js.map +1 -1
- package/dist/presets/fake.d.ts +1 -3
- package/dist/presets/fake.js +1 -11
- package/dist/presets/fake.js.map +1 -1
- package/dist/presets/google-genai.d.ts +1 -7
- package/dist/presets/google-genai.js +1 -33
- package/dist/presets/google-genai.js.map +1 -1
- package/dist/presets/groq.d.ts +1 -4
- package/dist/presets/groq.js +1 -29
- package/dist/presets/groq.js.map +1 -1
- package/dist/presets/openai.d.ts +1 -5
- package/dist/presets/openai.js +1 -45
- package/dist/presets/openai.js.map +1 -1
- package/dist/presets/openrouter.d.ts +1 -5
- package/dist/presets/openrouter.js +1 -56
- package/dist/presets/openrouter.js.map +1 -1
- package/dist/presets/vertexai.d.ts +1 -7
- package/dist/presets/vertexai.js +1 -40
- package/dist/presets/vertexai.js.map +1 -1
- package/dist/presets/xai.d.ts +1 -4
- package/dist/presets/xai.js +1 -29
- package/dist/presets/xai.js.map +1 -1
- package/dist/providers/file.d.ts +1 -8
- package/dist/providers/file.js +1 -19
- package/dist/providers/file.js.map +1 -1
- package/dist/providers/ghIssueProvider.d.ts +1 -8
- package/dist/providers/ghIssueProvider.js +1 -33
- package/dist/providers/ghIssueProvider.js.map +1 -1
- package/dist/providers/ghPrDiffProvider.d.ts +1 -8
- package/dist/providers/ghPrDiffProvider.js +1 -28
- package/dist/providers/ghPrDiffProvider.js.map +1 -1
- package/dist/providers/jiraIssueLegacyProvider.d.ts +1 -8
- package/dist/providers/jiraIssueLegacyProvider.js +1 -73
- package/dist/providers/jiraIssueLegacyProvider.js.map +1 -1
- package/dist/providers/jiraIssueProvider.d.ts +1 -11
- package/dist/providers/jiraIssueProvider.js +1 -61
- package/dist/providers/jiraIssueProvider.js.map +1 -1
- package/dist/providers/text.d.ts +1 -8
- package/dist/providers/text.js +1 -9
- package/dist/providers/text.js.map +1 -1
- package/dist/providers/types.d.ts +1 -33
- package/dist/providers/types.js +1 -1
- package/dist/providers/types.js.map +1 -1
- package/dist/state/artifactStore.d.ts +1 -21
- package/dist/state/artifactStore.js +1 -29
- package/dist/state/artifactStore.js.map +1 -1
- package/dist/tools/A2AAgentTool.d.ts +1 -24
- package/dist/tools/A2AAgentTool.js +1 -36
- package/dist/tools/A2AAgentTool.js.map +1 -1
- package/dist/tools/GthCustomToolkit.d.ts +1 -41
- package/dist/tools/GthCustomToolkit.js +1 -279
- package/dist/tools/GthCustomToolkit.js.map +1 -1
- package/dist/tools/GthDevToolkit.d.ts +1 -24
- package/dist/tools/GthDevToolkit.js +1 -188
- package/dist/tools/GthDevToolkit.js.map +1 -1
- package/dist/tools/GthFileSystemToolkit.d.ts +1 -36
- package/dist/tools/GthFileSystemToolkit.js +1 -775
- package/dist/tools/GthFileSystemToolkit.js.map +1 -1
- package/dist/tools/binaryUtils.d.ts +1 -13
- package/dist/tools/binaryUtils.js +1 -54
- package/dist/tools/binaryUtils.js.map +1 -1
- package/dist/tools/gthJiraLogWorkTool.d.ts +1 -1
- package/dist/tools/gthJiraLogWorkTool.js +3 -3
- package/dist/tools/gthJiraLogWorkTool.js.map +1 -1
- package/dist/tools/gthStatusUpdateTool.d.ts +1 -2
- package/dist/tools/gthStatusUpdateTool.js +1 -14
- package/dist/tools/gthStatusUpdateTool.js.map +1 -1
- package/dist/tools/gthWebFetchTool.d.ts +1 -2
- package/dist/tools/gthWebFetchTool.js +1 -46
- package/dist/tools/gthWebFetchTool.js.map +1 -1
- package/dist/tools/showA2UISurfaceTool.d.ts +1 -9
- package/dist/tools/showA2UISurfaceTool.js +1 -24
- package/dist/tools/showA2UISurfaceTool.js.map +1 -1
- package/dist/utils/ProgressIndicator.d.ts +1 -7
- package/dist/utils/ProgressIndicator.js +1 -25
- package/dist/utils/ProgressIndicator.js.map +1 -1
- package/dist/utils/aiignoreUtils.d.ts +1 -29
- package/dist/utils/aiignoreUtils.js +1 -82
- package/dist/utils/aiignoreUtils.js.map +1 -1
- package/dist/utils/binaryOutputUtils.d.ts +1 -13
- package/dist/utils/binaryOutputUtils.js +1 -137
- package/dist/utils/binaryOutputUtils.js.map +1 -1
- package/dist/utils/consoleUtils.d.ts +1 -76
- package/dist/utils/consoleUtils.js +1 -229
- package/dist/utils/consoleUtils.js.map +1 -1
- package/dist/utils/debugUtils.d.ts +1 -20
- package/dist/utils/debugUtils.js +1 -88
- package/dist/utils/debugUtils.js.map +1 -1
- package/dist/utils/fileUtils.d.ts +1 -75
- package/dist/utils/fileUtils.js +1 -230
- package/dist/utils/fileUtils.js.map +1 -1
- package/dist/utils/globalConfigUtils.d.ts +1 -28
- package/dist/utils/globalConfigUtils.js +1 -60
- package/dist/utils/globalConfigUtils.js.map +1 -1
- package/dist/utils/llmUtils.d.ts +1 -39
- package/dist/utils/llmUtils.js +1 -152
- package/dist/utils/llmUtils.js.map +1 -1
- package/dist/utils/mcpUtils.d.ts +1 -13
- package/dist/utils/mcpUtils.js +1 -224
- package/dist/utils/mcpUtils.js.map +1 -1
- package/dist/utils/stringUtils.d.ts +1 -4
- package/dist/utils/stringUtils.js +1 -9
- package/dist/utils/stringUtils.js.map +1 -1
- package/dist/utils/systemUtils.d.ts +1 -63
- package/dist/utils/systemUtils.js +1 -206
- package/dist/utils/systemUtils.js.map +1 -1
- package/dist/utils/vertexaiUtils.d.ts +1 -2
- package/dist/utils/vertexaiUtils.js +1 -17
- package/dist/utils/vertexaiUtils.js.map +1 -1
- package/package.json +17 -49
- package/.gsloth.backstory.md +0 -17
- package/.gsloth.chat.md +0 -11
- package/.gsloth.code.md +0 -27
- package/.gsloth.guidelines.md +0 -1
- package/.gsloth.review.md +0 -15
- package/.gsloth.system.md +0 -10
- package/LICENSE +0 -7
package/README.md
CHANGED
|
@@ -1,358 +1,51 @@
|
|
|
1
|
-
#
|
|
2
|
-
[](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/integration-tests.yml)
|
|
1
|
+
# gaunt-sloth-assistant
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
The main CLI application for Gaunt Sloth.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
## Contents
|
|
7
6
|
|
|
8
|
-
|
|
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
|
-
|
|
13
|
+
## CLI Binaries
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
The package registers four equivalent binary aliases:
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
- `gaunt-sloth-assistant`
|
|
18
|
+
- `gaunt-sloth`
|
|
19
|
+
- `gsloth`
|
|
20
|
+
- `gth`
|
|
15
21
|
|
|
16
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
33
|
+
## Re-exports
|
|
29
34
|
|
|
30
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
358
|
-
|
|
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
|
-
|
|
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
|
|
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 '
|
|
11
|
-
import { coerceBooleanOrString } from '
|
|
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,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],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Overrides } 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 '
|
|
2
|
-
import { displayError } from '
|
|
3
|
-
import { setExitCode } from '
|
|
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('
|
|
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,
|
|
1
|
+
{"version":3,"file":"apiCommand.js","sourceRoot":"","sources":["../../src/commands/apiCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,MAAM,UAAU,UAAU,CACxB,OAAgB,EAChB,0BAAsD;IAEtD,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,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