@auracheck-ai/cli 0.2.11 → 0.3.0-next.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.
@@ -482,6 +482,20 @@ function requireProjectId(ctx, explicit) {
482
482
  }
483
483
 
484
484
  // ../mcp-core/dist/errors.js
485
+ function resetClause(resetsAt) {
486
+ if (!resetsAt)
487
+ return "";
488
+ const d = new Date(resetsAt);
489
+ if (Number.isNaN(d.getTime()))
490
+ return "";
491
+ const day = new Intl.DateTimeFormat("en-GB", {
492
+ day: "numeric",
493
+ month: "short",
494
+ year: "numeric",
495
+ timeZone: "Asia/Jakarta"
496
+ }).format(d);
497
+ return ` It resets on ${day}.`;
498
+ }
485
499
  function parseBody(bodyText) {
486
500
  try {
487
501
  return JSON.parse(bodyText);
@@ -517,7 +531,7 @@ function mapApiError(err, ctx, requiresCapability) {
517
531
  const actionClause = isAdmin ? `Upgrade your plan or buy an AI-run top-up: ${ctx.renewalUrl}` : contact2 ? `Ask ${contactName(contact2)} to upgrade or buy a top-up.` : "Ask your admin to upgrade or buy a top-up.";
518
532
  return {
519
533
  blocked: true,
520
- message: `This month's AI test run quota (${body.limit}/mo) is used up. You can still run this case manually. ${actionClause}`
534
+ message: `The AI test run quota for this period (${body.limit} per month) is used up.${resetClause(body.resetsAt)} You can still run this case manually. ${actionClause}`
521
535
  };
522
536
  }
523
537
  if (body.isCompanyAdmin ?? isCompanyAdminRole(account)) {
@@ -1159,6 +1173,9 @@ function stripSecrets(value, depth = 0) {
1159
1173
  if (depth > MAX_DEPTH || value === null || value === void 0) {
1160
1174
  return value;
1161
1175
  }
1176
+ if (value instanceof Uint8Array) {
1177
+ return value;
1178
+ }
1162
1179
  if (Array.isArray(value)) {
1163
1180
  return value.map((v) => stripSecrets(v, depth + 1));
1164
1181
  }
@@ -5363,7 +5380,7 @@ var SourceReader = class {
5363
5380
  };
5364
5381
 
5365
5382
  // src/mcp/server.ts
5366
- var CLI_VERSION = "0.2.11";
5383
+ var CLI_VERSION = "0.3.0-next.0";
5367
5384
  var LOCAL_ALL_CAPABILITIES = [
5368
5385
  "viewProject",
5369
5386
  "viewReports",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auracheck-ai/cli",
3
- "version": "0.2.11",
3
+ "version": "0.3.0-next.0",
4
4
  "description": "AuraCheck CLI + MCP server for AI-driven whitebox testcase generation",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,11 +24,22 @@
24
24
  "files": [
25
25
  "dist",
26
26
  "!dist/**/*.map",
27
+ "schema",
27
28
  "README.md",
28
29
  "USAGE.md",
29
30
  "LICENSE",
30
31
  "NOTICE"
31
32
  ],
33
+ "scripts": {
34
+ "build": "tsup && chmod +x dist/bin.js",
35
+ "dev": "tsup --watch",
36
+ "start": "node dist/bin.js",
37
+ "typecheck": "tsc -p tsconfig.json --noEmit",
38
+ "prepack": "pnpm run build",
39
+ "test": "vitest --run",
40
+ "test:watch": "vitest",
41
+ "schema": "tsx scripts/gen-schema.ts"
42
+ },
32
43
  "publishConfig": {
33
44
  "access": "public"
34
45
  },
@@ -38,27 +49,21 @@
38
49
  "picocolors": "^1.1.1",
39
50
  "prompts": "^2.4.2",
40
51
  "undici": "^7.28.0",
52
+ "yaml": "^2.9.1",
41
53
  "zod": "^3.25.0",
42
54
  "zod-to-json-schema": "^3.25.2"
43
55
  },
44
56
  "devDependencies": {
57
+ "@auracheck-ai/mcp-apps-ui": "workspace:*",
58
+ "@auracheck-ai/mcp-core": "workspace:*",
45
59
  "@types/node": "^18.0.0",
46
60
  "@types/prompts": "^2.4.9",
47
61
  "tsup": "^8.3.5",
62
+ "tsx": "^4.19.2",
48
63
  "typescript": "^5.8.3",
49
- "vitest": "3.0.5",
50
- "@auracheck-ai/mcp-core": "0.1.0",
51
- "@auracheck-ai/mcp-apps-ui": "0.1.0"
64
+ "vitest": "3.0.5"
52
65
  },
53
66
  "engines": {
54
67
  "node": ">=18.19.0"
55
- },
56
- "scripts": {
57
- "build": "tsup && chmod +x dist/bin.js",
58
- "dev": "tsup --watch",
59
- "start": "node dist/bin.js",
60
- "typecheck": "tsc -p tsconfig.json --noEmit",
61
- "test": "vitest --run",
62
- "test:watch": "vitest"
63
68
  }
64
- }
69
+ }
@@ -0,0 +1,295 @@
1
+ {
2
+ "$id": "https://unpkg.com/@auracheck-ai/cli/schema/auracheck.schema.json",
3
+ "title": "AuraCheck PR review config",
4
+ "type": "object",
5
+ "properties": {
6
+ "language": {
7
+ "type": "string",
8
+ "default": "en",
9
+ "description": "Language of the review prose, e.g. \"en\" or \"id\"."
10
+ },
11
+ "tone_instructions": {
12
+ "type": "string",
13
+ "maxLength": 250,
14
+ "description": "Extra instructions for the tone of the review comments."
15
+ },
16
+ "reviews": {
17
+ "type": "object",
18
+ "properties": {
19
+ "profile": {
20
+ "type": "string",
21
+ "enum": ["quiet", "chill", "assertive"],
22
+ "default": "chill",
23
+ "description": "quiet: only likely bugs and security; chill: balanced; assertive: also nitpicks."
24
+ },
25
+ "high_level_summary": {
26
+ "type": "boolean",
27
+ "default": true,
28
+ "description": "Write the \"what this MR changes\" summary into the MR description in place of the placeholder."
29
+ },
30
+ "high_level_summary_placeholder": {
31
+ "type": "string",
32
+ "default": "@auracheck summary",
33
+ "description": "Text in the MR description that the summary replaces (once; later runs update the block)."
34
+ },
35
+ "changed_files_summary": {
36
+ "type": "boolean",
37
+ "default": true
38
+ },
39
+ "estimate_code_review_effort": {
40
+ "type": "boolean",
41
+ "default": true
42
+ },
43
+ "assess_linked_issues": {
44
+ "type": "boolean",
45
+ "default": true
46
+ },
47
+ "collapse_walkthrough": {
48
+ "type": "boolean",
49
+ "default": false
50
+ },
51
+ "commit_status": {
52
+ "type": "boolean",
53
+ "default": true,
54
+ "description": "Set an \"AuraCheck review\" commit status on the MR head."
55
+ },
56
+ "fail_commit_status": {
57
+ "type": "boolean",
58
+ "default": false,
59
+ "description": "Mark that commit status failed when the review errors."
60
+ },
61
+ "enable_prompt_for_ai_agents": {
62
+ "type": "boolean",
63
+ "default": true
64
+ },
65
+ "max_inline_comments": {
66
+ "type": "integer",
67
+ "minimum": 0,
68
+ "maximum": 50,
69
+ "default": 8,
70
+ "description": "At most this many inline discussions per run."
71
+ },
72
+ "path_filters": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string"
76
+ },
77
+ "default": [],
78
+ "description": "Globs. \"!glob\" excludes matching files; plain globs keep only matching files."
79
+ },
80
+ "path_instructions": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "object",
84
+ "properties": {
85
+ "path": {
86
+ "type": "string"
87
+ },
88
+ "instructions": {
89
+ "type": "string"
90
+ }
91
+ },
92
+ "required": ["path", "instructions"],
93
+ "additionalProperties": true
94
+ },
95
+ "default": []
96
+ },
97
+ "merge_risk_instructions": {
98
+ "type": "string"
99
+ },
100
+ "security_risk_instructions": {
101
+ "type": "string"
102
+ },
103
+ "auto_review": {
104
+ "type": "object",
105
+ "properties": {
106
+ "enabled": {
107
+ "type": "boolean",
108
+ "default": true
109
+ },
110
+ "auto_incremental_review": {
111
+ "type": "boolean",
112
+ "default": true,
113
+ "description": "Review only the files changed since the last reviewed commit."
114
+ },
115
+ "drafts": {
116
+ "type": "boolean",
117
+ "default": false
118
+ },
119
+ "base_branches": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "string"
123
+ },
124
+ "default": [],
125
+ "description": "Regexes of target branches to review besides the default branch."
126
+ },
127
+ "ignore_title_keywords": {
128
+ "type": "array",
129
+ "items": {
130
+ "type": "string"
131
+ },
132
+ "default": ["[skip review]"]
133
+ },
134
+ "labels": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string"
138
+ },
139
+ "default": [],
140
+ "description": "\"!label\" skips MRs with that label; plain entries review only MRs with one of them."
141
+ },
142
+ "ignore_usernames": {
143
+ "type": "array",
144
+ "items": {
145
+ "type": "string"
146
+ },
147
+ "default": []
148
+ }
149
+ },
150
+ "additionalProperties": true,
151
+ "default": {}
152
+ },
153
+ "pre_merge_checks": {
154
+ "type": "object",
155
+ "properties": {
156
+ "title": {
157
+ "type": "object",
158
+ "properties": {
159
+ "mode": {
160
+ "type": "string",
161
+ "enum": ["off", "warning", "error"],
162
+ "default": "warning"
163
+ },
164
+ "requirements": {
165
+ "type": "string",
166
+ "description": "A regex the title must match, written as /pattern/flags or starting with ^."
167
+ }
168
+ },
169
+ "additionalProperties": true,
170
+ "default": {}
171
+ },
172
+ "description": {
173
+ "type": "object",
174
+ "properties": {
175
+ "mode": {
176
+ "type": "string",
177
+ "enum": ["off", "warning", "error"],
178
+ "default": "warning"
179
+ }
180
+ },
181
+ "additionalProperties": true,
182
+ "default": {}
183
+ },
184
+ "issue_assessment": {
185
+ "type": "object",
186
+ "properties": {
187
+ "mode": {
188
+ "type": "string",
189
+ "enum": ["off", "warning", "error"],
190
+ "default": "warning"
191
+ }
192
+ },
193
+ "additionalProperties": true,
194
+ "default": {}
195
+ }
196
+ },
197
+ "additionalProperties": true,
198
+ "default": {}
199
+ },
200
+ "tools": {
201
+ "type": "object",
202
+ "properties": {
203
+ "biome": {
204
+ "type": "object",
205
+ "properties": {
206
+ "enabled": {
207
+ "type": "boolean",
208
+ "default": true
209
+ }
210
+ },
211
+ "additionalProperties": true,
212
+ "default": {}
213
+ },
214
+ "eslint": {
215
+ "type": "object",
216
+ "properties": {
217
+ "enabled": {
218
+ "type": "boolean",
219
+ "default": true
220
+ }
221
+ },
222
+ "additionalProperties": true,
223
+ "default": {}
224
+ },
225
+ "gitleaks": {
226
+ "type": "object",
227
+ "properties": {
228
+ "enabled": {
229
+ "type": "boolean",
230
+ "default": true
231
+ }
232
+ },
233
+ "additionalProperties": true,
234
+ "default": {}
235
+ },
236
+ "osv": {
237
+ "type": "object",
238
+ "properties": {
239
+ "enabled": {
240
+ "type": "boolean",
241
+ "default": true
242
+ }
243
+ },
244
+ "additionalProperties": true,
245
+ "default": {}
246
+ }
247
+ },
248
+ "additionalProperties": true,
249
+ "default": {}
250
+ }
251
+ },
252
+ "additionalProperties": true,
253
+ "default": {}
254
+ },
255
+ "knowledge_base": {
256
+ "type": "object",
257
+ "properties": {
258
+ "opt_out": {
259
+ "type": "boolean",
260
+ "default": false,
261
+ "description": "Keep nothing beyond usage counters on the server."
262
+ },
263
+ "code_guidelines": {
264
+ "type": "object",
265
+ "properties": {
266
+ "enabled": {
267
+ "type": "boolean",
268
+ "default": true
269
+ },
270
+ "file_patterns": {
271
+ "type": "array",
272
+ "items": {
273
+ "type": "string"
274
+ },
275
+ "default": [
276
+ "AGENTS.md",
277
+ "CLAUDE.md",
278
+ "CONTRIBUTING.md",
279
+ ".cursorrules",
280
+ ".github/copilot-instructions.md"
281
+ ]
282
+ }
283
+ },
284
+ "additionalProperties": true,
285
+ "default": {}
286
+ }
287
+ },
288
+ "additionalProperties": true,
289
+ "default": {}
290
+ }
291
+ },
292
+ "additionalProperties": true,
293
+ "description": "AuraCheck PR review configuration (.auracheck.yaml)",
294
+ "$schema": "http://json-schema.org/draft-07/schema#"
295
+ }