@codebakers/cli 3.9.16 → 3.9.17

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.
@@ -835,6 +835,15 @@ class CodeBakersServer {
835
835
  items: { type: 'string' },
836
836
  description: 'Files that were created/modified for this feature',
837
837
  },
838
+ envVarsAdded: {
839
+ type: 'array',
840
+ items: { type: 'string' },
841
+ description: 'New environment variables added during implementation (e.g., ["PAYPAL_CLIENT_ID", "PAYPAL_SECRET"])',
842
+ },
843
+ schemaModified: {
844
+ type: 'boolean',
845
+ description: 'Set to true if database schema (db/schema.ts) was modified',
846
+ },
838
847
  },
839
848
  required: ['feature'],
840
849
  },
@@ -3922,12 +3931,21 @@ Just describe what you want to build! I'll automatically:
3922
3931
  * Runs local checks (tests, TypeScript), then validates with server
3923
3932
  */
3924
3933
  async handleValidateComplete(args) {
3925
- const { feature, files = [] } = args;
3934
+ const { feature, files = [], envVarsAdded = [], schemaModified: schemaModifiedArg } = args;
3926
3935
  const cwd = process.cwd();
3927
3936
  let testsExist = false;
3928
3937
  let testsPass = false;
3929
3938
  let typescriptPass = false;
3930
3939
  const testsWritten = [];
3940
+ // v3.9.17: Auto-detect schema modifications if not explicitly provided
3941
+ let schemaModified = schemaModifiedArg;
3942
+ if (schemaModified === undefined) {
3943
+ // Check if schema file was in the modified files list
3944
+ schemaModified = files.some(f => f.includes('schema.ts') ||
3945
+ f.includes('schema/') ||
3946
+ f.includes('db/schema') ||
3947
+ f.includes('drizzle/'));
3948
+ }
3931
3949
  // v6.1: Code analysis for compliance scoring
3932
3950
  const codeAnalysis = {};
3933
3951
  // Step 1: Get session token (from memory or state file)
@@ -4105,6 +4123,9 @@ Just describe what you want to build! I'll automatically:
4105
4123
  testsPassed: testsPass,
4106
4124
  typescriptPassed: typescriptPass,
4107
4125
  codeAnalysis, // v6.1: Send code analysis for compliance scoring
4126
+ // v3.9.17: Environment and schema validation
4127
+ envVarsAdded: envVarsAdded.length > 0 ? envVarsAdded : undefined,
4128
+ schemaModified,
4108
4129
  }),
4109
4130
  });
4110
4131
  const result = await response.json();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebakers/cli",
3
- "version": "3.9.16",
3
+ "version": "3.9.17",
4
4
  "description": "CodeBakers CLI - Production patterns for AI-assisted development",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/mcp/server.ts CHANGED
@@ -917,6 +917,15 @@ class CodeBakersServer {
917
917
  items: { type: 'string' },
918
918
  description: 'Files that were created/modified for this feature',
919
919
  },
920
+ envVarsAdded: {
921
+ type: 'array',
922
+ items: { type: 'string' },
923
+ description: 'New environment variables added during implementation (e.g., ["PAYPAL_CLIENT_ID", "PAYPAL_SECRET"])',
924
+ },
925
+ schemaModified: {
926
+ type: 'boolean',
927
+ description: 'Set to true if database schema (db/schema.ts) was modified',
928
+ },
920
929
  },
921
930
  required: ['feature'],
922
931
  },
@@ -1686,7 +1695,7 @@ class CodeBakersServer {
1686
1695
  return this.handleGenerateTests(args as { file?: string; feature?: string; testType?: 'unit' | 'integration' | 'e2e' });
1687
1696
 
1688
1697
  case 'validate_complete':
1689
- return this.handleValidateComplete(args as { feature: string; files?: string[] });
1698
+ return this.handleValidateComplete(args as { feature: string; files?: string[]; envVarsAdded?: string[]; schemaModified?: boolean });
1690
1699
 
1691
1700
  case 'discover_patterns':
1692
1701
  return this.handleDiscoverPatterns(args as { task: string; files?: string[]; keywords?: string[] });
@@ -4384,14 +4393,26 @@ Just describe what you want to build! I'll automatically:
4384
4393
  * MANDATORY: Validate that a feature is complete before AI can say "done" (v6.0 Server-Side)
4385
4394
  * Runs local checks (tests, TypeScript), then validates with server
4386
4395
  */
4387
- private async handleValidateComplete(args: { feature: string; files?: string[] }) {
4388
- const { feature, files = [] } = args;
4396
+ private async handleValidateComplete(args: { feature: string; files?: string[]; envVarsAdded?: string[]; schemaModified?: boolean }) {
4397
+ const { feature, files = [], envVarsAdded = [], schemaModified: schemaModifiedArg } = args;
4389
4398
  const cwd = process.cwd();
4390
4399
  let testsExist = false;
4391
4400
  let testsPass = false;
4392
4401
  let typescriptPass = false;
4393
4402
  const testsWritten: string[] = [];
4394
4403
 
4404
+ // v3.9.17: Auto-detect schema modifications if not explicitly provided
4405
+ let schemaModified = schemaModifiedArg;
4406
+ if (schemaModified === undefined) {
4407
+ // Check if schema file was in the modified files list
4408
+ schemaModified = files.some(f =>
4409
+ f.includes('schema.ts') ||
4410
+ f.includes('schema/') ||
4411
+ f.includes('db/schema') ||
4412
+ f.includes('drizzle/')
4413
+ );
4414
+ }
4415
+
4395
4416
  // v6.1: Code analysis for compliance scoring
4396
4417
  const codeAnalysis: {
4397
4418
  hasErrorHandling?: boolean;
@@ -4584,6 +4605,9 @@ Just describe what you want to build! I'll automatically:
4584
4605
  testsPassed: testsPass,
4585
4606
  typescriptPassed: typescriptPass,
4586
4607
  codeAnalysis, // v6.1: Send code analysis for compliance scoring
4608
+ // v3.9.17: Environment and schema validation
4609
+ envVarsAdded: envVarsAdded.length > 0 ? envVarsAdded : undefined,
4610
+ schemaModified,
4587
4611
  }),
4588
4612
  });
4589
4613