@agenticmail/enterprise 0.5.42 → 0.5.43
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.
|
@@ -219,6 +219,9 @@ function OverviewSection(props) {
|
|
|
219
219
|
var createdAt = engineAgent?.createdAt || engineAgent?.created_at || agent?.createdAt;
|
|
220
220
|
var agentState = engineAgent?.state || engineAgent?.status || agent?.status || 'unknown';
|
|
221
221
|
var stateColor = { running: 'success', active: 'success', deploying: 'info', starting: 'info', ready: 'primary', degraded: 'warning', error: 'danger', stopped: 'neutral', draft: 'neutral' }[agentState] || 'neutral';
|
|
222
|
+
var managerId = config.managerId || null;
|
|
223
|
+
var managerAgent = managerId && (props.agents || []).find(function(a) { return a.id === managerId; });
|
|
224
|
+
var managerName = managerAgent ? (managerAgent.config?.identity?.name || managerAgent.config?.displayName || managerAgent.name || managerId) : null;
|
|
222
225
|
|
|
223
226
|
// Personality traits — can be object (keyed) or array
|
|
224
227
|
var rawTraits = identity.personality_traits || identity.traits || config.personality_traits || {};
|
|
@@ -239,7 +242,7 @@ function OverviewSection(props) {
|
|
|
239
242
|
// ─── Agent Summary Card ─────────────────────────────
|
|
240
243
|
h('div', { className: 'card', style: { marginBottom: 20 } },
|
|
241
244
|
h('div', { className: 'card-body' },
|
|
242
|
-
h('div', { style: { display: 'grid', gridTemplateColumns: '
|
|
245
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: 16 } },
|
|
243
246
|
h('div', null,
|
|
244
247
|
h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 4, textTransform: 'uppercase', letterSpacing: '0.05em', fontWeight: 600 } }, 'Status'),
|
|
245
248
|
h('span', { className: 'badge badge-' + stateColor, style: { textTransform: 'capitalize' } }, agentState)
|
|
@@ -252,6 +255,12 @@ function OverviewSection(props) {
|
|
|
252
255
|
h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 4, textTransform: 'uppercase', letterSpacing: '0.05em', fontWeight: 600 } }, 'Model'),
|
|
253
256
|
h('span', { style: { fontSize: 13, fontWeight: 500, fontFamily: 'var(--font-mono, monospace)' } }, agentModel)
|
|
254
257
|
),
|
|
258
|
+
h('div', null,
|
|
259
|
+
h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 4, textTransform: 'uppercase', letterSpacing: '0.05em', fontWeight: 600 } }, 'Reports To'),
|
|
260
|
+
managerName
|
|
261
|
+
? h('span', { style: { fontSize: 13, fontWeight: 500, color: 'var(--primary)', cursor: 'pointer' }, onClick: function() { /* navigate to manager */ } }, managerName)
|
|
262
|
+
: h('span', { style: { fontSize: 13, color: 'var(--text-muted)' } }, 'No manager')
|
|
263
|
+
),
|
|
255
264
|
h('div', null,
|
|
256
265
|
h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 4, textTransform: 'uppercase', letterSpacing: '0.05em', fontWeight: 600 } }, 'Created'),
|
|
257
266
|
h('span', { style: { fontSize: 13, fontWeight: 500 } }, createdAt ? new Date(createdAt).toLocaleDateString() : '—')
|
|
@@ -211,6 +211,18 @@ export function SkillsPage() {
|
|
|
211
211
|
setConfigSaving(false);
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
+
// Install a builtin skill
|
|
215
|
+
var installBuiltinSkill = async function(skillId) {
|
|
216
|
+
try {
|
|
217
|
+
await engineCall('/community/skills/' + skillId + '/install', {
|
|
218
|
+
method: 'POST',
|
|
219
|
+
body: JSON.stringify({ orgId: getOrgId() })
|
|
220
|
+
});
|
|
221
|
+
toast('Skill installed', 'success');
|
|
222
|
+
loadInstalled();
|
|
223
|
+
} catch (e) { toast(e.message || 'Install failed', 'error'); }
|
|
224
|
+
};
|
|
225
|
+
|
|
214
226
|
// Computed
|
|
215
227
|
var allSkills = Object.entries(skills).flatMap(function(entry) {
|
|
216
228
|
return entry[1].map(function(s) { return Object.assign({}, s, { category: entry[0] }); });
|
|
@@ -246,11 +258,26 @@ export function SkillsPage() {
|
|
|
246
258
|
return h('div', { key: cat, style: { marginBottom: 24 } },
|
|
247
259
|
h('h3', { style: { fontSize: 13, fontWeight: 600, textTransform: 'uppercase', letterSpacing: '0.05em', color: 'var(--text-muted)', marginBottom: 10 } }, cat.replace(/-/g, ' ')),
|
|
248
260
|
h('div', { className: 'skill-grid' }, list.map(function(s) {
|
|
261
|
+
var isInstalled = installed.some(function(i) { return i.skillId === s.id; });
|
|
249
262
|
return h('div', { key: s.id, className: 'skill-card' },
|
|
250
263
|
h('div', { className: 'skill-cat' }, s.category || cat),
|
|
251
264
|
h('div', { className: 'skill-name' }, s.name),
|
|
252
265
|
h('div', { className: 'skill-desc' }, s.description),
|
|
253
|
-
s.tools && h('div', { style: { marginTop: 6, fontSize: 11, color: 'var(--text-muted)' } }, s.tools.length + ' tools')
|
|
266
|
+
s.tools && h('div', { style: { marginTop: 6, fontSize: 11, color: 'var(--text-muted)' } }, s.tools.length + ' tools'),
|
|
267
|
+
h('div', { style: { marginTop: 8, display: 'flex', gap: 6 } },
|
|
268
|
+
isInstalled
|
|
269
|
+
? h('span', { style: { fontSize: 11, color: 'var(--success)', fontWeight: 600 } }, '\u2713 Installed')
|
|
270
|
+
: h('button', {
|
|
271
|
+
className: 'btn btn-primary btn-sm',
|
|
272
|
+
style: { fontSize: 11, padding: '3px 10px' },
|
|
273
|
+
onClick: function() { installBuiltinSkill(s.id); }
|
|
274
|
+
}, 'Install'),
|
|
275
|
+
!isInstalled && h('button', {
|
|
276
|
+
className: 'btn btn-secondary btn-sm',
|
|
277
|
+
style: { fontSize: 11, padding: '3px 10px' },
|
|
278
|
+
onClick: function() { setTokenModal({ skillId: s.id, skillName: s.name }); }
|
|
279
|
+
}, 'Add Token')
|
|
280
|
+
)
|
|
254
281
|
);
|
|
255
282
|
}))
|
|
256
283
|
);
|
package/package.json
CHANGED
|
@@ -219,6 +219,9 @@ function OverviewSection(props) {
|
|
|
219
219
|
var createdAt = engineAgent?.createdAt || engineAgent?.created_at || agent?.createdAt;
|
|
220
220
|
var agentState = engineAgent?.state || engineAgent?.status || agent?.status || 'unknown';
|
|
221
221
|
var stateColor = { running: 'success', active: 'success', deploying: 'info', starting: 'info', ready: 'primary', degraded: 'warning', error: 'danger', stopped: 'neutral', draft: 'neutral' }[agentState] || 'neutral';
|
|
222
|
+
var managerId = config.managerId || null;
|
|
223
|
+
var managerAgent = managerId && (props.agents || []).find(function(a) { return a.id === managerId; });
|
|
224
|
+
var managerName = managerAgent ? (managerAgent.config?.identity?.name || managerAgent.config?.displayName || managerAgent.name || managerId) : null;
|
|
222
225
|
|
|
223
226
|
// Personality traits — can be object (keyed) or array
|
|
224
227
|
var rawTraits = identity.personality_traits || identity.traits || config.personality_traits || {};
|
|
@@ -239,7 +242,7 @@ function OverviewSection(props) {
|
|
|
239
242
|
// ─── Agent Summary Card ─────────────────────────────
|
|
240
243
|
h('div', { className: 'card', style: { marginBottom: 20 } },
|
|
241
244
|
h('div', { className: 'card-body' },
|
|
242
|
-
h('div', { style: { display: 'grid', gridTemplateColumns: '
|
|
245
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: 16 } },
|
|
243
246
|
h('div', null,
|
|
244
247
|
h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 4, textTransform: 'uppercase', letterSpacing: '0.05em', fontWeight: 600 } }, 'Status'),
|
|
245
248
|
h('span', { className: 'badge badge-' + stateColor, style: { textTransform: 'capitalize' } }, agentState)
|
|
@@ -252,6 +255,12 @@ function OverviewSection(props) {
|
|
|
252
255
|
h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 4, textTransform: 'uppercase', letterSpacing: '0.05em', fontWeight: 600 } }, 'Model'),
|
|
253
256
|
h('span', { style: { fontSize: 13, fontWeight: 500, fontFamily: 'var(--font-mono, monospace)' } }, agentModel)
|
|
254
257
|
),
|
|
258
|
+
h('div', null,
|
|
259
|
+
h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 4, textTransform: 'uppercase', letterSpacing: '0.05em', fontWeight: 600 } }, 'Reports To'),
|
|
260
|
+
managerName
|
|
261
|
+
? h('span', { style: { fontSize: 13, fontWeight: 500, color: 'var(--primary)', cursor: 'pointer' }, onClick: function() { /* navigate to manager */ } }, managerName)
|
|
262
|
+
: h('span', { style: { fontSize: 13, color: 'var(--text-muted)' } }, 'No manager')
|
|
263
|
+
),
|
|
255
264
|
h('div', null,
|
|
256
265
|
h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 4, textTransform: 'uppercase', letterSpacing: '0.05em', fontWeight: 600 } }, 'Created'),
|
|
257
266
|
h('span', { style: { fontSize: 13, fontWeight: 500 } }, createdAt ? new Date(createdAt).toLocaleDateString() : '—')
|
|
@@ -211,6 +211,18 @@ export function SkillsPage() {
|
|
|
211
211
|
setConfigSaving(false);
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
+
// Install a builtin skill
|
|
215
|
+
var installBuiltinSkill = async function(skillId) {
|
|
216
|
+
try {
|
|
217
|
+
await engineCall('/community/skills/' + skillId + '/install', {
|
|
218
|
+
method: 'POST',
|
|
219
|
+
body: JSON.stringify({ orgId: getOrgId() })
|
|
220
|
+
});
|
|
221
|
+
toast('Skill installed', 'success');
|
|
222
|
+
loadInstalled();
|
|
223
|
+
} catch (e) { toast(e.message || 'Install failed', 'error'); }
|
|
224
|
+
};
|
|
225
|
+
|
|
214
226
|
// Computed
|
|
215
227
|
var allSkills = Object.entries(skills).flatMap(function(entry) {
|
|
216
228
|
return entry[1].map(function(s) { return Object.assign({}, s, { category: entry[0] }); });
|
|
@@ -246,11 +258,26 @@ export function SkillsPage() {
|
|
|
246
258
|
return h('div', { key: cat, style: { marginBottom: 24 } },
|
|
247
259
|
h('h3', { style: { fontSize: 13, fontWeight: 600, textTransform: 'uppercase', letterSpacing: '0.05em', color: 'var(--text-muted)', marginBottom: 10 } }, cat.replace(/-/g, ' ')),
|
|
248
260
|
h('div', { className: 'skill-grid' }, list.map(function(s) {
|
|
261
|
+
var isInstalled = installed.some(function(i) { return i.skillId === s.id; });
|
|
249
262
|
return h('div', { key: s.id, className: 'skill-card' },
|
|
250
263
|
h('div', { className: 'skill-cat' }, s.category || cat),
|
|
251
264
|
h('div', { className: 'skill-name' }, s.name),
|
|
252
265
|
h('div', { className: 'skill-desc' }, s.description),
|
|
253
|
-
s.tools && h('div', { style: { marginTop: 6, fontSize: 11, color: 'var(--text-muted)' } }, s.tools.length + ' tools')
|
|
266
|
+
s.tools && h('div', { style: { marginTop: 6, fontSize: 11, color: 'var(--text-muted)' } }, s.tools.length + ' tools'),
|
|
267
|
+
h('div', { style: { marginTop: 8, display: 'flex', gap: 6 } },
|
|
268
|
+
isInstalled
|
|
269
|
+
? h('span', { style: { fontSize: 11, color: 'var(--success)', fontWeight: 600 } }, '\u2713 Installed')
|
|
270
|
+
: h('button', {
|
|
271
|
+
className: 'btn btn-primary btn-sm',
|
|
272
|
+
style: { fontSize: 11, padding: '3px 10px' },
|
|
273
|
+
onClick: function() { installBuiltinSkill(s.id); }
|
|
274
|
+
}, 'Install'),
|
|
275
|
+
!isInstalled && h('button', {
|
|
276
|
+
className: 'btn btn-secondary btn-sm',
|
|
277
|
+
style: { fontSize: 11, padding: '3px 10px' },
|
|
278
|
+
onClick: function() { setTokenModal({ skillId: s.id, skillName: s.name }); }
|
|
279
|
+
}, 'Add Token')
|
|
280
|
+
)
|
|
254
281
|
);
|
|
255
282
|
}))
|
|
256
283
|
);
|