@hienlh/ppm 0.8.79 → 0.8.81
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
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.81] - 2026-04-01
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- **Usage polling**: Re-wire `startUsagePolling()` into server startup — accidentally removed during supervisor refactor, causing prod to never auto-fetch usage limits (only manual refresh worked)
|
|
7
|
+
|
|
8
|
+
## [0.8.80] - 2026-04-01
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Cloud command ack**: Device sends `command_ack` immediately when receiving a cloud command, before processing — allows cloud to confirm receipt and update UI
|
|
12
|
+
|
|
3
13
|
## [0.8.79] - 2026-04-01
|
|
4
14
|
|
|
5
15
|
### Added
|
package/package.json
CHANGED
package/src/server/index.ts
CHANGED
|
@@ -437,5 +437,8 @@ if (process.argv.includes("__serve__")) {
|
|
|
437
437
|
// Start background account token refresh in daemon child
|
|
438
438
|
import("../services/account.service.ts").then(({ accountService }) => accountService.startAutoRefresh()).catch(() => {});
|
|
439
439
|
|
|
440
|
+
// Start background usage limit polling (every 5 min)
|
|
441
|
+
import("../services/claude-usage.service.ts").then(({ startUsagePolling }) => startUsagePolling()).catch(() => {});
|
|
442
|
+
|
|
440
443
|
console.log(`Server child ready on port ${port}`);
|
|
441
444
|
}
|
|
@@ -30,6 +30,11 @@ interface StateChangeMsg extends WsMessage {
|
|
|
30
30
|
reason: string;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
interface CommandAckMsg extends WsMessage {
|
|
34
|
+
type: "command_ack";
|
|
35
|
+
id: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
interface CommandResultMsg extends WsMessage {
|
|
34
39
|
type: "command_result";
|
|
35
40
|
id: string;
|
|
@@ -38,7 +43,7 @@ interface CommandResultMsg extends WsMessage {
|
|
|
38
43
|
data?: Record<string, unknown>;
|
|
39
44
|
}
|
|
40
45
|
|
|
41
|
-
type OutboundMsg = HeartbeatMsg | StateChangeMsg | CommandResultMsg;
|
|
46
|
+
type OutboundMsg = HeartbeatMsg | StateChangeMsg | CommandAckMsg | CommandResultMsg;
|
|
42
47
|
|
|
43
48
|
interface CommandMsg extends WsMessage {
|
|
44
49
|
type: "command";
|
|
@@ -483,6 +483,13 @@ async function connectCloud(opts: { port: number }, serverArgs: string[], logFd:
|
|
|
483
483
|
|
|
484
484
|
log("INFO", `Cloud command received: ${cmd.action}`);
|
|
485
485
|
|
|
486
|
+
// Send immediate ack so Cloud can update UI before processing
|
|
487
|
+
send({
|
|
488
|
+
type: "command_ack",
|
|
489
|
+
id: cmd.id,
|
|
490
|
+
timestamp: new Date().toISOString(),
|
|
491
|
+
});
|
|
492
|
+
|
|
486
493
|
switch (cmd.action) {
|
|
487
494
|
case "restart":
|
|
488
495
|
if (serverChild) {
|