@agentunion/kite 1.3.2 → 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 +200 -0
- package/cli.js +76 -0
- package/extensions/agents/assistant/entry.py +111 -1
- package/extensions/agents/assistant/server.py +263 -215
- 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 -215
- package/extensions/event_hub_bench/entry.py +107 -1
- package/extensions/services/backup/entry.py +299 -21
- package/extensions/services/backup/module.md +24 -22
- package/extensions/services/model_service/entry.py +145 -19
- package/extensions/services/model_service/module.md +21 -22
- package/extensions/services/watchdog/entry.py +188 -25
- package/extensions/services/watchdog/monitor.py +144 -34
- 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/routes/schemas.py +0 -22
- package/extensions/services/web/server.py +421 -98
- package/extensions/services/web/static/css/style.css +67 -28
- package/extensions/services/web/static/index.html +234 -44
- package/extensions/services/web/static/js/app.js +1335 -48
- 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 +141 -16
- package/kernel/module.md +36 -33
- package/kernel/registry_store.py +48 -15
- package/kernel/rpc_router.py +120 -53
- package/kernel/server.py +219 -12
- 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/entry.py +819 -158
- package/launcher/logging_setup.py +104 -0
- package/launcher/module.md +37 -37
- package/package.json +2 -1
- package/scripts/plan_manager.py +315 -0
- package/extensions/services/web/routes/routes_modules.py +0 -249
|
@@ -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 ===== */
|
|
@@ -1064,35 +1118,20 @@ html, body {
|
|
|
1064
1118
|
}
|
|
1065
1119
|
|
|
1066
1120
|
/* ===== MODULES PAGE ===== */
|
|
1067
|
-
.
|
|
1068
|
-
|
|
1069
|
-
gap: 16px;
|
|
1070
|
-
}
|
|
1071
|
-
.module-card {
|
|
1072
|
-
background: var(--white); border-radius: var(--radius);
|
|
1073
|
-
box-shadow: var(--shadow); padding: 16px; cursor: pointer;
|
|
1074
|
-
border: 2px solid transparent; transition: all .15s;
|
|
1075
|
-
}
|
|
1076
|
-
.module-card:hover {
|
|
1077
|
-
border-color: var(--primary); box-shadow: var(--shadow-md);
|
|
1078
|
-
}
|
|
1079
|
-
.module-card-header {
|
|
1080
|
-
display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
|
|
1081
|
-
}
|
|
1082
|
-
.module-card-name {
|
|
1083
|
-
font-size: 16px; font-weight: 600; color: var(--gray-900);
|
|
1084
|
-
margin-bottom: 2px;
|
|
1121
|
+
.module-row {
|
|
1122
|
+
cursor: pointer;
|
|
1085
1123
|
}
|
|
1086
|
-
.module-
|
|
1087
|
-
|
|
1088
|
-
min-height: 16px;
|
|
1124
|
+
.module-row:hover {
|
|
1125
|
+
background: var(--gray-50);
|
|
1089
1126
|
}
|
|
1090
|
-
.module-
|
|
1091
|
-
|
|
1092
|
-
|
|
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;
|
|
1093
1131
|
}
|
|
1094
|
-
.module-
|
|
1095
|
-
|
|
1132
|
+
.module-state-select:focus {
|
|
1133
|
+
outline: none; border-color: var(--primary);
|
|
1134
|
+
box-shadow: 0 0 0 2px rgba(59,130,246,.15);
|
|
1096
1135
|
}
|
|
1097
1136
|
|
|
1098
1137
|
/* Module type badges */
|
|
@@ -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>
|
|
@@ -968,96 +969,252 @@
|
|
|
968
969
|
|
|
969
970
|
<!-- ==================== Modules ==================== -->
|
|
970
971
|
<section id="page-modules" class="page">
|
|
971
|
-
<div style="display:flex;align-items:center;
|
|
972
|
-
<
|
|
973
|
-
|
|
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>
|
|
974
1102
|
</div>
|
|
975
1103
|
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
<p class="text-muted" style="padding:40px;text-align:center;">加载中...</p>
|
|
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>
|
|
979
1106
|
</div>
|
|
980
1107
|
|
|
981
1108
|
<!-- Module Detail Panel (hidden by default) -->
|
|
982
1109
|
<div id="module-detail" class="hidden">
|
|
983
|
-
|
|
984
|
-
|
|
1110
|
+
<!-- 第一排:模块名和返回按钮 -->
|
|
1111
|
+
<div style="display:flex;align-items:center;gap:12px;margin-bottom:20px;">
|
|
985
1112
|
<h3 id="module-detail-name" style="font-size:18px;font-weight:600;color:var(--gray-900);margin:0;"></h3>
|
|
986
|
-
<
|
|
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>
|
|
987
1127
|
</div>
|
|
988
1128
|
|
|
989
|
-
<!--
|
|
990
|
-
<div class="form-section"
|
|
991
|
-
<h4 class="form-title"
|
|
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>
|
|
992
1140
|
|
|
993
|
-
|
|
994
|
-
<div class="form-row" style="margin-bottom:14px;">
|
|
1141
|
+
<div class="form-row">
|
|
995
1142
|
<div class="form-group">
|
|
996
|
-
<label>
|
|
1143
|
+
<label>模块名 <span style="font-size:11px;color:var(--gray-400);">(name)</span></label>
|
|
997
1144
|
<input type="text" id="mod-meta-name" disabled style="background:var(--gray-100);cursor:not-allowed;">
|
|
998
1145
|
</div>
|
|
999
1146
|
<div class="form-group">
|
|
1000
|
-
<label>
|
|
1147
|
+
<label>模块类型 <span style="font-size:11px;color:var(--gray-400);">(type)</span></label>
|
|
1001
1148
|
<input type="text" id="mod-meta-type" disabled style="background:var(--gray-100);cursor:not-allowed;">
|
|
1002
1149
|
</div>
|
|
1003
1150
|
</div>
|
|
1004
|
-
<div class="form-row"
|
|
1151
|
+
<div class="form-row">
|
|
1005
1152
|
<div class="form-group">
|
|
1006
|
-
<label>
|
|
1153
|
+
<label>运行时 <span style="font-size:11px;color:var(--gray-400);">(runtime)</span></label>
|
|
1007
1154
|
<input type="text" id="mod-meta-runtime" disabled style="background:var(--gray-100);cursor:not-allowed;">
|
|
1008
1155
|
</div>
|
|
1009
1156
|
<div class="form-group">
|
|
1010
|
-
<label>
|
|
1157
|
+
<label>入口文件 <span style="font-size:11px;color:var(--gray-400);">(entry)</span></label>
|
|
1011
1158
|
<input type="text" id="mod-meta-entry" disabled style="background:var(--gray-100);cursor:not-allowed;">
|
|
1012
1159
|
</div>
|
|
1013
1160
|
</div>
|
|
1014
|
-
|
|
1015
|
-
<hr style="border:none;border-top:1px solid var(--gray-200);margin:16px 0;">
|
|
1016
|
-
|
|
1017
|
-
<!-- Editable fields -->
|
|
1018
1161
|
<div class="form-row">
|
|
1019
1162
|
<div class="form-group">
|
|
1020
|
-
<label>
|
|
1021
|
-
<input type="text" id="mod-meta-
|
|
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;">
|
|
1022
1165
|
</div>
|
|
1023
1166
|
<div class="form-group">
|
|
1024
|
-
<label>
|
|
1025
|
-
<input type="text" id="mod-meta-
|
|
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">
|
|
1026
1169
|
</div>
|
|
1027
1170
|
</div>
|
|
1171
|
+
</div>
|
|
1172
|
+
|
|
1173
|
+
<!-- 【区块2:启动配置】 -->
|
|
1174
|
+
<div class="form-section">
|
|
1175
|
+
<h4 class="form-title">启动配置</h4>
|
|
1176
|
+
|
|
1028
1177
|
<div class="form-row">
|
|
1029
1178
|
<div class="form-group">
|
|
1030
|
-
<label>
|
|
1179
|
+
<label>默认状态 <span style="font-size:11px;color:var(--gray-400);">(state - 需重启生效)</span></label>
|
|
1031
1180
|
<select id="mod-meta-state" data-field="state">
|
|
1032
|
-
<option value="enabled">enabled
|
|
1033
|
-
<option value="manual">manual
|
|
1034
|
-
<option value="disabled">disabled
|
|
1181
|
+
<option value="enabled">enabled - 自动启动</option>
|
|
1182
|
+
<option value="manual">manual - 手动启动</option>
|
|
1183
|
+
<option value="disabled">disabled - 禁用</option>
|
|
1035
1184
|
</select>
|
|
1036
1185
|
</div>
|
|
1037
1186
|
<div class="form-group">
|
|
1038
|
-
<label>
|
|
1039
|
-
<
|
|
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>
|
|
1040
1192
|
</div>
|
|
1041
1193
|
</div>
|
|
1194
|
+
</div>
|
|
1195
|
+
|
|
1196
|
+
<!-- 【区块3:网络配置】 -->
|
|
1197
|
+
<div class="form-section">
|
|
1198
|
+
<h4 class="form-title">网络配置</h4>
|
|
1199
|
+
|
|
1042
1200
|
<div class="form-row">
|
|
1043
1201
|
<div class="form-group">
|
|
1044
|
-
<label>
|
|
1045
|
-
<input type="
|
|
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="(无)">
|
|
1046
1204
|
</div>
|
|
1047
1205
|
<div class="form-group">
|
|
1048
|
-
<label>
|
|
1049
|
-
<select id="mod-meta-
|
|
1050
|
-
<option value="">
|
|
1051
|
-
<option value="
|
|
1052
|
-
<option value="false">false</option>
|
|
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>
|
|
1053
1210
|
</select>
|
|
1054
1211
|
</div>
|
|
1055
1212
|
</div>
|
|
1056
1213
|
</div>
|
|
1057
1214
|
|
|
1058
|
-
<!--
|
|
1215
|
+
<!-- 【区块5:模块配置文件】 -->
|
|
1059
1216
|
<div class="form-section hidden" id="module-config-section">
|
|
1060
|
-
<h4 class="form-title"
|
|
1217
|
+
<h4 class="form-title">模块配置文件 (config.yaml)</h4>
|
|
1061
1218
|
<div id="module-config-tree"></div>
|
|
1062
1219
|
</div>
|
|
1063
1220
|
</div>
|
|
@@ -1369,6 +1526,35 @@
|
|
|
1369
1526
|
</div>
|
|
1370
1527
|
</div>
|
|
1371
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
|
+
|
|
1372
1558
|
<!-- ===== TTS Test Dialog ===== -->
|
|
1373
1559
|
<div id="tts-test-overlay" class="asr-test-overlay hidden">
|
|
1374
1560
|
<div class="asr-test-dialog" style="width:560px">
|
|
@@ -1543,6 +1729,10 @@
|
|
|
1543
1729
|
<!-- ===== Toast / Notification Area ===== -->
|
|
1544
1730
|
<div id="toast-container"></div>
|
|
1545
1731
|
|
|
1546
|
-
<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>
|
|
1547
1737
|
</body>
|
|
1548
1738
|
</html>
|