@agentunion/kite 1.3.1 → 1.4.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/CHANGELOG.md +287 -1
- package/cli.js +76 -0
- package/extensions/agents/assistant/entry.py +111 -1
- package/extensions/agents/assistant/server.py +263 -197
- package/extensions/channels/acp_channel/entry.py +111 -1
- package/extensions/channels/acp_channel/module.md +23 -22
- package/extensions/channels/acp_channel/server.py +263 -197
- package/extensions/event_hub_bench/entry.py +107 -1
- package/extensions/services/backup/entry.py +408 -72
- package/extensions/services/backup/module.md +24 -22
- package/extensions/services/model_service/entry.py +255 -71
- package/extensions/services/model_service/module.md +21 -22
- package/extensions/services/watchdog/entry.py +344 -90
- package/extensions/services/watchdog/monitor.py +237 -21
- package/extensions/services/web/WEBSOCKET_STATUS.md +143 -0
- package/extensions/services/web/config_example.py +35 -0
- package/extensions/services/web/config_loader.py +110 -0
- package/extensions/services/web/entry.py +114 -26
- package/extensions/services/web/module.md +35 -24
- package/extensions/services/web/pairing.py +250 -0
- package/extensions/services/web/pairing_codes.jsonl +16 -0
- package/extensions/services/web/relay.py +643 -0
- package/extensions/services/web/relay_config.json5 +67 -0
- package/extensions/services/web/routes/routes_management_ws.py +127 -0
- package/extensions/services/web/routes/routes_rpc.py +89 -0
- package/extensions/services/web/routes/routes_test.py +61 -0
- package/extensions/services/web/server.py +445 -99
- package/extensions/services/web/static/css/style.css +138 -2
- package/extensions/services/web/static/index.html +295 -2
- package/extensions/services/web/static/js/app.js +1579 -5
- package/extensions/services/web/static/js/kernel-client-example.js +161 -0
- package/extensions/services/web/static/js/kernel-client.js +383 -0
- package/extensions/services/web/static/js/registry-tests.js +558 -0
- package/extensions/services/web/static/js/token-manager.js +175 -0
- package/extensions/services/web/static/pairing.html +248 -0
- package/extensions/services/web/static/test_registry.html +262 -0
- package/extensions/services/web/web_config.json5 +29 -0
- package/kernel/entry.py +120 -32
- package/kernel/event_hub.py +159 -16
- package/kernel/module.md +36 -33
- package/kernel/registry_store.py +70 -20
- package/kernel/rpc_router.py +134 -57
- package/kernel/server.py +292 -15
- package/kite_cli/__init__.py +3 -0
- package/kite_cli/__main__.py +5 -0
- package/kite_cli/commands/__init__.py +1 -0
- package/kite_cli/commands/clean.py +101 -0
- package/kite_cli/commands/doctor.py +35 -0
- package/kite_cli/commands/history.py +111 -0
- package/kite_cli/commands/info.py +96 -0
- package/kite_cli/commands/install.py +313 -0
- package/kite_cli/commands/list.py +143 -0
- package/kite_cli/commands/log.py +81 -0
- package/kite_cli/commands/rollback.py +88 -0
- package/kite_cli/commands/search.py +73 -0
- package/kite_cli/commands/uninstall.py +85 -0
- package/kite_cli/commands/update.py +118 -0
- package/kite_cli/core/__init__.py +1 -0
- package/kite_cli/core/checker.py +142 -0
- package/kite_cli/core/dependency.py +229 -0
- package/kite_cli/core/downloader.py +209 -0
- package/kite_cli/core/install_info.py +40 -0
- package/kite_cli/core/tool_installer.py +397 -0
- package/kite_cli/core/validator.py +78 -0
- package/kite_cli/main.py +289 -0
- package/kite_cli/utils/__init__.py +1 -0
- package/kite_cli/utils/i18n.py +252 -0
- package/kite_cli/utils/interactive.py +63 -0
- package/kite_cli/utils/operation_log.py +77 -0
- package/kite_cli/utils/paths.py +34 -0
- package/kite_cli/utils/version.py +308 -0
- package/launcher/count_lines.py +34 -0
- package/launcher/entry.py +905 -166
- package/launcher/logging_setup.py +104 -0
- package/launcher/module.md +37 -37
- package/launcher/process_manager.py +12 -1
- package/package.json +2 -1
- package/scripts/plan_manager.py +315 -0
|
@@ -163,6 +163,56 @@ html, body {
|
|
|
163
163
|
}
|
|
164
164
|
.stat-label { font-size: 13px; color: var(--gray-500); }
|
|
165
165
|
|
|
166
|
+
/* Stats Grid */
|
|
167
|
+
.stats-grid {
|
|
168
|
+
display: grid;
|
|
169
|
+
grid-template-columns: repeat(8, 1fr);
|
|
170
|
+
gap: 10px;
|
|
171
|
+
}
|
|
172
|
+
.stat-item {
|
|
173
|
+
text-align: center;
|
|
174
|
+
padding: 8px 6px;
|
|
175
|
+
border-radius: 6px;
|
|
176
|
+
background: var(--gray-50);
|
|
177
|
+
transition: background 0.2s;
|
|
178
|
+
cursor: pointer;
|
|
179
|
+
position: relative;
|
|
180
|
+
}
|
|
181
|
+
.stat-item:hover {
|
|
182
|
+
background: var(--gray-100);
|
|
183
|
+
}
|
|
184
|
+
.stat-item .stat-value {
|
|
185
|
+
font-size: 18px;
|
|
186
|
+
margin-bottom: 2px;
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
}
|
|
189
|
+
.stat-item .stat-label {
|
|
190
|
+
font-size: 10px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Stat Tooltip */
|
|
194
|
+
.stat-tooltip {
|
|
195
|
+
position: fixed;
|
|
196
|
+
display: none;
|
|
197
|
+
background: #2d2d2d;
|
|
198
|
+
color: #e0e0e0;
|
|
199
|
+
padding: 12px;
|
|
200
|
+
border-radius: 6px;
|
|
201
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
|
|
202
|
+
font-size: 12px;
|
|
203
|
+
font-family: monospace;
|
|
204
|
+
max-width: 400px;
|
|
205
|
+
max-height: 300px;
|
|
206
|
+
overflow-y: auto;
|
|
207
|
+
z-index: 10000;
|
|
208
|
+
pointer-events: none;
|
|
209
|
+
white-space: pre-wrap;
|
|
210
|
+
line-height: 1.5;
|
|
211
|
+
}
|
|
212
|
+
.stat-tooltip.show {
|
|
213
|
+
display: block;
|
|
214
|
+
}
|
|
215
|
+
|
|
166
216
|
/* ===== PANELS ===== */
|
|
167
217
|
.panel {
|
|
168
218
|
background: var(--white); border-radius: var(--radius);
|
|
@@ -210,14 +260,18 @@ html, body {
|
|
|
210
260
|
font-size: 13px; font-weight: 500; cursor: pointer;
|
|
211
261
|
transition: all .15s; gap: 6px; white-space: nowrap;
|
|
212
262
|
}
|
|
213
|
-
.btn:disabled {
|
|
263
|
+
.btn:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; opacity: 1; }
|
|
214
264
|
.btn-primary { background: var(--primary); color: var(--white); }
|
|
215
265
|
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
|
|
216
266
|
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
|
|
217
267
|
.btn-secondary:hover:not(:disabled) { background: var(--gray-200); }
|
|
218
268
|
.btn-danger { background: var(--error); color: var(--white); }
|
|
219
269
|
.btn-danger:hover:not(:disabled) { background: #dc2626; }
|
|
220
|
-
.btn-
|
|
270
|
+
.btn-success { background: var(--success); color: var(--white); }
|
|
271
|
+
.btn-success:hover:not(:disabled) { background: #16a34a; }
|
|
272
|
+
.btn-warning { background: #f59e0b; color: var(--white); }
|
|
273
|
+
.btn-warning:hover:not(:disabled) { background: #d97706; }
|
|
274
|
+
.btn-sm { padding: 4px 14px; font-size: 12px; min-width: 52px; }
|
|
221
275
|
.btn-lg { padding: 10px 24px; font-size: 15px; }
|
|
222
276
|
|
|
223
277
|
/* ===== FORMS ===== */
|
|
@@ -1062,3 +1116,85 @@ html, body {
|
|
|
1062
1116
|
.toggle-switch-label input:checked + .toggle-switch::after {
|
|
1063
1117
|
transform: translateX(16px);
|
|
1064
1118
|
}
|
|
1119
|
+
|
|
1120
|
+
/* ===== MODULES PAGE ===== */
|
|
1121
|
+
.module-row {
|
|
1122
|
+
cursor: pointer;
|
|
1123
|
+
}
|
|
1124
|
+
.module-row:hover {
|
|
1125
|
+
background: var(--gray-50);
|
|
1126
|
+
}
|
|
1127
|
+
.module-state-select {
|
|
1128
|
+
padding: 4px 8px; border: 1px solid var(--gray-300); border-radius: 5px;
|
|
1129
|
+
font-size: 12px; background: var(--white); color: var(--gray-800);
|
|
1130
|
+
cursor: pointer;
|
|
1131
|
+
}
|
|
1132
|
+
.module-state-select:focus {
|
|
1133
|
+
outline: none; border-color: var(--primary);
|
|
1134
|
+
box-shadow: 0 0 0 2px rgba(59,130,246,.15);
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/* Module type badges */
|
|
1138
|
+
.module-type-badge {
|
|
1139
|
+
display: inline-block; padding: 2px 8px; border-radius: 10px;
|
|
1140
|
+
font-size: 11px; font-weight: 600; text-transform: lowercase;
|
|
1141
|
+
background: var(--gray-100); color: var(--gray-500);
|
|
1142
|
+
}
|
|
1143
|
+
.module-type-badge.type-infrastructure { background: #f3e8ff; color: #7c3aed; }
|
|
1144
|
+
.module-type-badge.type-service { background: var(--primary-light); color: var(--primary); }
|
|
1145
|
+
.module-type-badge.type-channel { background: var(--success-light); color: var(--success); }
|
|
1146
|
+
.module-type-badge.type-agent { background: #fff7ed; color: #ea580c; }
|
|
1147
|
+
.module-type-badge.type-tool { background: var(--gray-100); color: var(--gray-500); }
|
|
1148
|
+
|
|
1149
|
+
/* Module state dots */
|
|
1150
|
+
.module-state-dot {
|
|
1151
|
+
display: inline-block; width: 10px; height: 10px; border-radius: 50%;
|
|
1152
|
+
flex-shrink: 0; background: var(--gray-300);
|
|
1153
|
+
}
|
|
1154
|
+
.module-state-dot.enabled { background: var(--success); }
|
|
1155
|
+
.module-state-dot.manual { background: var(--warning); }
|
|
1156
|
+
.module-state-dot.disabled { background: var(--gray-300); }
|
|
1157
|
+
|
|
1158
|
+
/* Config tree */
|
|
1159
|
+
.config-tree-group {
|
|
1160
|
+
margin-bottom: 4px;
|
|
1161
|
+
}
|
|
1162
|
+
.config-tree-key {
|
|
1163
|
+
font-size: 13px; font-weight: 600; color: var(--gray-700);
|
|
1164
|
+
padding: 6px 8px; cursor: pointer; border-radius: 4px;
|
|
1165
|
+
user-select: none; display: flex; align-items: center; gap: 4px;
|
|
1166
|
+
}
|
|
1167
|
+
.config-tree-key::before {
|
|
1168
|
+
content: '\25BE'; font-size: 10px; color: var(--gray-400);
|
|
1169
|
+
display: inline-block; transition: transform .15s;
|
|
1170
|
+
}
|
|
1171
|
+
.config-tree-group.collapsed .config-tree-key::before {
|
|
1172
|
+
transform: rotate(-90deg);
|
|
1173
|
+
}
|
|
1174
|
+
.config-tree-key:hover { background: var(--gray-50); }
|
|
1175
|
+
.config-tree-nested {
|
|
1176
|
+
margin-left: 12px; padding-left: 12px;
|
|
1177
|
+
border-left: 2px solid var(--gray-200);
|
|
1178
|
+
}
|
|
1179
|
+
.config-tree-group.collapsed .config-tree-nested { display: none; }
|
|
1180
|
+
.config-tree-leaf {
|
|
1181
|
+
display: flex; align-items: center; gap: 10px;
|
|
1182
|
+
padding: 4px 8px; margin-bottom: 2px;
|
|
1183
|
+
}
|
|
1184
|
+
.config-tree-label {
|
|
1185
|
+
font-size: 13px; color: var(--gray-600); min-width: 140px;
|
|
1186
|
+
font-weight: 500; flex-shrink: 0;
|
|
1187
|
+
}
|
|
1188
|
+
.config-tree-input {
|
|
1189
|
+
flex: 1; padding: 5px 10px; border: 1px solid var(--gray-300);
|
|
1190
|
+
border-radius: 6px; font-size: 13px; color: var(--gray-800);
|
|
1191
|
+
background: var(--white); transition: border-color .15s;
|
|
1192
|
+
min-width: 0;
|
|
1193
|
+
}
|
|
1194
|
+
.config-tree-input:focus {
|
|
1195
|
+
outline: none; border-color: var(--primary);
|
|
1196
|
+
box-shadow: 0 0 0 3px rgba(59,130,246,.15);
|
|
1197
|
+
}
|
|
1198
|
+
.config-tree-checkbox {
|
|
1199
|
+
width: 16px; height: 16px; cursor: pointer;
|
|
1200
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>AI Phone Agent</title>
|
|
7
|
-
<link rel="stylesheet" href="css/style.css?v=
|
|
7
|
+
<link rel="stylesheet" href="css/style.css?v=41">
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
<h1 class="header-title">AI Phone Agent</h1>
|
|
16
16
|
</div>
|
|
17
17
|
<div class="header-right">
|
|
18
|
+
<span id="ws-indicator" style="font-size:13px;color:var(--gray-400);margin-right:16px;" title="Kite 连接状态">○ 未连线</span>
|
|
18
19
|
<span id="header-bt-status" class="bt-indicator" title="Bluetooth Status">
|
|
19
20
|
<span class="bt-icon">BT</span>
|
|
20
21
|
<span class="bt-label">未连接</span>
|
|
@@ -52,6 +53,10 @@
|
|
|
52
53
|
<span class="nav-label">蓝牙</span>
|
|
53
54
|
<span class="nav-sublabel">Bluetooth</span>
|
|
54
55
|
</li>
|
|
56
|
+
<li class="nav-item" data-page="modules">
|
|
57
|
+
<span class="nav-label">模块</span>
|
|
58
|
+
<span class="nav-sublabel">Modules</span>
|
|
59
|
+
</li>
|
|
55
60
|
<li class="nav-item" data-page="voicechat">
|
|
56
61
|
<span class="nav-label">语音测试</span>
|
|
57
62
|
<span class="nav-sublabel">Voice Chat</span>
|
|
@@ -960,6 +965,261 @@
|
|
|
960
965
|
</div>
|
|
961
966
|
</section>
|
|
962
967
|
|
|
968
|
+
<!-- ==================== Voice Chat ==================== -->
|
|
969
|
+
|
|
970
|
+
<!-- ==================== Modules ==================== -->
|
|
971
|
+
<section id="page-modules" class="page">
|
|
972
|
+
<div id="modules-list-header" style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;">
|
|
973
|
+
<div style="display:flex;align-items:center;gap:12px;">
|
|
974
|
+
<h2 class="page-title" style="margin-bottom:0;">模块管理</h2>
|
|
975
|
+
<span id="module-save-status" class="config-save-status"></span>
|
|
976
|
+
</div>
|
|
977
|
+
<div style="display:flex;align-items:center;gap:16px;">
|
|
978
|
+
<button class="btn btn-sm btn-secondary" id="btn-toggle-console">
|
|
979
|
+
<span id="console-toggle-text">展开控制台</span>
|
|
980
|
+
</button>
|
|
981
|
+
<button class="btn btn-warning" id="btn-restart-kite" style="display:flex;align-items:center;gap:6px;">
|
|
982
|
+
<span>重启 Kite</span>
|
|
983
|
+
</button>
|
|
984
|
+
</div>
|
|
985
|
+
</div>
|
|
986
|
+
|
|
987
|
+
<!-- Real-time Console (collapsible) -->
|
|
988
|
+
<div id="realtime-console" class="panel" style="display:none;margin-bottom:20px;">
|
|
989
|
+
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;">
|
|
990
|
+
<h3 style="margin:0;font-size:14px;font-weight:600;">实时事件日志</h3>
|
|
991
|
+
<button class="btn btn-sm btn-secondary" id="btn-clear-console">清空</button>
|
|
992
|
+
</div>
|
|
993
|
+
<div id="console-output" style="background:#1e1e1e;color:#d4d4d4;padding:12px;border-radius:4px;font-family:monospace;font-size:12px;max-height:300px;overflow-y:auto;white-space:pre-wrap;line-height:1.4;"></div>
|
|
994
|
+
</div>
|
|
995
|
+
|
|
996
|
+
<!-- Statistics Panel -->
|
|
997
|
+
<div class="panel" style="margin-bottom:20px;" id="statistics-panel">
|
|
998
|
+
<div class="stats-grid">
|
|
999
|
+
<div class="stat-item" data-stat-type="uptime">
|
|
1000
|
+
<div class="stat-label">运行时长</div>
|
|
1001
|
+
<div class="stat-value" id="stat-uptime">--</div>
|
|
1002
|
+
</div>
|
|
1003
|
+
<div class="stat-item" data-stat-type="modules">
|
|
1004
|
+
<div class="stat-label">模块数量</div>
|
|
1005
|
+
<div class="stat-value" id="stat-modules">--</div>
|
|
1006
|
+
</div>
|
|
1007
|
+
<div class="stat-item" data-stat-type="registry">
|
|
1008
|
+
<div class="stat-label">注册记录</div>
|
|
1009
|
+
<div class="stat-value" id="stat-registry">--</div>
|
|
1010
|
+
</div>
|
|
1011
|
+
<div class="stat-item" data-stat-type="rpc">
|
|
1012
|
+
<div class="stat-label">RPC 方法</div>
|
|
1013
|
+
<div class="stat-value" id="stat-rpc">--</div>
|
|
1014
|
+
</div>
|
|
1015
|
+
<div class="stat-item" data-stat-type="hooks">
|
|
1016
|
+
<div class="stat-label">Hook 数量</div>
|
|
1017
|
+
<div class="stat-value" id="stat-hooks">--</div>
|
|
1018
|
+
</div>
|
|
1019
|
+
<div class="stat-item" data-stat-type="api">
|
|
1020
|
+
<div class="stat-label">API 端点</div>
|
|
1021
|
+
<div class="stat-value" id="stat-api">--</div>
|
|
1022
|
+
</div>
|
|
1023
|
+
<div class="stat-item" data-stat-type="events">
|
|
1024
|
+
<div class="stat-label">事件处理</div>
|
|
1025
|
+
<div class="stat-value" id="stat-events">--</div>
|
|
1026
|
+
</div>
|
|
1027
|
+
<div class="stat-item" data-stat-type="rpc-calls">
|
|
1028
|
+
<div class="stat-label">RPC 调用</div>
|
|
1029
|
+
<div class="stat-value" id="stat-rpc-calls">--</div>
|
|
1030
|
+
</div>
|
|
1031
|
+
</div>
|
|
1032
|
+
</div>
|
|
1033
|
+
|
|
1034
|
+
<!-- Tooltip for statistics -->
|
|
1035
|
+
<div id="stat-tooltip" class="stat-tooltip"></div>
|
|
1036
|
+
|
|
1037
|
+
<!-- Module List Table -->
|
|
1038
|
+
<div class="panel">
|
|
1039
|
+
<div class="table-wrapper">
|
|
1040
|
+
<table class="data-table" id="modules-table">
|
|
1041
|
+
<thead>
|
|
1042
|
+
<tr>
|
|
1043
|
+
<th style="width:40px;"></th>
|
|
1044
|
+
<th>模块名称</th>
|
|
1045
|
+
<th>显示名称</th>
|
|
1046
|
+
<th>类型</th>
|
|
1047
|
+
<th>版本</th>
|
|
1048
|
+
<th>端口</th>
|
|
1049
|
+
<th>运行状态</th>
|
|
1050
|
+
<th>默认状态</th>
|
|
1051
|
+
<th style="width:180px;">操作</th>
|
|
1052
|
+
</tr>
|
|
1053
|
+
</thead>
|
|
1054
|
+
<tbody id="modules-tbody">
|
|
1055
|
+
<tr><td colspan="9" class="text-muted" style="text-align:center;padding:40px;">加载中...</td></tr>
|
|
1056
|
+
</tbody>
|
|
1057
|
+
</table>
|
|
1058
|
+
</div>
|
|
1059
|
+
</div>
|
|
1060
|
+
|
|
1061
|
+
<!-- Token Management Section -->
|
|
1062
|
+
<div id="token-management-section">
|
|
1063
|
+
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;margin-top:40px;">
|
|
1064
|
+
<div style="display:flex;align-items:center;gap:12px;">
|
|
1065
|
+
<h2 class="page-title" style="margin-bottom:0;">Token 管理</h2>
|
|
1066
|
+
</div>
|
|
1067
|
+
<div style="display:flex;align-items:center;gap:16px;">
|
|
1068
|
+
<button class="btn btn-sm btn-secondary" onclick="refreshTokens()">刷新</button>
|
|
1069
|
+
</div>
|
|
1070
|
+
</div>
|
|
1071
|
+
|
|
1072
|
+
<div class="panel">
|
|
1073
|
+
<div class="table-wrapper">
|
|
1074
|
+
<table class="data-table" id="tokens-table">
|
|
1075
|
+
<thead>
|
|
1076
|
+
<tr>
|
|
1077
|
+
<th style="width:200px;">Token</th>
|
|
1078
|
+
<th>角色</th>
|
|
1079
|
+
<th>创建时间</th>
|
|
1080
|
+
<th>过期时间</th>
|
|
1081
|
+
<th>状态</th>
|
|
1082
|
+
<th style="width:100px;">操作</th>
|
|
1083
|
+
</tr>
|
|
1084
|
+
</thead>
|
|
1085
|
+
<tbody id="tokens-tbody">
|
|
1086
|
+
<tr><td colspan="6" class="text-muted" style="text-align:center;padding:40px;">加载中...</td></tr>
|
|
1087
|
+
</tbody>
|
|
1088
|
+
</table>
|
|
1089
|
+
</div>
|
|
1090
|
+
</div>
|
|
1091
|
+
</div>
|
|
1092
|
+
|
|
1093
|
+
<!-- Registry Test Section -->
|
|
1094
|
+
<div id="registry-test-section" style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;margin-top:40px;">
|
|
1095
|
+
<div style="display:flex;align-items:center;gap:12px;">
|
|
1096
|
+
<h2 class="page-title" style="margin-bottom:0;">注册中心测试</h2>
|
|
1097
|
+
</div>
|
|
1098
|
+
<div style="display:flex;align-items:center;gap:16px;">
|
|
1099
|
+
<button class="btn btn-sm btn-primary" id="btn-test-registry">运行测试</button>
|
|
1100
|
+
<button class="btn btn-sm btn-secondary" id="btn-clear-test-output">清空输出</button>
|
|
1101
|
+
</div>
|
|
1102
|
+
</div>
|
|
1103
|
+
|
|
1104
|
+
<div class="panel" id="registry-test-output">
|
|
1105
|
+
<div id="test-output" style="background:#1e1e1e;color:#d4d4d4;padding:15px;border-radius:4px;font-family:monospace;font-size:13px;max-height:400px;overflow-y:auto;white-space:pre-wrap;"></div>
|
|
1106
|
+
</div>
|
|
1107
|
+
|
|
1108
|
+
<!-- Module Detail Panel (hidden by default) -->
|
|
1109
|
+
<div id="module-detail" class="hidden">
|
|
1110
|
+
<!-- 第一排:模块名和返回按钮 -->
|
|
1111
|
+
<div style="display:flex;align-items:center;gap:12px;margin-bottom:20px;">
|
|
1112
|
+
<h3 id="module-detail-name" style="font-size:18px;font-weight:600;color:var(--gray-900);margin:0;"></h3>
|
|
1113
|
+
<button class="btn btn-primary btn-sm" id="btn-module-back">返回</button>
|
|
1114
|
+
</div>
|
|
1115
|
+
|
|
1116
|
+
<!-- 第二排:类型状态和操作按钮 -->
|
|
1117
|
+
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;">
|
|
1118
|
+
<div style="display:flex;align-items:center;gap:12px;">
|
|
1119
|
+
<span id="module-detail-type-badge" class="module-type-badge"></span>
|
|
1120
|
+
<span id="module-detail-run-status" style="font-size:13px;"></span>
|
|
1121
|
+
</div>
|
|
1122
|
+
<div style="display:flex;align-items:center;gap:8px;">
|
|
1123
|
+
<button class="btn btn-sm btn-secondary" id="btn-reset-defaults" onclick="resetModuleDefaults()">恢复默认值</button>
|
|
1124
|
+
<button class="btn btn-sm btn-success" id="btn-detail-start" onclick="startModuleFromDetail()">启动</button>
|
|
1125
|
+
<button class="btn btn-sm btn-danger" id="btn-detail-stop" onclick="stopModuleFromDetail()">停止</button>
|
|
1126
|
+
</div>
|
|
1127
|
+
</div>
|
|
1128
|
+
|
|
1129
|
+
<!-- 【区块1:模块标识】 -->
|
|
1130
|
+
<div class="form-section">
|
|
1131
|
+
<h4 class="form-title">模块标识</h4>
|
|
1132
|
+
|
|
1133
|
+
<!-- 模块路径 -->
|
|
1134
|
+
<div class="form-row">
|
|
1135
|
+
<div class="form-group" style="grid-column: 1 / -1;">
|
|
1136
|
+
<label>模块路径 <span style="font-size:11px;color:var(--gray-400);">(source_path)</span></label>
|
|
1137
|
+
<input type="text" id="mod-source-path" disabled style="background:var(--gray-100);cursor:not-allowed;font-size:12px;font-family:monospace;">
|
|
1138
|
+
</div>
|
|
1139
|
+
</div>
|
|
1140
|
+
|
|
1141
|
+
<div class="form-row">
|
|
1142
|
+
<div class="form-group">
|
|
1143
|
+
<label>模块名 <span style="font-size:11px;color:var(--gray-400);">(name)</span></label>
|
|
1144
|
+
<input type="text" id="mod-meta-name" disabled style="background:var(--gray-100);cursor:not-allowed;">
|
|
1145
|
+
</div>
|
|
1146
|
+
<div class="form-group">
|
|
1147
|
+
<label>模块类型 <span style="font-size:11px;color:var(--gray-400);">(type)</span></label>
|
|
1148
|
+
<input type="text" id="mod-meta-type" disabled style="background:var(--gray-100);cursor:not-allowed;">
|
|
1149
|
+
</div>
|
|
1150
|
+
</div>
|
|
1151
|
+
<div class="form-row">
|
|
1152
|
+
<div class="form-group">
|
|
1153
|
+
<label>运行时 <span style="font-size:11px;color:var(--gray-400);">(runtime)</span></label>
|
|
1154
|
+
<input type="text" id="mod-meta-runtime" disabled style="background:var(--gray-100);cursor:not-allowed;">
|
|
1155
|
+
</div>
|
|
1156
|
+
<div class="form-group">
|
|
1157
|
+
<label>入口文件 <span style="font-size:11px;color:var(--gray-400);">(entry)</span></label>
|
|
1158
|
+
<input type="text" id="mod-meta-entry" disabled style="background:var(--gray-100);cursor:not-allowed;">
|
|
1159
|
+
</div>
|
|
1160
|
+
</div>
|
|
1161
|
+
<div class="form-row">
|
|
1162
|
+
<div class="form-group">
|
|
1163
|
+
<label>版本 <span style="font-size:11px;color:var(--gray-400);">(version)</span></label>
|
|
1164
|
+
<input type="text" id="mod-meta-version" disabled style="background:var(--gray-100);cursor:not-allowed;">
|
|
1165
|
+
</div>
|
|
1166
|
+
<div class="form-group">
|
|
1167
|
+
<label>显示名称 <span style="font-size:11px;color:var(--gray-400);">(display_name)</span></label>
|
|
1168
|
+
<input type="text" id="mod-meta-display-name" data-field="display_name">
|
|
1169
|
+
</div>
|
|
1170
|
+
</div>
|
|
1171
|
+
</div>
|
|
1172
|
+
|
|
1173
|
+
<!-- 【区块2:启动配置】 -->
|
|
1174
|
+
<div class="form-section">
|
|
1175
|
+
<h4 class="form-title">启动配置</h4>
|
|
1176
|
+
|
|
1177
|
+
<div class="form-row">
|
|
1178
|
+
<div class="form-group">
|
|
1179
|
+
<label>默认状态 <span style="font-size:11px;color:var(--gray-400);">(state - 需重启生效)</span></label>
|
|
1180
|
+
<select id="mod-meta-state" data-field="state">
|
|
1181
|
+
<option value="enabled">enabled - 自动启动</option>
|
|
1182
|
+
<option value="manual">manual - 手动启动</option>
|
|
1183
|
+
<option value="disabled">disabled - 禁用</option>
|
|
1184
|
+
</select>
|
|
1185
|
+
</div>
|
|
1186
|
+
<div class="form-group">
|
|
1187
|
+
<label>监控 <span style="font-size:11px;color:var(--gray-400);">(monitor - Watchdog是否监控此模块)</span></label>
|
|
1188
|
+
<select id="mod-meta-monitor" data-field="monitor">
|
|
1189
|
+
<option value="true">启用监控 (默认)</option>
|
|
1190
|
+
<option value="false">禁用监控</option>
|
|
1191
|
+
</select>
|
|
1192
|
+
</div>
|
|
1193
|
+
</div>
|
|
1194
|
+
</div>
|
|
1195
|
+
|
|
1196
|
+
<!-- 【区块3:网络配置】 -->
|
|
1197
|
+
<div class="form-section">
|
|
1198
|
+
<h4 class="form-title">网络配置</h4>
|
|
1199
|
+
|
|
1200
|
+
<div class="form-row">
|
|
1201
|
+
<div class="form-group">
|
|
1202
|
+
<label>首选端口 <span style="font-size:11px;color:var(--gray-400);">(preferred_port)</span></label>
|
|
1203
|
+
<input type="number" id="mod-meta-port" data-field="preferred_port" placeholder="(无)">
|
|
1204
|
+
</div>
|
|
1205
|
+
<div class="form-group">
|
|
1206
|
+
<label>监听地址 <span style="font-size:11px;color:var(--gray-400);">(advertise_ip)</span></label>
|
|
1207
|
+
<select id="mod-meta-ip" data-field="advertise_ip">
|
|
1208
|
+
<option value="127.0.0.1">127.0.0.1 - 仅本地</option>
|
|
1209
|
+
<option value="0.0.0.0">0.0.0.0 - 允许远程</option>
|
|
1210
|
+
</select>
|
|
1211
|
+
</div>
|
|
1212
|
+
</div>
|
|
1213
|
+
</div>
|
|
1214
|
+
|
|
1215
|
+
<!-- 【区块5:模块配置文件】 -->
|
|
1216
|
+
<div class="form-section hidden" id="module-config-section">
|
|
1217
|
+
<h4 class="form-title">模块配置文件 (config.yaml)</h4>
|
|
1218
|
+
<div id="module-config-tree"></div>
|
|
1219
|
+
</div>
|
|
1220
|
+
</div>
|
|
1221
|
+
</section>
|
|
1222
|
+
|
|
963
1223
|
<!-- ==================== Voice Chat ==================== -->
|
|
964
1224
|
<section id="page-voicechat" class="page">
|
|
965
1225
|
<div class="vc-layout">
|
|
@@ -1266,6 +1526,35 @@
|
|
|
1266
1526
|
</div>
|
|
1267
1527
|
</div>
|
|
1268
1528
|
|
|
1529
|
+
<!-- ===== Reset Module Defaults Dialog ===== -->
|
|
1530
|
+
<div id="reset-defaults-modal" class="modal-overlay hidden">
|
|
1531
|
+
<div class="modal" style="max-width:600px;">
|
|
1532
|
+
<div class="modal-header">
|
|
1533
|
+
<h3 class="modal-title">恢复默认值</h3>
|
|
1534
|
+
<button class="modal-close" id="reset-defaults-close">×</button>
|
|
1535
|
+
</div>
|
|
1536
|
+
<div class="modal-body">
|
|
1537
|
+
<p style="margin-bottom:16px;color:var(--gray-600);">以下配置将被恢复为默认值:</p>
|
|
1538
|
+
<table style="width:100%;border-collapse:collapse;">
|
|
1539
|
+
<thead>
|
|
1540
|
+
<tr style="background:var(--gray-100);border-bottom:1px solid var(--gray-300);">
|
|
1541
|
+
<th style="padding:8px;text-align:left;font-weight:600;">字段</th>
|
|
1542
|
+
<th style="padding:8px;text-align:left;font-weight:600;">当前值</th>
|
|
1543
|
+
<th style="padding:8px;text-align:left;font-weight:600;">默认值</th>
|
|
1544
|
+
</tr>
|
|
1545
|
+
</thead>
|
|
1546
|
+
<tbody id="reset-defaults-comparison">
|
|
1547
|
+
<!-- Dynamic content -->
|
|
1548
|
+
</tbody>
|
|
1549
|
+
</table>
|
|
1550
|
+
</div>
|
|
1551
|
+
<div class="modal-footer">
|
|
1552
|
+
<button class="btn btn-secondary" id="reset-defaults-cancel">取消</button>
|
|
1553
|
+
<button class="btn btn-primary" id="reset-defaults-confirm">确认恢复</button>
|
|
1554
|
+
</div>
|
|
1555
|
+
</div>
|
|
1556
|
+
</div>
|
|
1557
|
+
|
|
1269
1558
|
<!-- ===== TTS Test Dialog ===== -->
|
|
1270
1559
|
<div id="tts-test-overlay" class="asr-test-overlay hidden">
|
|
1271
1560
|
<div class="asr-test-dialog" style="width:560px">
|
|
@@ -1440,6 +1729,10 @@
|
|
|
1440
1729
|
<!-- ===== Toast / Notification Area ===== -->
|
|
1441
1730
|
<div id="toast-container"></div>
|
|
1442
1731
|
|
|
1443
|
-
<script src="js/
|
|
1732
|
+
<script src="js/kernel-client.js"></script>
|
|
1733
|
+
<script src="js/kernel-client-example.js"></script>
|
|
1734
|
+
<script src="js/registry-tests.js"></script>
|
|
1735
|
+
<script src="js/token-manager.js"></script>
|
|
1736
|
+
<script src="js/app.js?v=65"></script>
|
|
1444
1737
|
</body>
|
|
1445
1738
|
</html>
|