zcf 3.4.1 → 3.4.2

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.
@@ -1,6 +1,6 @@
1
1
  import dayjs from 'dayjs';
2
2
  import { join } from 'pathe';
3
- import { q as ZCF_CONFIG_FILE, Z as ZCF_CONFIG_DIR, am as ensureDir, an as readDefaultTomlConfig, ao as createDefaultTomlConfig, ap as exists, aq as readJsonConfig, ar as writeTomlConfig, S as SETTINGS_FILE, as as copyFile } from './simple-config.mjs';
3
+ import { q as ZCF_CONFIG_FILE, Z as ZCF_CONFIG_DIR, ap as ensureDir, aq as readDefaultTomlConfig, ar as createDefaultTomlConfig, as as exists, at as readJsonConfig, au as writeTomlConfig, S as SETTINGS_FILE, av as copyFile } from './simple-config.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:process';
6
6
  import 'ansis';
@@ -183,15 +183,15 @@ class ClaudeCodeConfigManager {
183
183
  * Apply profile settings to Claude Code runtime
184
184
  */
185
185
  static async applyProfileSettings(profile) {
186
- const { ensureI18nInitialized, i18n } = await import('./simple-config.mjs').then(function (n) { return n.bc; });
186
+ const { ensureI18nInitialized, i18n } = await import('./simple-config.mjs').then(function (n) { return n.bf; });
187
187
  ensureI18nInitialized();
188
188
  try {
189
189
  if (!profile) {
190
- const { switchToOfficialLogin } = await import('./simple-config.mjs').then(function (n) { return n.bg; });
190
+ const { switchToOfficialLogin } = await import('./simple-config.mjs').then(function (n) { return n.bj; });
191
191
  switchToOfficialLogin();
192
192
  return;
193
193
  }
194
- const { readJsonConfig: readJsonConfig2, writeJsonConfig } = await import('./simple-config.mjs').then(function (n) { return n.be; });
194
+ const { readJsonConfig: readJsonConfig2, writeJsonConfig } = await import('./simple-config.mjs').then(function (n) { return n.bh; });
195
195
  const settings = readJsonConfig2(SETTINGS_FILE) || {};
196
196
  if (!settings.env)
197
197
  settings.env = {};
@@ -203,7 +203,7 @@ class ClaudeCodeConfigManager {
203
203
  settings.env.ANTHROPIC_AUTH_TOKEN = profile.apiKey;
204
204
  delete settings.env.ANTHROPIC_API_KEY;
205
205
  } else if (profile.authType === "ccr_proxy") {
206
- const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.bh; });
206
+ const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.bk; });
207
207
  const ccrConfig = readCcrConfig();
208
208
  if (!ccrConfig) {
209
209
  throw new Error(i18n.t("ccr:ccrNotConfigured") || "CCR proxy configuration not found");
@@ -233,7 +233,7 @@ class ClaudeCodeConfigManager {
233
233
  delete settings.env.ANTHROPIC_SMALL_FAST_MODEL;
234
234
  }
235
235
  writeJsonConfig(SETTINGS_FILE, settings);
236
- const { setPrimaryApiKey, addCompletedOnboarding } = await import('./simple-config.mjs').then(function (n) { return n.bf; });
236
+ const { setPrimaryApiKey, addCompletedOnboarding } = await import('./simple-config.mjs').then(function (n) { return n.bi; });
237
237
  setPrimaryApiKey();
238
238
  addCompletedOnboarding();
239
239
  if (shouldRestartCcr) {
@@ -590,7 +590,7 @@ class ClaudeCodeConfigManager {
590
590
  */
591
591
  static async syncCcrProfile() {
592
592
  try {
593
- const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.bh; });
593
+ const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.bk; });
594
594
  const ccrConfig = readCcrConfig();
595
595
  if (!ccrConfig) {
596
596
  await this.ensureCcrProfileExists(ccrConfig);
@@ -1,6 +1,6 @@
1
1
  import ansis from 'ansis';
2
2
  import inquirer from 'inquirer';
3
- import { ah as ensureI18nInitialized, ai as i18n, aj as addNumbersToChoices, ak as validateApiKey, al as promptBoolean } from './simple-config.mjs';
3
+ import { ak as ensureI18nInitialized, al as i18n, am as addNumbersToChoices, an as validateApiKey, ao as promptBoolean } from './simple-config.mjs';
4
4
  import { ClaudeCodeConfigManager } from './claude-code-config-manager.mjs';
5
5
  import 'node:fs';
6
6
  import 'node:process';
@@ -1,6 +1,6 @@
1
1
  import ansis from 'ansis';
2
2
  import inquirer from 'inquirer';
3
- import { ah as ensureI18nInitialized, at as detectConfigManagementMode, ai as i18n, aj as addNumbersToChoices, al as promptBoolean, aq as readJsonConfig, l as CODEX_AUTH_FILE } from './simple-config.mjs';
3
+ import { ak as ensureI18nInitialized, aw as detectConfigManagementMode, al as i18n, am as addNumbersToChoices, ao as promptBoolean, at as readJsonConfig, l as CODEX_AUTH_FILE } from './simple-config.mjs';
4
4
  import { deleteProviders, addProviderToExisting, editExistingProvider } from './codex-provider-manager.mjs';
5
5
  import 'node:fs';
6
6
  import 'node:process';
@@ -150,7 +150,7 @@ async function handleAddProvider() {
150
150
  name: answers.providerName.trim(),
151
151
  baseUrl: selectedProvider === "custom" ? answers.baseUrl.trim() : prefilledBaseUrl,
152
152
  wireApi: selectedProvider === "custom" ? answers.wireApi : prefilledWireApi,
153
- envKey: `${providerId.toUpperCase().replace(/-/g, "_")}_API_KEY`,
153
+ tempEnvKey: `${providerId.toUpperCase().replace(/-/g, "_")}_API_KEY`,
154
154
  requiresOpenaiAuth: true,
155
155
  model: prefilledModel || "gpt-5-codex"
156
156
  // Use provider's default model or fallback
@@ -166,7 +166,7 @@ async function handleAddProvider() {
166
166
  defaultValue: true
167
167
  });
168
168
  if (setAsDefault) {
169
- const { switchToProvider } = await import('./simple-config.mjs').then(function (n) { return n.bj; });
169
+ const { switchToProvider } = await import('./simple-config.mjs').then(function (n) { return n.bm; });
170
170
  const switched = await switchToProvider(provider.id);
171
171
  if (switched) {
172
172
  console.log(ansis.green(i18n.t("multi-config:profileSetAsDefault", { name: provider.name })));
@@ -197,7 +197,7 @@ async function handleEditProvider(providers) {
197
197
  return;
198
198
  }
199
199
  const existingAuth = readJsonConfig(CODEX_AUTH_FILE, { defaultValue: {} }) || {};
200
- const existingApiKey = existingAuth[provider.envKey] || "";
200
+ const existingApiKey = existingAuth[provider.tempEnvKey] || "";
201
201
  const answers = await inquirer.prompt([
202
202
  {
203
203
  type: "input",
@@ -288,7 +288,7 @@ async function handleCopyProvider(providers) {
288
288
  console.log(ansis.cyan(`
289
289
  ${i18n.t("codex:copyingProvider", { name: provider.name })}`));
290
290
  const existingAuth = readJsonConfig(CODEX_AUTH_FILE, { defaultValue: {} }) || {};
291
- const existingApiKey = existingAuth[provider.envKey] || "";
291
+ const existingApiKey = existingAuth[provider.tempEnvKey] || "";
292
292
  const copiedName = `${provider.name}-copy`;
293
293
  const answers = await inquirer.prompt([
294
294
  {
@@ -346,7 +346,7 @@ ${i18n.t("codex:copyingProvider", { name: provider.name })}`));
346
346
  name: answers.providerName.trim(),
347
347
  baseUrl: answers.baseUrl.trim(),
348
348
  wireApi: answers.wireApi,
349
- envKey: `${providerId.toUpperCase().replace(/-/g, "_")}_API_KEY`,
349
+ tempEnvKey: `${providerId.toUpperCase().replace(/-/g, "_")}_API_KEY`,
350
350
  requiresOpenaiAuth: provider.requiresOpenaiAuth ?? true,
351
351
  model: model.trim()
352
352
  };
@@ -361,7 +361,7 @@ ${i18n.t("codex:copyingProvider", { name: provider.name })}`));
361
361
  defaultValue: false
362
362
  });
363
363
  if (setAsDefault) {
364
- const { switchToProvider } = await import('./simple-config.mjs').then(function (n) { return n.bj; });
364
+ const { switchToProvider } = await import('./simple-config.mjs').then(function (n) { return n.bm; });
365
365
  const switched = await switchToProvider(copiedProvider.id);
366
366
  if (switched) {
367
367
  console.log(ansis.green(i18n.t("multi-config:profileSetAsDefault", { name: copiedProvider.name })));
@@ -1,4 +1,4 @@
1
- import { ah as ensureI18nInitialized, au as readCodexConfig, ai as i18n, av as backupCodexComplete, aw as writeCodexConfig, ax as writeAuthFile } from './simple-config.mjs';
1
+ import { ak as ensureI18nInitialized, ax as readCodexConfig, al as i18n, ay as backupCodexComplete, az as writeCodexConfig, aA as writeAuthFile } from './simple-config.mjs';
2
2
  import 'node:fs';
3
3
  import 'node:process';
4
4
  import 'ansis';
@@ -58,7 +58,7 @@ async function addProviderToExisting(provider, apiKey, allowOverwrite = false) {
58
58
  }
59
59
  writeCodexConfig(updatedConfig);
60
60
  const authEntries = {};
61
- authEntries[provider.envKey] = apiKey;
61
+ authEntries[provider.tempEnvKey] = apiKey;
62
62
  writeAuthFile(authEntries);
63
63
  return {
64
64
  success: true,
@@ -112,7 +112,7 @@ async function editExistingProvider(providerId, updates) {
112
112
  writeCodexConfig(updatedConfig);
113
113
  if (updates.apiKey) {
114
114
  const authEntries = {};
115
- authEntries[updatedProvider.envKey] = updates.apiKey;
115
+ authEntries[updatedProvider.tempEnvKey] = updates.apiKey;
116
116
  writeAuthFile(authEntries);
117
117
  }
118
118
  return {
@@ -1,6 +1,6 @@
1
1
  import { pathExists } from 'fs-extra';
2
2
  import { join } from 'pathe';
3
- import { j as CODEX_DIR, k as CODEX_CONFIG_FILE, ai as i18n, l as CODEX_AUTH_FILE, n as CODEX_AGENTS_FILE, p as CODEX_PROMPTS_DIR } from './simple-config.mjs';
3
+ import { j as CODEX_DIR, k as CODEX_CONFIG_FILE, al as i18n, l as CODEX_AUTH_FILE, n as CODEX_AGENTS_FILE, p as CODEX_PROMPTS_DIR } from './simple-config.mjs';
4
4
  import { m as moveToTrash } from '../shared/zcf.DGjQxTq_.mjs';
5
5
  import 'node:fs';
6
6
  import 'node:process';
@@ -155,7 +155,7 @@ class CodexUninstaller {
155
155
  warnings: []
156
156
  };
157
157
  try {
158
- const { uninstallCodeTool } = await import('./simple-config.mjs').then(function (n) { return n.bk; });
158
+ const { uninstallCodeTool } = await import('./simple-config.mjs').then(function (n) { return n.bn; });
159
159
  const success = await uninstallCodeTool("codex");
160
160
  if (success) {
161
161
  result.removed.push("@openai/codex");
@@ -1,7 +1,7 @@
1
1
  import { exec } from 'node:child_process';
2
2
  import { promisify } from 'node:util';
3
3
  import ansis from 'ansis';
4
- import { ah as ensureI18nInitialized, ai as i18n } from './simple-config.mjs';
4
+ import { ak as ensureI18nInitialized, al as i18n } from './simple-config.mjs';
5
5
  import 'node:fs';
6
6
  import 'node:process';
7
7
  import 'inquirer';
@@ -1,6 +1,6 @@
1
1
  import ansis from 'ansis';
2
2
  import inquirer from 'inquirer';
3
- import { ai as i18n, ah as ensureI18nInitialized, x as SUPPORTED_LANGS, aj as addNumbersToChoices, y as LANG_LABELS, ay as updateZcfConfig, az as changeLanguage, aA as readZcfConfig, al as promptBoolean, o as openSettingsJson, d as importRecommendedPermissions, b as importRecommendedEnv, a1 as applyAiLanguageDirective, aB as configureOutputStyle, $ as getExistingModelConfig, X as updateCustomModel, Y as updateDefaultModel, aC as isWindows, F as readMcpConfig, K as fixWindowsMcpConfig, G as writeMcpConfig, aD as selectMcpServices, H as backupMcpConfig, aE as getMcpServices, J as buildMcpServerConfig, I as mergeMcpServers, aF as isCcrInstalled, aG as installCcr, aH as setupCcrConfiguration, a0 as getExistingApiConfig, a3 as promptApiConfigurationAction, aI as modifyApiConfigPartially, ak as validateApiKey, V as configureApi, aJ as formatApiKeyDisplay, a2 as switchToOfficialLogin } from './simple-config.mjs';
3
+ import { al as i18n, ak as ensureI18nInitialized, x as SUPPORTED_LANGS, am as addNumbersToChoices, y as LANG_LABELS, aB as updateZcfConfig, aC as changeLanguage, aD as readZcfConfig, ao as promptBoolean, o as openSettingsJson, d as importRecommendedPermissions, b as importRecommendedEnv, a1 as applyAiLanguageDirective, aE as configureOutputStyle, $ as getExistingModelConfig, X as updateCustomModel, Y as updateDefaultModel, aF as isWindows, F as readMcpConfig, K as fixWindowsMcpConfig, G as writeMcpConfig, aG as selectMcpServices, H as backupMcpConfig, aH as getMcpServices, J as buildMcpServerConfig, I as mergeMcpServers, aI as isCcrInstalled, aJ as installCcr, aK as setupCcrConfiguration, a0 as getExistingApiConfig, a3 as promptApiConfigurationAction, aL as modifyApiConfigPartially, an as validateApiKey, V as configureApi, aM as formatApiKeyDisplay, a2 as switchToOfficialLogin } from './simple-config.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:process';
6
6
  import 'node:child_process';
@@ -339,7 +339,7 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
339
339
  return;
340
340
  }
341
341
  }
342
- const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.bi; });
342
+ const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.bl; });
343
343
  const aiOutputLang = await selectAiOutputLanguage();
344
344
  applyAiLanguageDirective(aiOutputLang);
345
345
  updateZcfConfig({ aiOutputLang });
@@ -372,7 +372,7 @@ async function changeScriptLanguageFeature(currentLang) {
372
372
  }
373
373
  async function configureCodexDefaultModelFeature() {
374
374
  ensureI18nInitialized();
375
- const { readCodexConfig } = await import('./simple-config.mjs').then(function (n) { return n.bj; });
375
+ const { readCodexConfig } = await import('./simple-config.mjs').then(function (n) { return n.bm; });
376
376
  const existingConfig = readCodexConfig();
377
377
  const currentModel = existingConfig?.model;
378
378
  if (currentModel) {
@@ -473,7 +473,7 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
473
473
  return;
474
474
  }
475
475
  }
476
- const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.bi; });
476
+ const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.bl; });
477
477
  const aiOutputLang = await selectAiOutputLanguage();
478
478
  await updateCodexLanguageDirective(aiOutputLang);
479
479
  updateZcfConfig({ aiOutputLang });
@@ -481,14 +481,14 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
481
481
  } else if (option === "systemPrompt") {
482
482
  const zcfConfig = readZcfConfig();
483
483
  const currentLang = zcfConfig?.aiOutputLang || "English";
484
- const { runCodexSystemPromptSelection } = await import('./simple-config.mjs').then(function (n) { return n.bj; });
484
+ const { runCodexSystemPromptSelection } = await import('./simple-config.mjs').then(function (n) { return n.bm; });
485
485
  await runCodexSystemPromptSelection();
486
486
  await ensureLanguageDirectiveInAgents(currentLang);
487
487
  console.log(ansis.green(`\u2714 ${i18n.t("configuration:systemPromptConfigured")}`));
488
488
  }
489
489
  }
490
490
  async function updateCodexModelProvider(modelProvider) {
491
- const { readCodexConfig, writeCodexConfig, backupCodexConfig, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bj; });
491
+ const { readCodexConfig, writeCodexConfig, backupCodexConfig, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bm; });
492
492
  const backupPath = backupCodexConfig();
493
493
  if (backupPath) {
494
494
  console.log(ansis.gray(getBackupMessage(backupPath)));
@@ -509,7 +509,7 @@ async function updateCodexModelProvider(modelProvider) {
509
509
  writeCodexConfig(updatedConfig);
510
510
  }
511
511
  async function ensureLanguageDirectiveInAgents(aiOutputLang) {
512
- const { readFile, writeFile, exists } = await import('./simple-config.mjs').then(function (n) { return n.bd; });
512
+ const { readFile, writeFile, exists } = await import('./simple-config.mjs').then(function (n) { return n.bg; });
513
513
  const { homedir } = await import('node:os');
514
514
  const { join } = await import('pathe');
515
515
  const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
@@ -527,7 +527,7 @@ async function ensureLanguageDirectiveInAgents(aiOutputLang) {
527
527
  const langLabel = languageLabels[aiOutputLang] || aiOutputLang;
528
528
  const hasLanguageDirective = /\*\*Most Important:\s*Always respond in [^*]+\*\*/i.test(content);
529
529
  if (!hasLanguageDirective) {
530
- const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bj; });
530
+ const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bm; });
531
531
  const backupPath = backupCodexAgents();
532
532
  if (backupPath) {
533
533
  console.log(ansis.gray(getBackupMessage(backupPath)));
@@ -544,8 +544,8 @@ async function ensureLanguageDirectiveInAgents(aiOutputLang) {
544
544
  }
545
545
  }
546
546
  async function updateCodexLanguageDirective(aiOutputLang) {
547
- const { readFile, writeFile, exists } = await import('./simple-config.mjs').then(function (n) { return n.bd; });
548
- const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bj; });
547
+ const { readFile, writeFile, exists } = await import('./simple-config.mjs').then(function (n) { return n.bg; });
548
+ const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bm; });
549
549
  const { homedir } = await import('node:os');
550
550
  const { join } = await import('pathe');
551
551
  const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");