@kmlckj/licos-ai-cli 1.0.26 → 1.0.27
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/lib/cli.js +13 -15
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -2109,7 +2109,7 @@ const EventBuilder = {
|
|
|
2109
2109
|
};
|
|
2110
2110
|
|
|
2111
2111
|
var name = "@kmlckj/licos-ai-cli";
|
|
2112
|
-
var version = "1.0.
|
|
2112
|
+
var version = "1.0.27";
|
|
2113
2113
|
var description = "LICOS AI coding workspace CLI - project template engine and dev tools";
|
|
2114
2114
|
var license = "MIT";
|
|
2115
2115
|
var author = "kmlckj";
|
|
@@ -9047,26 +9047,24 @@ const readGitConfig = (projectPath, key) => {
|
|
|
9047
9047
|
const ensureGitCommitIdentity = (projectPath) => {
|
|
9048
9048
|
const existingName = readGitConfig(projectPath, 'user.name');
|
|
9049
9049
|
const existingEmail = readGitConfig(projectPath, 'user.email');
|
|
9050
|
+
const userId = (process.env.AGENT_USER_ID || process.env.LICOS_USER_ID || '').trim();
|
|
9051
|
+
const desiredName = userId || process.env.LICOS_GIT_USER_NAME || process.env.GIT_AUTHOR_NAME || '';
|
|
9052
|
+
const desiredEmail = userId
|
|
9053
|
+
? `${userId}@aios.licos.com`
|
|
9054
|
+
: process.env.LICOS_GIT_USER_EMAIL || process.env.GIT_AUTHOR_EMAIL || '';
|
|
9055
|
+
const shouldSetName = desiredName && existingName !== desiredName;
|
|
9056
|
+
const shouldSetEmail = desiredEmail && existingEmail !== desiredEmail;
|
|
9050
9057
|
|
|
9051
|
-
if (
|
|
9058
|
+
if (!shouldSetName && !shouldSetEmail) {
|
|
9052
9059
|
return;
|
|
9053
9060
|
}
|
|
9054
9061
|
|
|
9055
|
-
const fallbackName =
|
|
9056
|
-
process.env.LICOS_GIT_USER_NAME ||
|
|
9057
|
-
process.env.GIT_AUTHOR_NAME ||
|
|
9058
|
-
'LicOS Agent';
|
|
9059
|
-
const fallbackEmail =
|
|
9060
|
-
process.env.LICOS_GIT_USER_EMAIL ||
|
|
9061
|
-
process.env.GIT_AUTHOR_EMAIL ||
|
|
9062
|
-
'agent@licos.local';
|
|
9063
|
-
|
|
9064
9062
|
logger.info('Configuring local git commit identity...');
|
|
9065
|
-
if (
|
|
9066
|
-
runGitCommandArgs(['config', '--local', 'user.name',
|
|
9063
|
+
if (shouldSetName) {
|
|
9064
|
+
runGitCommandArgs(['config', '--local', 'user.name', desiredName], projectPath);
|
|
9067
9065
|
}
|
|
9068
|
-
if (
|
|
9069
|
-
runGitCommandArgs(['config', '--local', 'user.email',
|
|
9066
|
+
if (shouldSetEmail) {
|
|
9067
|
+
runGitCommandArgs(['config', '--local', 'user.email', desiredEmail], projectPath);
|
|
9070
9068
|
}
|
|
9071
9069
|
};
|
|
9072
9070
|
|