terminal-smart-cli 0.97.25 → 0.97.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/agent.js CHANGED
@@ -149,7 +149,11 @@ function isInspectionCommand(command) {
149
149
  const pw = s.match(/^powershell(?:\.exe)?\b[\s\S]*?-Command\s+([\s\S]+)$/i);
150
150
  if (!pw) return false;
151
151
  const inner = String(pw[1] || '').replace(/^[\s"'(]+/, '');
152
- return /^(?:Get-Content\b|Get-ChildItem\b|Get-FileHash\b|Get-Item\b|Get-NetTCPConnection\b|Test-Path\b|Select-String\b)/i.test(inner);
152
+ const mutates = /\b(?:Set-Content|Add-Content|Clear-Content|Remove-Item|Move-Item|Copy-Item|New-Item|Rename-Item|Out-File)\b|(?:^|[^|])>{1,2}(?!&)/i.test(inner);
153
+ if (mutates) return false;
154
+ // Models often assign $p/$lines before a read-only Select-String/Get-Content.
155
+ // Classify the whole command by its verbs, not only by the first token.
156
+ return /\b(?:Get-Content|Get-ChildItem|Get-FileHash|Get-Item|Get-NetTCPConnection|Test-Path|Select-String)\b/i.test(inner);
153
157
  }
154
158
 
155
159
  function parseStageJson(text) {
@@ -553,6 +557,11 @@ function mutationBatchConflicts(toolCalls, cwd) {
553
557
  for (const tc of (Array.isArray(toolCalls) ? toolCalls : [])) {
554
558
  const name = tc && tc.function && tc.function.name;
555
559
  if (!FILE_MUTATORS.has(name)) continue;
560
+ // Anchor edits are deterministic and this loop executes tool calls in
561
+ // order. Blocking a batch of independent source-code anchors made capable
562
+ // models stall on normal multi-part UI changes. Whole-file/document/sheet
563
+ // mutations remain protected because their batches can overwrite state.
564
+ if (name === 'editar_arquivo') continue;
556
565
  let input = {}; try { input = JSON.parse(tc.function.arguments || '{}'); } catch (_) {}
557
566
  const raw = input.caminho || input.path || input.arquivo;
558
567
  if (!raw) continue;
package/lib/meta.js CHANGED
@@ -1573,8 +1573,8 @@ async function run(goal, opts = {}) {
1573
1573
  ? (lang === 'en' ? `\nA SENIOR ENGINEER diagnosed the root cause and the exact fix — APPLY IT precisely:\n${st.escalationHint}\n` : `\nUm ENGENHEIRO SÊNIOR diagnosticou a causa-raiz e o fix exato — APLIQUE EXATAMENTE isto:\n${st.escalationHint}\n`)
1574
1574
  : '')
1575
1575
  + (lang === 'en'
1576
- ? `\nExecute NOW only this item: ${item.desc}\nBe DIRECT: do the item and stop — do NOT re-read or re-verify the whole project (wastes credits). At the end, state the full path of each file you created/changed.`
1577
- : `\nExecute AGORA apenas este item: ${item.desc}\nSeja DIRETO: faça o item e pare — NÃO releia nem revise o projeto inteiro (gasta créditos à toa). NUNCA use a ferramenta preciso_de_voce pra: pedir TESTE/instalação (o SISTEMA compila/instala/abre/testa sozinho a cada rodada), pedir CAMINHO DO SDK/Flutter/toolchain (o sistema provisiona sozinho — o SDK está no objetivo e o build gate cuida do local.properties), nem pedir QUALQUER informação que já esteja no objetivo. Se um caminho/valor está no objetivo, USE-O; não pergunte. A ferramenta preciso_de_voce é SÓ pra ação externa impossível pro agente (chave de API paga, criar conta, pagamento). Na dúvida, AJA com o que tem — não pare pra perguntar. No final, informe o caminho completo de cada arquivo criado/alterado.`);
1576
+ ? `\nExecute NOW only this item: ${item.desc}\nBe DIRECT: do the item and stop — do NOT re-read or re-verify the whole project (wastes credits). If the feature already exists, improve its weakest concrete aspect and persist that improvement in the mandatory artifact; inspection alone is not delivery. At the end, state the full path of each file you created/changed.`
1577
+ : `\nExecute AGORA apenas este item: ${item.desc}\nSeja DIRETO: faça o item e pare — NÃO releia nem revise o projeto inteiro (gasta créditos à toa). Se a funcionalidade já existe, melhore concretamente o ponto mais fraco dela e persista essa melhoria no artefato obrigatório; apenas inspecionar não é entrega. NUNCA use a ferramenta preciso_de_voce pra: pedir TESTE/instalação (o SISTEMA compila/instala/abre/testa sozinho a cada rodada), pedir CAMINHO DO SDK/Flutter/toolchain (o sistema provisiona sozinho — o SDK está no objetivo e o build gate cuida do local.properties), nem pedir QUALQUER informação que já esteja no objetivo. Se um caminho/valor está no objetivo, USE-O; não pergunte. A ferramenta preciso_de_voce é SÓ pra ação externa impossível pro agente (chave de API paga, criar conta, pagamento). Na dúvida, AJA com o que tem — não pare pra perguntar. No final, informe o caminho completo de cada arquivo criado/alterado.`);
1578
1578
 
1579
1579
  // RESILIÊNCIA: um blip de rede (conn) NÃO pode matar a missão inteira (crítico pra
1580
1580
  // rodar a noite). Retenta a rodada até 3x com espera crescente; se persistir, PAUSA
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terminal-smart-cli",
3
- "version": "0.97.25",
3
+ "version": "0.97.27",
4
4
  "description": "Terminal Smart no seu terminal — pergunte, analise logs por pipe e orquestre agentes de IA. Comando: ts",
5
5
  "bin": {
6
6
  "ts": "bin/ts.js"