cliclaw 1.0.23 → 1.0.24

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/bin/cli.js CHANGED
@@ -189,19 +189,18 @@ async function runConfigWizard() {
189
189
  console.log(`${c.gray} Leave empty to configure later.\n${c.reset}`)
190
190
  const forumId = await prompt('FORUM_GROUP_ID (Enter to skip)', existing.FORUM_GROUP_ID || '')
191
191
 
192
- console.log(`\n${c.bold}Permission mode${c.reset}`)
193
- console.log(` ${c.bold}1) auto${c.reset} — always skip prompts ${c.cyan}(recommended)${c.reset}`)
194
- console.log(` ${c.bold}2) session${c.reset} ask per /new session`)
195
- console.log(` ${c.bold}3) ask${c.reset} — prefix message with ! to allow\n`)
196
- const permChoice = await prompt('Choose [1/2/3]',
197
- existing.PERMISSION_MODE === 'session' ? '2' : existing.PERMISSION_MODE === 'ask' ? '3' : '1')
198
- const permMode = permChoice === '2' ? 'session' : permChoice === '3' ? 'ask' : 'auto'
199
- ok(`Permission mode: ${permMode}`)
192
+ console.log(`\n${c.bold}Codex — aprovação de comandos${c.reset}`)
193
+ console.log(` ${c.bold}1) ask${c.reset} — pergunta antes de cada comando ${c.cyan}(recomendado)${c.reset}`)
194
+ console.log(` ${c.bold}2) allow${c.reset} executa tudo automaticamente\n`)
195
+ const approvalChoice = await prompt('Escolha [1/2]',
196
+ existing.CODEX_APPROVAL === 'allow' ? '2' : '1')
197
+ const codexApproval = approvalChoice === '2' ? 'allow' : 'ask'
198
+ ok(`Codex approval: ${codexApproval}`)
200
199
 
201
200
  const dataDir = existing.DATA_DIR || path.join(USER_DIR, 'data')
202
201
  let envContent = `TELEGRAM_BOT_TOKEN=${token}\n`
203
202
  if (forumId) envContent += `FORUM_GROUP_ID=${forumId}\n`
204
- envContent += `PERMISSION_MODE=${permMode}\n`
203
+ envContent += `CODEX_APPROVAL=${codexApproval}\n`
205
204
  envContent += `DATA_DIR=${dataDir}\n`
206
205
  fs.writeFileSync(envFile, envContent, 'utf8')
207
206
  ok(`.env saved → ${envFile}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cliclaw",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Telegram bot bridging AI CLIs (Claude Code, Codex) to Forum Topics",
5
5
  "main": "index.ts",
6
6
  "scripts": {
@@ -14,8 +14,8 @@ const BASE_ENV = {
14
14
  LANG: 'en_US.UTF-8',
15
15
  }
16
16
 
17
- const SESSION_TTL_MS = 30 * 60 * 1000 // kill idle processes after 30 min
18
- const RESPONSE_TIMEOUT_MS = 120_000 // 2 min per message
17
+ const SESSION_TTL_MS = 30 * 60 * 1000 // kill idle processes after 30 min
18
+ const RESPONSE_TIMEOUT_MS = 10 * 60_000 // 10 min allows time for user approval clicks
19
19
 
20
20
  interface PendingReq {
21
21
  resolve: (r: { text: string; usage?: TokenUsage }) => void