nothumanallowed 6.3.1 → 6.3.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/constants.mjs +1 -1
- package/src/services/web-ui.mjs +93 -65
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.2",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents for security, code, DevOps, data & daily ops. Per-agent memory, Telegram + Discord auto-responder, proactive intelligence daemon, voice chat, plugin system.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/constants.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
|
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = path.dirname(__filename);
|
|
7
7
|
|
|
8
|
-
export const VERSION = '6.3.
|
|
8
|
+
export const VERSION = '6.3.2';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -654,77 +654,105 @@ function renderSettings(el) {
|
|
|
654
654
|
}
|
|
655
655
|
|
|
656
656
|
el.innerHTML = '<div style="max-width:600px;margin:0 auto">' +
|
|
657
|
-
'
|
|
658
|
-
'
|
|
659
|
-
'
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
'
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
'<div class="card__title" style="color:var(--green);font-size:14px;margin-bottom:12px">Daily Operations</div>' +
|
|
684
|
-
settingsField('plan-time', 'Daily Plan Time', '07:00') +
|
|
685
|
-
settingsField('summary-time', 'Summary Time', '18:00') +
|
|
686
|
-
settingsField('meeting-alert', 'Meeting Alert (minutes)', '30') +
|
|
687
|
-
'</div>' +
|
|
688
|
-
'<div style="text-align:center;margin-top:16px"><span style="color:var(--dim);font-size:10px">Changes are saved automatically when you press Enter or click outside a field.</span></div>' +
|
|
657
|
+
settingsSection('profile', 'User Profile', 'Agents use this when you say "my home", "my city", etc.', [
|
|
658
|
+
['name', 'Name', 'Your full name'],
|
|
659
|
+
['email', 'Email', 'your@email.com'],
|
|
660
|
+
['phone', 'Phone', '+39 ...'],
|
|
661
|
+
['home-address', 'Home Address', 'Via Roma 1, Modena'],
|
|
662
|
+
['work-address', 'Work Address', 'Via Ufficio 10, Modena'],
|
|
663
|
+
['city', 'City', 'Modena'],
|
|
664
|
+
['country', 'Country', 'Italy'],
|
|
665
|
+
['company', 'Company', 'Your company'],
|
|
666
|
+
['role', 'Role', 'Your role'],
|
|
667
|
+
['profile-notes', 'Notes', 'Anything agents should know about you'],
|
|
668
|
+
]) +
|
|
669
|
+
settingsSection('llm', 'LLM Provider', 'The AI model that powers your agents.', [
|
|
670
|
+
['provider', 'Provider', 'anthropic / openai / gemini / deepseek / grok / mistral'],
|
|
671
|
+
['key', 'API Key', 'sk-ant-api03-...', true],
|
|
672
|
+
['model', 'Model', 'Leave empty for default'],
|
|
673
|
+
]) +
|
|
674
|
+
settingsSection('responder', 'Message Responder', 'Auto-reply to Telegram and Discord messages.', [
|
|
675
|
+
['telegram-bot-token', 'Telegram Bot Token', 'Get from @BotFather', true],
|
|
676
|
+
['discord-bot-token', 'Discord Bot Token', 'From Discord Developer Portal', true],
|
|
677
|
+
]) +
|
|
678
|
+
settingsSection('ops', 'Daily Operations', 'Configure daily plan and alert timing.', [
|
|
679
|
+
['plan-time', 'Daily Plan Time', '07:00'],
|
|
680
|
+
['summary-time', 'Summary Time', '18:00'],
|
|
681
|
+
['meeting-alert', 'Meeting Alert (minutes)', '30'],
|
|
682
|
+
]) +
|
|
689
683
|
'</div>';
|
|
690
684
|
}
|
|
691
685
|
|
|
692
|
-
function
|
|
693
|
-
var
|
|
694
|
-
|
|
695
|
-
var
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
'style="
|
|
705
|
-
'
|
|
706
|
-
|
|
707
|
-
|
|
686
|
+
function settingsSection(id, title, desc, fields) {
|
|
687
|
+
var h = '<div class="card" style="margin-bottom:16px" id="settings-' + id + '">' +
|
|
688
|
+
'<div class="card__title" style="color:var(--green);font-size:14px;margin-bottom:4px">' + esc(title) + '</div>' +
|
|
689
|
+
'<div style="font-size:11px;color:var(--dim);margin-bottom:12px">' + esc(desc) + '</div>';
|
|
690
|
+
|
|
691
|
+
for (var i = 0; i < fields.length; i++) {
|
|
692
|
+
var f = fields[i];
|
|
693
|
+
var key = f[0], label = f[1], placeholder = f[2], isSecret = f[3] || false;
|
|
694
|
+
var currentVal = '';
|
|
695
|
+
try { var cfg = JSON.parse(localStorage.getItem('nha_config_cache') || '{}'); currentVal = cfg[key] || ''; } catch(e) {}
|
|
696
|
+
|
|
697
|
+
h += '<div style="margin-bottom:10px">' +
|
|
698
|
+
'<label style="display:block;font-size:11px;color:var(--dim);margin-bottom:3px">' + esc(label) + '</label>' +
|
|
699
|
+
'<input type="' + (isSecret ? 'password' : 'text') + '" ' +
|
|
700
|
+
'value="' + esc(currentVal) + '" ' +
|
|
701
|
+
'placeholder="' + esc(placeholder) + '" ' +
|
|
702
|
+
'style="width:100%;padding:8px 12px;font-size:13px" ' +
|
|
703
|
+
'data-config-key="' + esc(key) + '" ' +
|
|
704
|
+
'data-section="' + esc(id) + '">' +
|
|
705
|
+
'</div>';
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
h += '<div style="display:flex;align-items:center;gap:12px;margin-top:14px">' +
|
|
709
|
+
'<button onclick="saveSettingsSection(\\x27' + id + '\\x27)" ' +
|
|
710
|
+
'style="background:var(--green3);color:var(--bg);padding:8px 24px;border-radius:var(--r);font-weight:700;font-size:13px;cursor:pointer">' +
|
|
711
|
+
'Save' +
|
|
712
|
+
'</button>' +
|
|
713
|
+
'<span id="settings-status-' + id + '" style="font-size:11px;color:var(--dim)"></span>' +
|
|
708
714
|
'</div>';
|
|
715
|
+
|
|
716
|
+
h += '</div>';
|
|
717
|
+
return h;
|
|
709
718
|
}
|
|
710
719
|
|
|
711
|
-
function
|
|
712
|
-
var
|
|
713
|
-
var
|
|
714
|
-
if (
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
720
|
+
function saveSettingsSection(sectionId) {
|
|
721
|
+
var inputs = document.querySelectorAll('input[data-section="' + sectionId + '"]');
|
|
722
|
+
var statusEl = document.getElementById('settings-status-' + sectionId);
|
|
723
|
+
if (statusEl) { statusEl.textContent = 'Saving...'; statusEl.style.color = 'var(--amber)'; }
|
|
724
|
+
|
|
725
|
+
var promises = [];
|
|
726
|
+
inputs.forEach(function(input) {
|
|
727
|
+
var key = input.dataset.configKey;
|
|
728
|
+
var val = input.value.trim();
|
|
729
|
+
if (!key) return;
|
|
730
|
+
promises.push(
|
|
731
|
+
apiPost('/api/config', { key: key, value: val }).then(function(r) {
|
|
732
|
+
if (r && r.ok) {
|
|
733
|
+
try {
|
|
734
|
+
var cfg = JSON.parse(localStorage.getItem('nha_config_cache') || '{}');
|
|
735
|
+
cfg[key] = val;
|
|
736
|
+
localStorage.setItem('nha_config_cache', JSON.stringify(cfg));
|
|
737
|
+
} catch(e) {}
|
|
738
|
+
return true;
|
|
739
|
+
}
|
|
740
|
+
return false;
|
|
741
|
+
})
|
|
742
|
+
);
|
|
743
|
+
});
|
|
744
|
+
|
|
745
|
+
Promise.all(promises).then(function(results) {
|
|
746
|
+
var allOk = results.every(function(r) { return r; });
|
|
747
|
+
if (statusEl) {
|
|
748
|
+
if (allOk) {
|
|
749
|
+
statusEl.textContent = 'Saved!';
|
|
750
|
+
statusEl.style.color = 'var(--green)';
|
|
751
|
+
} else {
|
|
752
|
+
statusEl.textContent = 'Some fields failed to save.';
|
|
753
|
+
statusEl.style.color = 'var(--red)';
|
|
754
|
+
}
|
|
755
|
+
setTimeout(function() { statusEl.textContent = ''; }, 3000);
|
|
728
756
|
}
|
|
729
757
|
});
|
|
730
758
|
}
|