natureco-cli 5.64.4 → 5.64.6
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/CHANGELOG.md +21 -0
- package/README.md +2 -0
- package/package.json +1 -1
- package/src/tools/agentic-runner.js +47 -4
- package/src/tools/computer_use_loop.js +3 -1
- package/src/tools/workflow.js +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to NatureCo CLI will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [5.64.6] - 2026-07-13 — Typed MiniMax tool arguments
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- MiniMax XML tool parameters are now coerced from text to their declared JSON Schema types before validation and execution.
|
|
9
|
+
- `computer_use_loop` now accepts XML values such as `<parameter name="maxSteps">30</parameter>` as the number `30`, so visible GUI automation starts instead of failing with `expected number, got string`.
|
|
10
|
+
- Conversion also covers integer, boolean, object, and array parameters while leaving invalid values untouched for normal schema validation.
|
|
11
|
+
|
|
12
|
+
### Tests
|
|
13
|
+
- Added regressions for valid type conversion, invalid-value preservation, and the exact `computer_use_loop` `maxSteps` failure reported on macOS.
|
|
14
|
+
|
|
15
|
+
## [5.64.5] - 2026-07-13 — Deterministic visible-browser recovery
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- Added `computer_use_loop` to the full-mode GUI tool set and documented it as the single authority for visible multi-step desktop tasks.
|
|
19
|
+
- Clarified that the headless `browser` tool only accepts `open`, `screenshot`, `evaluate`, and `html`; it does not support `navigate`, `click`, or `type` and every call requires a URL.
|
|
20
|
+
- After a verified GUI loop fails, the agent now stops the current turn instead of fanning out into blind screenshots, binary `read_file`, invalid headless-browser actions, or brittle AppleScript window/tab index enumeration.
|
|
21
|
+
- GUI failures now include the last concrete verification/action error instead of only returning `Goal was not verified`.
|
|
22
|
+
|
|
23
|
+
### Tests
|
|
24
|
+
- Added regression coverage proving an unverified GUI loop ends the agentic turn immediately and preserves the failure reason.
|
|
25
|
+
|
|
5
26
|
## [5.64.4] - 2026-07-13 — Unified MiniMax media routing
|
|
6
27
|
|
|
7
28
|
### Added
|
package/README.md
CHANGED
|
@@ -51,6 +51,8 @@ natureco code
|
|
|
51
51
|
|
|
52
52
|
| Version | Highlights |
|
|
53
53
|
|---------|-----------|
|
|
54
|
+
| **v5.64.6** | **Reliable MiniMax tool calls:** XML parameters are converted to their declared schema types, fixing `computer_use_loop` failures such as `maxSteps: expected number, got string`. |
|
|
55
|
+
| **v5.64.5** | **Deterministic GUI recovery:** visible web tasks use one verified GUI loop; failures expose their concrete reason and stop blind browser/AppleScript fallback chains. |
|
|
54
56
|
| **v5.64.4** | **Unified MiniMax media:** the existing MiniMax key now powers `MiniMax-VL-01` analysis, `image-01` generation, `MiniMax-Hailuo-2.3` video, and verified GUI vision—no second key required. |
|
|
55
57
|
| **v5.64.3** | **Evidence-based GUI completion:** desktop actions require a changed screen plus independent visual evidence before success. MiniMax screenshots use the Token Plan VLM with the existing provider key. |
|
|
56
58
|
| **v5.64.2** | **Reliable macOS GUI automation:** tool names stay visible in REPL transcripts, visual tasks use a verified screenshot loop, MiniMax GUI routing avoids duplicate paths, and failed/unverified actions no longer claim success. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natureco-cli",
|
|
3
|
-
"version": "5.64.
|
|
3
|
+
"version": "5.64.6",
|
|
4
4
|
"description": "Terminal-native AI agent CLI with bilingual TR/EN UI, multi-agent orchestration, persistent memory, secure tools and messaging integrations.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"natureco": "bin/natureco.js"
|
|
@@ -112,7 +112,7 @@ const AGENT_EXEC_BLOCK_PATTERNS = [
|
|
|
112
112
|
];
|
|
113
113
|
// Full modda ("agentExec: full") acilan computer-use araclari: tarayici otomasyonu,
|
|
114
114
|
// uygulama ac/kapat, GUI (tikla/yaz/ekran goruntusu). Safe modda (varsayilan) KAPALI.
|
|
115
|
-
const FULL_TOOLS = ['browser', 'browser_use', 'mac_app_open', 'mac_app_quit', 'social_open', 'computer_use', 'macos_screenshot'];
|
|
115
|
+
const FULL_TOOLS = ['browser', 'browser_use', 'mac_app_open', 'mac_app_quit', 'social_open', 'computer_use', 'computer_use_loop', 'macos_screenshot'];
|
|
116
116
|
function agentExecAllowed(command, opts) {
|
|
117
117
|
if (opts && opts.full) return true;
|
|
118
118
|
if (String(process.env.NATURECO_AGENT_EXEC || '').toLowerCase() === 'full') return true;
|
|
@@ -288,6 +288,37 @@ function buildFeedback(norm, res) {
|
|
|
288
288
|
return body ? `${head}:\n${body}` : head;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
function coerceArgsForSchema(args, schema) {
|
|
292
|
+
if (!args || typeof args !== 'object' || !schema || typeof schema !== 'object') return { ...(args || {}) };
|
|
293
|
+
const properties = schema.properties || {};
|
|
294
|
+
const result = { ...args };
|
|
295
|
+
|
|
296
|
+
for (const [key, property] of Object.entries(properties)) {
|
|
297
|
+
const value = result[key];
|
|
298
|
+
if (typeof value !== 'string' || !property) continue;
|
|
299
|
+
const types = Array.isArray(property.type) ? property.type : [property.type];
|
|
300
|
+
const trimmed = value.trim();
|
|
301
|
+
|
|
302
|
+
if (types.includes('integer') && /^[-+]?\d+$/.test(trimmed)) {
|
|
303
|
+
const number = Number(trimmed);
|
|
304
|
+
if (Number.isSafeInteger(number)) result[key] = number;
|
|
305
|
+
} else if (types.includes('number') && trimmed !== '' && Number.isFinite(Number(trimmed))) {
|
|
306
|
+
result[key] = Number(trimmed);
|
|
307
|
+
} else if (types.includes('boolean') && /^(true|false)$/i.test(trimmed)) {
|
|
308
|
+
result[key] = trimmed.toLowerCase() === 'true';
|
|
309
|
+
} else if (types.includes('object') || types.includes('array')) {
|
|
310
|
+
try {
|
|
311
|
+
const parsed = JSON.parse(trimmed);
|
|
312
|
+
if ((types.includes('array') && Array.isArray(parsed)) ||
|
|
313
|
+
(types.includes('object') && parsed && typeof parsed === 'object' && !Array.isArray(parsed))) {
|
|
314
|
+
result[key] = parsed;
|
|
315
|
+
}
|
|
316
|
+
} catch {}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return result;
|
|
320
|
+
}
|
|
321
|
+
|
|
291
322
|
/**
|
|
292
323
|
* Tek bir parse edilmis cagriyi calistir.
|
|
293
324
|
* Donus: { records: [...], feedback: '...' }
|
|
@@ -389,9 +420,11 @@ async function executeCall(call, opts = {}) {
|
|
|
389
420
|
records.push({ tool: norm, status: 'error', error: 'execute yok' });
|
|
390
421
|
return { records, feedback: `${norm} HATA: execute fonksiyonu yok` };
|
|
391
422
|
}
|
|
423
|
+
const schema = mod.inputSchema || mod.parameters || (mod.default && (mod.default.inputSchema || mod.default.parameters));
|
|
424
|
+
const typedArgs = coerceArgsForSchema(args, schema);
|
|
392
425
|
const res = await executeThroughGateway({
|
|
393
426
|
toolName: norm,
|
|
394
|
-
args,
|
|
427
|
+
args: typedArgs,
|
|
395
428
|
resolveTool: () => mod,
|
|
396
429
|
execute: fn,
|
|
397
430
|
normalizeSuccess: value => value,
|
|
@@ -401,7 +434,7 @@ async function executeCall(call, opts = {}) {
|
|
|
401
434
|
const ok = typeof res === 'string' ? true : (res && res.success !== false);
|
|
402
435
|
const status = ok ? 'done' : 'error';
|
|
403
436
|
const feedback = buildFeedback(norm, res);
|
|
404
|
-
records.push({ tool: norm, status, args: sanitizeArgs(
|
|
437
|
+
records.push({ tool: norm, status, args: sanitizeArgs(typedArgs), result: res, error: ok ? undefined : res.error });
|
|
405
438
|
return { records, feedback };
|
|
406
439
|
}
|
|
407
440
|
|
|
@@ -439,6 +472,16 @@ async function runAgentic({ callModel, systemPrompt, historyMessages, task, tool
|
|
|
439
472
|
allRecords.push(...records);
|
|
440
473
|
feedbacks.push(feedback);
|
|
441
474
|
}
|
|
475
|
+
// A verified GUI loop is the authority for visible multi-step desktop work.
|
|
476
|
+
// If it fails, do not let the text model fan out into blind screenshots,
|
|
477
|
+
// binary read_file calls, headless browser guesses, or brittle AppleScript
|
|
478
|
+
// tab enumeration in the same turn. Surface the evidence failure instead;
|
|
479
|
+
// a user-requested retry starts a clean new turn.
|
|
480
|
+
const guiFailure = allRecords.find(record => record.tool === 'computer_use_loop' && record.status === 'error');
|
|
481
|
+
if (guiFailure) {
|
|
482
|
+
finalReply = `GUI görevi doğrulanamadı: ${guiFailure.error || guiFailure.result?.error || 'bilinmeyen hata'}`;
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
442
485
|
messages.push({
|
|
443
486
|
role: 'user',
|
|
444
487
|
content: '<tool_results>\n' + feedbacks.join('\n') + '\n</tool_results>\nGorev tamamlandiysa ARAC CAGIRMADAN tek cumlelik ozet yaz. Devam gerekiyorsa sonraki araci cagir.',
|
|
@@ -452,4 +495,4 @@ async function runAgentic({ callModel, systemPrompt, historyMessages, task, tool
|
|
|
452
495
|
return { records: allRecords, reply: finalReply, iterations };
|
|
453
496
|
}
|
|
454
497
|
|
|
455
|
-
module.exports = { parseAgenticCalls, stripProtocolTokens, executeCall, runAgentic, expandHome, makeStreamFilter, makeSanitizeStream, agentExecAllowed, buildFeedback, TOOL_ALIASES, DEFAULT_ALLOWED };
|
|
498
|
+
module.exports = { parseAgenticCalls, stripProtocolTokens, executeCall, runAgentic, expandHome, makeStreamFilter, makeSanitizeStream, agentExecAllowed, buildFeedback, coerceArgsForSchema, TOOL_ALIASES, DEFAULT_ALLOWED };
|
|
@@ -285,7 +285,9 @@ async function loop(goal, maxSteps) {
|
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
if (!completed) {
|
|
288
|
-
|
|
288
|
+
const lastFailure = [...steps].reverse().find(step => step.error);
|
|
289
|
+
const detail = lastFailure?.error || 'No visible completion evidence was produced';
|
|
290
|
+
return { success: false, error: 'Goal was not verified: ' + detail, goal, totalSteps: steps.length, steps };
|
|
289
291
|
}
|
|
290
292
|
return { success: true, verified: true, evidence: completionEvidence.evidence, confidence: completionEvidence.confidence, goal, totalSteps: steps.length, steps };
|
|
291
293
|
}
|
package/src/tools/workflow.js
CHANGED
|
@@ -243,8 +243,10 @@ async function workflow(params) {
|
|
|
243
243
|
'\n\nTAM MOD ACIK — su araclara da ERISIMIN VAR; o an ne gerekiyorsa dogrudan cagir:',
|
|
244
244
|
'- mac_app_open: macOS uygulamasi ac. parametre: appName (orn. "WhatsApp", "Google Chrome", "Spotify")',
|
|
245
245
|
'- mac_app_quit: macOS uygulamasi kapat. parametre: appName',
|
|
246
|
-
'- browser: HEADLESS
|
|
247
|
-
'-
|
|
246
|
+
'- browser: HEADLESS ve ETKILESIMSIZ icerik araci; kullaniciya GORUNMEZ. SADECE action=open|screenshot|evaluate|html; HER CAGRI url ister. navigate/click/type DESTEKLEMEZ.',
|
|
247
|
+
'- browser_use: ayri bulut/CLI tarayici servisi; yalniz kurulu ve hazirsa kullan. Acik Chrome penceresini kontrol etmek icin kullanma.',
|
|
248
|
+
'- computer_use: GUI otomasyonu. parametreler: action ("screenshot"/"click"/"type"/"keypress"/"scroll"), x, y, text, key',
|
|
249
|
+
'- computer_use_loop: GORUNUR, cok-adimli GUI icin TEK tercih. p: goal, maxSteps?. Kendi screenshot→vision→action→dogrulama dongusunu yapar.',
|
|
248
250
|
'- social_open: muzik/video/sosyal ac. parametreler: query, platform (spotify/youtube...)',
|
|
249
251
|
'- macos_screenshot: ekran goruntusu al',
|
|
250
252
|
'\nGORUNUR ACMA (onemli): Kullanici "kendi tarayicimda ac / gorunur ac / dinlemek/izlemek istiyorum" derse `browser` (headless, gorunmez) DEGIL, GORUNUR ac: macOS bash ile `open "https://..."` ya da `open -a "Google Chrome" "https://..."`; Windows `start "" "https://..."`. Uygulama icin `open -a WhatsApp` / mac_app_open. Muzik/video icin dogrudan YouTube/Spotify URL\'sini `open` ile ac.',
|
|
@@ -300,7 +302,7 @@ async function workflow(params) {
|
|
|
300
302
|
'- Dosya degistirmeden ONCE read_file ile oku, edit_file ile hedefli degistir. Yerini bilmiyorsan file_search/grep_search ile kesfet.',
|
|
301
303
|
'- Kod yazinca/degistirince bash ile calistir/test et, hata varsa duzelt. Coklu dosya = her biri icin AYRI write_file. Hep TAM yol; "masaustu" = ' + desktop + '.',
|
|
302
304
|
'- Arac sonuclari <tool_results> icinde doner; is bitince arac cagirmadan tek cumlelik ozet yaz. Basit sohbette arac cagirma, dogrudan yanitla.',
|
|
303
|
-
execFull ? '- Kullanici uygulama ac / tarayici kontrol / muzik cal / ekran / GUI istediyse yukaridaki computer-use araclarini KULLAN
|
|
305
|
+
execFull ? '- Kullanici uygulama ac / tarayici kontrol / muzik cal / ekran / GUI istediyse yukaridaki computer-use araclarini KULLAN. Gorsel geri bildirim gerektiren cok adimli GORUNUR GUI gorevinde SADECE computer_use_loop kullan; once tekil screenshot alip read_file ile PNG okuma, browser ile click/navigate deneme veya AppleScript ile pencere/tab indeksleri tarama. computer_use_loop hata verirse AYNI TURDA kor alternatif denemeler yapma; hata nedenini durustce bildir. Basariyi arac kanitlamadan tamamlandi deme.' : '',
|
|
304
306
|
fullToolsBlock,
|
|
305
307
|
treeDigest ? ('\n\nBILDIGIN KALICI HAFIZA (bu kullaniciya ait, onceki oturumlardan hatirladiklarin; kullaniciya ozel bir sey sorulursa ONCE BUNU KULLAN — dosya arama, uydurma):\n' + treeDigest) : '',
|
|
306
308
|
treeIndex ? ('\n\nHafiza agaci yapisi (yukarida olmayan detay icin memory_tree(action:read/search) ile ilgili kok/dali oku):\n' + treeIndex) : '',
|