@agenticmail/enterprise 0.5.16 → 0.5.18
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/dist/chunk-4F3XGZWR.js +2295 -0
- package/dist/chunk-52DDMP6J.js +12666 -0
- package/dist/chunk-5M2VVNE5.js +48 -0
- package/dist/chunk-76X3FKF5.js +898 -0
- package/dist/chunk-7JFYYBVR.js +1987 -0
- package/dist/chunk-BCDVBHJY.js +9080 -0
- package/dist/chunk-MCOXOTGK.js +889 -0
- package/dist/chunk-XNN7WCIP.js +1987 -0
- package/dist/cli-recover-UHALNDIN.js +97 -0
- package/dist/cli-verify-CN5WNXQI.js +98 -0
- package/dist/cli.js +3 -3
- package/dist/dashboard/app.js +2 -2
- package/dist/dashboard/components/utils.js +19 -0
- package/dist/dashboard/pages/activity.js +2 -2
- package/dist/dashboard/pages/agent-detail.js +12 -12
- package/dist/dashboard/pages/agents.js +4 -4
- package/dist/dashboard/pages/approvals.js +2 -2
- package/dist/dashboard/pages/community-skills.js +12 -12
- package/dist/dashboard/pages/compliance.js +4 -4
- package/dist/dashboard/pages/dashboard.js +3 -3
- package/dist/dashboard/pages/dlp.js +6 -6
- package/dist/dashboard/pages/guardrails.js +17 -17
- package/dist/dashboard/pages/journal.js +3 -3
- package/dist/dashboard/pages/knowledge-contributions.js +8 -8
- package/dist/dashboard/pages/knowledge.js +2 -2
- package/dist/dashboard/pages/messages.js +5 -5
- package/dist/dashboard/pages/settings.js +9 -9
- package/dist/dashboard/pages/skills.js +4 -4
- package/dist/dashboard/pages/vault.js +5 -5
- package/dist/dashboard/pages/workforce.js +2 -2
- package/dist/db-adapter-DZFYOL4K.js +7 -0
- package/dist/factory-5C7EC3SE.js +9 -0
- package/dist/index.js +6 -6
- package/dist/postgres-KG3QMSFU.js +587 -0
- package/dist/routes-T6LJPTIF.js +5674 -0
- package/dist/runtime-O4FBRIDG.js +47 -0
- package/dist/server-47SBCNL5.js +11 -0
- package/dist/server-E5KEUNLI.js +11 -0
- package/dist/setup-HAVYNSWT.js +20 -0
- package/dist/setup-QBFQ5AWO.js +20 -0
- package/package.json +1 -1
- package/src/dashboard/app.js +2 -2
- package/src/dashboard/components/utils.js +19 -0
- package/src/dashboard/pages/activity.js +2 -2
- package/src/dashboard/pages/agent-detail.js +12 -12
- package/src/dashboard/pages/agents.js +4 -4
- package/src/dashboard/pages/approvals.js +2 -2
- package/src/dashboard/pages/community-skills.js +12 -12
- package/src/dashboard/pages/compliance.js +4 -4
- package/src/dashboard/pages/dashboard.js +3 -3
- package/src/dashboard/pages/dlp.js +6 -6
- package/src/dashboard/pages/guardrails.js +17 -17
- package/src/dashboard/pages/journal.js +3 -3
- package/src/dashboard/pages/knowledge-contributions.js +8 -8
- package/src/dashboard/pages/knowledge.js +2 -2
- package/src/dashboard/pages/messages.js +5 -5
- package/src/dashboard/pages/settings.js +9 -9
- package/src/dashboard/pages/skills.js +4 -4
- package/src/dashboard/pages/vault.js +5 -5
- package/src/dashboard/pages/workforce.js +2 -2
- package/src/db/adapter.ts +1 -0
- package/src/db/postgres.ts +6 -2
- package/src/engine/agent-memory.ts +3 -2
- package/src/engine/approvals.ts +2 -1
- package/src/engine/communication.ts +2 -1
- package/src/engine/compliance.ts +3 -2
- package/src/engine/db-adapter.ts +40 -34
- package/src/setup/provision.ts +14 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge } from '../components/utils.js';
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge , getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
|
|
4
4
|
// ─── Constants ──────────────────────────────────────────
|
|
@@ -100,7 +100,7 @@ export function GuardrailsPage() {
|
|
|
100
100
|
var _ag = useState([]);
|
|
101
101
|
var agents = _ag[0]; var setAgents = _ag[1];
|
|
102
102
|
useEffect(function() {
|
|
103
|
-
engineCall('/agents?orgId=
|
|
103
|
+
engineCall('/agents?orgId=' + getOrgId()).then(function(d) { setAgents(d.agents || []); }).catch(function() {});
|
|
104
104
|
}, []);
|
|
105
105
|
|
|
106
106
|
var TABS = [
|
|
@@ -148,8 +148,8 @@ function OverviewTab(props) {
|
|
|
148
148
|
var load = function() {
|
|
149
149
|
setLoading(true);
|
|
150
150
|
Promise.all([
|
|
151
|
-
engineCall('/guardrails/interventions?orgId=
|
|
152
|
-
engineCall('/policies?orgId=
|
|
151
|
+
engineCall('/guardrails/interventions?orgId=' + getOrgId() + '&limit=10').catch(function() { return { interventions: [] }; }),
|
|
152
|
+
engineCall('/policies?orgId=' + getOrgId()).catch(function() { return { policies: [] }; }),
|
|
153
153
|
engineCall('/onboarding/org/default').catch(function() { return { progress: [] }; }),
|
|
154
154
|
]).then(function(res) {
|
|
155
155
|
setInterventions(res[0].interventions || []);
|
|
@@ -256,17 +256,17 @@ function PoliciesTab() {
|
|
|
256
256
|
var editPolicy = _edit[0]; var setEditPolicy = _edit[1];
|
|
257
257
|
var _exp = useState(null);
|
|
258
258
|
var expanded = _exp[0]; var setExpanded = _exp[1];
|
|
259
|
-
var _form = useState({ orgId:
|
|
259
|
+
var _form = useState({ orgId: getOrgId(), name: '', category: 'code_of_conduct', description: '', content: '', priority: 0, enforcement: 'mandatory', appliesTo: ['*'], tags: [], enabled: true });
|
|
260
260
|
var form = _form[0]; var setForm = _form[1];
|
|
261
261
|
|
|
262
262
|
var load = function() {
|
|
263
|
-
engineCall('/policies?orgId=
|
|
263
|
+
engineCall('/policies?orgId=' + getOrgId()).then(function(d) { setPolicies(d.policies || []); }).catch(function() {});
|
|
264
264
|
};
|
|
265
265
|
useEffect(load, []);
|
|
266
266
|
|
|
267
267
|
var openCreate = function() {
|
|
268
268
|
setEditPolicy(null);
|
|
269
|
-
setForm({ orgId:
|
|
269
|
+
setForm({ orgId: getOrgId(), name: '', category: 'code_of_conduct', description: '', content: '', priority: 0, enforcement: 'mandatory', appliesTo: ['*'], tags: [], enabled: true });
|
|
270
270
|
setShowModal(true);
|
|
271
271
|
};
|
|
272
272
|
var openEdit = function(p) {
|
|
@@ -288,7 +288,7 @@ function PoliciesTab() {
|
|
|
288
288
|
.catch(function(e) { toast(e.message, 'error'); });
|
|
289
289
|
};
|
|
290
290
|
var applyDefaults = function() {
|
|
291
|
-
engineCall('/policies/templates/apply', { method: 'POST', body: JSON.stringify({ orgId:
|
|
291
|
+
engineCall('/policies/templates/apply', { method: 'POST', body: JSON.stringify({ orgId: getOrgId(), createdBy: 'admin' }) })
|
|
292
292
|
.then(function(d) { toast('Applied ' + (d.policies ? d.policies.length : 0) + ' default templates', 'success'); load(); })
|
|
293
293
|
.catch(function(e) { toast(e.message, 'error'); });
|
|
294
294
|
};
|
|
@@ -425,7 +425,7 @@ function OnboardingTab(props) {
|
|
|
425
425
|
|
|
426
426
|
var initiate = function() {
|
|
427
427
|
if (!initAgentId) { toast('Enter an agent ID', 'error'); return; }
|
|
428
|
-
engineCall('/onboarding/initiate/' + initAgentId, { method: 'POST', body: JSON.stringify({ orgId:
|
|
428
|
+
engineCall('/onboarding/initiate/' + initAgentId, { method: 'POST', body: JSON.stringify({ orgId: getOrgId() }) })
|
|
429
429
|
.then(function() { toast('Onboarding initiated', 'success'); setInitAgentId(''); load(); })
|
|
430
430
|
.catch(function(e) { toast(e.message, 'error'); });
|
|
431
431
|
};
|
|
@@ -435,7 +435,7 @@ function OnboardingTab(props) {
|
|
|
435
435
|
.catch(function(e) { toast(e.message, 'error'); });
|
|
436
436
|
};
|
|
437
437
|
var checkChanges = function() {
|
|
438
|
-
engineCall('/onboarding/check-changes', { method: 'POST', body: JSON.stringify({ orgId:
|
|
438
|
+
engineCall('/onboarding/check-changes', { method: 'POST', body: JSON.stringify({ orgId: getOrgId() }) })
|
|
439
439
|
.then(function(d) {
|
|
440
440
|
var stale = d.staleAgents || [];
|
|
441
441
|
if (stale.length === 0) { toast('All agents up to date', 'success'); }
|
|
@@ -529,7 +529,7 @@ function MemoryTab(props) {
|
|
|
529
529
|
var showCreate = _show[0]; var setShowCreate = _show[1];
|
|
530
530
|
var _exp = useState(null);
|
|
531
531
|
var expanded = _exp[0]; var setExpanded = _exp[1];
|
|
532
|
-
var _form = useState({ agentId: '', orgId:
|
|
532
|
+
var _form = useState({ agentId: '', orgId: getOrgId(), category: 'org_knowledge', title: '', content: '', source: 'admin', importance: 'normal', tags: [] });
|
|
533
533
|
var form = _form[0]; var setForm = _form[1];
|
|
534
534
|
|
|
535
535
|
var loadMemories = function(aid) {
|
|
@@ -736,13 +736,13 @@ function RulesTab(props) {
|
|
|
736
736
|
var _showAnomaly = useState(false);
|
|
737
737
|
var showAnomalyModal = _showAnomaly[0]; var setShowAnomalyModal = _showAnomaly[1];
|
|
738
738
|
var _form = useState({
|
|
739
|
-
orgId:
|
|
739
|
+
orgId: getOrgId(), name: '', description: '', category: 'anomaly', ruleType: 'threshold',
|
|
740
740
|
conditions: { threshold: 10, windowMinutes: 60 },
|
|
741
741
|
action: 'alert', severity: 'medium', cooldownMinutes: 15, enabled: true
|
|
742
742
|
});
|
|
743
743
|
var form = _form[0]; var setForm = _form[1];
|
|
744
744
|
var _anomalyForm = useState({
|
|
745
|
-
orgId:
|
|
745
|
+
orgId: getOrgId(), name: '', ruleType: 'error_rate',
|
|
746
746
|
config: { maxErrorsPerHour: 50, windowMinutes: 60 }, action: 'pause', enabled: true
|
|
747
747
|
});
|
|
748
748
|
var anomalyForm = _anomalyForm[0]; var setAnomalyForm = _anomalyForm[1];
|
|
@@ -751,9 +751,9 @@ function RulesTab(props) {
|
|
|
751
751
|
|
|
752
752
|
var load = function() {
|
|
753
753
|
Promise.all([
|
|
754
|
-
engineCall('/guardrails/rules?orgId=
|
|
755
|
-
engineCall('/anomaly-rules?orgId=
|
|
756
|
-
engineCall('/guardrails/interventions?orgId=
|
|
754
|
+
engineCall('/guardrails/rules?orgId=' + getOrgId()).catch(function() { return { rules: [] }; }),
|
|
755
|
+
engineCall('/anomaly-rules?orgId=' + getOrgId()).catch(function() { return { rules: [] }; }),
|
|
756
|
+
engineCall('/guardrails/interventions?orgId=' + getOrgId() + '&limit=50').catch(function() { return { interventions: [] }; }),
|
|
757
757
|
]).then(function(res) {
|
|
758
758
|
setRules(res[0].rules || []);
|
|
759
759
|
setAnomalyRules(res[1].rules || []);
|
|
@@ -765,7 +765,7 @@ function RulesTab(props) {
|
|
|
765
765
|
// Guardrail rules CRUD
|
|
766
766
|
var openCreateRule = function() {
|
|
767
767
|
setEditRule(null);
|
|
768
|
-
setForm({ orgId:
|
|
768
|
+
setForm({ orgId: getOrgId(), name: '', description: '', category: 'anomaly', ruleType: 'threshold', conditions: { threshold: 10, windowMinutes: 60 }, action: 'alert', severity: 'medium', cooldownMinutes: 15, enabled: true });
|
|
769
769
|
setShowModal(true);
|
|
770
770
|
};
|
|
771
771
|
var openEditRule = function(r) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, Fragment, useApp, engineCall, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge } from '../components/utils.js';
|
|
1
|
+
import { h, useState, useEffect, Fragment, useApp, engineCall, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge , getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
|
|
4
4
|
export function JournalPage() {
|
|
@@ -10,9 +10,9 @@ export function JournalPage() {
|
|
|
10
10
|
const [agents, setAgents] = useState([]);
|
|
11
11
|
|
|
12
12
|
const load = () => {
|
|
13
|
-
engineCall('/journal?orgId=
|
|
13
|
+
engineCall('/journal?orgId=' + getOrgId() + '&limit=50').then(d => { setEntries(d.entries || []); setTotal(d.total || 0); }).catch(() => {});
|
|
14
14
|
engineCall('/journal/stats/default').then(d => setStats(d)).catch(() => {});
|
|
15
|
-
engineCall('/agents?orgId=
|
|
15
|
+
engineCall('/agents?orgId=' + getOrgId()).then(d => setAgents(d.agents || [])).catch(() => {});
|
|
16
16
|
};
|
|
17
17
|
useEffect(load, []);
|
|
18
18
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall } from '../components/utils.js';
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall , getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { Modal } from '../components/modal.js';
|
|
4
4
|
|
|
@@ -25,7 +25,7 @@ export function KnowledgeContributionsPage() {
|
|
|
25
25
|
var [editSchedule, setEditSchedule] = useState(null);
|
|
26
26
|
|
|
27
27
|
var loadBases = useCallback(function() {
|
|
28
|
-
engineCall('/knowledge-contribution/bases?orgId=
|
|
28
|
+
engineCall('/knowledge-contribution/bases?orgId=' + getOrgId())
|
|
29
29
|
.then(function(d) { setBases(d.bases || d.knowledgeBases || []); })
|
|
30
30
|
.catch(function() {});
|
|
31
31
|
}, []);
|
|
@@ -37,19 +37,19 @@ export function KnowledgeContributionsPage() {
|
|
|
37
37
|
}, []);
|
|
38
38
|
|
|
39
39
|
var loadStats = useCallback(function() {
|
|
40
|
-
engineCall('/knowledge-contribution/stats?orgId=
|
|
40
|
+
engineCall('/knowledge-contribution/stats?orgId=' + getOrgId())
|
|
41
41
|
.then(function(d) { setStats(d || {}); })
|
|
42
42
|
.catch(function() {});
|
|
43
43
|
}, []);
|
|
44
44
|
|
|
45
45
|
var loadContributions = useCallback(function() {
|
|
46
|
-
engineCall('/knowledge-contribution/contributions?orgId=
|
|
46
|
+
engineCall('/knowledge-contribution/contributions?orgId=' + getOrgId())
|
|
47
47
|
.then(function(d) { setContributions(d.contributions || d.cycles || []); })
|
|
48
48
|
.catch(function() {});
|
|
49
49
|
}, []);
|
|
50
50
|
|
|
51
51
|
var loadSchedules = useCallback(function() {
|
|
52
|
-
engineCall('/knowledge-contribution/schedules?orgId=
|
|
52
|
+
engineCall('/knowledge-contribution/schedules?orgId=' + getOrgId())
|
|
53
53
|
.then(function(d) { setSchedules(d.schedules || []); })
|
|
54
54
|
.catch(function() {});
|
|
55
55
|
}, []);
|
|
@@ -83,7 +83,7 @@ export function KnowledgeContributionsPage() {
|
|
|
83
83
|
try {
|
|
84
84
|
await engineCall('/knowledge-contribution/bases', {
|
|
85
85
|
method: 'POST',
|
|
86
|
-
body: JSON.stringify({ name: baseForm.name, description: baseForm.description, role: baseForm.role, orgId:
|
|
86
|
+
body: JSON.stringify({ name: baseForm.name, description: baseForm.description, role: baseForm.role, orgId: getOrgId() })
|
|
87
87
|
});
|
|
88
88
|
toast('Knowledge base created', 'success');
|
|
89
89
|
setShowCreateBase(false);
|
|
@@ -134,7 +134,7 @@ export function KnowledgeContributionsPage() {
|
|
|
134
134
|
try {
|
|
135
135
|
await engineCall('/knowledge-contribution/contribute/' + triggerAgent, {
|
|
136
136
|
method: 'POST',
|
|
137
|
-
body: JSON.stringify({ targetBaseId: triggerBase || undefined, orgId:
|
|
137
|
+
body: JSON.stringify({ targetBaseId: triggerBase || undefined, orgId: getOrgId() })
|
|
138
138
|
});
|
|
139
139
|
toast('Contribution triggered', 'success');
|
|
140
140
|
setShowTrigger(false);
|
|
@@ -155,7 +155,7 @@ export function KnowledgeContributionsPage() {
|
|
|
155
155
|
frequency: scheduleForm.frequency,
|
|
156
156
|
dayOfWeek: scheduleForm.dayOfWeek,
|
|
157
157
|
minConfidence: parseFloat(scheduleForm.minConfidence) || 0.7,
|
|
158
|
-
orgId:
|
|
158
|
+
orgId: getOrgId()
|
|
159
159
|
})
|
|
160
160
|
});
|
|
161
161
|
toast('Schedule created', 'success');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, Fragment, useApp, engineCall } from '../components/utils.js';
|
|
1
|
+
import { h, useState, useEffect, Fragment, useApp, engineCall , getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { Modal } from '../components/modal.js';
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ export function KnowledgeBasePage() {
|
|
|
13
13
|
|
|
14
14
|
const create = async () => {
|
|
15
15
|
try {
|
|
16
|
-
await engineCall('/knowledge-bases', { method: 'POST', body: JSON.stringify({ name: form.name, description: form.description, orgId:
|
|
16
|
+
await engineCall('/knowledge-bases', { method: 'POST', body: JSON.stringify({ name: form.name, description: form.description, orgId: getOrgId() }) });
|
|
17
17
|
toast('Knowledge base created', 'success');
|
|
18
18
|
setCreating(false); setForm({ name: '', description: '' }); load();
|
|
19
19
|
} catch (e) { toast(e.message, 'error'); }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useRef, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge } from '../components/utils.js';
|
|
1
|
+
import { h, useState, useEffect, useRef, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge , getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
|
|
4
4
|
export function MessagesPage() {
|
|
@@ -9,19 +9,19 @@ export function MessagesPage() {
|
|
|
9
9
|
const [mainTab, setMainTab] = useState('messages');
|
|
10
10
|
const [subTab, setSubTab] = useState('all');
|
|
11
11
|
const [showModal, setShowModal] = useState(false);
|
|
12
|
-
const [form, setForm] = useState({ orgId:
|
|
12
|
+
const [form, setForm] = useState({ orgId: getOrgId(), fromAgentId: '', toAgentId: '', subject: '', content: '', priority: 'normal' });
|
|
13
13
|
const [selectedNode, setSelectedNode] = useState(null);
|
|
14
14
|
const [nodePositions, setNodePositions] = useState([]);
|
|
15
15
|
const svgRef = useRef(null);
|
|
16
16
|
|
|
17
17
|
const loadMessages = () => {
|
|
18
|
-
engineCall('/messages?orgId=
|
|
18
|
+
engineCall('/messages?orgId=' + getOrgId() + '&limit=100').then(d => setMessages(d.messages || [])).catch(() => {});
|
|
19
19
|
};
|
|
20
20
|
const loadAgents = () => {
|
|
21
|
-
engineCall('/agents?orgId=
|
|
21
|
+
engineCall('/agents?orgId=' + getOrgId()).then(d => setAgents(d.agents || [])).catch(() => {});
|
|
22
22
|
};
|
|
23
23
|
const loadTopology = () => {
|
|
24
|
-
engineCall('/messages/topology?orgId=
|
|
24
|
+
engineCall('/messages/topology?orgId=' + getOrgId()).then(d => setTopology(d.topology || null)).catch(() => {});
|
|
25
25
|
};
|
|
26
26
|
useEffect(() => { loadMessages(); loadAgents(); loadTopology(); }, []);
|
|
27
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, Fragment, useApp, apiCall, engineCall, applyBrandColor, showConfirm } from '../components/utils.js';
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, apiCall, engineCall, applyBrandColor, showConfirm, setOrgId , getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { Modal } from '../components/modal.js';
|
|
4
4
|
import { TagInput } from '../components/tag-input.js';
|
|
@@ -54,7 +54,7 @@ export function SettingsPage() {
|
|
|
54
54
|
var apiKeyInput = _apiKeyInput[0]; var setApiKeyInput = _apiKeyInput[1];
|
|
55
55
|
|
|
56
56
|
useEffect(() => {
|
|
57
|
-
apiCall('/settings').then(d => { const s = d.settings || d || {}; setSettings(s); if (s.primaryColor) applyBrandColor(s.primaryColor); }).catch(() => {});
|
|
57
|
+
apiCall('/settings').then(d => { const s = d.settings || d || {}; setSettings(s); if (s.primaryColor) applyBrandColor(s.primaryColor); if (s.orgId) setOrgId(s.orgId); }).catch(() => {});
|
|
58
58
|
apiCall('/api-keys').then(d => setApiKeys(d.keys || [])).catch(() => {});
|
|
59
59
|
apiCall('/settings/sso').then(d => {
|
|
60
60
|
const sso = d.ssoConfig || {};
|
|
@@ -65,7 +65,7 @@ export function SettingsPage() {
|
|
|
65
65
|
oidcClientId: sso.oidc?.clientId || '', oidcClientSecret: sso.oidc?.clientSecret || '', oidcDiscoveryUrl: sso.oidc?.discoveryUrl || '',
|
|
66
66
|
}));
|
|
67
67
|
}).catch(() => {});
|
|
68
|
-
engineCall('/deploy-credentials?orgId=
|
|
68
|
+
engineCall('/deploy-credentials?orgId=' + getOrgId()).then(d => setDeployCreds(d.credentials || [])).catch(() => {});
|
|
69
69
|
apiCall('/settings/tool-security').then(d => {
|
|
70
70
|
var cfg = d.toolSecurityConfig || {};
|
|
71
71
|
setToolSec({
|
|
@@ -150,11 +150,11 @@ export function SettingsPage() {
|
|
|
150
150
|
|
|
151
151
|
const createDeployCred = async () => {
|
|
152
152
|
try {
|
|
153
|
-
await engineCall('/deploy-credentials', { method: 'POST', body: JSON.stringify({ orgId:
|
|
153
|
+
await engineCall('/deploy-credentials', { method: 'POST', body: JSON.stringify({ orgId: getOrgId(), name: deployForm.name, targetType: deployForm.targetType, config: deployForm.config }) });
|
|
154
154
|
toast('Credential created', 'success');
|
|
155
155
|
setShowDeployModal(false);
|
|
156
156
|
setDeployForm({ name: '', targetType: 'docker', config: {} });
|
|
157
|
-
engineCall('/deploy-credentials?orgId=
|
|
157
|
+
engineCall('/deploy-credentials?orgId=' + getOrgId()).then(d => setDeployCreds(d.credentials || [])).catch(() => {});
|
|
158
158
|
} catch (e) { toast(e.message, 'error'); }
|
|
159
159
|
};
|
|
160
160
|
|
|
@@ -639,7 +639,7 @@ function IntegrationsTab(props) {
|
|
|
639
639
|
|
|
640
640
|
var loadStatuses = useCallback(function() {
|
|
641
641
|
var promises = INTEGRATIONS.map(function(int) {
|
|
642
|
-
return engineCall('/oauth/status/' + int.skillId + '?orgId=
|
|
642
|
+
return engineCall('/oauth/status/' + int.skillId + '?orgId=' + getOrgId())
|
|
643
643
|
.then(function(d) { return { skillId: int.skillId, connected: d.connected, expiresAt: d.expiresAt }; })
|
|
644
644
|
.catch(function() { return { skillId: int.skillId, connected: false }; });
|
|
645
645
|
});
|
|
@@ -660,7 +660,7 @@ function IntegrationsTab(props) {
|
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
662
662
|
setActionLoading(int.skillId);
|
|
663
|
-
engineCall('/oauth/authorize/' + int.skillId + '?orgId=
|
|
663
|
+
engineCall('/oauth/authorize/' + int.skillId + '?orgId=' + getOrgId())
|
|
664
664
|
.then(function(d) {
|
|
665
665
|
if (d.authorizationUrl) {
|
|
666
666
|
var popup = window.open(d.authorizationUrl, 'oauth_connect', 'width=600,height=700,popup=yes');
|
|
@@ -688,7 +688,7 @@ function IntegrationsTab(props) {
|
|
|
688
688
|
.then(function(ok) {
|
|
689
689
|
if (!ok) return;
|
|
690
690
|
setActionLoading(int.skillId);
|
|
691
|
-
engineCall('/oauth/disconnect/' + int.skillId + '?orgId=
|
|
691
|
+
engineCall('/oauth/disconnect/' + int.skillId + '?orgId=' + getOrgId() + '', { method: 'DELETE' })
|
|
692
692
|
.then(function() { toast(int.name + ' disconnected', 'success'); loadStatuses(); })
|
|
693
693
|
.catch(function(e) { toast('Failed: ' + e.message, 'error'); })
|
|
694
694
|
.finally(function() { setActionLoading(null); });
|
|
@@ -698,7 +698,7 @@ function IntegrationsTab(props) {
|
|
|
698
698
|
var handleSaveToken = function() {
|
|
699
699
|
if (!tokenModal || !tokenValue.trim()) return;
|
|
700
700
|
setActionLoading(tokenModal.skillId);
|
|
701
|
-
engineCall('/oauth/authorize/' + tokenModal.skillId + '?orgId=
|
|
701
|
+
engineCall('/oauth/authorize/' + tokenModal.skillId + '?orgId=' + getOrgId() + '', {
|
|
702
702
|
method: 'POST',
|
|
703
703
|
body: JSON.stringify({ token: tokenValue.trim() })
|
|
704
704
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall } from '../components/utils.js';
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall , getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { Modal } from '../components/modal.js';
|
|
4
4
|
|
|
@@ -52,7 +52,7 @@ export function SkillsPage() {
|
|
|
52
52
|
// Load installed skills + statuses
|
|
53
53
|
var loadInstalled = useCallback(function() {
|
|
54
54
|
setInstalledLoading(true);
|
|
55
|
-
engineCall('/community/installed?orgId=
|
|
55
|
+
engineCall('/community/installed?orgId=' + getOrgId())
|
|
56
56
|
.then(function(d) {
|
|
57
57
|
var items = d.installed || [];
|
|
58
58
|
setInstalled(items);
|
|
@@ -159,7 +159,7 @@ export function SkillsPage() {
|
|
|
159
159
|
try {
|
|
160
160
|
await engineCall('/community/skills/' + skillId + '/' + (enable ? 'enable' : 'disable'), {
|
|
161
161
|
method: 'PUT',
|
|
162
|
-
body: JSON.stringify({ orgId:
|
|
162
|
+
body: JSON.stringify({ orgId: getOrgId() })
|
|
163
163
|
});
|
|
164
164
|
toast('Skill ' + (enable ? 'enabled' : 'disabled'), 'success');
|
|
165
165
|
loadInstalled();
|
|
@@ -177,7 +177,7 @@ export function SkillsPage() {
|
|
|
177
177
|
try {
|
|
178
178
|
await engineCall('/community/skills/' + skillId + '/uninstall', {
|
|
179
179
|
method: 'DELETE',
|
|
180
|
-
body: JSON.stringify({ orgId:
|
|
180
|
+
body: JSON.stringify({ orgId: getOrgId() })
|
|
181
181
|
});
|
|
182
182
|
toast('Skill uninstalled', 'success');
|
|
183
183
|
loadInstalled();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall } from '../components/utils.js';
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall , getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { Modal } from '../components/modal.js';
|
|
4
4
|
|
|
@@ -63,7 +63,7 @@ export function VaultPage() {
|
|
|
63
63
|
// Load secrets
|
|
64
64
|
var loadSecrets = useCallback(function() {
|
|
65
65
|
setLoading(true);
|
|
66
|
-
engineCall('/vault/secrets?orgId=
|
|
66
|
+
engineCall('/vault/secrets?orgId=' + getOrgId())
|
|
67
67
|
.then(function(d) { setSecrets(d.secrets || d.entries || []); })
|
|
68
68
|
.catch(function(e) { toast(e.message || 'Failed to load secrets', 'error'); })
|
|
69
69
|
.finally(function() { setLoading(false); });
|
|
@@ -71,7 +71,7 @@ export function VaultPage() {
|
|
|
71
71
|
|
|
72
72
|
var loadAudit = useCallback(function() {
|
|
73
73
|
setAuditLoading(true);
|
|
74
|
-
engineCall('/vault/audit-log?orgId=
|
|
74
|
+
engineCall('/vault/audit-log?orgId=' + getOrgId() + '&limit=100')
|
|
75
75
|
.then(function(d) { setAuditLog(d.entries || d.log || []); })
|
|
76
76
|
.catch(function(e) { toast(e.message || 'Failed to load audit log', 'error'); })
|
|
77
77
|
.finally(function() { setAuditLoading(false); });
|
|
@@ -94,7 +94,7 @@ export function VaultPage() {
|
|
|
94
94
|
await engineCall('/vault/secrets', {
|
|
95
95
|
method: 'POST',
|
|
96
96
|
body: JSON.stringify({
|
|
97
|
-
orgId:
|
|
97
|
+
orgId: getOrgId(),
|
|
98
98
|
name: addForm.name,
|
|
99
99
|
value: addForm.value,
|
|
100
100
|
category: addForm.category
|
|
@@ -169,7 +169,7 @@ export function VaultPage() {
|
|
|
169
169
|
try {
|
|
170
170
|
var d = await engineCall('/vault/rotate-all', {
|
|
171
171
|
method: 'POST',
|
|
172
|
-
body: JSON.stringify({ orgId:
|
|
172
|
+
body: JSON.stringify({ orgId: getOrgId() })
|
|
173
173
|
});
|
|
174
174
|
toast('Rotated ' + (d.rotated || 0) + ' secrets', 'success');
|
|
175
175
|
loadSecrets();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge } from '../components/utils.js';
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge , getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
|
|
4
4
|
export function WorkforcePage() {
|
|
@@ -42,7 +42,7 @@ export function WorkforcePage() {
|
|
|
42
42
|
setSchedules(schedulesRes.schedules || []);
|
|
43
43
|
setBudgetData(budgetRes);
|
|
44
44
|
setClockRecords(recordsRes.records || []);
|
|
45
|
-
engineCall('/agents?orgId=
|
|
45
|
+
engineCall('/agents?orgId=' + getOrgId()).then(d => setAgents(d.agents || [])).catch(() => {});
|
|
46
46
|
} catch (err) { toast('Failed to load workforce data', 'error'); }
|
|
47
47
|
setLoading(false);
|
|
48
48
|
};
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
executeTool,
|
|
13
13
|
runAgentLoop,
|
|
14
14
|
toolsToDefinitions
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-52DDMP6J.js";
|
|
16
16
|
import {
|
|
17
17
|
ValidationError,
|
|
18
18
|
auditLogger,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
requireRole,
|
|
27
27
|
securityHeaders,
|
|
28
28
|
validate
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-XNN7WCIP.js";
|
|
30
30
|
import {
|
|
31
31
|
PROVIDER_REGISTRY,
|
|
32
32
|
listAllProviders,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
provision,
|
|
38
38
|
runSetupWizard
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-76X3FKF5.js";
|
|
40
40
|
import {
|
|
41
41
|
ENGINE_TABLES,
|
|
42
42
|
ENGINE_TABLES_POSTGRES,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
MIGRATIONS_TABLE_POSTGRES,
|
|
47
47
|
sqliteToMySQL,
|
|
48
48
|
sqliteToPostgres
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-4F3XGZWR.js";
|
|
50
50
|
import {
|
|
51
51
|
deployToCloud,
|
|
52
52
|
generateDockerCompose,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
TenantManager,
|
|
78
78
|
WorkforceManager,
|
|
79
79
|
init_guardrails
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-BCDVBHJY.js";
|
|
81
81
|
import "./chunk-TYW5XTOW.js";
|
|
82
82
|
import {
|
|
83
83
|
CircuitBreaker,
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
import {
|
|
99
99
|
createAdapter,
|
|
100
100
|
getSupportedDatabases
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-5M2VVNE5.js";
|
|
102
102
|
import {
|
|
103
103
|
AGENTICMAIL_TOOLS,
|
|
104
104
|
ALL_TOOLS,
|