beast-agent 2.6.0 → 2.6.2
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/package.json +1 -1
- package/src/agent/apps.js +587 -0
- package/src/agent/engine.js +39 -4
- package/src/agent/logger.js +138 -5
- package/src/agent/seed-apps/hesap-makinesi/app.json +11 -0
- package/src/agent/seed-apps/hesap-makinesi/main.js +41 -0
- package/src/agent/seed-apps/hesap-makinesi/ui/index.html +151 -0
- package/src/agent/watchers.js +25 -4
- package/src/agent/watext.js +1 -0
- package/src/main.js +29 -6
- package/src/preload.js +1 -0
- package/src/renderer/app-preload.js +20 -0
- package/src/renderer/i18n.js +10 -2
- package/src/renderer/index.html +3 -3
- package/src/renderer/renderer.js +51 -14
- package/src/renderer/style.css +16 -10
package/src/renderer/renderer.js
CHANGED
|
@@ -1153,7 +1153,7 @@ function switchTab(name) {
|
|
|
1153
1153
|
document.querySelectorAll('#setTabs .tab').forEach((b) =>
|
|
1154
1154
|
b.classList.toggle('active', b.dataset.tab === name)
|
|
1155
1155
|
);
|
|
1156
|
-
for (const p of ['lang', 'provider', 'fallout', 'skills', 'agents', 'tts', 'install', 'email', 'integrations', 'websearch', 'mcp', 'events', 'empati', 'cron', 'usage', 'logs', 'dash', 'sec', 'update']) {
|
|
1156
|
+
for (const p of ['lang', 'provider', 'fallout', 'skills', 'agents', 'tts', 'install', 'email', 'integrations', 'websearch', 'mcp', 'events', 'empati', 'cron', 'usage', 'logs', 'dash', 'sec', 'update']) {
|
|
1157
1157
|
const el = $('#tab-' + p);
|
|
1158
1158
|
if (el) el.hidden = p !== name; // guard: eksik pane tüm sekmeleri kilitlemesin
|
|
1159
1159
|
}
|
|
@@ -1262,11 +1262,20 @@ async function refreshFalloutPane() {
|
|
|
1262
1262
|
renderFalloutPane();
|
|
1263
1263
|
}
|
|
1264
1264
|
|
|
1265
|
-
/* Web Arama sekmesi: TinyFish anahtarı + arama sırası (Obscura kaldırıldı — SearXNG yerel motor) */
|
|
1265
|
+
/* Web Arama sekmesi: TinyFish anahtarı + arama sırası + tarayıcı gizleme (Obscura kaldırıldı — SearXNG yerel motor) */
|
|
1266
|
+
/* göz ikonu görünürlüğü: gizleme özelliği açıkken üst çubukta çıkar, kapalıyken yok */
|
|
1267
|
+
async function syncEyeBtn() {
|
|
1268
|
+
if (!els.eyeBtn) return;
|
|
1269
|
+
const r = await beast.browserShownGet().catch(() => null);
|
|
1270
|
+
const enabled = !!(r && r.enabled);
|
|
1271
|
+
els.eyeBtn.hidden = !enabled;
|
|
1272
|
+
els.eyeBtn.classList.toggle('on', !!(r && r.shown));
|
|
1273
|
+
}
|
|
1266
1274
|
async function renderWebSearchPane() {
|
|
1267
1275
|
const pane = $('#tab-websearch');
|
|
1268
1276
|
if (!pane) return;
|
|
1269
1277
|
const tf = await beast.tinyfishGet().catch(() => ({ set: false, masked: '' }));
|
|
1278
|
+
const bh = await beast.browserShownGet().catch(() => ({ enabled: false, shown: false }));
|
|
1270
1279
|
pane.innerHTML =
|
|
1271
1280
|
'<h2>' + _t('ws_h2') + '</h2>' +
|
|
1272
1281
|
'<div class="sub">' + _t('ws_sub') + '</div>' +
|
|
@@ -1275,6 +1284,11 @@ async function renderWebSearchPane() {
|
|
|
1275
1284
|
'<h2>' + _t('so_h2') + '</h2>' +
|
|
1276
1285
|
'<div class="sub">' + _t('so_sub') + '</div>' +
|
|
1277
1286
|
'<div id="soList" style="margin-top:10px"></div>' +
|
|
1287
|
+
/* --- Tarayıcı gizleme --- */
|
|
1288
|
+
'<div class="divider"></div>' +
|
|
1289
|
+
'<h2>' + _t('bh_h2') + '</h2>' +
|
|
1290
|
+
'<div class="sub">' + _t('bh_sub') + '</div>' +
|
|
1291
|
+
'<label class="lock-row" style="margin-top:8px"><input type="checkbox" id="bhOn" ' + (bh.enabled ? 'checked' : '') + '/><span>' + _t('bh_label') + '</span></label>' +
|
|
1278
1292
|
/* --- TinyFish --- */
|
|
1279
1293
|
'<div class="divider"></div>' +
|
|
1280
1294
|
'<h2>' + _t('tf_h2') + '</h2>' +
|
|
@@ -1332,6 +1346,18 @@ async function renderWebSearchPane() {
|
|
|
1332
1346
|
}
|
|
1333
1347
|
if (rows.length) renderRows();
|
|
1334
1348
|
|
|
1349
|
+
/* --- Tarayıcı gizleme --- */
|
|
1350
|
+
const bhOn = $('#bhOn');
|
|
1351
|
+
if (bhOn) bhOn.addEventListener('change', async () => {
|
|
1352
|
+
const r = await beast.browserHideSet(bhOn.checked).catch(() => null);
|
|
1353
|
+
if (r && r.enabled !== undefined) {
|
|
1354
|
+
syncEyeBtn();
|
|
1355
|
+
toast(r.enabled ? _t('bh_on_toast') : _t('bh_off_toast'));
|
|
1356
|
+
} else {
|
|
1357
|
+
toast(_t('ws_fail_toast'));
|
|
1358
|
+
}
|
|
1359
|
+
});
|
|
1360
|
+
|
|
1335
1361
|
/* --- TinyFish --- */
|
|
1336
1362
|
const tfSt = $('#tfStatus');
|
|
1337
1363
|
const setTfSt = (r) => {
|
|
@@ -2219,7 +2245,7 @@ async function renderTtsPane() { const pane = $('#tab-tts');
|
|
|
2219
2245
|
};
|
|
2220
2246
|
const sttLine = stt
|
|
2221
2247
|
? stt.engineLabel + ' · ' + (stateText[stt.state] || stt.state) + (stt.mb ? ' · ' + stt.mb + ' MB' : '')
|
|
2222
|
-
: (window.beast ? 'bilinmiyor' : '');
|
|
2248
|
+
: (window.beast ? 'bilinmiyor' : '');
|
|
2223
2249
|
const edgeOpts = [
|
|
2224
2250
|
['tr-TR-AhmetNeural', 'Ahmet — Türkçe (erkek)'],
|
|
2225
2251
|
['tr-TR-EmelNeural', 'Emel — Türkçe (kadın)'],
|
|
@@ -2976,7 +3002,6 @@ async function renderEventsPane() {
|
|
|
2976
3002
|
<button id="ebSave" class="btn ghost">${_t('ev_save')}</button>
|
|
2977
3003
|
</div>
|
|
2978
3004
|
<div class="sub">${_t('ev_price_sub')}</div>
|
|
2979
|
-
<div class="sub" style="margin-top:8px">Webhook: <code>POST http://127.0.0.1:${ec.port || 8787}/beast-event</code><br>Header: <code>x-beast-token: …</code> <button id="ebTokenCopy" class="btn ghost" style="padding:2px 8px;margin-left:4px">${_t('ev_token_copy')}</button></div>
|
|
2980
3005
|
</div>` +
|
|
2981
3006
|
'<h3 style="margin-top:16px;color:var(--muted)">' + _t('ev_subs_h3') + '</h3>';
|
|
2982
3007
|
const wrap = document.createElement('div');
|
|
@@ -3021,10 +3046,6 @@ async function renderEventsPane() {
|
|
|
3021
3046
|
$('#ebMail').addEventListener('change', saveEb);
|
|
3022
3047
|
$('#ebFs').addEventListener('change', saveEb);
|
|
3023
3048
|
$('#ebSave').addEventListener('click', saveEb);
|
|
3024
|
-
$('#ebTokenCopy').addEventListener('click', async () => {
|
|
3025
|
-
await navigator.clipboard.writeText(ec.token || '').catch(() => {});
|
|
3026
|
-
toast('Webhook token kopyalandı');
|
|
3027
|
-
});
|
|
3028
3049
|
}
|
|
3029
3050
|
|
|
3030
3051
|
/* ---------------- EMPATİ LOOP (proaktif algı sekmesi) ---------------- */
|
|
@@ -5306,7 +5327,10 @@ async function renderWatchersModal() {
|
|
|
5306
5327
|
for (const w of rows) {
|
|
5307
5328
|
const row = document.createElement('div');
|
|
5308
5329
|
row.className = 'mini-row' + (w.enabled ? '' : ' off');
|
|
5309
|
-
const target =
|
|
5330
|
+
const target =
|
|
5331
|
+
w.kind === 'battery' ? 'pil yüzdesi'
|
|
5332
|
+
: w.kind === 'logs' ? `log ${w.level || 'error'} · son ${w.windowMin || 10}dk${w.re ? ' · /' + w.re + '/' : ''}`
|
|
5333
|
+
: (w.path ? w.path : (w.re ? '/' + w.re + '/' : w.url));
|
|
5310
5334
|
row.innerHTML =
|
|
5311
5335
|
`<span class="mr-dot"></span>` +
|
|
5312
5336
|
`<div class="mr-main">` +
|
|
@@ -5397,19 +5421,31 @@ function effectiveModelSel() {
|
|
|
5397
5421
|
return b && !b.admin && b.model ? b.model : (state.activeModel && state.activeModel.sel) || '';
|
|
5398
5422
|
}
|
|
5399
5423
|
|
|
5424
|
+
/* Picker etiketi en fazla 7 karakter: "Sağlayıcı · Model" → modelin ilk anlamlı parçası.
|
|
5425
|
+
Örn "OpenRouter · anthropic/claude-3.5-sonnet" → "claude" */
|
|
5426
|
+
function shortPickerLabel(full) {
|
|
5427
|
+
const model = String(full).split('·').pop().trim();
|
|
5428
|
+
const bare = model.includes('/') ? model.split('/').pop() : model;
|
|
5429
|
+
const short = bare.slice(0, 7).replace(/[-_.\s]+$/, '');
|
|
5430
|
+
return short || String(full).slice(0, 7);
|
|
5431
|
+
}
|
|
5432
|
+
|
|
5400
5433
|
function applyState() {
|
|
5401
5434
|
if (!state) return;
|
|
5402
5435
|
const botSel = activeBotId && botsCache.length ? effectiveModelSel() : (state.activeModel && state.activeModel.sel);
|
|
5403
5436
|
const bm = botSel ? (state.models || []).find((x) => x.sel === botSel) : null;
|
|
5404
|
-
|
|
5437
|
+
/* picker etiketi kısa: tam ad "Sağlayıcı · Model" tooltip'te */
|
|
5438
|
+
const fullSel = bm
|
|
5405
5439
|
? `${bm.providerName} · ${bm.model}`
|
|
5406
5440
|
: state.activeModel
|
|
5407
5441
|
? `${state.activeModel.providerName} · ${state.activeModel.model}`
|
|
5408
|
-
: '
|
|
5442
|
+
: '';
|
|
5443
|
+
els.modelBtnLabel.textContent = fullSel ? shortPickerLabel(fullSel) : 'Model seçilmedi';
|
|
5444
|
+
els.modelBtn.title = fullSel ? `Model: ${fullSel}` : 'Model seç';
|
|
5409
5445
|
els.thinkBtnLabel.innerHTML =
|
|
5410
|
-
'<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.5 2A2.5 2.5 0 0 0 7 4.5v.55A3.5 3.5 0 0 0 4.5 8.5c0 .74.23 1.43.62 2A3.5 3.5 0 0 0 4 13.5 3.5 3.5 0 0 0 7 16.95v.55A2.5 2.5 0 0 0 9.5 20a2.5 2.5 0 0 0 2.5-2.5v-13A2.5 2.5 0 0 0 9.5 2z"/><path d="M14.5 2A2.5 2.5 0 0 1 17 4.5v.55a3.5 3.5 0 0 1 2.5 3.45c0 .74-.23 1.43-.62 2a3.5 3.5 0 0 1
|
|
5446
|
+
'<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.5 2A2.5 2.5 0 0 0 7 4.5v.55A3.5 3.5 0 0 0 4.5 8.5c0 .74.23 1.43.62 2A3.5 3.5 0 0 0 4 13.5 3.5 3.5 0 0 0 7 16.95v.55A2.5 2.5 0 0 0 9.5 20a2.5 2.5 0 0 0 2.5-2.5v-13A2.5 2.5 0 0 0 9.5 2z"/><path d="M14.5 2A2.5 2.5 0 0 1 17 4.5v.55a3.5 3.5 0 0 1 2.5 3.45c0 .74-.23 1.43-.62 2a3.5 3.5 0 0 1 1.12 3 3.5 3.5 0 0 1-3 3.45v.55A2.5 2.5 0 0 1 14.5 20 2.5 2.5 0 0 1 12 17.5v-13A2.5 2.5 0 0 1 14.5 2z"/></svg>';
|
|
5411
5447
|
renderModelMenu();
|
|
5412
|
-
}
|
|
5448
|
+
}
|
|
5413
5449
|
|
|
5414
5450
|
/* düşünme (reasoning) seviyesi picker — gerçek API değerleri */
|
|
5415
5451
|
const THINK_UI_LEVELS = [
|
|
@@ -5983,7 +6019,6 @@ async function init() {
|
|
|
5983
6019
|
/* dahili tarayıcı çubuğu */
|
|
5984
6020
|
els.browserBtn.addEventListener('click', () => beast.toggleBrowser());
|
|
5985
6021
|
if (els.eyeBtn) {
|
|
5986
|
-
beast.browserShownGet().then((r) => els.eyeBtn.classList.toggle('on', !!(r && r.shown))).catch(() => {});
|
|
5987
6022
|
els.eyeBtn.addEventListener('click', async () => {
|
|
5988
6023
|
const next = !els.eyeBtn.classList.contains('on');
|
|
5989
6024
|
try {
|
|
@@ -5992,6 +6027,8 @@ async function init() {
|
|
|
5992
6027
|
toast(r && r.shown ? 'Tarayıcı GÖRÜNÜR — ajan aramaları panelde izlenir' : 'Tarayıcı GİZLİ — ajan arka planda çalışır');
|
|
5993
6028
|
} catch {}
|
|
5994
6029
|
});
|
|
6030
|
+
/* göz ikonu yalnızca gizleme özelliği (Web Arama sekmesi) açıkken görünür */
|
|
6031
|
+
syncEyeBtn();
|
|
5995
6032
|
}
|
|
5996
6033
|
if (els.railBtn) els.railBtn.addEventListener('click', () => {
|
|
5997
6034
|
const willOpen = document.body.classList.contains('rail-hidden');
|
package/src/renderer/style.css
CHANGED
|
@@ -185,8 +185,7 @@ body {
|
|
|
185
185
|
#langBtn,
|
|
186
186
|
#storeBtn,
|
|
187
187
|
#gitBtn,
|
|
188
|
-
#ideBtn
|
|
189
|
-
#studioBtn {
|
|
188
|
+
#ideBtn {
|
|
190
189
|
background: none;
|
|
191
190
|
border: none;
|
|
192
191
|
color: var(--muted);
|
|
@@ -204,18 +203,18 @@ body {
|
|
|
204
203
|
#langBtn:hover,
|
|
205
204
|
#storeBtn:hover,
|
|
206
205
|
#gitBtn:hover,
|
|
207
|
-
#ideBtn:hover
|
|
208
|
-
#studioBtn:hover { background: var(--panel2); color: var(--text); }
|
|
206
|
+
#ideBtn:hover { background: var(--panel2); color: var(--text); }
|
|
209
207
|
#gearBtn:focus,
|
|
210
208
|
#themeBtn:focus,
|
|
211
209
|
#langBtn:focus,
|
|
212
210
|
#storeBtn:focus,
|
|
213
211
|
#gitBtn:focus,
|
|
214
|
-
#ideBtn:focus
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
212
|
+
#ideBtn:focus { outline: none; }
|
|
213
|
+
/* aktif mod rozeti: IDE tuşu basılıyken vurgulanır */
|
|
214
|
+
#ideBtn.on { color: var(--accent); background: var(--panel2); }
|
|
215
|
+
|
|
216
|
+
/* Studio tuşu artık topbar'da (dd-btn dd-icon-btn) — aktif rozet diğer topbar ikonlarıyla aynı */
|
|
217
|
+
#studioBtn.on { background: var(--accent-dim); color: var(--accent); }
|
|
219
218
|
|
|
220
219
|
/* model refresh butonu — çekerken döner */
|
|
221
220
|
#modelRefreshBtn.spin { opacity: .7; pointer-events: none; }
|
|
@@ -303,6 +302,8 @@ body.browser-open #topbar { width: auto; }
|
|
|
303
302
|
#eyeBtn .eye-slash { display: none; }
|
|
304
303
|
#eyeBtn:not(.on) .eye-slash { display: block; }
|
|
305
304
|
#eyeBtn.on { background: var(--accent-dim); color: var(--accent); }
|
|
305
|
+
/* tarayıcı gizleme özelliği kapalıyken buton tamamen yok — [hidden] flex'i ezmesin */
|
|
306
|
+
#eyeBtn[hidden] { display: none; }
|
|
306
307
|
|
|
307
308
|
/* internet göstergesi (sol alt sideFoot satırında, ortalanmış): bağlı = YEŞİL wifi, kopuk = KIRMIZI */
|
|
308
309
|
#netDot {
|
|
@@ -572,6 +573,7 @@ body.term-dragging * { cursor: row-resize !important; }
|
|
|
572
573
|
.dd-btn {
|
|
573
574
|
display: flex;
|
|
574
575
|
align-items: center;
|
|
576
|
+
height: 32px;
|
|
575
577
|
gap: 7px;
|
|
576
578
|
background: var(--panel2);
|
|
577
579
|
color: var(--text);
|
|
@@ -647,7 +649,7 @@ body.term-dragging * { cursor: row-resize !important; }
|
|
|
647
649
|
.dd-empty { color: var(--muted); font-size: 12.5px; padding: 10px; }
|
|
648
650
|
|
|
649
651
|
/* picker yapılandırma popover */
|
|
650
|
-
.dd-icon-btn { width: 34px; justify-content: center; padding: 6px 0; font-size: 15px; }
|
|
652
|
+
.dd-icon-btn { width: 34px; height: 32px; justify-content: center; padding: 6px 0; font-size: 15px; }
|
|
651
653
|
.cfg-menu { width: 360px; max-width: 85vw; }
|
|
652
654
|
.cfg-head {
|
|
653
655
|
display: flex;
|
|
@@ -1948,6 +1950,10 @@ body.browser-open #settingsDialog { width: min(70vw, calc(100vw - var(--bw, 480p
|
|
|
1948
1950
|
/* üst bardaki aktif bot rozeti */
|
|
1949
1951
|
#botChip {
|
|
1950
1952
|
flex: none;
|
|
1953
|
+
display: inline-flex;
|
|
1954
|
+
align-items: center;
|
|
1955
|
+
gap: 6px;
|
|
1956
|
+
height: 32px;
|
|
1951
1957
|
font-size: 12px;
|
|
1952
1958
|
font-weight: 800;
|
|
1953
1959
|
letter-spacing: 0.3px;
|