@gaunt-sloth/review 0.0.2 → 0.0.4
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 +26 -0
- package/cli.js +14 -3
- package/package.json +18 -2
package/README.md
CHANGED
|
@@ -15,6 +15,24 @@ Review and question-answering functionality for Gaunt Sloth.
|
|
|
15
15
|
|
|
16
16
|
The package ships a standalone binary `gaunt-sloth-review` for CI-friendly reviews that does not depend on `commander`. This makes it suitable for embedding in pipelines where a minimal footprint is preferred.
|
|
17
17
|
|
|
18
|
+
```bash
|
|
19
|
+
gaunt-sloth-review <pr-number> [requirement-ids...]
|
|
20
|
+
gaunt-sloth-review --version
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Identity profiles
|
|
24
|
+
|
|
25
|
+
To use a different config profile (e.g. separate provider/auth for CI vs local),
|
|
26
|
+
set the `GSLOTH_IDENTITY_PROFILE` environment variable:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
GSLOTH_IDENTITY_PROFILE=review gaunt-sloth-review 123
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
This loads config from `.gsloth-settings/review/` instead of the default
|
|
33
|
+
`.gsloth/` directory. Useful when CI uses different credentials or a different
|
|
34
|
+
LLM provider than local development.
|
|
35
|
+
|
|
18
36
|
## Dependencies
|
|
19
37
|
|
|
20
38
|
- `@gaunt-sloth/core` (required)
|
|
@@ -29,3 +47,11 @@ import { reviewModule } from '@gaunt-sloth/review/reviewModule.js';
|
|
|
29
47
|
import { questionAnsweringModule } from '@gaunt-sloth/review/questionAnsweringModule.js';
|
|
30
48
|
import { commandUtils } from '@gaunt-sloth/review/commandUtils.js';
|
|
31
49
|
```
|
|
50
|
+
|
|
51
|
+
## Related packages
|
|
52
|
+
|
|
53
|
+
- [`@gaunt-sloth/core`](../core) — Core utilities, config, and agent infrastructure
|
|
54
|
+
- [`@gaunt-sloth/tools`](../tools) — Built-in tools, filesystem toolkit, and middleware registry
|
|
55
|
+
- [`@gaunt-sloth/api`](../api) — API server, AG-UI, MCP, and A2A integration
|
|
56
|
+
- [`@gaunt-sloth/review`](../review) — Review and Q&A modules with standalone CLI (this package)
|
|
57
|
+
- [`gaunt-sloth-assistant`](../assistant) — Main CLI application
|
package/cli.js
CHANGED
|
@@ -8,6 +8,17 @@
|
|
|
8
8
|
* When called without arguments, reads diff from stdin via the configured content provider.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import { createRequire } from 'node:module';
|
|
12
|
+
|
|
13
|
+
const args = process.argv.slice(2);
|
|
14
|
+
|
|
15
|
+
if (args.includes('--version') || args.includes('-v')) {
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
const { version } = require('./package.json');
|
|
18
|
+
console.log(version);
|
|
19
|
+
process.exit(0);
|
|
20
|
+
}
|
|
21
|
+
|
|
11
22
|
import { setEntryPoint } from '@gaunt-sloth/core/utils/systemUtils.js';
|
|
12
23
|
setEntryPoint(import.meta.url);
|
|
13
24
|
|
|
@@ -17,11 +28,11 @@ import { displayError } from '@gaunt-sloth/core/utils/consoleUtils.js';
|
|
|
17
28
|
import { getContentFromSource, getRequirementsFromSource } from '#src/commands/commandUtils.js';
|
|
18
29
|
import { buildSystemMessages } from '@gaunt-sloth/core/utils/llmUtils.js';
|
|
19
30
|
|
|
20
|
-
const args = process.argv.slice(2);
|
|
21
|
-
|
|
22
31
|
async function main() {
|
|
23
32
|
try {
|
|
24
|
-
const config = await initConfig({
|
|
33
|
+
const config = await initConfig({
|
|
34
|
+
identityProfile: process.env.GSLOTH_IDENTITY_PROFILE,
|
|
35
|
+
});
|
|
25
36
|
|
|
26
37
|
// First arg is content (e.g. PR number), rest are requirements
|
|
27
38
|
const contentArg = args[0];
|
package/package.json
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gaunt-sloth/review",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Review functionality for Gaunt Sloth",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Andrew Kondratev",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant.git",
|
|
10
|
+
"directory": "packages/review"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/tree/main/packages/review#readme",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"ai",
|
|
18
|
+
"agent",
|
|
19
|
+
"llm",
|
|
20
|
+
"code-review",
|
|
21
|
+
"cli"
|
|
22
|
+
],
|
|
7
23
|
"type": "module",
|
|
8
24
|
"main": "dist/index.js",
|
|
9
25
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +34,7 @@
|
|
|
18
34
|
"#src/*.js": "./dist/*.js"
|
|
19
35
|
},
|
|
20
36
|
"dependencies": {
|
|
21
|
-
"@gaunt-sloth/core": "^0.0.
|
|
37
|
+
"@gaunt-sloth/core": "^0.0.3"
|
|
22
38
|
},
|
|
23
39
|
"peerDependencies": {
|
|
24
40
|
"@gaunt-sloth/tools": "^0.0.1"
|