@juspay/yama 1.1.1 → 1.3.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.
- package/CHANGELOG.md +16 -7
- package/README.md +1 -1
- package/dist/core/ContextGatherer.d.ts +8 -3
- package/dist/core/ContextGatherer.js +40 -21
- package/dist/core/Guardian.js +5 -1
- package/dist/core/providers/BitbucketProvider.js +1 -1
- package/dist/features/CodeReviewer.d.ts +49 -1
- package/dist/features/CodeReviewer.js +452 -26
- package/dist/types/index.d.ts +44 -0
- package/dist/utils/Cache.d.ts +5 -0
- package/dist/utils/Cache.js +17 -1
- package/dist/utils/ConfigManager.d.ts +4 -0
- package/dist/utils/ConfigManager.js +21 -1
- package/dist/utils/MemoryBankManager.d.ts +73 -0
- package/dist/utils/MemoryBankManager.js +310 -0
- package/dist/utils/ProviderLimits.d.ts +58 -0
- package/dist/utils/ProviderLimits.js +143 -0
- package/package.json +30 -5
- package/yama.config.example.yaml +19 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/yama",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Enterprise-grade Pull Request automation toolkit with AI-powered code review and description enhancement",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pr",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"test": "jest",
|
|
55
55
|
"lint": "eslint .",
|
|
56
56
|
"lint:fix": "eslint . --fix",
|
|
57
|
-
"type-check": "tsc --noEmit",
|
|
57
|
+
"type-check": "tsc --noEmit --skipLibCheck",
|
|
58
58
|
"format": "prettier --write .",
|
|
59
59
|
"format:check": "prettier --check .",
|
|
60
60
|
"docs": "typedoc src",
|
|
61
61
|
"clean": "rimraf dist",
|
|
62
|
-
"prepare": "
|
|
62
|
+
"prepare": "husky install",
|
|
63
63
|
"prepack": "npm run build && npm run test",
|
|
64
64
|
"changeset": "changeset",
|
|
65
65
|
"changeset:version": "changeset version && git add --all",
|
|
@@ -67,7 +67,20 @@
|
|
|
67
67
|
"release:dry": "npm publish --dry-run",
|
|
68
68
|
"release:github": "npm publish --registry https://npm.pkg.github.com",
|
|
69
69
|
"version:check": "npm version --no-git-tag-version",
|
|
70
|
-
"pack:verify": "npm pack && tar -tzf *.tgz | head -20"
|
|
70
|
+
"pack:verify": "npm pack && tar -tzf *.tgz | head -20",
|
|
71
|
+
"validate": "npm run validate:env && npm run validate:security",
|
|
72
|
+
"validate:all": "npm run lint && npm run type-check && npm run validate",
|
|
73
|
+
"validate:env": "node scripts/validate-env.cjs",
|
|
74
|
+
"validate:security": "node scripts/validate-security.cjs",
|
|
75
|
+
"validate:commit": "node scripts/commit-validation.cjs \"$(git log -1 --pretty=format:'%s')\"",
|
|
76
|
+
"validate:build": "node scripts/build-validations.cjs",
|
|
77
|
+
"commit:validate": "node scripts/commit-validation.cjs",
|
|
78
|
+
"pre-commit": "lint-staged",
|
|
79
|
+
"pre-push": "npm run validate && npm run test",
|
|
80
|
+
"quality:all": "npm run lint && npm run format && npm run test",
|
|
81
|
+
"quality:metrics": "node scripts/quality-metrics.cjs",
|
|
82
|
+
"quality:report": "npm run quality:metrics && echo 'Quality metrics saved to quality-metrics.json'",
|
|
83
|
+
"check:all": "npm run lint && npm run format --check && npm run validate && npm run validate:commit"
|
|
71
84
|
},
|
|
72
85
|
"dependencies": {
|
|
73
86
|
"@juspay/neurolink": "^5.1.0",
|
|
@@ -111,7 +124,9 @@
|
|
|
111
124
|
"@semantic-release/release-notes-generator": "^14.0.1",
|
|
112
125
|
"semantic-release": "^24.0.0",
|
|
113
126
|
"prettier": "^3.0.0",
|
|
114
|
-
"publint": "^0.3.0"
|
|
127
|
+
"publint": "^0.3.0",
|
|
128
|
+
"husky": "^9.0.0",
|
|
129
|
+
"lint-staged": "^15.0.0"
|
|
115
130
|
},
|
|
116
131
|
"peerDependencies": {
|
|
117
132
|
"typescript": ">=4.5.0"
|
|
@@ -134,5 +149,15 @@
|
|
|
134
149
|
"onlyBuiltDependencies": [
|
|
135
150
|
"esbuild"
|
|
136
151
|
]
|
|
152
|
+
},
|
|
153
|
+
"lint-staged": {
|
|
154
|
+
"*.{ts,tsx,js,jsx}": [
|
|
155
|
+
"eslint --fix",
|
|
156
|
+
"prettier --write"
|
|
157
|
+
],
|
|
158
|
+
"*.{json,md,yml,yaml}": [
|
|
159
|
+
"prettier --write"
|
|
160
|
+
],
|
|
161
|
+
"*.ts": []
|
|
137
162
|
}
|
|
138
163
|
}
|
package/yama.config.example.yaml
CHANGED
|
@@ -7,7 +7,7 @@ providers:
|
|
|
7
7
|
provider: "auto" # Options: auto, google-ai, openai, anthropic, azure, bedrock
|
|
8
8
|
model: "best" # Model name or "best" for auto-selection
|
|
9
9
|
temperature: 0.3 # Lower = more focused (0.0-1.0)
|
|
10
|
-
maxTokens:
|
|
10
|
+
maxTokens: 60000 # Maximum tokens for response (provider-aware limits will be applied automatically)
|
|
11
11
|
timeout: "15m" # Timeout for AI operations
|
|
12
12
|
enableAnalytics: true
|
|
13
13
|
enableEvaluation: false
|
|
@@ -51,6 +51,15 @@ features:
|
|
|
51
51
|
- "Performance bottlenecks"
|
|
52
52
|
- "Error handling"
|
|
53
53
|
- "Code quality"
|
|
54
|
+
|
|
55
|
+
# NEW: Batch Processing Configuration
|
|
56
|
+
batchProcessing:
|
|
57
|
+
enabled: true # Enable batch processing for large PRs
|
|
58
|
+
maxFilesPerBatch: 3 # Maximum files to process in each batch
|
|
59
|
+
prioritizeSecurityFiles: true # Process security-sensitive files first
|
|
60
|
+
parallelBatches: false # Process batches sequentially for reliability
|
|
61
|
+
batchDelayMs: 1000 # Delay between batches in milliseconds
|
|
62
|
+
singleRequestThreshold: 5 # Use single request for PRs with ≤5 files
|
|
54
63
|
|
|
55
64
|
# Description Enhancement Configuration
|
|
56
65
|
descriptionEnhancement:
|
|
@@ -141,3 +150,12 @@ monitoring:
|
|
|
141
150
|
metrics: ["api_calls", "cache_hits", "processing_time"]
|
|
142
151
|
exportFormat: "prometheus"
|
|
143
152
|
interval: "1m"
|
|
153
|
+
|
|
154
|
+
# Memory Bank Configuration
|
|
155
|
+
memoryBank:
|
|
156
|
+
enabled: true
|
|
157
|
+
path: "memory-bank" # Primary path to look for memory bank files
|
|
158
|
+
fallbackPaths: # Optional fallback paths if primary doesn't exist
|
|
159
|
+
- "docs/memory-bank"
|
|
160
|
+
- ".memory-bank"
|
|
161
|
+
- "project-docs/context"
|