terminal-smart-cli 0.97.15 → 0.97.16
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/i18n.js +2 -2
- package/lib/meta.js +8 -4
- package/package.json +1 -1
package/lib/i18n.js
CHANGED
|
@@ -163,7 +163,7 @@ const STR = {
|
|
|
163
163
|
chat_bye: 'Até logo! A conversa continua salva na web (/ia).',
|
|
164
164
|
agent_need: 'Descreva a tarefa. Ex.: ts agente "libere espaço em disco analisando as pastas maiores"',
|
|
165
165
|
agent_thinking: 'agente pensando',
|
|
166
|
-
agent_blocked: 'bloqueado
|
|
166
|
+
agent_blocked: 'bloqueado pelo harness',
|
|
167
167
|
agent_approve: (cmd) => `O agente quer rodar um comando DESTRUTIVO:\n\n ${cmd}\n\n Permitir? (s/N) `,
|
|
168
168
|
agent_footer: (st, cr, s) => `${st} passo(s) · ${cr} créditos · ${s}`,
|
|
169
169
|
agent_footer_byok: (st, prov, s) => `${st} passo(s) · sua chave (${prov}) · ${s}`,
|
|
@@ -332,7 +332,7 @@ const STR = {
|
|
|
332
332
|
chat_bye: 'See you! The conversation stays saved on the web (/ia).',
|
|
333
333
|
agent_need: 'Describe the task. E.g.: ts agente "free disk space by analyzing the largest folders"',
|
|
334
334
|
agent_thinking: 'agent thinking',
|
|
335
|
-
agent_blocked: 'blocked
|
|
335
|
+
agent_blocked: 'blocked by harness',
|
|
336
336
|
agent_approve: (cmd) => `The agent wants to run a DESTRUCTIVE command:\n\n ${cmd}\n\n Allow? (y/N) `,
|
|
337
337
|
agent_footer: (st, cr, s) => `${st} step(s) · ${cr} credits · ${s}`,
|
|
338
338
|
agent_footer_byok: (st, prov, s) => `${st} step(s) · your key (${prov}) · ${s}`,
|
package/lib/meta.js
CHANGED
|
@@ -49,7 +49,7 @@ function artifactForMetaItem(item, st) {
|
|
|
49
49
|
const list = Array.isArray(st && st.checklist) ? st.checklist : [];
|
|
50
50
|
const index = Math.max(0, list.indexOf(item));
|
|
51
51
|
const criterion = Array.isArray(st && st.criteria) ? st.criteria[index] : null;
|
|
52
|
-
if (criterion && criterion.type
|
|
52
|
+
if (criterion && ['file_exists', 'file_contains'].includes(criterion.type) && criterion.path) return String(criterion.path);
|
|
53
53
|
const d = String(item && item.desc || '').toLowerCase();
|
|
54
54
|
if (/controller.*8 dire|8 dire.*controller/.test(d)) return 'src/player_controller.gd';
|
|
55
55
|
if (/combate b[aá]sico|sistema de combate/.test(d)) return 'src/combat_system.gd';
|
|
@@ -1630,13 +1630,17 @@ async function run(goal, opts = {}) {
|
|
|
1630
1630
|
if (expectedNow && !wroteExpectedNow) {
|
|
1631
1631
|
item.attempts = Math.max(0, (item.attempts || 1) - 1);
|
|
1632
1632
|
item.avoidModels = [...new Set([...(item.avoidModels || []), String(out.model || roundModel || 'automatico')])];
|
|
1633
|
-
|
|
1633
|
+
const expectedTarget = path.isAbsolute(expectedArtifact) ? expectedArtifact : path.resolve(dir, expectedArtifact);
|
|
1634
|
+
// Conteúdo direto é seguro para um artefato NOVO. Para código existente ele poderia
|
|
1635
|
+
// substituir o projeto inteiro por uma resposta parcial do item; nesse caso troque o
|
|
1636
|
+
// executor e obrigue uma edição real, preservando o arquivo atual.
|
|
1637
|
+
item.directArtifact = !fs.existsSync(expectedTarget);
|
|
1634
1638
|
const failedModel = String(out.model || roundModel || 'glm-5.2');
|
|
1635
|
-
item.directModel = /glm/i.test(failedModel) ? 'glm-5.2' : failedModel;
|
|
1639
|
+
if (item.directArtifact) item.directModel = /glm/i.test(failedModel) ? 'glm-5.2' : failedModel;
|
|
1636
1640
|
st.status = 'paused'; st.pause_reason = 'model_no_action';
|
|
1637
1641
|
st.budget = st.creditsSpent;
|
|
1638
1642
|
save(st, dir);
|
|
1639
|
-
onAlert({ type: 'retry', text: `O modelo ${out.model || roundModel || 'automatico'}
|
|
1643
|
+
onAlert({ type: 'retry', text: `O modelo ${out.model || roundModel || 'automatico'} não persistiu o artefato esperado. Não marquei o item como concluído; a retomada usará outro executor sem substituir código existente.` });
|
|
1640
1644
|
return st;
|
|
1641
1645
|
}
|
|
1642
1646
|
|