Spaces:
Running
Running
Agent Guard: graceful wake for the in-weights backend
Browse files
ag.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
const S = {
|
| 7 |
en: {
|
| 8 |
agTabAgent: 'Agent', agTabStore: 'App Store β',
|
| 9 |
-
agGraftCold: '
|
| 10 |
agName: 'Agent Guard (Meta Muse)',
|
| 11 |
agIntro: 'A Meta Muse agent. Every tool call it proposes is sent to the ViKernel Secure OS first. Denied or halted actions never run.',
|
| 12 |
agChat: 'Agent chat', agDec: 'ViKernel decisions', agAudit: 'Audit chain',
|
|
@@ -25,7 +25,7 @@ const S = {
|
|
| 25 |
},
|
| 26 |
ko: {
|
| 27 |
agTabAgent: 'μμ΄μ νΈ', agTabStore: 'μ± μ€ν μ΄ β',
|
| 28 |
-
agGraftCold: 'κ°μ€μΉ λ΄μ₯
|
| 29 |
agName: 'Agent Guard (Meta Muse)',
|
| 30 |
agIntro: 'Meta Muse μμ΄μ νΈμ
λλ€. μμ΄μ νΈκ° μ μνλ λͺ¨λ λꡬ νΈμΆμ λ¨Όμ ViKernel μνμ΄ OS λ‘ κ°λλ€. κ±°λΆλκ±°λ μ μ§λ νλμ μ€νλμ§ μμ΅λλ€.',
|
| 31 |
agChat: 'μμ΄μ νΈ λν', agDec: 'ViKernel νμ ', agAudit: 'κ°μ¬ μ¬μ¬',
|
|
@@ -69,9 +69,16 @@ window.VK_AG = ({el, t, toast}) => ({
|
|
| 69 |
el('option', {value:'spark'}, '1. Meta Muse Spark 1.3 (API) + ViKernel gate'),
|
| 70 |
el('option', {value:'graftB'}, '2. Meta Muse Glimmer 30B + ViKernel in-weights, mode B'),
|
| 71 |
el('option', {value:'graftA'}, '3. Meta Muse Glimmer 30B + ViKernel in-weights, mode A (kernel runs inside the weights, slow)'));
|
|
|
|
| 72 |
sel.onchange = async () => { const want = sel.value;
|
| 73 |
if (want !== 'spark') { const prev = SEL; SEL = want; let h = null; try { h = await call('health'); } catch {}
|
| 74 |
-
if (!h || !h.live) { SEL = prev; sel.value = prev;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
SEL = want; LIVE = true; REPLAY = null; mode.textContent = t('agLive'); mode.className = 'tag allow';
|
| 76 |
b.querySelector('#agModel').textContent = sel.options[sel.selectedIndex].text.replace(/^\d\. /, '');
|
| 77 |
say('s', '--- ' + sel.options[sel.selectedIndex].text + ' ---' + (want === 'graftA' ? '\n' + t('agModeA') : '')); audit.innerHTML = ''; refresh(); };
|
|
|
|
| 6 |
const S = {
|
| 7 |
en: {
|
| 8 |
agTabAgent: 'Agent', agTabStore: 'App Store β',
|
| 9 |
+
agGraftCold: 'Waking the in-weights model (about 4 min: it loads 59 GB of weights plus the kernel). Option 1 (Muse Spark + ViKernel gate) stays live meanwhile; you will be told when option 2/3 is ready.', agGraftReady: 'The in-weights model is awake. Pick option 2 or 3 again.', agEGate: 'E checks the audit chain of the ViKernel gate.', agModeA: 'Mode A: the ViKernel kernel runs inside the model weights (a chip circuit grafted into the decoder). Each turn takes about 20 to 60 seconds.',
|
| 10 |
agName: 'Agent Guard (Meta Muse)',
|
| 11 |
agIntro: 'A Meta Muse agent. Every tool call it proposes is sent to the ViKernel Secure OS first. Denied or halted actions never run.',
|
| 12 |
agChat: 'Agent chat', agDec: 'ViKernel decisions', agAudit: 'Audit chain',
|
|
|
|
| 25 |
},
|
| 26 |
ko: {
|
| 27 |
agTabAgent: 'μμ΄μ νΈ', agTabStore: 'μ± μ€ν μ΄ β',
|
| 28 |
+
agGraftCold: 'κ°μ€μΉ λ΄μ₯ λͺ¨λΈμ κΉ¨μ°λ μ€μ
λλ€(μ½ 4λΆ: κ°μ€μΉ 59GB μ 컀λμ μ¬λ¦½λλ€). κ·Έλμ 1λ²(Muse Spark + ViKernel κ²μ΄νΈ)μ κ³μ μΈ μ μμ΅λλ€. μ€λΉλλ©΄ μλ € λ립λλ€.', agGraftReady: 'κ°μ€μΉ λ΄μ₯ λͺ¨λΈμ΄ μ€λΉλμ΅λλ€. 2λ²μ΄λ 3λ²μ λ€μ κ³ λ₯΄μΈμ.', agEGate: 'E λ ViKernel κ²μ΄νΈμ κ°μ¬ μ¬μ¬μ κ²μ¬ν©λλ€.', agModeA: 'λͺ¨λ A: ViKernel 컀λμ΄ λͺ¨λΈ κ°μ€μΉ μ(λμ½λμ μ λͺ©ν μΉ© νλ‘)μμ λμν©λλ€. ν λ²μ μ½ 20~60μ΄ κ±Έλ¦½λλ€.',
|
| 29 |
agName: 'Agent Guard (Meta Muse)',
|
| 30 |
agIntro: 'Meta Muse μμ΄μ νΈμ
λλ€. μμ΄μ νΈκ° μ μνλ λͺ¨λ λꡬ νΈμΆμ λ¨Όμ ViKernel μνμ΄ OS λ‘ κ°λλ€. κ±°λΆλκ±°λ μ μ§λ νλμ μ€νλμ§ μμ΅λλ€.',
|
| 31 |
agChat: 'μμ΄μ νΈ λν', agDec: 'ViKernel νμ ', agAudit: 'κ°μ¬ μ¬μ¬',
|
|
|
|
| 69 |
el('option', {value:'spark'}, '1. Meta Muse Spark 1.3 (API) + ViKernel gate'),
|
| 70 |
el('option', {value:'graftB'}, '2. Meta Muse Glimmer 30B + ViKernel in-weights, mode B'),
|
| 71 |
el('option', {value:'graftA'}, '3. Meta Muse Glimmer 30B + ViKernel in-weights, mode A (kernel runs inside the weights, slow)'));
|
| 72 |
+
let wakeT = null;
|
| 73 |
sel.onchange = async () => { const want = sel.value;
|
| 74 |
if (want !== 'spark') { const prev = SEL; SEL = want; let h = null; try { h = await call('health'); } catch {}
|
| 75 |
+
if (!h || !h.live) { SEL = prev; sel.value = prev;
|
| 76 |
+
if (!wakeT) { const want2 = want; let n = 0;
|
| 77 |
+
say('s', t('agGraftCold'));
|
| 78 |
+
wakeT = setInterval(async () => { n++; let hh = null; SEL = want2; try { hh = await call('health'); } catch (e) {} SEL = sel.value;
|
| 79 |
+
if (hh && hh.live) { clearInterval(wakeT); wakeT = null; say('s', t('agGraftReady')); toast(t('agGraftReady')); }
|
| 80 |
+
else if (n > 40) { clearInterval(wakeT); wakeT = null; } }, 15000); }
|
| 81 |
+
return; } }
|
| 82 |
SEL = want; LIVE = true; REPLAY = null; mode.textContent = t('agLive'); mode.className = 'tag allow';
|
| 83 |
b.querySelector('#agModel').textContent = sel.options[sel.selectedIndex].text.replace(/^\d\. /, '');
|
| 84 |
say('s', '--- ' + sel.options[sel.selectedIndex].text + ' ---' + (want === 'graftA' ? '\n' + t('agModeA') : '')); audit.innerHTML = ''; refresh(); };
|