+4
-9
@@ -25,13 +25,8 @@ #!/usr/bin/env node | ||
| // Platform package and binary aliases let multiple wrapper names consume one | ||
| // immutable payload. dimagent shares dimcode's packages; goatchain is separate. | ||
| // Inner binary file name shipped inside each platform sub-package's bin/. | ||
| // Only needed when the binary basename differs from the wrapper package name. | ||
| const BINARY_BASENAMES = { | ||
| 'dimagent': 'dimcode', | ||
| 'goatchain-cli': 'goatchain', | ||
| } | ||
| const binaryBasename = BINARY_BASENAMES[wrapperName] || wrapperName | ||
| const PLATFORM_PACKAGE_PREFIXES = { | ||
| 'dimagent': 'dimcode', | ||
| } | ||
| const platformPackagePrefix = PLATFORM_PACKAGE_PREFIXES[wrapperName] || wrapperName | ||
@@ -71,3 +66,3 @@ const wrapperDir = path.join(__dirname, '..').replace(/\\/g, '/').toLowerCase() | ||
| const arch = archMap[os.arch()] || os.arch() | ||
| const base = platformPackagePrefix + '-' + platform + '-' + arch | ||
| const base = wrapperName + '-' + platform + '-' + arch | ||
| const binary = platform === 'windows' ? binaryBasename + '.exe' : binaryBasename | ||
@@ -122,3 +117,3 @@ | ||
| const home = os.homedir() | ||
| const cacheDir = path.join(home, '.dimcode', 'binaries', base, version) | ||
| const cacheDir = path.join(home, wrapperName === 'dimagent' ? '.dim' : '.dimcode', 'binaries', base, version) | ||
| const cachedBin = path.join(cacheDir, 'bin', binary) | ||
@@ -125,0 +120,0 @@ if (fs.existsSync(cachedBin)) { |
+6
-6
| { | ||
| "name": "dimcode", | ||
| "version": "0.3.21", | ||
| "version": "0.3.22", | ||
| "description": "AI coding agent CLI and terminal coding assistant with an interactive TUI (beta channel)", | ||
@@ -15,8 +15,8 @@ "type": "module", | ||
| "optionalDependencies": { | ||
| "dimcode-darwin-arm64": "0.3.21", | ||
| "dimcode-darwin-x64": "0.3.21", | ||
| "dimcode-linux-arm64": "0.3.21", | ||
| "dimcode-linux-x64": "0.3.21", | ||
| "dimcode-windows-x64": "0.3.21" | ||
| "dimcode-darwin-arm64": "0.3.22", | ||
| "dimcode-darwin-x64": "0.3.22", | ||
| "dimcode-linux-arm64": "0.3.22", | ||
| "dimcode-linux-x64": "0.3.22", | ||
| "dimcode-windows-x64": "0.3.22" | ||
| } | ||
| } |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
28616
-0.52%261
-1.88%16
6.67%