nexus-agentd 0.1.8 → 0.2.0
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/LICENSE +22 -22
- package/README.md +224 -446
- package/dist/a2a/runtime.d.ts +5 -4
- package/dist/a2a/runtime.js +83 -13
- package/dist/acp/runtime.d.ts +3 -8
- package/dist/acp/runtime.js +63 -79
- package/dist/completion-contract.d.ts +1 -0
- package/dist/completion-contract.js +9 -0
- package/dist/config.js +1 -15
- package/dist/control-plane.d.ts +0 -1
- package/dist/control-plane.js +1 -19
- package/dist/run-store.d.ts +1 -1
- package/dist/server.js +63 -248
- package/dist/session-contract.d.ts +3 -2
- package/dist/session.d.ts +11 -2
- package/dist/session.js +202 -17
- package/dist/types.d.ts +25 -45
- package/dist/webui/app.js +912 -1074
- package/dist/webui/icons.d.ts +0 -1
- package/dist/webui/icons.js +0 -1
- package/dist/webui/index.js +10 -10
- package/dist/webui/markup.js +65 -66
- package/dist/webui/styles.js +256 -268
- package/nexus-agentd.example.json +40 -47
- package/package.json +52 -52
- package/dist/agent-instructions.d.ts +0 -11
- package/dist/agent-instructions.js +0 -44
- package/dist/artifact-store.d.ts +0 -41
- package/dist/artifact-store.js +0 -340
- package/dist/workspace-files.d.ts +0 -48
- package/dist/workspace-files.js +0 -269
package/dist/webui/icons.d.ts
CHANGED
package/dist/webui/icons.js
CHANGED
|
@@ -4,7 +4,6 @@ export const icons = {
|
|
|
4
4
|
runs: base('<path d="M4 4v16h16"/><path d="m7 15 3-4 3 2 4-6"/><circle cx="7" cy="15" r="1"/><circle cx="10" cy="11" r="1"/><circle cx="13" cy="13" r="1"/><circle cx="17" cy="7" r="1"/>'),
|
|
5
5
|
agents: base('<path d="M12 8V4H8"/><rect x="4" y="8" width="16" height="12" rx="2"/><path d="M9 13h.01M15 13h.01M9 17h6"/>'),
|
|
6
6
|
workspaces: base('<path d="M3 7.5h7l2 2h9v9.5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><path d="M3 7.5V5a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v2.5"/>'),
|
|
7
|
-
files: base('<path d="M4 3h10l6 6v12H4z"/><path d="M14 3v6h6"/><path d="M8 14h8M8 18h6"/>'),
|
|
8
7
|
keys: base('<circle cx="8" cy="15" r="4"/><path d="m11 12 8-8M15 8l3 3M17 6l3 3"/>'),
|
|
9
8
|
settings: base('<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .34 1.88l.06.06-2.83 2.83-.06-.06A1.7 1.7 0 0 0 15 19.4a1.7 1.7 0 0 0-1 .6 1.7 1.7 0 0 0-.4 1.1V21H9.6v-.09A1.7 1.7 0 0 0 8.5 19.4a1.7 1.7 0 0 0-1.88.34l-.06.06-2.83-2.83.06-.06A1.7 1.7 0 0 0 4.6 15a1.7 1.7 0 0 0-.6-1 1.7 1.7 0 0 0-1.1-.4H3V9.6h.09A1.7 1.7 0 0 0 4.6 8.5a1.7 1.7 0 0 0-.34-1.88l-.06-.06 2.83-2.83.06.06A1.7 1.7 0 0 0 9 4.6a1.7 1.7 0 0 0 1-.6 1.7 1.7 0 0 0 .4-1.1V3h4v.09A1.7 1.7 0 0 0 15.5 4.6a1.7 1.7 0 0 0 1.88-.34l.06-.06 2.83 2.83-.06.06A1.7 1.7 0 0 0 19.4 9c.15.38.38.72.7 1 .3.27.7.4 1.1.4h.09v4h-.09c-.4 0-.8.14-1.1.4-.32.28-.55.62-.7 1Z"/>')
|
|
10
9
|
};
|
package/dist/webui/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { app } from './app.js';
|
|
2
2
|
import { markup } from './markup.js';
|
|
3
3
|
import { styles } from './styles.js';
|
|
4
|
-
const page = `<!doctype html>
|
|
5
|
-
<html lang="zh-CN">
|
|
6
|
-
<head>
|
|
7
|
-
<meta charset="utf-8">
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<meta name="color-scheme" content="light dark">
|
|
10
|
-
<title>Agent Nexus</title>
|
|
11
|
-
<style>${styles}</style>
|
|
12
|
-
</head>
|
|
13
|
-
<body>${markup}<script>${app}</script></body>
|
|
4
|
+
const page = `<!doctype html>
|
|
5
|
+
<html lang="zh-CN">
|
|
6
|
+
<head>
|
|
7
|
+
<meta charset="utf-8">
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
+
<meta name="color-scheme" content="light dark">
|
|
10
|
+
<title>Agent Nexus</title>
|
|
11
|
+
<style>${styles}</style>
|
|
12
|
+
</head>
|
|
13
|
+
<body>${markup}<script>${app}</script></body>
|
|
14
14
|
</html>`;
|
|
15
15
|
export function redirectToAgentdWebUi(response) {
|
|
16
16
|
response.writeHead(302, {
|
package/dist/webui/markup.js
CHANGED
|
@@ -1,68 +1,67 @@
|
|
|
1
1
|
import { icons } from './icons.js';
|
|
2
|
-
export const markup = String.raw `
|
|
3
|
-
<div id="setup-screen" class="auth-screen hidden">
|
|
4
|
-
<form id="setup-form" class="auth-card">
|
|
5
|
-
<div class="brand-mark">N</div>
|
|
6
|
-
<h1>初始化 Agent Nexus</h1>
|
|
7
|
-
<p>创建仅用于后台管理的控制台密码。客户端 API 密钥将在登录后单独管理。</p>
|
|
8
|
-
<label>控制台密码<input name="password" type="password" minlength="12" autocomplete="new-password" required></label>
|
|
9
|
-
<label>确认密码<input name="confirmPassword" type="password" minlength="12" autocomplete="new-password" required></label>
|
|
10
|
-
<button class="button primary" type="submit">完成初始化</button>
|
|
11
|
-
<p class="form-error" data-form-error></p>
|
|
12
|
-
</form>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
<div id="login-screen" class="auth-screen hidden">
|
|
16
|
-
<form id="login-form" class="auth-card">
|
|
17
|
-
<div class="brand-mark">N</div>
|
|
18
|
-
<h1>Agent Nexus</h1>
|
|
19
|
-
<p>登录后管理智能体、工作区和客户端 API 密钥。</p>
|
|
20
|
-
<label>控制台密码<input name="password" type="password" autocomplete="current-password" required autofocus></label>
|
|
21
|
-
<button class="button primary" type="submit">登录</button>
|
|
22
|
-
<p class="form-error" data-form-error></p>
|
|
23
|
-
</form>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div id="app" class="app-shell hidden">
|
|
27
|
-
<aside class="sidebar">
|
|
28
|
-
<div class="brand"><span class="brand-mark small">N</span><span>Agent Nexus</span></div>
|
|
29
|
-
<nav aria-label="主导航">
|
|
30
|
-
<button class="nav-item active" data-page="overview">${icons.overview}<span>总览</span></button>
|
|
31
|
-
<button class="nav-item" data-page="runs">${icons.runs}<span>运行记录</span></button>
|
|
32
|
-
<button class="nav-item" data-page="agents">${icons.agents}<span>智能体</span></button>
|
|
33
|
-
<button class="nav-item" data-page="workspaces">${icons.workspaces}<span>工作区</span></button>
|
|
34
|
-
<button class="nav-item" data-page="
|
|
35
|
-
<button class="nav-item" data-page="
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<option value="
|
|
43
|
-
<option value="
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<button id="
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<div
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<div id="toast-region" class="toast-region" aria-live="assertive"></div>
|
|
2
|
+
export const markup = String.raw `
|
|
3
|
+
<div id="setup-screen" class="auth-screen hidden">
|
|
4
|
+
<form id="setup-form" class="auth-card">
|
|
5
|
+
<div class="brand-mark">N</div>
|
|
6
|
+
<h1>初始化 Agent Nexus</h1>
|
|
7
|
+
<p>创建仅用于后台管理的控制台密码。客户端 API 密钥将在登录后单独管理。</p>
|
|
8
|
+
<label>控制台密码<input name="password" type="password" minlength="12" autocomplete="new-password" required></label>
|
|
9
|
+
<label>确认密码<input name="confirmPassword" type="password" minlength="12" autocomplete="new-password" required></label>
|
|
10
|
+
<button class="button primary" type="submit">完成初始化</button>
|
|
11
|
+
<p class="form-error" data-form-error></p>
|
|
12
|
+
</form>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div id="login-screen" class="auth-screen hidden">
|
|
16
|
+
<form id="login-form" class="auth-card">
|
|
17
|
+
<div class="brand-mark">N</div>
|
|
18
|
+
<h1>Agent Nexus</h1>
|
|
19
|
+
<p>登录后管理智能体、工作区和客户端 API 密钥。</p>
|
|
20
|
+
<label>控制台密码<input name="password" type="password" autocomplete="current-password" required autofocus></label>
|
|
21
|
+
<button class="button primary" type="submit">登录</button>
|
|
22
|
+
<p class="form-error" data-form-error></p>
|
|
23
|
+
</form>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div id="app" class="app-shell hidden">
|
|
27
|
+
<aside class="sidebar">
|
|
28
|
+
<div class="brand"><span class="brand-mark small">N</span><span>Agent Nexus</span></div>
|
|
29
|
+
<nav aria-label="主导航">
|
|
30
|
+
<button class="nav-item active" data-page="overview">${icons.overview}<span>总览</span></button>
|
|
31
|
+
<button class="nav-item" data-page="runs">${icons.runs}<span>运行记录</span></button>
|
|
32
|
+
<button class="nav-item" data-page="agents">${icons.agents}<span>智能体</span></button>
|
|
33
|
+
<button class="nav-item" data-page="workspaces">${icons.workspaces}<span>工作区</span></button>
|
|
34
|
+
<button class="nav-item" data-page="keys">${icons.keys}<span>API 密钥</span></button>
|
|
35
|
+
<button class="nav-item" data-page="settings">${icons.settings}<span>运行设置</span></button>
|
|
36
|
+
</nav>
|
|
37
|
+
<div class="admin-menu-wrap">
|
|
38
|
+
<div id="admin-popover" class="admin-popover hidden">
|
|
39
|
+
<label>界面主题
|
|
40
|
+
<select id="theme-select">
|
|
41
|
+
<option value="system">跟随系统</option>
|
|
42
|
+
<option value="light">浅色</option>
|
|
43
|
+
<option value="dark">深色</option>
|
|
44
|
+
</select>
|
|
45
|
+
</label>
|
|
46
|
+
<button id="change-password" class="menu-button">修改密码</button>
|
|
47
|
+
<button id="logout" class="menu-button danger-text">退出登录</button>
|
|
48
|
+
</div>
|
|
49
|
+
<button id="admin-menu" class="admin-button" aria-expanded="false">${icons.settings}<span><strong>管理员</strong><small>控制台设置</small></span></button>
|
|
50
|
+
</div>
|
|
51
|
+
</aside>
|
|
52
|
+
<main class="main">
|
|
53
|
+
<header class="page-header">
|
|
54
|
+
<div><h1 id="page-title"></h1><p id="page-description"></p></div>
|
|
55
|
+
<div id="page-actions" class="page-actions"></div>
|
|
56
|
+
</header>
|
|
57
|
+
<section id="page-content" class="page-content" aria-live="polite"></section>
|
|
58
|
+
</main>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div id="drawer-backdrop" class="drawer-backdrop hidden"></div>
|
|
62
|
+
<aside id="drawer" class="drawer hidden" aria-modal="true" role="dialog">
|
|
63
|
+
<div class="drawer-header"><h2 id="drawer-title"></h2><button id="drawer-close" class="icon-button" aria-label="关闭">×</button></div>
|
|
64
|
+
<form id="drawer-form" class="drawer-body"></form>
|
|
65
|
+
</aside>
|
|
66
|
+
<div id="toast-region" class="toast-region" aria-live="assertive"></div>
|
|
68
67
|
`;
|