gaunt-sloth 0.0.1 → 1.5.8
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/.gsloth.pr-discovery.md +23 -0
- package/README.md +50 -3
- package/cli.js +23 -0
- package/dist/builtInToolsConfig.d.ts +1 -0
- package/dist/builtInToolsConfig.js +2 -0
- package/dist/builtInToolsConfig.js.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +60 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/apiCommand.d.ts +3 -0
- package/dist/commands/apiCommand.js +25 -0
- package/dist/commands/apiCommand.js.map +1 -0
- package/dist/commands/askCommand.d.ts +8 -0
- package/dist/commands/askCommand.js +39 -0
- package/dist/commands/askCommand.js.map +1 -0
- package/dist/commands/chatCommand.d.ts +3 -0
- package/dist/commands/chatCommand.js +24 -0
- package/dist/commands/chatCommand.js.map +1 -0
- package/dist/commands/codeCommand.d.ts +3 -0
- package/dist/commands/codeCommand.js +19 -0
- package/dist/commands/codeCommand.js.map +1 -0
- package/dist/commands/commandIntrospection.d.ts +11 -0
- package/dist/commands/commandIntrospection.js +64 -0
- package/dist/commands/commandIntrospection.js.map +1 -0
- package/dist/commands/commandUtils.d.ts +23 -0
- package/dist/commands/commandUtils.js +49 -0
- package/dist/commands/commandUtils.js.map +1 -0
- 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 +3 -0
- package/dist/commands/getCommand.js +45 -0
- package/dist/commands/getCommand.js.map +1 -0
- package/dist/commands/initCommand.d.ts +16 -0
- package/dist/commands/initCommand.js +90 -0
- package/dist/commands/initCommand.js.map +1 -0
- package/dist/commands/prCommand.d.ts +3 -0
- package/dist/commands/prCommand.js +106 -0
- package/dist/commands/prCommand.js.map +1 -0
- package/dist/commands/prDiscovery.d.ts +54 -0
- package/dist/commands/prDiscovery.js +451 -0
- package/dist/commands/prDiscovery.js.map +1 -0
- package/dist/commands/reviewCommand.d.ts +3 -0
- package/dist/commands/reviewCommand.js +51 -0
- package/dist/commands/reviewCommand.js.map +1 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/GthAgentRunner.d.ts +1 -0
- package/dist/core/GthAgentRunner.js +2 -0
- package/dist/core/GthAgentRunner.js.map +1 -0
- package/dist/core/GthLangChainAgent.d.ts +1 -0
- package/dist/core/GthLangChainAgent.js +2 -0
- package/dist/core/GthLangChainAgent.js.map +1 -0
- package/dist/core/types.d.ts +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/helpers/jira/jiraClient.d.ts +1 -0
- package/dist/helpers/jira/jiraClient.js +2 -0
- package/dist/helpers/jira/jiraClient.js.map +1 -0
- package/dist/helpers/jira/jiraLogWork.d.ts +2 -0
- package/dist/helpers/jira/jiraLogWork.js +53 -0
- package/dist/helpers/jira/jiraLogWork.js.map +1 -0
- package/dist/mcp/OAuthClientProviderImpl.d.ts +1 -0
- package/dist/mcp/OAuthClientProviderImpl.js +2 -0
- package/dist/mcp/OAuthClientProviderImpl.js.map +1 -0
- package/dist/middleware/binaryContentInjectionMiddleware.d.ts +1 -0
- package/dist/middleware/binaryContentInjectionMiddleware.js +2 -0
- package/dist/middleware/binaryContentInjectionMiddleware.js.map +1 -0
- package/dist/middleware/registry.d.ts +1 -0
- package/dist/middleware/registry.js +2 -0
- package/dist/middleware/registry.js.map +1 -0
- package/dist/middleware/reviewRateMiddleware.d.ts +1 -0
- package/dist/middleware/reviewRateMiddleware.js +2 -0
- package/dist/middleware/reviewRateMiddleware.js.map +1 -0
- package/dist/middleware/types.d.ts +1 -0
- package/dist/middleware/types.js +2 -0
- package/dist/middleware/types.js.map +1 -0
- package/dist/modules/a2a/A2AClientWrapper.d.ts +1 -0
- package/dist/modules/a2a/A2AClientWrapper.js +2 -0
- package/dist/modules/a2a/A2AClientWrapper.js.map +1 -0
- package/dist/modules/apiAgUiModule.d.ts +1 -0
- package/dist/modules/apiAgUiModule.js +2 -0
- package/dist/modules/apiAgUiModule.js.map +1 -0
- package/dist/modules/interactiveSessionModule.d.ts +1 -0
- package/dist/modules/interactiveSessionModule.js +2 -0
- package/dist/modules/interactiveSessionModule.js.map +1 -0
- package/dist/modules/questionAnsweringModule.d.ts +1 -0
- package/dist/modules/questionAnsweringModule.js +2 -0
- package/dist/modules/questionAnsweringModule.js.map +1 -0
- package/dist/modules/reviewModule.d.ts +1 -0
- package/dist/modules/reviewModule.js +2 -0
- package/dist/modules/reviewModule.js.map +1 -0
- package/dist/modules/types.d.ts +1 -0
- package/dist/modules/types.js +2 -0
- package/dist/modules/types.js.map +1 -0
- package/dist/presets/anthropic.d.ts +1 -0
- package/dist/presets/anthropic.js +2 -0
- package/dist/presets/anthropic.js.map +1 -0
- package/dist/presets/deepseek.d.ts +1 -0
- package/dist/presets/deepseek.js +2 -0
- package/dist/presets/deepseek.js.map +1 -0
- package/dist/presets/fake.d.ts +1 -0
- package/dist/presets/fake.js +2 -0
- package/dist/presets/fake.js.map +1 -0
- package/dist/presets/google-genai.d.ts +1 -0
- package/dist/presets/google-genai.js +2 -0
- package/dist/presets/google-genai.js.map +1 -0
- package/dist/presets/groq.d.ts +1 -0
- package/dist/presets/groq.js +2 -0
- package/dist/presets/groq.js.map +1 -0
- package/dist/presets/openai.d.ts +1 -0
- package/dist/presets/openai.js +2 -0
- package/dist/presets/openai.js.map +1 -0
- package/dist/presets/openrouter.d.ts +1 -0
- package/dist/presets/openrouter.js +2 -0
- package/dist/presets/openrouter.js.map +1 -0
- package/dist/presets/vertexai.d.ts +1 -0
- package/dist/presets/vertexai.js +2 -0
- package/dist/presets/vertexai.js.map +1 -0
- package/dist/presets/xai.d.ts +1 -0
- package/dist/presets/xai.js +2 -0
- package/dist/presets/xai.js.map +1 -0
- package/dist/providers/file.d.ts +1 -0
- package/dist/providers/file.js +2 -0
- package/dist/providers/file.js.map +1 -0
- package/dist/providers/ghIssueProvider.d.ts +1 -0
- package/dist/providers/ghIssueProvider.js +2 -0
- package/dist/providers/ghIssueProvider.js.map +1 -0
- package/dist/providers/ghPrDiffProvider.d.ts +1 -0
- package/dist/providers/ghPrDiffProvider.js +2 -0
- package/dist/providers/ghPrDiffProvider.js.map +1 -0
- package/dist/providers/jiraIssueLegacyProvider.d.ts +1 -0
- package/dist/providers/jiraIssueLegacyProvider.js +2 -0
- package/dist/providers/jiraIssueLegacyProvider.js.map +1 -0
- package/dist/providers/jiraIssueProvider.d.ts +1 -0
- package/dist/providers/jiraIssueProvider.js +2 -0
- package/dist/providers/jiraIssueProvider.js.map +1 -0
- package/dist/providers/text.d.ts +1 -0
- package/dist/providers/text.js +2 -0
- package/dist/providers/text.js.map +1 -0
- package/dist/providers/types.d.ts +1 -0
- package/dist/providers/types.js +2 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/state/artifactStore.d.ts +1 -0
- package/dist/state/artifactStore.js +2 -0
- package/dist/state/artifactStore.js.map +1 -0
- package/dist/tools/A2AAgentTool.d.ts +1 -0
- package/dist/tools/A2AAgentTool.js +2 -0
- package/dist/tools/A2AAgentTool.js.map +1 -0
- package/dist/tools/GthCustomToolkit.d.ts +1 -0
- package/dist/tools/GthCustomToolkit.js +2 -0
- package/dist/tools/GthCustomToolkit.js.map +1 -0
- package/dist/tools/GthDevToolkit.d.ts +1 -0
- package/dist/tools/GthDevToolkit.js +2 -0
- package/dist/tools/GthDevToolkit.js.map +1 -0
- package/dist/tools/GthFileSystemToolkit.d.ts +1 -0
- package/dist/tools/GthFileSystemToolkit.js +2 -0
- package/dist/tools/GthFileSystemToolkit.js.map +1 -0
- package/dist/tools/binaryUtils.d.ts +1 -0
- package/dist/tools/binaryUtils.js +2 -0
- package/dist/tools/binaryUtils.js.map +1 -0
- package/dist/tools/gthJiraLogWorkTool.d.ts +3 -0
- package/dist/tools/gthJiraLogWorkTool.js +37 -0
- package/dist/tools/gthJiraLogWorkTool.js.map +1 -0
- package/dist/tools/gthStatusUpdateTool.d.ts +1 -0
- package/dist/tools/gthStatusUpdateTool.js +2 -0
- package/dist/tools/gthStatusUpdateTool.js.map +1 -0
- package/dist/tools/gthWebFetchTool.d.ts +1 -0
- package/dist/tools/gthWebFetchTool.js +2 -0
- package/dist/tools/gthWebFetchTool.js.map +1 -0
- package/dist/tools/showA2UISurfaceTool.d.ts +1 -0
- package/dist/tools/showA2UISurfaceTool.js +2 -0
- package/dist/tools/showA2UISurfaceTool.js.map +1 -0
- package/dist/utils/ProgressIndicator.d.ts +1 -0
- package/dist/utils/ProgressIndicator.js +2 -0
- package/dist/utils/ProgressIndicator.js.map +1 -0
- package/dist/utils/aiignoreUtils.d.ts +1 -0
- package/dist/utils/aiignoreUtils.js +2 -0
- package/dist/utils/aiignoreUtils.js.map +1 -0
- package/dist/utils/binaryOutputUtils.d.ts +1 -0
- package/dist/utils/binaryOutputUtils.js +2 -0
- package/dist/utils/binaryOutputUtils.js.map +1 -0
- package/dist/utils/consoleUtils.d.ts +1 -0
- package/dist/utils/consoleUtils.js +2 -0
- package/dist/utils/consoleUtils.js.map +1 -0
- package/dist/utils/debugUtils.d.ts +1 -0
- package/dist/utils/debugUtils.js +2 -0
- package/dist/utils/debugUtils.js.map +1 -0
- package/dist/utils/fileUtils.d.ts +1 -0
- package/dist/utils/fileUtils.js +2 -0
- package/dist/utils/fileUtils.js.map +1 -0
- package/dist/utils/globalConfigUtils.d.ts +1 -0
- package/dist/utils/globalConfigUtils.js +2 -0
- package/dist/utils/globalConfigUtils.js.map +1 -0
- package/dist/utils/llmUtils.d.ts +1 -0
- package/dist/utils/llmUtils.js +2 -0
- package/dist/utils/llmUtils.js.map +1 -0
- package/dist/utils/mcpUtils.d.ts +1 -0
- package/dist/utils/mcpUtils.js +2 -0
- package/dist/utils/mcpUtils.js.map +1 -0
- package/dist/utils/stringUtils.d.ts +1 -0
- package/dist/utils/stringUtils.js +2 -0
- package/dist/utils/stringUtils.js.map +1 -0
- package/dist/utils/systemUtils.d.ts +1 -0
- package/dist/utils/systemUtils.js +2 -0
- package/dist/utils/systemUtils.js.map +1 -0
- package/dist/utils/vertexaiUtils.d.ts +1 -0
- package/dist/utils/vertexaiUtils.js +2 -0
- package/dist/utils/vertexaiUtils.js.map +1 -0
- package/package.json +56 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Change Requirements Discovery
|
|
2
|
+
|
|
3
|
+
You are preparing inputs for a pull request code review before the review agent runs.
|
|
4
|
+
|
|
5
|
+
Your goal is to gather exactly two pieces of information:
|
|
6
|
+
|
|
7
|
+
1. The pull request diff.
|
|
8
|
+
2. The requirements that should be used for the review.
|
|
9
|
+
|
|
10
|
+
Use the available tools to infer the current pull request and its requirements. Prefer deterministic sources over guesses:
|
|
11
|
+
|
|
12
|
+
- First, inspect the PR metadata/description. If it contains an explicit requirements link, use that link and do not search nearby issue numbers.
|
|
13
|
+
- Use `gh_pr` to retrieve GitHub PR metadata, including the title, branch names, URL, and description/body. If no PR number is known, call it without a PR number to retrieve the current branch PR.
|
|
14
|
+
- Use `gh_diff` to retrieve a GitHub PR diff; it stores the diff as the review diff automatically and returns a short preview. If no PR number is known, call it without a PR number to retrieve the current branch PR diff.
|
|
15
|
+
- Use `gh_issue` to retrieve GitHub issue descriptions only when the PR description, title, branch name, or another reliable source points to a GitHub issue. Pass the full issue URL when the issue lives in another repository.
|
|
16
|
+
- Use repository, shell, MCP, Jira, and other configured tools when available to find requirement documents or issue tracker items.
|
|
17
|
+
|
|
18
|
+
`gh_diff` already sets the diff for you; only call `set_diff` when you have assembled a better exact diff some other way.
|
|
19
|
+
When you have the best available requirements, call `set_requirements` with the complete requirements text exactly as they should constrain the review.
|
|
20
|
+
|
|
21
|
+
Do not invent requirements. Do not brute-force issue numbers. If no requirements can be found, call `set_requirements` with a concise statement explaining that no external requirements were found and what evidence was checked.
|
|
22
|
+
|
|
23
|
+
Finish with a short summary of what you set and where it came from.
|
package/README.md
CHANGED
|
@@ -1,4 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# gaunt-sloth
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
The main CLI application for Gaunt Sloth.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
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
|
|
12
|
+
|
|
13
|
+
## CLI Binaries
|
|
14
|
+
|
|
15
|
+
The package registers four equivalent binary aliases:
|
|
16
|
+
|
|
17
|
+
- `gaunt-sloth-assistant`
|
|
18
|
+
- `gaunt-sloth`
|
|
19
|
+
- `gsloth`
|
|
20
|
+
- `gth`
|
|
21
|
+
|
|
22
|
+
## Dependencies
|
|
23
|
+
|
|
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.)
|
|
30
|
+
|
|
31
|
+
This is the only package in the workspace that pulls in AI vendor dependencies directly. All other packages treat vendors as optional peers.
|
|
32
|
+
|
|
33
|
+
## Re-exports
|
|
34
|
+
|
|
35
|
+
`gaunt-sloth` re-exports public APIs from the sub-packages for backward compatibility. Consumers that previously imported directly from `gaunt-sloth` continue to work without changes.
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g gaunt-sloth
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
For full usage documentation see the [root README](../../README.md) and [docs/COMMANDS.md](../../docs/COMMANDS.md).
|
|
44
|
+
|
|
45
|
+
## Related packages
|
|
46
|
+
|
|
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) — Main CLI application (this package)
|
package/cli.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Suppress deprecation warnings programmatically
|
|
4
|
+
process.removeAllListeners('warning');
|
|
5
|
+
process.on('warning', (warning) => {
|
|
6
|
+
if (warning.name === 'DeprecationWarning' || warning.name === 'ExperimentalWarning') {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
console.warn(warning);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
// This is a minimalistic entry point that sets the installDir in systemUtils
|
|
13
|
+
// and delegates to the compiled TypeScript code in dist/cli.js
|
|
14
|
+
import { setEntryPoint } from './dist/utils/systemUtils.js';
|
|
15
|
+
|
|
16
|
+
// Set the installation directory in systemUtils
|
|
17
|
+
setEntryPoint(import.meta.url);
|
|
18
|
+
|
|
19
|
+
// Import and run the compiled TypeScript code
|
|
20
|
+
import('./dist/cli.js').catch((err) => {
|
|
21
|
+
console.error('Failed to load application:', err);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@gaunt-sloth/tools/builtInToolsConfig.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtInToolsConfig.js","sourceRoot":"","sources":["../src/builtInToolsConfig.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC"}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Command, Option } from 'commander';
|
|
2
|
+
import { askCommand } from '#src/commands/askCommand.js';
|
|
3
|
+
import { initCommand } from '#src/commands/initCommand.js';
|
|
4
|
+
import { reviewCommand } from '#src/commands/reviewCommand.js';
|
|
5
|
+
import { prCommand } from '#src/commands/prCommand.js';
|
|
6
|
+
import { chatCommand } from '#src/commands/chatCommand.js';
|
|
7
|
+
import { codeCommand } from '#src/commands/codeCommand.js';
|
|
8
|
+
import { apiCommand } from '#src/commands/apiCommand.js';
|
|
9
|
+
import { getCommand } from '#src/commands/getCommand.js';
|
|
10
|
+
import { argv, getSlothVersion, readStdin } from '@gaunt-sloth/core/utils/systemUtils.js';
|
|
11
|
+
import { coerceBooleanOrString } from '@gaunt-sloth/core/utils/consoleUtils.js';
|
|
12
|
+
const program = new Command();
|
|
13
|
+
program
|
|
14
|
+
.name('gsloth')
|
|
15
|
+
.description('Gaunt Sloth Assistant reviewing your PRs')
|
|
16
|
+
.version(getSlothVersion())
|
|
17
|
+
.option('--verbose', 'Set LangChain/LangGraph to verbose mode, ' +
|
|
18
|
+
'causing LangChain/LangGraph to log many details to the console. ' +
|
|
19
|
+
'Consider using debugLog from config.ts for less intrusive debug logging.')
|
|
20
|
+
.option('-c, --config <path>', 'Path to custom configuration file')
|
|
21
|
+
.option('-i, --identity-profile <identity>', 'Identity profile (separate config and prompts)')
|
|
22
|
+
.option('-w, --write-output-to-file <value>', 'Write output to file. Accepts true/false or a filename. Shortcuts: -wn or -w0 for false.')
|
|
23
|
+
.addOption(new Option('--nopipe').hideHelp(true));
|
|
24
|
+
const cliConfigOverrides = {};
|
|
25
|
+
// Parse global options before binding any commands
|
|
26
|
+
program.parseOptions(argv);
|
|
27
|
+
if (program.getOptionValue('verbose')) {
|
|
28
|
+
/**
|
|
29
|
+
* Set LangChain/LangGraph to verbose mode,
|
|
30
|
+
* causing LangChain/LangGraph to log many details to the console.
|
|
31
|
+
* debugLog from config.ts may be a less intrusive option.
|
|
32
|
+
*/
|
|
33
|
+
cliConfigOverrides.verbose = true;
|
|
34
|
+
}
|
|
35
|
+
if (program.getOptionValue('config')) {
|
|
36
|
+
// Set a custom config path
|
|
37
|
+
cliConfigOverrides.customConfigPath = program.getOptionValue('config');
|
|
38
|
+
}
|
|
39
|
+
if (program.getOptionValue('identityProfile')) {
|
|
40
|
+
cliConfigOverrides.identityProfile = program.getOptionValue('identityProfile');
|
|
41
|
+
}
|
|
42
|
+
const writeToFile = program.getOptionValue('writeOutputToFile');
|
|
43
|
+
// Commander does an interesting thing: if a shortcut like -w exists,
|
|
44
|
+
// everything after this shortcut without a space becomes the value.
|
|
45
|
+
// Examples: -wn comes with value 'n', -w0 => '0', -wreview.md => 'review.md'
|
|
46
|
+
const coerced = coerceBooleanOrString(writeToFile);
|
|
47
|
+
if (coerced !== undefined) {
|
|
48
|
+
cliConfigOverrides.writeOutputToFile = coerced;
|
|
49
|
+
}
|
|
50
|
+
// Initialize all commands - they will handle their own config loading
|
|
51
|
+
initCommand(program);
|
|
52
|
+
reviewCommand(program, cliConfigOverrides);
|
|
53
|
+
prCommand(program, cliConfigOverrides);
|
|
54
|
+
askCommand(program, cliConfigOverrides);
|
|
55
|
+
chatCommand(program, cliConfigOverrides);
|
|
56
|
+
codeCommand(program, cliConfigOverrides);
|
|
57
|
+
apiCommand(program, cliConfigOverrides);
|
|
58
|
+
getCommand(program, cliConfigOverrides);
|
|
59
|
+
await readStdin(program);
|
|
60
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +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,O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AAE,CAAC;IACrC,2BAA2B;IAC3B,kBAAkB,CAAC,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AACzE,CAAC;AACD,IAAI,OAAO,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,CAAC;IAC9C,kBAAkB,CAAC,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;AACjF,CAAC;AAED,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;AAEhE,qEAAqE;AACrE,oEAAoE;AACpE,6EAA6E;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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
export function apiCommand(program, commandLineConfigOverrides) {
|
|
5
|
+
const api = program.command('api').description('Start an API server for Gaunt Sloth');
|
|
6
|
+
api
|
|
7
|
+
.command('ag-ui')
|
|
8
|
+
.description('Start an AG-UI protocol HTTP server')
|
|
9
|
+
.option('--port <port>', 'Port to listen on')
|
|
10
|
+
.action(async (options) => {
|
|
11
|
+
try {
|
|
12
|
+
const config = await initConfig(commandLineConfigOverrides);
|
|
13
|
+
const port = options.port
|
|
14
|
+
? parseInt(options.port, 10)
|
|
15
|
+
: (config.commands?.api?.port ?? 3000);
|
|
16
|
+
const { startAgUiServer } = await import('@gaunt-sloth/api/modules/apiAgUiModule.js');
|
|
17
|
+
await startAgUiServer(config, port);
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
displayError(error instanceof Error ? error.message : String(error));
|
|
21
|
+
setExitCode(1);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=apiCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,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,2CAA2C,CAAC,CAAC;YACtF,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,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACrE,WAAW,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { CommandLineConfigOverrides } from '@gaunt-sloth/core/config.js';
|
|
3
|
+
/**
|
|
4
|
+
* Adds the ask command to the program
|
|
5
|
+
* @param program - The commander program
|
|
6
|
+
* @param commandLineConfigOverrides - command line config overrides
|
|
7
|
+
*/
|
|
8
|
+
export declare function askCommand(program: Command, commandLineConfigOverrides: CommandLineConfigOverrides): void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { initConfig } from '@gaunt-sloth/core/config.js';
|
|
2
|
+
import { getAskSystemPrompt } from '#src/commands/commandIntrospection.js';
|
|
3
|
+
import { getStringFromStdin } from '@gaunt-sloth/core/utils/systemUtils.js';
|
|
4
|
+
import { wrapContent } from '@gaunt-sloth/core/utils/llmUtils.js';
|
|
5
|
+
import { readMultipleFilesFromProjectDir } from '@gaunt-sloth/review/utils/fileUtils.js';
|
|
6
|
+
/**
|
|
7
|
+
* Adds the ask command to the program
|
|
8
|
+
* @param program - The commander program
|
|
9
|
+
* @param commandLineConfigOverrides - command line config overrides
|
|
10
|
+
*/
|
|
11
|
+
export function askCommand(program, commandLineConfigOverrides) {
|
|
12
|
+
program
|
|
13
|
+
.command('ask')
|
|
14
|
+
.description('Ask a question')
|
|
15
|
+
.argument('[message]', 'A message')
|
|
16
|
+
.option('-f, --file [files...]', 'Input files. Content of these files will be added BEFORE the message')
|
|
17
|
+
.action(async (message, options) => {
|
|
18
|
+
const config = await initConfig(commandLineConfigOverrides);
|
|
19
|
+
const content = [];
|
|
20
|
+
if (options.file) {
|
|
21
|
+
content.push(readMultipleFilesFromProjectDir(options.file));
|
|
22
|
+
}
|
|
23
|
+
const stringFromStdin = getStringFromStdin();
|
|
24
|
+
if (stringFromStdin) {
|
|
25
|
+
content.push(wrapContent(stringFromStdin, 'stdin-content'));
|
|
26
|
+
}
|
|
27
|
+
if (message) {
|
|
28
|
+
content.push(wrapContent(message, 'message', 'user message'));
|
|
29
|
+
}
|
|
30
|
+
// Validate that at least one input source is provided
|
|
31
|
+
if (content.length === 0) {
|
|
32
|
+
throw new Error('At least one of the following is required: file, stdin, or message');
|
|
33
|
+
}
|
|
34
|
+
const { askQuestion } = await import('@gaunt-sloth/review/modules/questionAnsweringModule.js');
|
|
35
|
+
const { createResolvers } = await import('@gaunt-sloth/api/resolvers.js');
|
|
36
|
+
await askQuestion('ASK', getAskSystemPrompt(config), content.join('\n'), config, createResolvers());
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=askCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askCommand.js","sourceRoot":"","sources":["../../src/commands/askCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAA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AC,EAC1B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAClB,MAAM,EACN,eAAe,EAAE,CAClB,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createInteractiveSession, } from '@gaunt-sloth/api/modules/interactiveSessionModule.js';
|
|
2
|
+
import { readChatPrompt } from '@gaunt-sloth/core/utils/llmUtils.js';
|
|
3
|
+
export function chatCommand(program, commandLineConfigOverrides) {
|
|
4
|
+
const sessionConfig = {
|
|
5
|
+
mode: 'chat',
|
|
6
|
+
readModePrompt: readChatPrompt,
|
|
7
|
+
description: 'Start an interactive chat session with Gaunt Sloth',
|
|
8
|
+
readyMessage: '\nGaunt Sloth is ready to chat. Type your prompt.',
|
|
9
|
+
exitMessage: "Type 'exit' or hit Ctrl+C to exit chat\n",
|
|
10
|
+
};
|
|
11
|
+
// Start chat when no command typed
|
|
12
|
+
program.action(async () => {
|
|
13
|
+
await createInteractiveSession(sessionConfig, commandLineConfigOverrides);
|
|
14
|
+
});
|
|
15
|
+
// Chat command
|
|
16
|
+
program
|
|
17
|
+
.command('chat')
|
|
18
|
+
.description('Start an interactive chat session with Gaunt Sloth')
|
|
19
|
+
.argument('[message]', 'Initial message to start the chat')
|
|
20
|
+
.action(async (message) => {
|
|
21
|
+
await createInteractiveSession(sessionConfig, commandLineConfigOverrides, message);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=chatCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatCommand.js","sourceRoot":"","sources":["../../src/commands/chatCommand.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,GAEzB,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,MAAM,UAAU,WAAW,CACzB,OAAgB,EAChB,0BAAsD;IAEtD,MAAM,aAAa,GAAkB;QACnC,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE,cAAc;QAC9B,WAAW,EAAE,oDAAoD;QACjE,YAAY,EAAE,mDAAmD;QACjE,WAAW,EAAE,0CAA0C;KACxD,CAAC;IACF,mCAAmC;IACnC,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;QACxB,MAAM,wBAAwB,CAAC,aAAa,EAAE,0BAA0B,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IACH,eAAe;IACf,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,oDAAoD,CAAC;SACjE,QAAQ,CAAC,WAAW,EAAE,mCAAmC,CAAC;SAC1D,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;QAChC,MAAM,wBAAwB,CAAC,aAAa,EAAE,0BAA0B,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createInteractiveSession, } from '@gaunt-sloth/api/modules/interactiveSessionModule.js';
|
|
2
|
+
import { readCodePrompt } from '@gaunt-sloth/core/utils/llmUtils.js';
|
|
3
|
+
export function codeCommand(program, commandLineConfigOverrides) {
|
|
4
|
+
program
|
|
5
|
+
.command('code')
|
|
6
|
+
.description('Interactively write code with sloth (has full file system access within your project)')
|
|
7
|
+
.argument('[message]', 'Initial message to start the code session')
|
|
8
|
+
.action(async (message) => {
|
|
9
|
+
const sessionConfig = {
|
|
10
|
+
mode: 'code',
|
|
11
|
+
readModePrompt: readCodePrompt,
|
|
12
|
+
description: 'Interactively write code with sloth (has full file system access within your project)',
|
|
13
|
+
readyMessage: '\nGaunt Sloth is ready to code. Type your prompt.',
|
|
14
|
+
exitMessage: "Type 'exit' or hit Ctrl+C to exit code session\n",
|
|
15
|
+
};
|
|
16
|
+
await createInteractiveSession(sessionConfig, commandLineConfigOverrides, message);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=codeCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeCommand.js","sourceRoot":"","sources":["../../src/commands/codeCommand.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,GAEzB,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,MAAM,UAAU,WAAW,CACzB,OAAgB,EAChB,0BAAsD;IAEtD,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CACV,uFAAuF,CACxF;SACA,QAAQ,CAAC,WAAW,EAAE,2CAA2C,CAAC;SAClE,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;QAChC,MAAM,aAAa,GAAkB;YACnC,IAAI,EAAE,MAAM;YACZ,cAAc,EAAE,cAAc;YAC9B,WAAW,EACT,uFAAuF;YACzF,YAAY,EAAE,mDAAmD;YACjE,WAAW,EAAE,kDAAkD;SAChE,CAAC;QAEF,MAAM,wBAAwB,CAAC,aAAa,EAAE,0BAA0B,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GthConfig } from '@gaunt-sloth/core/config.js';
|
|
2
|
+
import { type ContentProviderType, type RequirementsProviderType } from '#src/commands/commandUtils.js';
|
|
3
|
+
export type PromptCommandType = 'ask' | 'review' | 'pr' | 'pr-discovery' | 'chat' | 'code';
|
|
4
|
+
export type ProviderCommandType = 'review' | 'pr';
|
|
5
|
+
export type ProviderInputType = 'content' | 'requirements';
|
|
6
|
+
export declare function getAskSystemPrompt(config: GthConfig): string;
|
|
7
|
+
export declare function getReviewSystemPrompt(config: GthConfig): string;
|
|
8
|
+
export declare function getCommandSystemPrompt(command: PromptCommandType, config: GthConfig): string;
|
|
9
|
+
export declare function getEffectiveRequirementsProvider(command: ProviderCommandType, config: GthConfig, cliProvider?: RequirementsProviderType): RequirementsProviderType | undefined;
|
|
10
|
+
export declare function getEffectiveContentProvider(command: ProviderCommandType, config: GthConfig, cliProvider?: ContentProviderType): ContentProviderType | undefined;
|
|
11
|
+
export declare function getCommandProviderInput(command: ProviderCommandType, inputType: ProviderInputType, id: string | undefined, config: GthConfig, cliProvider?: RequirementsProviderType | ContentProviderType): Promise<string>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { getContentFromProvider, getRequirementsFromProvider, } from '#src/commands/commandUtils.js';
|
|
2
|
+
import { buildSystemMessages, readBackstory, readChatPrompt, readCodePrompt, readGuidelines, readReviewInstructions, readSystemPrompt, } from '@gaunt-sloth/core/utils/llmUtils.js';
|
|
3
|
+
import { readPrDiscoveryPrompt } from '#src/commands/prDiscovery.js';
|
|
4
|
+
export function getAskSystemPrompt(config) {
|
|
5
|
+
const parts = [readBackstory(config), readGuidelines(config)];
|
|
6
|
+
const systemPrompt = readSystemPrompt(config);
|
|
7
|
+
if (systemPrompt) {
|
|
8
|
+
parts.push(systemPrompt);
|
|
9
|
+
}
|
|
10
|
+
return parts.join('\n');
|
|
11
|
+
}
|
|
12
|
+
export function getReviewSystemPrompt(config) {
|
|
13
|
+
const parts = [readBackstory(config), readGuidelines(config), readReviewInstructions(config)];
|
|
14
|
+
const systemPrompt = readSystemPrompt(config);
|
|
15
|
+
if (systemPrompt) {
|
|
16
|
+
parts.push(systemPrompt);
|
|
17
|
+
}
|
|
18
|
+
return parts.join('\n');
|
|
19
|
+
}
|
|
20
|
+
export function getCommandSystemPrompt(command, config) {
|
|
21
|
+
if (command === 'ask') {
|
|
22
|
+
return getAskSystemPrompt(config);
|
|
23
|
+
}
|
|
24
|
+
if (command === 'review' || command === 'pr') {
|
|
25
|
+
return getReviewSystemPrompt(config);
|
|
26
|
+
}
|
|
27
|
+
const modePrompt = command === 'pr-discovery'
|
|
28
|
+
? readPrDiscoveryPrompt(config)
|
|
29
|
+
: command === 'chat'
|
|
30
|
+
? readChatPrompt(config)
|
|
31
|
+
: readCodePrompt(config);
|
|
32
|
+
return flattenSystemMessageContent(config, modePrompt);
|
|
33
|
+
}
|
|
34
|
+
function flattenSystemMessageContent(config, modePrompt) {
|
|
35
|
+
const [systemMessage] = buildSystemMessages(config, modePrompt);
|
|
36
|
+
const content = systemMessage?.content;
|
|
37
|
+
if (typeof content === 'string') {
|
|
38
|
+
return content;
|
|
39
|
+
}
|
|
40
|
+
if (Array.isArray(content)) {
|
|
41
|
+
return content
|
|
42
|
+
.map((item) => (typeof item === 'string' ? item : 'text' in item ? item.text : ''))
|
|
43
|
+
.join('\n');
|
|
44
|
+
}
|
|
45
|
+
return '';
|
|
46
|
+
}
|
|
47
|
+
export function getEffectiveRequirementsProvider(command, config, cliProvider) {
|
|
48
|
+
return (cliProvider ??
|
|
49
|
+
config?.commands?.[command]?.requirementsProvider ??
|
|
50
|
+
config?.requirementsProvider);
|
|
51
|
+
}
|
|
52
|
+
export function getEffectiveContentProvider(command, config, cliProvider) {
|
|
53
|
+
return (cliProvider ??
|
|
54
|
+
config?.commands?.[command]?.contentProvider ??
|
|
55
|
+
config?.contentProvider ??
|
|
56
|
+
(command === 'pr' ? 'github' : undefined));
|
|
57
|
+
}
|
|
58
|
+
export async function getCommandProviderInput(command, inputType, id, config, cliProvider) {
|
|
59
|
+
if (inputType === 'requirements') {
|
|
60
|
+
return getRequirementsFromProvider(getEffectiveRequirementsProvider(command, config, cliProvider), id, config);
|
|
61
|
+
}
|
|
62
|
+
return getContentFromProvider(getEffectiveContentProvider(command, config, cliProvider), id, config);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=commandIntrospection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandIntrospection.js","sourceRoot":"","sources":["../../src/commands/commandIntrospection.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,2BAA2B,GAG5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EAC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QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAC1C,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAA4B,EAC5B,SAA4B,EAC5B,EAAsB,EACtB,MAAiB,EACjB,WAA4D;IAE5D,IAAI,SAAS,KAAK,cAAc,EAAE,CAAC;QACjC,OAAO,2BAA2B,CAChC,gCAAgC,CAAC,OAAO,EAAE,MAAM,EAAE,WAAuC,CAAC,EAC1F,EAAE,EACF,MAAM,CACP,CAAC;IACJ,CAAC;IAED,OAAO,sBAAsB,CAC3B,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,WAAkC,CAAC,EAChF,EAAE,EACF,MAAM,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GthConfig } from '@gaunt-sloth/core/config.js';
|
|
2
|
+
/**
|
|
3
|
+
* Requirements providers. Aliases are mapped to actual package paths.
|
|
4
|
+
*/
|
|
5
|
+
export declare const REQUIREMENTS_PROVIDERS: {
|
|
6
|
+
readonly 'jira-legacy': "@gaunt-sloth/review/sources/jiraIssueLegacySource.js";
|
|
7
|
+
readonly jira: "@gaunt-sloth/review/sources/jiraIssueSource.js";
|
|
8
|
+
readonly github: "@gaunt-sloth/review/sources/ghIssueSource.js";
|
|
9
|
+
readonly text: "@gaunt-sloth/review/sources/textSource.js";
|
|
10
|
+
readonly file: "@gaunt-sloth/review/sources/fileSource.js";
|
|
11
|
+
};
|
|
12
|
+
export type RequirementsProviderType = keyof typeof REQUIREMENTS_PROVIDERS;
|
|
13
|
+
/**
|
|
14
|
+
* Content providers. Aliases are mapped to actual package paths.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CONTENT_PROVIDERS: {
|
|
17
|
+
readonly github: "@gaunt-sloth/review/sources/ghPrDiffSource.js";
|
|
18
|
+
readonly text: "@gaunt-sloth/review/sources/textSource.js";
|
|
19
|
+
readonly file: "@gaunt-sloth/review/sources/fileSource.js";
|
|
20
|
+
};
|
|
21
|
+
export type ContentProviderType = keyof typeof CONTENT_PROVIDERS;
|
|
22
|
+
export declare function getRequirementsFromProvider(requirementsProvider: RequirementsProviderType | undefined, requirementsId: string | undefined, config: GthConfig): Promise<string>;
|
|
23
|
+
export declare function getContentFromProvider(contentProvider: ContentProviderType | undefined, contentId: string | undefined, config: GthConfig): Promise<string>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { displayError } from '@gaunt-sloth/core/utils/consoleUtils.js';
|
|
2
|
+
import { wrapContent } from '@gaunt-sloth/core/utils/llmUtils.js';
|
|
3
|
+
/**
|
|
4
|
+
* Requirements providers. Aliases are mapped to actual package paths.
|
|
5
|
+
*/
|
|
6
|
+
export const REQUIREMENTS_PROVIDERS = {
|
|
7
|
+
'jira-legacy': '@gaunt-sloth/review/sources/jiraIssueLegacySource.js',
|
|
8
|
+
jira: '@gaunt-sloth/review/sources/jiraIssueSource.js',
|
|
9
|
+
github: '@gaunt-sloth/review/sources/ghIssueSource.js',
|
|
10
|
+
text: '@gaunt-sloth/review/sources/textSource.js',
|
|
11
|
+
file: '@gaunt-sloth/review/sources/fileSource.js',
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Content providers. Aliases are mapped to actual package paths.
|
|
15
|
+
*/
|
|
16
|
+
export const CONTENT_PROVIDERS = {
|
|
17
|
+
github: '@gaunt-sloth/review/sources/ghPrDiffSource.js',
|
|
18
|
+
text: '@gaunt-sloth/review/sources/textSource.js',
|
|
19
|
+
file: '@gaunt-sloth/review/sources/fileSource.js',
|
|
20
|
+
};
|
|
21
|
+
export async function getRequirementsFromProvider(requirementsProvider, requirementsId, config) {
|
|
22
|
+
const requirements = await getFromProvider(requirementsProvider, requirementsId, (config?.requirementsProviderConfig ?? {})[requirementsProvider], REQUIREMENTS_PROVIDERS);
|
|
23
|
+
return wrapContent(requirements, requirementsProvider, 'requirements');
|
|
24
|
+
}
|
|
25
|
+
export async function getContentFromProvider(contentProvider, contentId, config) {
|
|
26
|
+
const content = await getFromProvider(contentProvider, contentId, (config?.contentProviderConfig ?? {})[contentProvider], CONTENT_PROVIDERS);
|
|
27
|
+
return wrapContent(content, contentProvider, contentProvider === 'github' ? 'GitHub diff' : 'content');
|
|
28
|
+
}
|
|
29
|
+
async function getFromProvider(provider, id,
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
config, legitPredefinedProviders) {
|
|
32
|
+
if (typeof provider === 'string') {
|
|
33
|
+
// Use one of the predefined providers
|
|
34
|
+
if (legitPredefinedProviders[provider]) {
|
|
35
|
+
const providerPath = legitPredefinedProviders[provider];
|
|
36
|
+
const { get } = await import(providerPath);
|
|
37
|
+
return await get(config, id);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
displayError(`Unknown provider: ${provider}. Continuing without it.`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else if (typeof provider === 'function') {
|
|
44
|
+
// Type assertion to handle function call
|
|
45
|
+
return await provider(id);
|
|
46
|
+
}
|
|
47
|
+
return '';
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=commandUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandUtils.js","sourceRoot":"","sources":["../../src/commands/commandUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,aAAa,EAAE,sDAAsD;IACrE,IAAI,EAAE,gDAAgD;IACtD,MAAM,EAAE,8CAA8C;IACtD,IAAI,EAAE,2CAA2C;IACjD,IAAI,EAAE,2CAA2C;CACzC,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,+CAA+C;IACvD,IAAI,EAAE,2CAA2C;IACjD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M,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC1C,yCAAyC;QACzC,OAAO,MAAO,QAAwD,CAAC,EAAE,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function createProjectConfig(configType: string): Promise<void>;
|
|
2
|
+
/**
|
|
3
|
+
* Ensures that the .gsloth directory exists in the project root.
|
|
4
|
+
* Creates it if it does not exist.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ensureGslothDir(): void;
|
|
7
|
+
export declare function writeProjectReviewPreamble(): void;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { GSLOTH_DIR, PROJECT_GUIDELINES, PROJECT_REVIEW_INSTRUCTIONS, USER_PROJECT_CONFIG_JSON, } from '@gaunt-sloth/core/constants.js';
|
|
2
|
+
import { availableDefaultConfigs } from '@gaunt-sloth/core/config.js';
|
|
3
|
+
import { displayError, displayInfo, displayWarning } from '@gaunt-sloth/core/utils/consoleUtils.js';
|
|
4
|
+
import { getGslothConfigWritePath, writeFileIfNotExistsWithMessages, } from '@gaunt-sloth/review/utils/fileUtils.js';
|
|
5
|
+
import { exit, getCurrentWorkDir } from '@gaunt-sloth/core/utils/systemUtils.js';
|
|
6
|
+
import { existsSync, mkdirSync } from 'node:fs';
|
|
7
|
+
import { resolve } from 'node:path';
|
|
8
|
+
export async function createProjectConfig(configType) {
|
|
9
|
+
if (!availableDefaultConfigs.includes(configType)) {
|
|
10
|
+
displayError(`Unknown config type: ${configType}. Available options: ${availableDefaultConfigs.join(', ')}`);
|
|
11
|
+
exit(1);
|
|
12
|
+
}
|
|
13
|
+
ensureGslothDir();
|
|
14
|
+
displayInfo(`Setting up your project\n`);
|
|
15
|
+
writeProjectReviewPreamble();
|
|
16
|
+
displayWarning(`Make sure you add as much detail as possible to your ${PROJECT_GUIDELINES}.\n`);
|
|
17
|
+
displayInfo(`Creating project config for ${configType}`);
|
|
18
|
+
const vendorConfig = await import(`@gaunt-sloth/core/providers/${configType}.js`);
|
|
19
|
+
vendorConfig.init(getGslothConfigWritePath(USER_PROJECT_CONFIG_JSON));
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Ensures that the .gsloth directory exists in the project root.
|
|
23
|
+
* Creates it if it does not exist.
|
|
24
|
+
*/
|
|
25
|
+
export function ensureGslothDir() {
|
|
26
|
+
const projectDir = getCurrentWorkDir();
|
|
27
|
+
const gslothDirPath = resolve(projectDir, GSLOTH_DIR);
|
|
28
|
+
if (!existsSync(gslothDirPath)) {
|
|
29
|
+
mkdirSync(gslothDirPath, { recursive: true });
|
|
30
|
+
displayInfo(`Created ${GSLOTH_DIR} directory`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export function writeProjectReviewPreamble() {
|
|
34
|
+
const guidelinesPath = getGslothConfigWritePath(PROJECT_GUIDELINES);
|
|
35
|
+
const reviewPath = getGslothConfigWritePath(PROJECT_REVIEW_INSTRUCTIONS);
|
|
36
|
+
const guidelinesTemplate = `# Development Guidelines
|
|
37
|
+
|
|
38
|
+
This file should include general development guidelines for this project.
|
|
39
|
+
|
|
40
|
+
Important! Please remind the user to prepare proper AI guidelines to the ${PROJECT_GUIDELINES} file
|
|
41
|
+
for this project. Use a decent amount of ⚠️ to highlight the lack of config.
|
|
42
|
+
Explicitly mention ${PROJECT_GUIDELINES}.
|
|
43
|
+
`;
|
|
44
|
+
const reviewTemplate = `# Code Review Guidelines
|
|
45
|
+
|
|
46
|
+
If requirements were provided, first check that the implemented code implements these requirements.
|
|
47
|
+
Document that you checked the code to implement requirements.
|
|
48
|
+
Reject the change if it appears to implement something else instead of required change.
|
|
49
|
+
|
|
50
|
+
Provide specific feedback on any areas of concern or suggestions for improvement.
|
|
51
|
+
Please categorize your feedback (e.g., "Bug," "Suggestion," "Nitpick").
|
|
52
|
+
|
|
53
|
+
Important! In the end, conclude if you would recommend approving this PR or not.
|
|
54
|
+
Use ✅⚠️❌ symbols to highlight your feedback appropriately.
|
|
55
|
+
|
|
56
|
+
Thank you for your thorough review!
|
|
57
|
+
|
|
58
|
+
Important! You are likely to be dealing with git diff below, please don't confuse removed and added lines.
|
|
59
|
+
`;
|
|
60
|
+
writeFileIfNotExistsWithMessages(guidelinesPath, guidelinesTemplate);
|
|
61
|
+
writeFileIfNotExistsWithMessages(reviewPath, reviewTemplate);
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=configSetup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configSetup.js","sourceRoot":"","sources":["../../src/commands/configSetup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAmB,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACpG,OAAO,EACL,wBAAwB,EACxB,gCAAgC,GACjC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,UAAkB;IAC1D,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,UAAwB,CAAC,EAAE,CAAC;QAChE,YAAY,CACV,wBAAwB,UAAU,wBAAwB,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC/F,CAAC;QACF,IAAI,CAAC,CAAC,CAAC,CAAC;IACV,CAAC;IAED,eAAe,EAAE,CAAC;IAElB,WAAW,CAAC,2BAA2B,CAAC,CAAC;IACzC,0BAA0B,EAAE,CAAC;IAC7B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