@codebakers/cli 3.9.35 → 3.9.37

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.
@@ -1626,7 +1626,7 @@ ${content}
1626
1626
  if (auth) {
1627
1627
  const apiUrl = (0, config_js_1.getApiUrl)();
1628
1628
  confirmDownload(apiUrl, auth, {
1629
- version: '6.12',
1629
+ version: '6.19',
1630
1630
  moduleCount: 0,
1631
1631
  cliVersion: getCliVersion(),
1632
1632
  command: 'go',
@@ -1730,7 +1730,7 @@ async function setupExistingProject(cwd, projectInfo, options = {}, auth) {
1730
1730
  if (auth) {
1731
1731
  const apiUrl = (0, config_js_1.getApiUrl)();
1732
1732
  confirmDownload(apiUrl, auth, {
1733
- version: '6.12',
1733
+ version: '6.19',
1734
1734
  moduleCount: 0,
1735
1735
  cliVersion: getCliVersion(),
1736
1736
  command: 'go',
package/dist/config.js CHANGED
@@ -462,7 +462,17 @@ function setCachedUpdateInfo(latestVersion) {
462
462
  * Get the current CLI version from package.json
463
463
  */
464
464
  function getCliVersion() {
465
- return '3.3.5'; // Keep in sync with package.json
465
+ try {
466
+ // Read version from package.json at runtime using path relative to this file
467
+ const path = require('path');
468
+ const packageJsonPath = path.join(__dirname, '..', 'package.json');
469
+ const packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf-8'));
470
+ return packageJson.version || '0.0.0';
471
+ }
472
+ catch {
473
+ // Fallback if package.json can't be read
474
+ return '3.9.35';
475
+ }
466
476
  }
467
477
  // ============================================
468
478
  // Pattern Auto-Update Cache
package/dist/index.js CHANGED
@@ -35,7 +35,8 @@ const api_js_1 = require("./lib/api.js");
35
35
  // ============================================
36
36
  // Automatic Update Notification
37
37
  // ============================================
38
- const CURRENT_VERSION = '3.9.14';
38
+ // Get version dynamically from package.json via getCliVersion()
39
+ const CURRENT_VERSION = (0, config_js_2.getCliVersion)();
39
40
  // Simple semver comparison: returns true if v1 > v2
40
41
  function isNewerVersion(v1, v2) {
41
42
  const parts1 = v1.split('.').map(Number);
@@ -61,7 +61,7 @@ class CodeBakersServer {
61
61
  pendingUpdate = null;
62
62
  lastUpdateCheck = 0;
63
63
  updateCheckInterval = 60 * 60 * 1000; // Check every hour
64
- currentSessionToken = null; // v6.14: Server-side enforcement session
64
+ currentSessionToken = null; // v6.19: Server-side enforcement session
65
65
  constructor() {
66
66
  this.apiKey = (0, config_js_1.getApiKey)();
67
67
  this.apiUrl = (0, config_js_1.getApiUrl)();
@@ -4245,7 +4245,7 @@ If you want AI features and prefer Claude over GPT (or want both as fallback).`,
4245
4245
  };
4246
4246
  }
4247
4247
  /**
4248
- * MANDATORY: Validate that a feature is complete before AI can say "done" (v6.14 Server-Side)
4248
+ * MANDATORY: Validate that a feature is complete before AI can say "done" (v6.19 Server-Side)
4249
4249
  * Runs local checks (tests, TypeScript), then validates with server
4250
4250
  */
4251
4251
  async handleValidateComplete(args) {
@@ -4601,7 +4601,7 @@ If you want AI features and prefer Claude over GPT (or want both as fallback).`,
4601
4601
  }
4602
4602
  }
4603
4603
  /**
4604
- * discover_patterns - START gate for pattern compliance (v6.14 Server-Side)
4604
+ * discover_patterns - START gate for pattern compliance (v6.19 Server-Side)
4605
4605
  * MUST be called before writing any code
4606
4606
  * Calls server API to get patterns and creates enforcement session
4607
4607
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebakers/cli",
3
- "version": "3.9.35",
3
+ "version": "3.9.37",
4
4
  "description": "CodeBakers CLI - Production patterns for AI-assisted development",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -1836,7 +1836,7 @@ ${content}
1836
1836
  if (auth) {
1837
1837
  const apiUrl = getApiUrl();
1838
1838
  confirmDownload(apiUrl, auth, {
1839
- version: '6.12',
1839
+ version: '6.19',
1840
1840
  moduleCount: 0,
1841
1841
  cliVersion: getCliVersion(),
1842
1842
  command: 'go',
@@ -1952,7 +1952,7 @@ async function setupExistingProject(cwd: string, projectInfo: ProjectInfo, optio
1952
1952
  if (auth) {
1953
1953
  const apiUrl = getApiUrl();
1954
1954
  confirmDownload(apiUrl, auth, {
1955
- version: '6.12',
1955
+ version: '6.19',
1956
1956
  moduleCount: 0,
1957
1957
  cliVersion: getCliVersion(),
1958
1958
  command: 'go',
package/src/config.ts CHANGED
@@ -542,7 +542,16 @@ export function setCachedUpdateInfo(latestVersion: string): void {
542
542
  * Get the current CLI version from package.json
543
543
  */
544
544
  export function getCliVersion(): string {
545
- return '3.3.5'; // Keep in sync with package.json
545
+ try {
546
+ // Read version from package.json at runtime using path relative to this file
547
+ const path = require('path');
548
+ const packageJsonPath = path.join(__dirname, '..', 'package.json');
549
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
550
+ return packageJson.version || '0.0.0';
551
+ } catch {
552
+ // Fallback if package.json can't be read
553
+ return '3.9.35';
554
+ }
546
555
  }
547
556
 
548
557
  // ============================================
package/src/index.ts CHANGED
@@ -35,7 +35,8 @@ import { join } from 'path';
35
35
  // Automatic Update Notification
36
36
  // ============================================
37
37
 
38
- const CURRENT_VERSION = '3.9.14';
38
+ // Get version dynamically from package.json via getCliVersion()
39
+ const CURRENT_VERSION = getCliVersion();
39
40
 
40
41
  // Simple semver comparison: returns true if v1 > v2
41
42
  function isNewerVersion(v1: string, v2: string): boolean {
package/src/mcp/server.ts CHANGED
@@ -69,7 +69,7 @@ class CodeBakersServer {
69
69
  private pendingUpdate: { current: string; latest: string } | null = null;
70
70
  private lastUpdateCheck = 0;
71
71
  private updateCheckInterval = 60 * 60 * 1000; // Check every hour
72
- private currentSessionToken: string | null = null; // v6.14: Server-side enforcement session
72
+ private currentSessionToken: string | null = null; // v6.19: Server-side enforcement session
73
73
 
74
74
  constructor() {
75
75
  this.apiKey = getApiKey();
@@ -4743,7 +4743,7 @@ If you want AI features and prefer Claude over GPT (or want both as fallback).`,
4743
4743
  }
4744
4744
 
4745
4745
  /**
4746
- * MANDATORY: Validate that a feature is complete before AI can say "done" (v6.14 Server-Side)
4746
+ * MANDATORY: Validate that a feature is complete before AI can say "done" (v6.19 Server-Side)
4747
4747
  * Runs local checks (tests, TypeScript), then validates with server
4748
4748
  */
4749
4749
  private async handleValidateComplete(args: { feature: string; files?: string[]; envVarsAdded?: string[]; schemaModified?: boolean }) {
@@ -5134,7 +5134,7 @@ If you want AI features and prefer Claude over GPT (or want both as fallback).`,
5134
5134
  }
5135
5135
 
5136
5136
  /**
5137
- * discover_patterns - START gate for pattern compliance (v6.14 Server-Side)
5137
+ * discover_patterns - START gate for pattern compliance (v6.19 Server-Side)
5138
5138
  * MUST be called before writing any code
5139
5139
  * Calls server API to get patterns and creates enforcement session
5140
5140
  */
@@ -0,0 +1 @@
1
+ /c/dev/1 - CodeBakers/codebakers-server/cli
@@ -0,0 +1 @@
1
+ /c/dev/1 - CodeBakers/codebakers-server/cli
@@ -0,0 +1 @@
1
+ /c/dev/1 - CodeBakers/codebakers-server/cli
@@ -0,0 +1 @@
1
+ /c/dev/1 - CodeBakers/codebakers-server/cli