ccjk 16.0.6 → 16.3.0

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.
Files changed (69) hide show
  1. package/README.md +72 -316
  2. package/dist/chunks/claude-code-config-manager.mjs +28 -7
  3. package/dist/chunks/claude-code-incremental-manager.mjs +2 -2
  4. package/dist/chunks/codex-config-switch.mjs +3 -3
  5. package/dist/chunks/codex-presets.mjs +98 -0
  6. package/dist/chunks/codex-provider-manager.mjs +4 -4
  7. package/dist/chunks/codex-runtime.mjs +246 -0
  8. package/dist/chunks/codex-uninstaller.mjs +2 -2
  9. package/dist/chunks/commands.mjs +1 -1
  10. package/dist/chunks/features.mjs +35 -15
  11. package/dist/chunks/simple-config.mjs +659 -148
  12. package/dist/cli.mjs +1700 -908
  13. package/dist/i18n/locales/en/clean.json +24 -0
  14. package/dist/i18n/locales/en/codex.json +24 -1
  15. package/dist/i18n/locales/en/configuration.json +27 -12
  16. package/dist/i18n/locales/en/hub.json +30 -0
  17. package/dist/i18n/locales/en/menu.json +32 -8
  18. package/dist/i18n/locales/en/workflow.json +13 -1
  19. package/dist/i18n/locales/zh-CN/clean.json +24 -0
  20. package/dist/i18n/locales/zh-CN/codex.json +24 -1
  21. package/dist/i18n/locales/zh-CN/configuration.json +27 -12
  22. package/dist/i18n/locales/zh-CN/hub.json +30 -0
  23. package/dist/i18n/locales/zh-CN/menu.json +32 -8
  24. package/dist/i18n/locales/zh-CN/workflow.json +13 -1
  25. package/dist/index.d.mts +3 -1
  26. package/dist/index.d.ts +3 -1
  27. package/dist/index.mjs +1 -1
  28. package/dist/shared/{ccjk.BSLlI-JL.mjs → ccjk.TC1_-qhV.mjs} +1 -1
  29. package/package.json +1 -1
  30. package/templates/common/output-styles/en/agents-md-baseline.md +28 -0
  31. package/templates/common/output-styles/en/plan-first.md +30 -0
  32. package/templates/common/output-styles/en/surgical-diff.md +27 -0
  33. package/templates/common/output-styles/en/verify-and-ship.md +31 -0
  34. package/templates/common/output-styles/zh-CN/agents-md-baseline.md +28 -0
  35. package/templates/common/output-styles/zh-CN/plan-first.md +30 -0
  36. package/templates/common/output-styles/zh-CN/surgical-diff.md +27 -0
  37. package/templates/common/output-styles/zh-CN/verify-and-ship.md +31 -0
  38. package/templates/common/workflow/bmad/en/bmad-init.md +275 -0
  39. package/templates/common/workflow/bmad/zh-CN/bmad-init.md +275 -0
  40. package/templates/common/workflow/codeReview/en/code-review.md +34 -0
  41. package/templates/common/workflow/codeReview/zh-CN/code-review.md +34 -0
  42. package/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +628 -0
  43. package/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +628 -0
  44. package/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +187 -0
  45. package/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +191 -0
  46. package/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +249 -0
  47. package/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +277 -0
  48. package/templates/common/workflow/essential/en/agents/get-current-datetime.md +29 -0
  49. package/templates/common/workflow/essential/en/agents/init-architect.md +115 -0
  50. package/templates/common/workflow/essential/en/agents/planner.md +116 -0
  51. package/templates/common/workflow/essential/en/agents/teamagent.md +102 -0
  52. package/templates/common/workflow/essential/en/agents/ui-ux-designer.md +91 -0
  53. package/templates/common/workflow/essential/en/feat.md +92 -0
  54. package/templates/common/workflow/essential/en/init-project.md +53 -0
  55. package/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +29 -0
  56. package/templates/common/workflow/essential/zh-CN/agents/init-architect.md +115 -0
  57. package/templates/common/workflow/essential/zh-CN/agents/planner.md +116 -0
  58. package/templates/common/workflow/essential/zh-CN/agents/teamagent.md +102 -0
  59. package/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +91 -0
  60. package/templates/common/workflow/essential/zh-CN/feat.md +315 -0
  61. package/templates/common/workflow/essential/zh-CN/init-project.md +53 -0
  62. package/templates/common/workflow/interview/en/interview.md +67 -0
  63. package/templates/common/workflow/interview/zh-CN/interview.md +67 -0
  64. package/templates/common/workflow/linearMethod/en/linear-method.md +651 -0
  65. package/templates/common/workflow/linearMethod/zh-CN/linear-method.md +750 -0
  66. package/templates/common/workflow/refactoringMaster/en/refactoring-master.md +516 -0
  67. package/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +810 -0
  68. package/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +364 -0
  69. package/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +364 -0
@@ -1,4 +1,4 @@
1
- import { aq as ensureI18nInitialized, aH as readCodexConfig, as as i18n, aI as backupCodexComplete, aJ as writeAuthFile } from './simple-config.mjs';
1
+ import { as as ensureI18nInitialized, aL as readCodexConfig, au as i18n, aM as backupCodexComplete, aN as writeAuthFile } from './simple-config.mjs';
2
2
  import 'node:fs';
3
3
  import 'node:process';
4
4
  import 'ansis';
@@ -40,7 +40,7 @@ async function addProviderToExisting(provider, apiKey, allowOverwrite = false) {
40
40
  }
41
41
  backupPath = backup || void 0;
42
42
  }
43
- const { updateCodexApiFields, upsertCodexProvider } = await import('./simple-config.mjs').then(function (n) { return n.by; });
43
+ const { updateCodexApiFields, upsertCodexProvider } = await import('./simple-config.mjs').then(function (n) { return n.bP; });
44
44
  if (!existingConfig) {
45
45
  updateCodexApiFields({
46
46
  model: provider.model,
@@ -100,7 +100,7 @@ async function editExistingProvider(providerId, updates) {
100
100
  ...updates.wireApi && { wireApi: updates.wireApi },
101
101
  ...updates.model && { model: updates.model }
102
102
  };
103
- const { upsertCodexProvider } = await import('./simple-config.mjs').then(function (n) { return n.by; });
103
+ const { upsertCodexProvider } = await import('./simple-config.mjs').then(function (n) { return n.bP; });
104
104
  upsertCodexProvider(providerId, updatedProvider);
105
105
  if (updates.apiKey) {
106
106
  const authEntries = {};
@@ -166,7 +166,7 @@ async function deleteProviders(providerIds) {
166
166
  if (providerIds.includes(existingConfig.modelProvider || "")) {
167
167
  newDefaultProvider = remainingProviders[0].id;
168
168
  }
169
- const { deleteCodexProvider, updateCodexApiFields } = await import('./simple-config.mjs').then(function (n) { return n.by; });
169
+ const { deleteCodexProvider, updateCodexApiFields } = await import('./simple-config.mjs').then(function (n) { return n.bP; });
170
170
  if (newDefaultProvider !== existingConfig.modelProvider) {
171
171
  updateCodexApiFields({
172
172
  modelProvider: newDefaultProvider,
@@ -0,0 +1,246 @@
1
+ import { readdirSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+ import process from 'node:process';
4
+ import ansis from 'ansis';
5
+ import { join } from 'pathe';
6
+ import { ah as resolveCodexHome, az as exists, as as ensureI18nInitialized, au as i18n, X as getPlatform, aA as parseToml, aB as readFile } from './simple-config.mjs';
7
+ import 'inquirer';
8
+ import 'node:child_process';
9
+ import 'node:util';
10
+ import 'dayjs';
11
+ import 'node:url';
12
+ import 'inquirer-toggle';
13
+ import 'ora';
14
+ import 'tinyexec';
15
+ import 'semver';
16
+ import 'node:fs/promises';
17
+ import 'i18next';
18
+ import 'i18next-fs-backend';
19
+ import '@rainbowatcher/toml-edit-js';
20
+
21
+ const OFFICIAL_PROVIDER_HINTS = /* @__PURE__ */ new Set([
22
+ "openai",
23
+ "chatgpt",
24
+ "default"
25
+ ]);
26
+ function codexDesktopDataDir() {
27
+ const platform = getPlatform();
28
+ if (platform === "macos")
29
+ return join(homedir(), "Library", "Application Support", "Codex");
30
+ if (platform === "windows") {
31
+ const appData = process.env.APPDATA || join(homedir(), "AppData", "Roaming");
32
+ return join(appData, "Codex");
33
+ }
34
+ return join(homedir(), ".local", "share", "Codex");
35
+ }
36
+ function listHomebrewCodexAppPaths() {
37
+ const paths = [];
38
+ for (const prefix of ["/opt/homebrew", "/usr/local"]) {
39
+ const caskroom = join(prefix, "Caskroom", "codex");
40
+ if (!exists(caskroom))
41
+ continue;
42
+ try {
43
+ for (const version of readdirSync(caskroom)) {
44
+ if (version.startsWith("."))
45
+ continue;
46
+ paths.push(join(caskroom, version, "Codex.app"));
47
+ }
48
+ } catch {
49
+ }
50
+ }
51
+ return paths;
52
+ }
53
+ function detectDesktopAppPaths() {
54
+ const platform = getPlatform();
55
+ const paths = [];
56
+ if (platform === "macos") {
57
+ paths.push(
58
+ "/Applications/Codex.app",
59
+ join(homedir(), "Applications", "Codex.app"),
60
+ ...listHomebrewCodexAppPaths()
61
+ );
62
+ } else if (platform === "windows") {
63
+ const localAppData = process.env.LOCALAPPDATA || join(homedir(), "AppData", "Local");
64
+ paths.push(join(localAppData, "Programs", "OpenAI", "Codex", "Codex.exe"));
65
+ } else {
66
+ paths.push(
67
+ join(homedir(), ".local", "share", "applications", "codex.desktop"),
68
+ "/usr/share/applications/codex.desktop"
69
+ );
70
+ }
71
+ return paths.filter((path) => exists(path));
72
+ }
73
+ function detectCliPaths() {
74
+ const paths = [
75
+ join(homedir(), ".local", "bin", "codex"),
76
+ "/usr/local/bin/codex",
77
+ "/opt/homebrew/bin/codex"
78
+ ];
79
+ if (getPlatform() === "windows") {
80
+ const localAppData = process.env.LOCALAPPDATA || join(homedir(), "AppData", "Local");
81
+ paths.push(join(localAppData, "Programs", "OpenAI", "Codex", "bin", "codex.exe"));
82
+ }
83
+ for (const prefix of ["/opt/homebrew", "/usr/local"]) {
84
+ const cellar = join(prefix, "Cellar", "node");
85
+ if (!exists(cellar))
86
+ continue;
87
+ try {
88
+ for (const version of readdirSync(cellar)) {
89
+ paths.push(join(cellar, version, "bin", "codex"));
90
+ }
91
+ } catch {
92
+ }
93
+ }
94
+ return paths.filter((path) => exists(path));
95
+ }
96
+ function detectIdeExtensionPaths() {
97
+ const roots = [
98
+ join(homedir(), ".vscode", "extensions"),
99
+ join(homedir(), ".cursor", "extensions"),
100
+ join(homedir(), ".windsurf", "extensions")
101
+ ];
102
+ const matches = [];
103
+ for (const root of roots) {
104
+ if (!exists(root))
105
+ continue;
106
+ try {
107
+ for (const entry of readdirSync(root)) {
108
+ const lower = entry.toLowerCase();
109
+ if (lower.includes("openai") && lower.includes("codex"))
110
+ matches.push(join(root, entry));
111
+ }
112
+ } catch {
113
+ }
114
+ }
115
+ return matches;
116
+ }
117
+ function readFeatureFlags(configFile) {
118
+ if (!exists(configFile))
119
+ return {};
120
+ try {
121
+ const parsed = parseToml(readFile(configFile));
122
+ const features = parsed.features;
123
+ if (!features || typeof features !== "object")
124
+ return {};
125
+ const result = {};
126
+ for (const [key, value] of Object.entries(features)) {
127
+ if (typeof value === "boolean")
128
+ result[key] = value;
129
+ }
130
+ return result;
131
+ } catch {
132
+ return {};
133
+ }
134
+ }
135
+ function readModelProvider(configFile) {
136
+ if (!exists(configFile))
137
+ return null;
138
+ try {
139
+ const content = readFile(configFile);
140
+ const active = content.match(/^\s*model_provider\s*=\s*"([^"]+)"/m);
141
+ if (active)
142
+ return active[1];
143
+ const commented = content.match(/^\s*#\s*model_provider\s*=\s*"([^"]+)"/m);
144
+ return commented?.[1] ?? null;
145
+ } catch {
146
+ return null;
147
+ }
148
+ }
149
+ function isThirdPartyModelProvider(providerId) {
150
+ if (!providerId)
151
+ return false;
152
+ const normalized = providerId.trim().toLowerCase();
153
+ return !OFFICIAL_PROVIDER_HINTS.has(normalized);
154
+ }
155
+ function isFeatureEnabled(features, key, defaultValue) {
156
+ if (key in features)
157
+ return features[key];
158
+ return defaultValue;
159
+ }
160
+ function scanCodexConfigDoctorFindings(configFile = join(resolveCodexHome(), "config.toml")) {
161
+ const findings = [];
162
+ const features = readFeatureFlags(configFile);
163
+ const modelProvider = readModelProvider(configFile);
164
+ const thirdParty = isThirdPartyModelProvider(modelProvider);
165
+ const goalsEnabled = isFeatureEnabled(features, "goals", false);
166
+ const multiAgentEnabled = isFeatureEnabled(features, "multi_agent", true);
167
+ if (thirdParty && goalsEnabled) {
168
+ findings.push({
169
+ id: "feature-goals-third-party",
170
+ severity: "warn",
171
+ messageKey: "codex:runtime.finding.goalsThirdParty",
172
+ messageParams: { provider: modelProvider ?? "unknown" }
173
+ });
174
+ }
175
+ if (thirdParty && multiAgentEnabled) {
176
+ findings.push({
177
+ id: "feature-multi-agent-third-party",
178
+ severity: "warn",
179
+ messageKey: "codex:runtime.finding.multiAgentThirdParty",
180
+ messageParams: { provider: modelProvider ?? "unknown" }
181
+ });
182
+ }
183
+ if (!exists(configFile)) {
184
+ findings.push({
185
+ id: "config-missing",
186
+ severity: "info",
187
+ messageKey: "codex:runtime.finding.configMissing"
188
+ });
189
+ }
190
+ return findings;
191
+ }
192
+ function detectCodexRuntimes() {
193
+ const configHome = resolveCodexHome();
194
+ const configFile = join(configHome, "config.toml");
195
+ const desktopDataDir = codexDesktopDataDir();
196
+ const cliPaths = detectCliPaths();
197
+ const desktopPaths = detectDesktopAppPaths();
198
+ const idePaths = detectIdeExtensionPaths();
199
+ const desktopDataPresent = exists(desktopDataDir);
200
+ const runtimes = [
201
+ {
202
+ kind: "cli",
203
+ detected: cliPaths.length > 0,
204
+ path: cliPaths[0]
205
+ },
206
+ {
207
+ kind: "desktop",
208
+ detected: desktopPaths.length > 0 || desktopDataPresent,
209
+ path: desktopPaths[0] ?? (desktopDataPresent ? desktopDataDir : void 0),
210
+ weakSignal: desktopPaths.length === 0 && desktopDataPresent
211
+ },
212
+ {
213
+ kind: "ide",
214
+ detected: idePaths.length > 0,
215
+ path: idePaths[0]
216
+ }
217
+ ];
218
+ return {
219
+ configHome,
220
+ configHomeFromEnv: Boolean(process.env?.CODEX_HOME?.trim()),
221
+ configFile,
222
+ desktopDataDir,
223
+ runtimes,
224
+ findings: scanCodexConfigDoctorFindings(configFile)
225
+ };
226
+ }
227
+ function printCodexReloadHint() {
228
+ ensureI18nInitialized();
229
+ const summary = detectCodexRuntimes();
230
+ const desktop = summary.runtimes.find((runtime) => runtime.kind === "desktop");
231
+ console.log(ansis.gray(`
232
+ ${i18n.t("codex:runtime.reloadHint.shared", { path: summary.configHome })}`));
233
+ if (desktop?.detected)
234
+ console.log(ansis.gray(i18n.t("codex:runtime.reloadHint.desktop")));
235
+ console.log("");
236
+ }
237
+ function formatCodexRuntimeLine(runtime, t) {
238
+ const label = t(`codex:runtime.kind.${runtime.kind}`);
239
+ if (!runtime.detected)
240
+ return `${label}: ${t("codex:runtime.notDetected")}`;
241
+ const pathSuffix = runtime.path ? ` (${runtime.path})` : "";
242
+ const weakSuffix = runtime.weakSignal ? ` \u2014 ${t("codex:runtime.weakDesktopSignal")}` : "";
243
+ return `${label}: ${t("codex:runtime.detected")}${pathSuffix}${weakSuffix}`;
244
+ }
245
+
246
+ export { detectCodexRuntimes, formatCodexRuntimeLine, printCodexReloadHint, scanCodexConfigDoctorFindings };
@@ -1,6 +1,6 @@
1
1
  import { pathExists } from 'fs-extra';
2
2
  import { join } from 'pathe';
3
- import { n as CODEX_DIR, m as CODEX_CONFIG_FILE, as as i18n, l as CODEX_AUTH_FILE, k as CODEX_AGENTS_FILE, o as CODEX_PROMPTS_DIR } from './simple-config.mjs';
3
+ import { o as CODEX_DIR, n as CODEX_CONFIG_FILE, au as i18n, m as CODEX_AUTH_FILE, l as CODEX_AGENTS_FILE, p as CODEX_PROMPTS_DIR } from './simple-config.mjs';
4
4
  import { m as moveToTrash } from '../shared/ccjk.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.bA; });
158
+ const { uninstallCodeTool } = await import('./simple-config.mjs').then(function (n) { return n.bR; });
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 { aq as ensureI18nInitialized, as as i18n } from './simple-config.mjs';
4
+ import { as as ensureI18nInitialized, au as i18n } from './simple-config.mjs';
5
5
  import 'node:fs';
6
6
  import 'node:process';
7
7
  import 'inquirer';
@@ -1,7 +1,7 @@
1
1
  import ansis from 'ansis';
2
2
  import inquirer from 'inquirer';
3
- import { as as i18n, aq as ensureI18nInitialized, u as SUPPORTED_LANGS, at as addNumbersToChoices, L as LANG_LABELS, aK as updateCcjkConfig, aL as changeLanguage, ar as getActiveCodeTool, aa as openSettingsJson, Z as importRecommendedPermissions, Y as importRecommendedEnv, aM as readCcjkConfig, av as promptBoolean, x as applyAiLanguageDirective, aN as configureOutputStyle, aO as isClaudeFamilyCodeTool, T as getExistingModelConfig, am as updateCustomModel, an as updateDefaultModel, aP as isWindows, ac as readMcpConfig, P as fixWindowsMcpConfig, ap as writeMcpConfig, aQ as selectMcpServices, z as backupMcpConfig, aR as getMcpServices, B as buildMcpServerConfig, a8 as mergeMcpServers, aS as isCcrInstalled, aT as installCcr, aU as setupCcrConfiguration, R as getExistingApiConfig, ab as promptApiConfigurationAction, aV as modifyApiConfigPartially, au as validateApiKey, G as configureApi, aW as formatApiKeyDisplay, ak as switchToOfficialLogin } from './simple-config.mjs';
4
- import { g as getClaudeFamilyRuntimeLabel } from '../shared/ccjk.BSLlI-JL.mjs';
3
+ import { au as i18n, as as ensureI18nInitialized, v as SUPPORTED_LANGS, av as addNumbersToChoices, L as LANG_LABELS, aP as updateCcjkConfig, aQ as changeLanguage, at as getActiveCodeTool, ab as openSettingsJson, aR as applyRecommendedPermissionTier, aS as getPermissionTierLabel, _ as importRecommendedPermissions, Z as importRecommendedEnv, aT as readCcjkConfig, ax as promptBoolean, y as applyAiLanguageDirective, aU as configureOutputStyle, aV as isClaudeFamilyCodeTool, U as getExistingModelConfig, ao as updateCustomModel, ap as updateDefaultModel, aW as isWindows, ad as readMcpConfig, Q as fixWindowsMcpConfig, ar as writeMcpConfig, aX as selectMcpServices, B as backupMcpConfig, aY as getMcpServices, E as buildMcpServerConfig, a9 as mergeMcpServers, aZ as isCcrInstalled, a_ as installCcr, a$ as setupCcrConfiguration, T as getExistingApiConfig, ac as promptApiConfigurationAction, b0 as modifyApiConfigPartially, aw as validateApiKey, H as configureApi, b1 as formatApiKeyDisplay, am as switchToOfficialLogin } from './simple-config.mjs';
4
+ import { g as getClaudeFamilyRuntimeLabel } from '../shared/ccjk.TC1_-qhV.mjs';
5
5
  import 'node:fs';
6
6
  import 'node:process';
7
7
  import 'node:child_process';
@@ -361,7 +361,7 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
361
361
  return;
362
362
  }
363
363
  }
364
- const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.bw; });
364
+ const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.bN; });
365
365
  const aiOutputLang = await selectAiOutputLanguage();
366
366
  applyAiLanguageDirective(aiOutputLang, memoryTool);
367
367
  updateCcjkConfig({ aiOutputLang });
@@ -394,7 +394,7 @@ async function changeScriptLanguageFeature(currentLang) {
394
394
  }
395
395
  async function configureCodexDefaultModelFeature() {
396
396
  ensureI18nInitialized();
397
- const { readCodexConfig } = await import('./simple-config.mjs').then(function (n) { return n.bz; });
397
+ const { readCodexConfig } = await import('./simple-config.mjs').then(function (n) { return n.bQ; });
398
398
  const existingConfig = readCodexConfig();
399
399
  const currentModel = existingConfig?.model;
400
400
  if (currentModel) {
@@ -499,7 +499,7 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
499
499
  return;
500
500
  }
501
501
  }
502
- const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.bw; });
502
+ const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.bN; });
503
503
  const aiOutputLang = await selectAiOutputLanguage();
504
504
  await updateCodexLanguageDirective(aiOutputLang);
505
505
  updateCcjkConfig({ aiOutputLang });
@@ -507,15 +507,15 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
507
507
  } else if (option === "systemPrompt") {
508
508
  const ccjkConfig = readCcjkConfig();
509
509
  const currentLang = ccjkConfig?.aiOutputLang || "English";
510
- const { runCodexSystemPromptSelection } = await import('./simple-config.mjs').then(function (n) { return n.bz; });
510
+ const { runCodexSystemPromptSelection } = await import('./simple-config.mjs').then(function (n) { return n.bQ; });
511
511
  await runCodexSystemPromptSelection();
512
512
  await ensureLanguageDirectiveInAgents(currentLang);
513
513
  console.log(ansis.green(`\u2714 ${i18n.t("configuration:systemPromptConfigured")}`));
514
514
  }
515
515
  }
516
516
  async function updateCodexModelProvider(modelProvider) {
517
- const { backupCodexConfig, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bz; });
518
- const { updateCodexApiFields } = await import('./simple-config.mjs').then(function (n) { return n.by; });
517
+ const { backupCodexConfig, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bQ; });
518
+ const { updateCodexApiFields } = await import('./simple-config.mjs').then(function (n) { return n.bP; });
519
519
  const backupPath = backupCodexConfig();
520
520
  if (backupPath) {
521
521
  console.log(ansis.gray(getBackupMessage(backupPath)));
@@ -523,7 +523,7 @@ async function updateCodexModelProvider(modelProvider) {
523
523
  updateCodexApiFields({ model: modelProvider });
524
524
  }
525
525
  async function ensureLanguageDirectiveInAgents(aiOutputLang) {
526
- const { readFile, writeFile, exists } = await import('./simple-config.mjs').then(function (n) { return n.br; });
526
+ const { readFile, writeFile, exists } = await import('./simple-config.mjs').then(function (n) { return n.bG; });
527
527
  const { homedir } = await import('node:os');
528
528
  const { join } = await import('pathe');
529
529
  const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
@@ -541,7 +541,7 @@ async function ensureLanguageDirectiveInAgents(aiOutputLang) {
541
541
  const langLabel = languageLabels[aiOutputLang] || aiOutputLang;
542
542
  const hasLanguageDirective = /\*\*Most Important:\s*Always respond in [^*]+\*\*/i.test(content);
543
543
  if (!hasLanguageDirective) {
544
- const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bz; });
544
+ const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bQ; });
545
545
  const backupPath = backupCodexAgents();
546
546
  if (backupPath) {
547
547
  console.log(ansis.gray(getBackupMessage(backupPath)));
@@ -558,8 +558,8 @@ async function ensureLanguageDirectiveInAgents(aiOutputLang) {
558
558
  }
559
559
  }
560
560
  async function updateCodexLanguageDirective(aiOutputLang) {
561
- const { readFile, writeFile, exists } = await import('./simple-config.mjs').then(function (n) { return n.br; });
562
- const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bz; });
561
+ const { readFile, writeFile, exists } = await import('./simple-config.mjs').then(function (n) { return n.bG; });
562
+ const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.bQ; });
563
563
  const { homedir } = await import('node:os');
564
564
  const { join } = await import('pathe');
565
565
  const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
@@ -604,10 +604,22 @@ async function configureEnvPermissionFeature() {
604
604
  value: "env"
605
605
  },
606
606
  {
607
- name: `${i18n.t("configuration:importRecommendedPermissions") || "Import permissions"} ${ansis.gray(
608
- `- ${i18n.t("configuration:importRecommendedPermissionsDesc") || "Import permission settings"}`
607
+ name: `${i18n.t("configuration:permissionTierSafe") || "Safe permissions"} ${ansis.gray(
608
+ `- ${i18n.t("configuration:permissionTierSafeDesc") || "Read-only tools only"}`
609
609
  )}`,
610
- value: "permissions"
610
+ value: "permission-safe"
611
+ },
612
+ {
613
+ name: `${i18n.t("configuration:permissionTierStandard") || "Standard permissions"} ${ansis.gray(
614
+ `- ${i18n.t("configuration:permissionTierStandardDesc") || "Daily development without noisy prompts"}`
615
+ )}`,
616
+ value: "permission-standard"
617
+ },
618
+ {
619
+ name: `${i18n.t("configuration:permissionTierYolo") || "YOLO permissions"} ${ansis.gray(
620
+ `- ${i18n.t("configuration:permissionTierYoloDesc") || "Bypass prompts for trusted projects"}`
621
+ )}`,
622
+ value: "permission-yolo"
611
623
  },
612
624
  {
613
625
  name: `${i18n.t("configuration:openSettingsJson") || "Open settings"} ${ansis.gray(
@@ -631,6 +643,14 @@ async function configureEnvPermissionFeature() {
631
643
  await importRecommendedPermissions(settingsTool);
632
644
  console.log(ansis.green(`\u2705 ${i18n.t("configuration:permissionsImportSuccess") || "Permissions imported"}`));
633
645
  break;
646
+ case "permission-safe":
647
+ case "permission-standard":
648
+ case "permission-yolo": {
649
+ const tier = choice.replace("permission-", "");
650
+ await applyRecommendedPermissionTier(tier, settingsTool);
651
+ console.log(ansis.green(`\u2705 ${i18n.t("configuration:permissionTierApplied", { tier: getPermissionTierLabel(tier) }) || `Permission tier applied: ${tier}`}`));
652
+ break;
653
+ }
634
654
  case "open":
635
655
  console.log(ansis.cyan(i18n.t("configuration:openingSettingsJson") || "Opening settings.json..."));
636
656
  await openSettingsJson(settingsTool);