@prover-coder-ai/docker-git 1.0.46 → 1.0.48

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.
@@ -1426,7 +1426,15 @@ var findDockerGitConfigPaths = (fs, path, rootDir) => Effect.gen(function* (_) {
1426
1426
  //#endregion
1427
1427
  //#region ../lib/src/usecases/projects-core.ts
1428
1428
  var sshOptions = "-tt -Y -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
1429
- var buildSshCommand = (config, sshKey) => sshKey === null ? `ssh ${sshOptions} -p ${config.sshPort} ${config.sshUser}@localhost` : `ssh -i ${sshKey} ${sshOptions} -p ${config.sshPort} ${config.sshUser}@localhost`;
1429
+ var buildSshCommand = (config, sshKey, ipAddress) => {
1430
+ const host = ipAddress ?? "localhost";
1431
+ const port = ipAddress ? 22 : config.sshPort;
1432
+ return sshKey === null ? `ssh ${sshOptions} -p ${port} ${config.sshUser}@${host}` : `ssh -i ${sshKey} ${sshOptions} -p ${port} ${config.sshUser}@${host}`;
1433
+ };
1434
+ var getContainerIpIfInsideContainer = (fs, projectDir, containerName) => Effect.gen(function* (_) {
1435
+ if (!(yield* _(fs.exists("/.dockerenv")))) return;
1436
+ return yield* _(runDockerInspectContainerIp(projectDir, containerName).pipe(Effect.orElse(() => Effect.succeed("")), Effect.map((ip) => ip.length > 0 ? ip : void 0)));
1437
+ });
1430
1438
  var loadProjectBase = (configPath) => Effect.gen(function* (_) {
1431
1439
  const { fs, path, resolved } = yield* _(resolveBaseDir(configPath));
1432
1440
  const projectDir = path.dirname(resolved);
@@ -1440,12 +1448,14 @@ var loadProjectBase = (configPath) => Effect.gen(function* (_) {
1440
1448
  var findProjectConfigPaths = (projectsRoot) => withFsPathContext(({ fs, path }) => findDockerGitConfigPaths(fs, path, path.resolve(projectsRoot)));
1441
1449
  var loadProjectSummary = (configPath, sshKey) => Effect.gen(function* (_) {
1442
1450
  const { config, fs, path, projectDir } = yield* _(loadProjectBase(configPath));
1451
+ const ipAddress = yield* _(getContainerIpIfInsideContainer(fs, projectDir, config.template.containerName));
1443
1452
  const resolvedAuthorizedKeys = resolveAuthorizedKeysPath(path, projectDir, config.template.authorizedKeysPath);
1444
1453
  const authExists = yield* _(fs.exists(resolvedAuthorizedKeys));
1445
1454
  return {
1446
1455
  projectDir,
1447
1456
  config,
1448
- sshCommand: buildSshCommand(config.template, sshKey),
1457
+ sshCommand: buildSshCommand(config.template, sshKey, ipAddress),
1458
+ ipAddress,
1449
1459
  authorizedKeysPath: resolvedAuthorizedKeys,
1450
1460
  authorizedKeysExists: authExists
1451
1461
  };
@@ -1466,9 +1476,10 @@ var formatDisplayName = (repoUrl) => {
1466
1476
  var loadProjectItem = (configPath, sshKey) => Effect.gen(function* (_) {
1467
1477
  const { config, fs, path, projectDir } = yield* _(loadProjectBase(configPath));
1468
1478
  const template = config.template;
1479
+ const ipAddress = yield* _(getContainerIpIfInsideContainer(fs, projectDir, template.containerName));
1469
1480
  const resolvedAuthorizedKeys = resolveAuthorizedKeysPath(path, projectDir, template.authorizedKeysPath);
1470
1481
  const authExists = yield* _(fs.exists(resolvedAuthorizedKeys));
1471
- const sshCommand = buildSshCommand(template, sshKey);
1482
+ const sshCommand = buildSshCommand(template, sshKey, ipAddress);
1472
1483
  return {
1473
1484
  projectDir,
1474
1485
  displayName: formatDisplayName(template.repoUrl),
@@ -1480,6 +1491,7 @@ var loadProjectItem = (configPath, sshKey) => Effect.gen(function* (_) {
1480
1491
  sshPort: template.sshPort,
1481
1492
  targetDir: template.targetDir,
1482
1493
  sshCommand,
1494
+ ipAddress,
1483
1495
  sshKeyPath: sshKey,
1484
1496
  authorizedKeysPath: resolvedAuthorizedKeys,
1485
1497
  authorizedKeysExists: authExists,
@@ -3064,6 +3076,62 @@ docker_git_refresh_gemini_env() {
3064
3076
 
3065
3077
  docker_git_refresh_gemini_env`;
3066
3078
  var renderGeminiAuthConfig = (config) => geminiAuthConfigTemplate.replaceAll("__GEMINI_AUTH_ROOT__", geminiAuthRootContainerPath(config.sshUser)).replaceAll("__GEMINI_HOME_DIR__", config.geminiHome);
3079
+ var geminiSettingsJsonTemplate = `{
3080
+ "model": {
3081
+ "name": "gemini-3.1-pro-preview-yolo",
3082
+ "compressionThreshold": 0.9,
3083
+ "disableLoopDetection": true
3084
+ },
3085
+ "modelConfigs": {
3086
+ "customAliases": {
3087
+ "yolo-ultra": {
3088
+ "modelConfig": {
3089
+ "model": "gemini-3.1-pro-preview-yolo",
3090
+ "generateContentConfig": {
3091
+ "tools": [
3092
+ {
3093
+ "googleSearch": {}
3094
+ },
3095
+ {
3096
+ "urlContext": {}
3097
+ }
3098
+ ]
3099
+ }
3100
+ }
3101
+ }
3102
+ }
3103
+ },
3104
+ "general": {
3105
+ "defaultApprovalMode": "auto_edit"
3106
+ },
3107
+ "tools": {
3108
+ "allowed": [
3109
+ "run_shell_command",
3110
+ "write_file",
3111
+ "googleSearch",
3112
+ "urlContext"
3113
+ ]
3114
+ },
3115
+ "sandbox": {
3116
+ "enabled": false
3117
+ },
3118
+ "security": {
3119
+ "folderTrust": {
3120
+ "enabled": false
3121
+ },
3122
+ "auth": {
3123
+ "selectedType": "oauth-personal"
3124
+ },
3125
+ "disableYoloMode": false
3126
+ },
3127
+ "mcpServers": {
3128
+ "playwright": {
3129
+ "command": "docker-git-playwright-mcp",
3130
+ "args": [],
3131
+ "trust": true
3132
+ }
3133
+ }
3134
+ }`;
3067
3135
  var renderGeminiPermissionSettingsConfig = (config) => String.raw`# Gemini CLI: keep trust settings in sync with docker-git defaults
3068
3136
  GEMINI_SETTINGS_DIR="${config.geminiHome}"
3069
3137
  GEMINI_TRUST_SETTINGS_FILE="$GEMINI_SETTINGS_DIR/trustedFolders.json"
@@ -3073,18 +3141,9 @@ GEMINI_CONFIG_SETTINGS_FILE="$GEMINI_SETTINGS_DIR/settings.json"
3073
3141
  mkdir -p "$GEMINI_SETTINGS_DIR" || true
3074
3142
 
3075
3143
  # Disable folder trust prompt and enable auto-approval in settings.json
3076
- if [[ ! -f "$GEMINI_CONFIG_SETTINGS_FILE" ]]; then
3077
- cat <<'EOF' > "$GEMINI_CONFIG_SETTINGS_FILE"
3078
- {
3079
- "security": {
3080
- "folderTrust": {
3081
- "enabled": false
3082
- },
3083
- "approvalPolicy": "never"
3084
- }
3085
- }
3144
+ cat <<'EOF' > "$GEMINI_CONFIG_SETTINGS_FILE"
3145
+ ${geminiSettingsJsonTemplate}
3086
3146
  EOF
3087
- fi
3088
3147
 
3089
3148
  # Pre-trust important directories in trustedFolders.json
3090
3149
  # Use flat mapping as required by recent Gemini CLI versions
@@ -5521,18 +5580,24 @@ var runDockerComposeUpWithPortCheck = (projectDir) => Effect.gen(function* (_) {
5521
5580
  //#endregion
5522
5581
  //#region ../lib/src/usecases/projects-ssh.ts
5523
5582
  var buildSshArgs$1 = (item) => {
5583
+ const host = item.ipAddress ?? "localhost";
5584
+ const port = item.ipAddress ? 22 : item.sshPort;
5524
5585
  const args = [];
5525
5586
  if (item.sshKeyPath !== null) args.push("-i", item.sshKeyPath);
5526
- args.push("-tt", "-Y", "-o", "LogLevel=ERROR", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-p", String(item.sshPort), `${item.sshUser}@localhost`);
5587
+ args.push("-tt", "-Y", "-o", "LogLevel=ERROR", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-p", String(port), `${item.sshUser}@${host}`);
5527
5588
  return args;
5528
5589
  };
5529
5590
  var buildSshProbeArgs = (item) => {
5591
+ const host = item.ipAddress ?? "localhost";
5592
+ const port = item.ipAddress ? 22 : item.sshPort;
5530
5593
  const args = [];
5531
5594
  if (item.sshKeyPath !== null) args.push("-i", item.sshKeyPath);
5532
- args.push("-T", "-o", "BatchMode=yes", "-o", "ConnectTimeout=2", "-o", "ConnectionAttempts=1", "-o", "LogLevel=ERROR", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-p", String(item.sshPort), `${item.sshUser}@localhost`, "true");
5595
+ args.push("-T", "-o", "BatchMode=yes", "-o", "ConnectTimeout=2", "-o", "ConnectionAttempts=1", "-o", "LogLevel=ERROR", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-p", String(port), `${item.sshUser}@${host}`, "true");
5533
5596
  return args;
5534
5597
  };
5535
5598
  var waitForSshReady = (item) => {
5599
+ const host = item.ipAddress ?? "localhost";
5600
+ const port = item.ipAddress ? 22 : item.sshPort;
5536
5601
  const probe = Effect.gen(function* (_) {
5537
5602
  const exitCode = yield* _(runCommandExitCode({
5538
5603
  cwd: process.cwd(),
@@ -5544,7 +5609,7 @@ var waitForSshReady = (item) => {
5544
5609
  exitCode
5545
5610
  })));
5546
5611
  });
5547
- return pipe(Effect.log(`Waiting for SSH on localhost:${item.sshPort} ...`), Effect.zipRight(Effect.retry(probe, pipe(Schedule.spaced(Duration.seconds(2)), Schedule.intersect(Schedule.recurs(30))))), Effect.tap(() => Effect.log("SSH is ready.")));
5612
+ return pipe(Effect.log(`Waiting for SSH on ${host}:${port} ...`), Effect.zipRight(Effect.retry(probe, pipe(Schedule.spaced(Duration.seconds(2)), Schedule.intersect(Schedule.recurs(30))))), Effect.tap(() => Effect.log("SSH is ready.")));
5548
5613
  };
5549
5614
  var connectProjectSsh = (item) => pipe(ensureTerminalCursorVisible(), Effect.zipRight(runCommandWithExitCodes({
5550
5615
  cwd: process.cwd(),
@@ -5554,14 +5619,34 @@ var connectProjectSsh = (item) => pipe(ensureTerminalCursorVisible(), Effect.zip
5554
5619
  command: "ssh",
5555
5620
  exitCode
5556
5621
  }))), Effect.ensuring(ensureTerminalCursorVisible()));
5557
- var connectProjectSshWithUp = (item) => pipe(Effect.log(`Starting docker compose for ${item.displayName} ...`), Effect.zipRight(runDockerComposeUpWithPortCheck(item.projectDir)), Effect.map((template) => ({
5558
- ...item,
5559
- sshPort: template.sshPort
5560
- })), Effect.tap((updated) => waitForSshReady(updated)), Effect.flatMap((updated) => connectProjectSsh(updated)));
5561
- var listProjectStatus = Effect.asVoid(withProjectIndexAndSsh((index, sshKey) => forEachProjectStatus(index.configPaths, (status) => pipe(Effect.log(renderProjectStatusHeader(status)), Effect.zipRight(Effect.log(`SSH access: ${buildSshCommand(status.config.template, sshKey)}`)), Effect.zipRight(runDockerComposePsFormatted(status.projectDir).pipe(Effect.map((raw) => parseComposePsOutput(raw)), Effect.map((rows) => formatComposeRows(rows)), Effect.flatMap((text) => Effect.log(text)), Effect.matchEffect({
5622
+ var connectProjectSshWithUp = (item) => Effect.gen(function* (_) {
5623
+ const fs = yield* _(FileSystem.FileSystem);
5624
+ yield* _(Effect.log(`Starting docker compose for ${item.displayName} ...`));
5625
+ const template = yield* _(runDockerComposeUpWithPortCheck(item.projectDir));
5626
+ const isInsideContainer = yield* _(fs.exists("/.dockerenv"));
5627
+ let ipAddress;
5628
+ if (isInsideContainer) {
5629
+ const containerIp = yield* _(runDockerInspectContainerIp(item.projectDir, template.containerName).pipe(Effect.orElse(() => Effect.succeed(""))));
5630
+ if (containerIp.length > 0) ipAddress = containerIp;
5631
+ }
5632
+ const updated = {
5633
+ ...item,
5634
+ sshPort: template.sshPort,
5635
+ ipAddress
5636
+ };
5637
+ yield* _(waitForSshReady(updated));
5638
+ yield* _(connectProjectSsh(updated));
5639
+ });
5640
+ var listProjectStatus = withProjectIndexAndSsh((index, sshKey) => forEachProjectStatus(index.configPaths, (status) => Effect.gen(function* (_) {
5641
+ const ipAddress = yield* _(getContainerIpIfInsideContainer(yield* _(FileSystem.FileSystem), status.projectDir, status.config.template.containerName));
5642
+ yield* _(Effect.log(renderProjectStatusHeader(status)));
5643
+ yield* _(Effect.log(`SSH access: ${buildSshCommand(status.config.template, sshKey, ipAddress)}`));
5644
+ const text = formatComposeRows(parseComposePsOutput(yield* _(runDockerComposePsFormatted(status.projectDir))));
5645
+ yield* _(Effect.log(text));
5646
+ }).pipe(Effect.matchEffect({
5562
5647
  onFailure: (error) => Effect.logWarning(`docker compose ps failed for ${status.projectDir}: ${renderError(error)}`),
5563
5648
  onSuccess: () => Effect.void
5564
- })))))));
5649
+ })))).pipe(Effect.asVoid);
5565
5650
  //#endregion
5566
5651
  //#region ../lib/src/usecases/actions/docker-up.ts
5567
5652
  var clonePollInterval = Duration.seconds(1);
@@ -5573,9 +5658,15 @@ var agentFailPath = "/run/docker-git/agent.failed";
5573
5658
  var logSshAccess = (baseDir, config) => Effect.gen(function* (_) {
5574
5659
  const fs = yield* _(FileSystem.FileSystem);
5575
5660
  const path = yield* _(Path.Path);
5661
+ const isInsideContainer = yield* _(fs.exists("/.dockerenv"));
5662
+ let ipAddress;
5663
+ if (isInsideContainer) {
5664
+ const containerIp = yield* _(runDockerInspectContainerIp(baseDir, config.containerName).pipe(Effect.orElse(() => Effect.succeed(""))));
5665
+ if (containerIp.length > 0) ipAddress = containerIp;
5666
+ }
5576
5667
  const resolvedAuthorizedKeys = resolveAuthorizedKeysPath(path, baseDir, config.authorizedKeysPath);
5577
5668
  const authExists = yield* _(fs.exists(resolvedAuthorizedKeys));
5578
- const sshCommand = buildSshCommand(config, yield* _(findSshPrivateKey(fs, path, process.cwd())));
5669
+ const sshCommand = buildSshCommand(config, yield* _(findSshPrivateKey(fs, path, process.cwd())), ipAddress);
5579
5670
  yield* _(Effect.log(`SSH access: ${sshCommand}`));
5580
5671
  if (!authExists) yield* _(Effect.logWarning(`Authorized keys file missing: ${resolvedAuthorizedKeys} (SSH may fail without a matching key).`));
5581
5672
  });
@@ -5818,23 +5909,28 @@ var formatStateSyncLabel = (repoUrl) => {
5818
5909
  return repoPath.length > 0 ? repoPath : repoUrl;
5819
5910
  };
5820
5911
  var isInteractiveTty = () => process.stdin.isTTY && process.stdout.isTTY;
5821
- var buildSshArgs = (config, sshKeyPath, remoteCommand) => {
5912
+ var buildSshArgs = (config, sshKeyPath, remoteCommand, ipAddress) => {
5913
+ const host = ipAddress ?? "localhost";
5914
+ const port = ipAddress ? 22 : config.sshPort;
5822
5915
  const args = [];
5823
5916
  if (sshKeyPath !== null) args.push("-i", sshKeyPath);
5824
- args.push("-tt", "-Y", "-o", "LogLevel=ERROR", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-p", String(config.sshPort), `${config.sshUser}@localhost`);
5917
+ args.push("-tt", "-Y", "-o", "LogLevel=ERROR", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-p", String(port), `${config.sshUser}@${host}`);
5825
5918
  if (remoteCommand !== void 0) args.push(remoteCommand);
5826
5919
  return args;
5827
5920
  };
5828
5921
  var openSshBestEffort = (template, remoteCommand) => Effect.gen(function* (_) {
5829
- const sshKey = yield* _(findSshPrivateKey(yield* _(FileSystem.FileSystem), yield* _(Path.Path), process.cwd()));
5830
- const sshCommand = buildSshCommand(template, sshKey);
5922
+ const fs = yield* _(FileSystem.FileSystem);
5923
+ const path = yield* _(Path.Path);
5924
+ const ipAddress = yield* _(getContainerIpIfInsideContainer(fs, process.cwd(), template.containerName).pipe(Effect.orElse(() => Effect.succeed(""))));
5925
+ const sshKey = yield* _(findSshPrivateKey(fs, path, process.cwd()));
5926
+ const sshCommand = buildSshCommand(template, sshKey, ipAddress);
5831
5927
  const remoteCommandLabel = remoteCommand === void 0 ? "" : ` (${remoteCommand})`;
5832
5928
  yield* _(Effect.log(`Opening SSH: ${sshCommand}${remoteCommandLabel}`));
5833
5929
  yield* _(ensureTerminalCursorVisible());
5834
5930
  yield* _(runCommandWithExitCodes({
5835
5931
  cwd: process.cwd(),
5836
5932
  command: "ssh",
5837
- args: buildSshArgs(template, sshKey, remoteCommand)
5933
+ args: buildSshArgs(template, sshKey, remoteCommand, ipAddress)
5838
5934
  }, [0, 130], (exitCode) => new CommandFailedError({
5839
5935
  command: "ssh",
5840
5936
  exitCode
@@ -6685,23 +6781,38 @@ var prepareGeminiCredentialsDir = (cwd, accountPath, fs) => Effect.gen(function*
6685
6781
  }).pipe(Effect.orElse(() => Effect.succeed(0))));
6686
6782
  return credentialsDir;
6687
6783
  });
6784
+ var defaultGeminiSettings = {
6785
+ model: {
6786
+ name: "gemini-3.1-pro-preview-yolo",
6787
+ compressionThreshold: .9,
6788
+ disableLoopDetection: true
6789
+ },
6790
+ modelConfigs: { customAliases: { "yolo-ultra": { "modelConfig": {
6791
+ "model": "gemini-3.1-pro-preview-yolo",
6792
+ "generateContentConfig": { "tools": [{ "googleSearch": {} }, { "urlContext": {} }] }
6793
+ } } } },
6794
+ general: { defaultApprovalMode: "auto_edit" },
6795
+ tools: { allowed: [
6796
+ "run_shell_command",
6797
+ "write_file",
6798
+ "googleSearch",
6799
+ "urlContext"
6800
+ ] },
6801
+ sandbox: { enabled: false },
6802
+ security: {
6803
+ folderTrust: { enabled: false },
6804
+ auth: { selectedType: "oauth-personal" },
6805
+ disableYoloMode: false
6806
+ },
6807
+ mcpServers: { playwright: {
6808
+ command: "docker-git-playwright-mcp",
6809
+ args: [],
6810
+ trust: true
6811
+ } }
6812
+ };
6688
6813
  var writeInitialSettings = (credentialsDir, fs) => Effect.gen(function* (_) {
6689
6814
  const settingsPath = `${credentialsDir}/settings.json`;
6690
- yield* _(fs.writeFileString(settingsPath, JSON.stringify({
6691
- model: {
6692
- name: "gemini-2.0-flash",
6693
- compressionThreshold: .9,
6694
- disableLoopDetection: true
6695
- },
6696
- general: { defaultApprovalMode: "auto_edit" },
6697
- yolo: true,
6698
- sandbox: { enabled: false },
6699
- security: {
6700
- folderTrust: { enabled: false },
6701
- auth: { selectedType: "oauth-personal" },
6702
- approvalPolicy: "never"
6703
- }
6704
- }, null, 2)));
6815
+ yield* _(fs.writeFileString(settingsPath, JSON.stringify(defaultGeminiSettings, null, 2) + "\n"));
6705
6816
  const trustedFoldersPath = `${credentialsDir}/trustedFolders.json`;
6706
6817
  yield* _(fs.writeFileString(trustedFoldersPath, JSON.stringify({
6707
6818
  "/": "TRUST_FOLDER",
@@ -6882,6 +6993,30 @@ var runGeminiOauthLoginWithPrompt = (cwd, accountPath, options) => Effect.scoped
6882
6993
  return yield* _(resolveGeminiLoginResult(resultBox.value, exitCode));
6883
6994
  }));
6884
6995
  //#endregion
6996
+ //#region ../lib/src/usecases/auth-gemini-logout.ts
6997
+ var authGeminiLogout = (command) => Effect.gen(function* (_) {
6998
+ const accountLabel = normalizeAccountLabel(command.label, "default");
6999
+ yield* _(withGeminiAuth(command, ({ accountPath, fs }) => Effect.gen(function* (_) {
7000
+ yield* _(fs.remove(geminiApiKeyPath(accountPath), { force: true }));
7001
+ yield* _(fs.remove(geminiEnvFilePath(accountPath), { force: true }));
7002
+ yield* _(fs.remove(geminiCredentialsPath(accountPath), {
7003
+ recursive: true,
7004
+ force: true
7005
+ }));
7006
+ })));
7007
+ yield* _(autoSyncState(`chore(state): auth gemini logout ${accountLabel}`));
7008
+ }).pipe(Effect.asVoid);
7009
+ //#endregion
7010
+ //#region ../lib/src/usecases/auth-gemini-status.ts
7011
+ var authGeminiStatus = (command) => withGeminiAuth(command, ({ accountLabel, accountPath, fs }) => Effect.gen(function* (_) {
7012
+ const authMethod = yield* _(resolveGeminiAuthMethod(fs, accountPath));
7013
+ if (authMethod === "none") {
7014
+ yield* _(Effect.log(`Gemini not connected (${accountLabel}).`));
7015
+ return;
7016
+ }
7017
+ yield* _(Effect.log(`Gemini connected (${accountLabel}, ${authMethod}).`));
7018
+ }));
7019
+ //#endregion
6885
7020
  //#region ../lib/src/usecases/auth-gemini.ts
6886
7021
  var authGeminiLogin = (command, apiKey) => {
6887
7022
  const accountLabel = normalizeAccountLabel(command.label, "default");
@@ -6889,6 +7024,10 @@ var authGeminiLogin = (command, apiKey) => {
6889
7024
  const apiKeyFilePath = geminiApiKeyPath(accountPath);
6890
7025
  yield* _(fs.writeFileString(apiKeyFilePath, `${apiKey.trim()}\n`));
6891
7026
  yield* _(fs.chmod(apiKeyFilePath, 384), Effect.orElseSucceed(() => void 0));
7027
+ const credentialsDir = geminiCredentialsPath(accountPath);
7028
+ yield* _(fs.makeDirectory(credentialsDir, { recursive: true }));
7029
+ const settingsPath = `${credentialsDir}/settings.json`;
7030
+ yield* _(fs.writeFileString(settingsPath, JSON.stringify(defaultGeminiSettings, null, 2) + "\n"));
6892
7031
  })).pipe(Effect.zipRight(autoSyncState(`chore(state): auth gemini ${accountLabel}`)));
6893
7032
  };
6894
7033
  var authGeminiLoginCli = (_command) => Effect.gen(function* (_) {
@@ -6911,33 +7050,9 @@ var authGeminiLoginOauth = (command) => {
6911
7050
  image: geminiImageName,
6912
7051
  containerPath: geminiContainerHomeDir
6913
7052
  }));
6914
- yield* _(fs.writeFileString(settingsPath, JSON.stringify({ security: {
6915
- folderTrust: { enabled: false },
6916
- auth: { selectedType: "oauth-personal" },
6917
- approvalPolicy: "never"
6918
- } }, null, 2) + "\n"));
7053
+ yield* _(fs.writeFileString(settingsPath, JSON.stringify(defaultGeminiSettings, null, 2) + "\n"));
6919
7054
  }), { buildImage: true }).pipe(Effect.zipRight(autoSyncState(`chore(state): auth gemini oauth ${accountLabel}`)));
6920
7055
  };
6921
- var authGeminiStatus = (command) => withGeminiAuth(command, ({ accountLabel, accountPath, fs }) => Effect.gen(function* (_) {
6922
- const authMethod = yield* _(resolveGeminiAuthMethod(fs, accountPath));
6923
- if (authMethod === "none") {
6924
- yield* _(Effect.log(`Gemini not connected (${accountLabel}).`));
6925
- return;
6926
- }
6927
- yield* _(Effect.log(`Gemini connected (${accountLabel}, ${authMethod}).`));
6928
- }));
6929
- var authGeminiLogout = (command) => Effect.gen(function* (_) {
6930
- const accountLabel = normalizeAccountLabel(command.label, "default");
6931
- yield* _(withGeminiAuth(command, ({ accountPath, fs }) => Effect.gen(function* (_) {
6932
- yield* _(fs.remove(geminiApiKeyPath(accountPath), { force: true }));
6933
- yield* _(fs.remove(geminiEnvFilePath(accountPath), { force: true }));
6934
- yield* _(fs.remove(geminiCredentialsPath(accountPath), {
6935
- recursive: true,
6936
- force: true
6937
- }));
6938
- })));
6939
- yield* _(autoSyncState(`chore(state): auth gemini logout ${accountLabel}`));
6940
- }).pipe(Effect.asVoid);
6941
7056
  //#endregion
6942
7057
  //#region ../lib/src/usecases/state-repo-github.ts
6943
7058
  var dotDockerGitRepoName = ".docker-git";