SeaWolf-AI commited on
Commit
f41c651
Β·
verified Β·
1 Parent(s): b8523e8

Agent Guard: graceful wake for the in-weights backend

Browse files
Files changed (1) hide show
  1. ag.js +10 -3
ag.js CHANGED
@@ -6,7 +6,7 @@
6
  const S = {
7
  en: {
8
  agTabAgent: 'Agent', agTabStore: 'App Store β†—',
9
- agGraftCold: 'The in-weights backend (GPU) is starting. Try again in a few minutes.', 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,7 +25,7 @@ const S = {
25
  },
26
  ko: {
27
  agTabAgent: 'μ—μ΄μ „νŠΈ', agTabStore: 'μ•± μŠ€ν† μ–΄ β†—',
28
- agGraftCold: 'κ°€μ€‘μΉ˜ λ‚΄μž₯ λ°±μ—”λ“œ(GPU)κ°€ μ‹œμž‘ μ€‘μž…λ‹ˆλ‹€. λͺ‡ λΆ„ λ’€ λ‹€μ‹œ μ‹œλ„ν•˜μ„Έμš”.', 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,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; toast(t('agGraftCold')); return; } }
 
 
 
 
 
 
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(); };