dsh-hive-panel 1.0.12 → 1.0.13
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 +16 -0
- package/lib/client.js +39 -8
- package/package.json +1 -1
- package/src/panel.js +39 -8
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to this project are documented in this file. The format is
|
|
|
4
4
|
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project
|
|
5
5
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [1.0.13] - 2026-12-05
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Renderer re-synced from hive-panel 1.0.7: supervisor health prefers the top-level
|
|
12
|
+
`lastTickAt`, so a long drain no longer reports the supervisor as unresponsive, and
|
|
13
|
+
the repository scope meta is shown alongside. Browser bundle rebuilt.
|
|
14
|
+
|
|
15
|
+
### Tests
|
|
16
|
+
|
|
17
|
+
- 48 checks pass, including the synced top-tick health and the scope meta.
|
|
18
|
+
|
|
7
19
|
## [1.0.12] - 2026-12-05
|
|
8
20
|
|
|
9
21
|
### Fixed
|
|
@@ -26,6 +38,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
26
38
|
- 48 checks cover the per-repository injection, foreign-repo query/body rejection with
|
|
27
39
|
zero spawn, the panel-side rejection toast/tooltip (en + zh) and the 32768 role cap.
|
|
28
40
|
|
|
41
|
+
### Published
|
|
42
|
+
|
|
43
|
+
- npm: `dsh-hive-panel@1.0.12` on 2026-12-05.
|
|
44
|
+
|
|
29
45
|
## [1.0.11] - 2026-12-05
|
|
30
46
|
|
|
31
47
|
### Changed
|
package/lib/client.js
CHANGED
|
@@ -2216,6 +2216,7 @@ const messages = Object.freeze({
|
|
|
2216
2216
|
"supervisor.unresponsive": "Unresponsive",
|
|
2217
2217
|
"supervisor.noData": "No supervisor data",
|
|
2218
2218
|
"supervisor.lastCheck": "Last check {seconds}s ago",
|
|
2219
|
+
"supervisor.lastTick": "Last tick {seconds}s ago",
|
|
2219
2220
|
"supervisor.tooltipRunning": "Running {count}",
|
|
2220
2221
|
"supervisor.tooltipQueued": "Queued {count}",
|
|
2221
2222
|
"supervisor.tooltipError": "Last error: {error}",
|
|
@@ -2479,6 +2480,7 @@ const messages = Object.freeze({
|
|
|
2479
2480
|
"supervisor.unresponsive": "未响应",
|
|
2480
2481
|
"supervisor.noData": "无监督器数据",
|
|
2481
2482
|
"supervisor.lastCheck": "最近一次检查 {seconds} 秒前",
|
|
2483
|
+
"supervisor.lastTick": "最后 tick {seconds} 秒前",
|
|
2482
2484
|
"supervisor.tooltipRunning": "运行中 {count} 个",
|
|
2483
2485
|
"supervisor.tooltipQueued": "待办 {count} 个",
|
|
2484
2486
|
"supervisor.tooltipError": "最近错误:{error}",
|
|
@@ -3172,6 +3174,32 @@ function normalizeSupervisorWorkers(source) {
|
|
|
3172
3174
|
return rows;
|
|
3173
3175
|
}
|
|
3174
3176
|
|
|
3177
|
+
function supervisorTopTick(payload) {
|
|
3178
|
+
const candidates = [payload];
|
|
3179
|
+
for (const key of ["data", "result", "status", "supervisor"]) {
|
|
3180
|
+
if (isRecord(payload) && isRecord(payload[key])) candidates.push(payload[key]);
|
|
3181
|
+
}
|
|
3182
|
+
for (const source of candidates) {
|
|
3183
|
+
if (!isRecord(source)) continue;
|
|
3184
|
+
const tick = asString(source.lastTickAt || source.last_tick_at);
|
|
3185
|
+
if (tick) return tick;
|
|
3186
|
+
}
|
|
3187
|
+
return "";
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
function supervisorHeartbeatAt(rows) {
|
|
3191
|
+
if (!Array.isArray(rows)) return null;
|
|
3192
|
+
const top = parseDate(rows.lastTickAt);
|
|
3193
|
+
if (top) return top;
|
|
3194
|
+
let latest = null;
|
|
3195
|
+
for (const row of rows) {
|
|
3196
|
+
if (!isRecord(row)) continue;
|
|
3197
|
+
const check = parseDate(row.lastCheckAt);
|
|
3198
|
+
if (check && (latest === null || check.getTime() > latest.getTime())) latest = check;
|
|
3199
|
+
}
|
|
3200
|
+
return latest;
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3175
3203
|
function normalizeSupervisorStatus(payload) {
|
|
3176
3204
|
const rows = new Map();
|
|
3177
3205
|
for (const raw of supervisorEntriesFrom(payload)) {
|
|
@@ -3223,12 +3251,14 @@ function normalizeSupervisorStatus(payload) {
|
|
|
3223
3251
|
workers: normalizeSupervisorWorkers(source),
|
|
3224
3252
|
});
|
|
3225
3253
|
}
|
|
3226
|
-
|
|
3254
|
+
const result = [...rows.values()].sort((left, right) => left.repo.localeCompare(right.repo));
|
|
3255
|
+
result.lastTickAt = supervisorTopTick(payload);
|
|
3256
|
+
return result;
|
|
3227
3257
|
}
|
|
3228
3258
|
|
|
3229
3259
|
/**
|
|
3230
3260
|
* Normalize the supervisor's queen cross-repository rejection observability:
|
|
3231
|
-
*
|
|
3261
|
+
* \`crossRepoBlocked\` count + \`lastCrossRepoBlocked { tool, repo, cwd, at }\`.
|
|
3232
3262
|
* Older/newer supervisors may nest it under queen-prefixed or repoScope names.
|
|
3233
3263
|
* @param {unknown} payload - /api/hive-runner?op=status payload.
|
|
3234
3264
|
* @returns {{ count: number, last: { tool: string, repo: string, cwd: string, at: string } | null }}
|
|
@@ -6139,10 +6169,10 @@ function mount(root, options = {}) {
|
|
|
6139
6169
|
? supervisorData.find((entry) => entry.repo === lastModel.repo)
|
|
6140
6170
|
: null;
|
|
6141
6171
|
const now = Date.now();
|
|
6142
|
-
const
|
|
6143
|
-
const fresh =
|
|
6172
|
+
const heartbeat = supervisorHeartbeatAt(supervisorData);
|
|
6173
|
+
const fresh = heartbeat !== null && now - heartbeat.getTime() <= 90_000;
|
|
6144
6174
|
const paused = Boolean(row && (row.paused === true || row.state === "paused"));
|
|
6145
|
-
const status = paused ? "paused" : fresh ? "normal" : "unresponsive";
|
|
6175
|
+
const status = paused ? "paused" : !row ? "unresponsive" : fresh ? "normal" : "unresponsive";
|
|
6146
6176
|
const label =
|
|
6147
6177
|
status === "normal"
|
|
6148
6178
|
? translate("supervisor.normal")
|
|
@@ -6156,11 +6186,12 @@ function mount(root, options = {}) {
|
|
|
6156
6186
|
supervisorInlineState.textContent = label;
|
|
6157
6187
|
|
|
6158
6188
|
const details = [];
|
|
6159
|
-
if (
|
|
6189
|
+
if (heartbeat) {
|
|
6190
|
+
const hasTopTick = Boolean(supervisorData && parseDate(supervisorData.lastTickAt));
|
|
6160
6191
|
details.push(
|
|
6161
|
-
translate("supervisor.lastCheck").replace(
|
|
6192
|
+
translate(hasTopTick ? "supervisor.lastTick" : "supervisor.lastCheck").replace(
|
|
6162
6193
|
"{seconds}",
|
|
6163
|
-
String(Math.max(0, Math.floor((now -
|
|
6194
|
+
String(Math.max(0, Math.floor((now - heartbeat.getTime()) / 1000))),
|
|
6164
6195
|
),
|
|
6165
6196
|
);
|
|
6166
6197
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-hive-panel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Hive board and queen mode inside DSH Web: a conversation view scoped to the Session's repository, with allowlisted task-card actions over DSH's shell seam.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
package/src/panel.js
CHANGED
|
@@ -2143,6 +2143,7 @@ export const messages = Object.freeze({
|
|
|
2143
2143
|
"supervisor.unresponsive": "Unresponsive",
|
|
2144
2144
|
"supervisor.noData": "No supervisor data",
|
|
2145
2145
|
"supervisor.lastCheck": "Last check {seconds}s ago",
|
|
2146
|
+
"supervisor.lastTick": "Last tick {seconds}s ago",
|
|
2146
2147
|
"supervisor.tooltipRunning": "Running {count}",
|
|
2147
2148
|
"supervisor.tooltipQueued": "Queued {count}",
|
|
2148
2149
|
"supervisor.tooltipError": "Last error: {error}",
|
|
@@ -2406,6 +2407,7 @@ export const messages = Object.freeze({
|
|
|
2406
2407
|
"supervisor.unresponsive": "未响应",
|
|
2407
2408
|
"supervisor.noData": "无监督器数据",
|
|
2408
2409
|
"supervisor.lastCheck": "最近一次检查 {seconds} 秒前",
|
|
2410
|
+
"supervisor.lastTick": "最后 tick {seconds} 秒前",
|
|
2409
2411
|
"supervisor.tooltipRunning": "运行中 {count} 个",
|
|
2410
2412
|
"supervisor.tooltipQueued": "待办 {count} 个",
|
|
2411
2413
|
"supervisor.tooltipError": "最近错误:{error}",
|
|
@@ -3099,6 +3101,32 @@ function normalizeSupervisorWorkers(source) {
|
|
|
3099
3101
|
return rows;
|
|
3100
3102
|
}
|
|
3101
3103
|
|
|
3104
|
+
function supervisorTopTick(payload) {
|
|
3105
|
+
const candidates = [payload];
|
|
3106
|
+
for (const key of ["data", "result", "status", "supervisor"]) {
|
|
3107
|
+
if (isRecord(payload) && isRecord(payload[key])) candidates.push(payload[key]);
|
|
3108
|
+
}
|
|
3109
|
+
for (const source of candidates) {
|
|
3110
|
+
if (!isRecord(source)) continue;
|
|
3111
|
+
const tick = asString(source.lastTickAt || source.last_tick_at);
|
|
3112
|
+
if (tick) return tick;
|
|
3113
|
+
}
|
|
3114
|
+
return "";
|
|
3115
|
+
}
|
|
3116
|
+
|
|
3117
|
+
function supervisorHeartbeatAt(rows) {
|
|
3118
|
+
if (!Array.isArray(rows)) return null;
|
|
3119
|
+
const top = parseDate(rows.lastTickAt);
|
|
3120
|
+
if (top) return top;
|
|
3121
|
+
let latest = null;
|
|
3122
|
+
for (const row of rows) {
|
|
3123
|
+
if (!isRecord(row)) continue;
|
|
3124
|
+
const check = parseDate(row.lastCheckAt);
|
|
3125
|
+
if (check && (latest === null || check.getTime() > latest.getTime())) latest = check;
|
|
3126
|
+
}
|
|
3127
|
+
return latest;
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3102
3130
|
function normalizeSupervisorStatus(payload) {
|
|
3103
3131
|
const rows = new Map();
|
|
3104
3132
|
for (const raw of supervisorEntriesFrom(payload)) {
|
|
@@ -3150,12 +3178,14 @@ function normalizeSupervisorStatus(payload) {
|
|
|
3150
3178
|
workers: normalizeSupervisorWorkers(source),
|
|
3151
3179
|
});
|
|
3152
3180
|
}
|
|
3153
|
-
|
|
3181
|
+
const result = [...rows.values()].sort((left, right) => left.repo.localeCompare(right.repo));
|
|
3182
|
+
result.lastTickAt = supervisorTopTick(payload);
|
|
3183
|
+
return result;
|
|
3154
3184
|
}
|
|
3155
3185
|
|
|
3156
3186
|
/**
|
|
3157
3187
|
* Normalize the supervisor's queen cross-repository rejection observability:
|
|
3158
|
-
*
|
|
3188
|
+
* \`crossRepoBlocked\` count + \`lastCrossRepoBlocked { tool, repo, cwd, at }\`.
|
|
3159
3189
|
* Older/newer supervisors may nest it under queen-prefixed or repoScope names.
|
|
3160
3190
|
* @param {unknown} payload - /api/hive-runner?op=status payload.
|
|
3161
3191
|
* @returns {{ count: number, last: { tool: string, repo: string, cwd: string, at: string } | null }}
|
|
@@ -6066,10 +6096,10 @@ export function mount(root, options = {}) {
|
|
|
6066
6096
|
? supervisorData.find((entry) => entry.repo === lastModel.repo)
|
|
6067
6097
|
: null;
|
|
6068
6098
|
const now = Date.now();
|
|
6069
|
-
const
|
|
6070
|
-
const fresh =
|
|
6099
|
+
const heartbeat = supervisorHeartbeatAt(supervisorData);
|
|
6100
|
+
const fresh = heartbeat !== null && now - heartbeat.getTime() <= 90_000;
|
|
6071
6101
|
const paused = Boolean(row && (row.paused === true || row.state === "paused"));
|
|
6072
|
-
const status = paused ? "paused" : fresh ? "normal" : "unresponsive";
|
|
6102
|
+
const status = paused ? "paused" : !row ? "unresponsive" : fresh ? "normal" : "unresponsive";
|
|
6073
6103
|
const label =
|
|
6074
6104
|
status === "normal"
|
|
6075
6105
|
? translate("supervisor.normal")
|
|
@@ -6083,11 +6113,12 @@ export function mount(root, options = {}) {
|
|
|
6083
6113
|
supervisorInlineState.textContent = label;
|
|
6084
6114
|
|
|
6085
6115
|
const details = [];
|
|
6086
|
-
if (
|
|
6116
|
+
if (heartbeat) {
|
|
6117
|
+
const hasTopTick = Boolean(supervisorData && parseDate(supervisorData.lastTickAt));
|
|
6087
6118
|
details.push(
|
|
6088
|
-
translate("supervisor.lastCheck").replace(
|
|
6119
|
+
translate(hasTopTick ? "supervisor.lastTick" : "supervisor.lastCheck").replace(
|
|
6089
6120
|
"{seconds}",
|
|
6090
|
-
String(Math.max(0, Math.floor((now -
|
|
6121
|
+
String(Math.max(0, Math.floor((now - heartbeat.getTime()) / 1000))),
|
|
6091
6122
|
),
|
|
6092
6123
|
);
|
|
6093
6124
|
} else {
|