@invago/mixin 1.0.14 → 1.0.15

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.
@@ -2,7 +2,7 @@
2
2
  "id": "mixin",
3
3
  "name": "Mixin Messenger Channel",
4
4
  "description": "Mixin Messenger channel via Blaze WebSocket",
5
- "version": "1.0.14",
5
+ "version": "1.0.15",
6
6
  "channels": [
7
7
  "mixin"
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invago/mixin",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Mixin Messenger channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "index.ts",
package/src/status.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { buildBaseAccountStatusSnapshot, buildBaseChannelStatusSummary } from "openclaw/plugin-sdk";
2
1
  import type { OpenClawConfig } from "openclaw/plugin-sdk";
3
2
  import { getAccountConfig, resolveDefaultAccountId } from "./config.js";
4
3
  import { getOutboxPathsSnapshot, type OutboxStatus } from "./send-service.js";
@@ -44,6 +43,71 @@ type MixinStatusAccount = {
44
43
  };
45
44
  };
46
45
 
46
+ function buildBaseChannelStatusSummary(snapshot: MixinChannelStatusSnapshot): {
47
+ configured: boolean;
48
+ running: boolean;
49
+ lastStartAt: number | null;
50
+ lastStopAt: number | null;
51
+ lastError: string | null;
52
+ } {
53
+ return {
54
+ configured: snapshot.configured ?? false,
55
+ running: snapshot.running ?? false,
56
+ lastStartAt: snapshot.lastStartAt ?? null,
57
+ lastStopAt: snapshot.lastStopAt ?? null,
58
+ lastError: snapshot.lastError ?? null,
59
+ };
60
+ }
61
+
62
+ function buildRuntimeAccountStatusSnapshot(params: {
63
+ runtime?: RuntimeLifecycleSnapshot | null;
64
+ probe?: unknown;
65
+ }): {
66
+ running: boolean;
67
+ lastStartAt: number | null;
68
+ lastStopAt: number | null;
69
+ lastError: string | null;
70
+ probe?: unknown;
71
+ } {
72
+ const { runtime, probe } = params;
73
+ return {
74
+ running: runtime?.running ?? false,
75
+ lastStartAt: runtime?.lastStartAt ?? null,
76
+ lastStopAt: runtime?.lastStopAt ?? null,
77
+ lastError: runtime?.lastError ?? null,
78
+ probe,
79
+ };
80
+ }
81
+
82
+ function buildBaseAccountStatusSnapshot(params: {
83
+ account: MixinStatusAccount;
84
+ runtime?: RuntimeLifecycleSnapshot | null;
85
+ probe?: unknown;
86
+ }): {
87
+ accountId: string;
88
+ name?: string;
89
+ enabled?: boolean;
90
+ configured?: boolean;
91
+ running: boolean;
92
+ lastStartAt: number | null;
93
+ lastStopAt: number | null;
94
+ lastError: string | null;
95
+ probe?: unknown;
96
+ lastInboundAt: number | null;
97
+ lastOutboundAt: number | null;
98
+ } {
99
+ const { account, runtime, probe } = params;
100
+ return {
101
+ accountId: account.accountId,
102
+ name: account.name,
103
+ enabled: account.enabled,
104
+ configured: account.configured,
105
+ ...buildRuntimeAccountStatusSnapshot({ runtime, probe }),
106
+ lastInboundAt: runtime?.lastInboundAt ?? null,
107
+ lastOutboundAt: runtime?.lastOutboundAt ?? null,
108
+ };
109
+ }
110
+
47
111
  export function resolveMixinStatusSnapshot(
48
112
  cfg: OpenClawConfig,
49
113
  accountId?: string,