myagent-ai 1.23.21 → 1.23.22
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/web/ui/admin/admin-agents.js +0 -5
- package/web/ui/admin/admin-dashboard.js +0 -5
- package/web/ui/admin/admin-executor.js +0 -5
- package/web/ui/admin/admin-files.js +0 -5
- package/web/ui/admin/admin-llm.js +0 -5
- package/web/ui/admin/admin-logs.js +0 -5
- package/web/ui/admin/admin-memory.js +0 -5
- package/web/ui/admin/admin-org.js +0 -5
- package/web/ui/admin/admin-permissions.js +0 -5
- package/web/ui/admin/admin-platforms.js +0 -5
- package/web/ui/admin/admin-sessions.js +0 -5
- package/web/ui/admin/admin-skills.js +0 -5
- package/web/ui/admin/admin-system.js +0 -5
- package/web/ui/admin/admin-tasks.js +0 -5
package/package.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Agents ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Agents (FULL REWRITE) ==========
|
|
5
2
|
async function renderAgents(){
|
|
6
3
|
const [agents,models,depts]=await Promise.all([api('/api/agents'),api('/api/models'),api('/api/departments')]);
|
|
7
4
|
allAgentsCache=Array.isArray(agents)?agents:[];allModelsCache=Array.isArray(models)?models:[];allDeptsCache=Array.isArray(depts)?depts:(depts?.tree||[]);
|
|
@@ -566,5 +563,3 @@ function chatWithAgent(path){
|
|
|
566
563
|
|
|
567
564
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
568
565
|
window._adminRenderers['agents'] = renderAgents;
|
|
569
|
-
} catch(e) { console.error('[admin-agents] load error:', e); }
|
|
570
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Dashboard ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Dashboard ==========
|
|
5
2
|
async function renderDashboard(){
|
|
6
3
|
const s = await api('/api/status');
|
|
7
4
|
const gl = s.global_llm || {};
|
|
@@ -149,5 +146,3 @@ async function renderDashboard(){
|
|
|
149
146
|
|
|
150
147
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
151
148
|
window._adminRenderers['dashboard'] = renderDashboard;
|
|
152
|
-
} catch(e) { console.error('[admin-dashboard] load error:', e); }
|
|
153
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Executor ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Executor ==========
|
|
5
2
|
async function renderExecutor(){
|
|
6
3
|
const e=await api('/api/executor');if(!e)return;
|
|
7
4
|
const isSandbox=e.mode==='sandbox';const dockerOk=e.docker_available;
|
|
@@ -63,5 +60,3 @@ async function releaseLock(){
|
|
|
63
60
|
|
|
64
61
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
65
62
|
window._adminRenderers['executor'] = renderExecutor;
|
|
66
|
-
} catch(e) { console.error('[admin-executor] load error:', e); }
|
|
67
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Files ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Files ==========
|
|
5
2
|
var _workdirAgent=''; // 当前选中的 agent(空=全局工作目录)
|
|
6
3
|
async function renderFiles(){
|
|
7
4
|
try{
|
|
@@ -77,5 +74,3 @@ async function changeWorkdir(){const p=prompt('新路径:');if(!p)return;await a
|
|
|
77
74
|
|
|
78
75
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
79
76
|
window._adminRenderers['files'] = renderFiles;
|
|
80
|
-
} catch(e) { console.error('[admin-files] load error:', e); }
|
|
81
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== LLM ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== LLM ==========
|
|
5
2
|
async function renderLLM(){
|
|
6
3
|
const [u,models]=await Promise.all([api('/api/llm/usage'),api('/api/models')]);
|
|
7
4
|
// 更新模型缓存
|
|
@@ -186,5 +183,3 @@ async function deleteModel(id,name){
|
|
|
186
183
|
|
|
187
184
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
188
185
|
window._adminRenderers['llm'] = renderLLM;
|
|
189
|
-
} catch(e) { console.error('[admin-llm] load error:', e); }
|
|
190
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Logs ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Logs ==========
|
|
5
2
|
async function renderLogs(){
|
|
6
3
|
let html=`<div class="flex gap-8 mb-16 flex-wrap">
|
|
7
4
|
<select id="logLines" style="width:auto"><option value="100">100 行</option><option value="500" selected>500 行</option><option value="1000">1000 行</option><option value="2000">2000 行</option></select>
|
|
@@ -65,5 +62,3 @@ async function toggleLogStream(){
|
|
|
65
62
|
|
|
66
63
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
67
64
|
window._adminRenderers['logs'] = renderLogs;
|
|
68
|
-
} catch(e) { console.error('[admin-logs] load error:', e); }
|
|
69
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Memory ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Memory ==========
|
|
5
2
|
let _memCategory='global';
|
|
6
3
|
let _memAgentFilter=''; // [v1.18.9] agent筛选
|
|
7
4
|
async function renderMemory(){
|
|
@@ -87,5 +84,3 @@ async function cleanupMemory(){const r=await api('/api/memory/cleanup',{method:'
|
|
|
87
84
|
|
|
88
85
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
89
86
|
window._adminRenderers['memory'] = renderMemory;
|
|
90
|
-
} catch(e) { console.error('[admin-memory] load error:', e); }
|
|
91
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Organization + Departments ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Organization ==========
|
|
5
2
|
async function renderOrganization(){
|
|
6
3
|
const [org,info]=await Promise.all([api('/api/organization'),api('/api/organization/info')]);
|
|
7
4
|
if(org.error){$('content').innerHTML='<div class="empty" style="color:var(--danger)">加载失败: '+escHtml(org.error)+'</div>';return}
|
|
@@ -279,5 +276,3 @@ async function uploadDeptKB(path,folderMode){
|
|
|
279
276
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
280
277
|
window._adminRenderers['organization'] = renderOrganization;
|
|
281
278
|
window._adminRenderers['departments'] = renderDepartments;
|
|
282
|
-
} catch(e) { console.error('[admin-org] load error:', e); }
|
|
283
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Permissions ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== 权限管理 ==========
|
|
5
2
|
let _permsCache=null;
|
|
6
3
|
async function renderPermissions(){
|
|
7
4
|
const r=await api('/api/permissions');
|
|
@@ -143,5 +140,3 @@ async function resetAgentPerms(name){
|
|
|
143
140
|
|
|
144
141
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
145
142
|
window._adminRenderers['permissions'] = renderPermissions;
|
|
146
|
-
} catch(e) { console.error('[admin-permissions] load error:', e); }
|
|
147
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Platforms ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Platforms ==========
|
|
5
2
|
async function renderPlatforms(){
|
|
6
3
|
const ps=await api('/api/platforms');
|
|
7
4
|
if(ps.error){$('content').innerHTML='<div class="empty" style="color:var(--danger)">加载失败: '+escHtml(ps.error)+'</div>';return}
|
|
@@ -217,5 +214,3 @@ function toggleAgentSelection(cb,inputId,containerId){
|
|
|
217
214
|
|
|
218
215
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
219
216
|
window._adminRenderers['platforms'] = renderPlatforms;
|
|
220
|
-
} catch(e) { console.error('[admin-platforms] load error:', e); }
|
|
221
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Sessions ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Sessions ==========
|
|
5
2
|
async function renderSessions(){
|
|
6
3
|
const ss=await api('/api/sessions');
|
|
7
4
|
let html='<div class="table-wrap"><table><tr><th>会话</th><th>Agent</th><th>消息数</th><th>最后活动</th><th>操作</th></tr>';
|
|
@@ -178,5 +175,3 @@ function enterSession(sid,agentName){
|
|
|
178
175
|
|
|
179
176
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
180
177
|
window._adminRenderers['sessions'] = renderSessions;
|
|
181
|
-
} catch(e) { console.error('[admin-sessions] load error:', e); }
|
|
182
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Skills ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Skills ==========
|
|
5
2
|
// [v1.23.0] CLI 命令分类配置(与 registry.py CLI_CATEGORY_LABELS/ICONS 同步)
|
|
6
3
|
const CLI_CAT_ICONS={perception:'\u{1F441}',search:'\u{1F50D}',file:'\u{1F4C1}',document:'\u{1F4C4}',system:'\u{1F4BB}',browser:'\u{1F310}',gui:'\u{1F5A5}',memory:'\u{1F9E0}'};
|
|
7
4
|
const CLI_CAT_LABELS={perception:'感知',search:'搜索',file:'文件操作',document:'文档生成',system:'系统',browser:'浏览器',gui:'GUI 桌面',memory:'记忆'};
|
|
@@ -213,5 +210,3 @@ async function viewSkillDetail(name){
|
|
|
213
210
|
|
|
214
211
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
215
212
|
window._adminRenderers['skills'] = renderSkills;
|
|
216
|
-
} catch(e) { console.error('[admin-skills] load error:', e); }
|
|
217
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== System Config ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== System Config ==========
|
|
5
2
|
async function renderSystem(){
|
|
6
3
|
$('content').innerHTML=`
|
|
7
4
|
<div class="card">
|
|
@@ -150,5 +147,3 @@ async function sysLoadPreview(){
|
|
|
150
147
|
|
|
151
148
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
152
149
|
window._adminRenderers['system'] = renderSystem;
|
|
153
|
-
} catch(e) { console.error('[admin-system] load error:', e); }
|
|
154
|
-
})();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// ========== Tasks ==========
|
|
2
|
-
(function(){
|
|
3
|
-
try {
|
|
4
|
-
// ========== Tasks ==========
|
|
5
2
|
async function renderTasks(){
|
|
6
3
|
// [v1.18.7] 同时获取实时 task plan 和持久化任务
|
|
7
4
|
const [planR,persistR]=await Promise.all([api('/api/task-plan/all').catch(()=>({plans:[],total_keys:0})),api('/api/tasks').catch(()=>({tasks:[],total:0}))]);
|
|
@@ -127,5 +124,3 @@ async function deleteTask(taskId){
|
|
|
127
124
|
|
|
128
125
|
if (typeof window._adminRenderers === 'undefined') window._adminRenderers = {};
|
|
129
126
|
window._adminRenderers['tasks'] = renderTasks;
|
|
130
|
-
} catch(e) { console.error('[admin-tasks] load error:', e); }
|
|
131
|
-
})();
|