@agentchatme/openclaw 0.3.0 → 0.5.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.
@@ -51,20 +51,23 @@ type AgentchatChannelConfig = z.infer<typeof agentchatChannelConfigSchema>;
51
51
  declare function parseChannelConfig(input: unknown): AgentchatChannelConfig;
52
52
 
53
53
  /**
54
- * AgentChat channel plugin entry point.
54
+ * ChannelStatusAdapter account health + configured-state probe.
55
55
  *
56
- * Wires the real OpenClaw SDK contracts builds a
57
- * `ChannelPlugin<AgentchatResolvedAccount>` with id / meta / capabilities /
58
- * config-adapter / config-schema / setup + setupWizard, and wraps it via
59
- * `defineChannelPluginEntry(...)` for OpenClaw's extension loader.
60
- *
61
- * Config adapter supports both:
62
- * - single-account flat form: `channels.agentchat.{ apiKey, apiBase, ... }`
63
- * - multi-account form: `channels.agentchat.accounts.<id>.{ apiKey, ... }`
64
- *
65
- * Loaded by OpenClaw via `package.json`'s `openclaw.extensions` entry.
56
+ * `probeAccount` hits `/v1/agents/me` with a short timeout and reports
57
+ * whether the configured key still authenticates and whether the account
58
+ * is active / restricted / suspended. The gateway uses this to surface a
59
+ * red/yellow/green status in `openclaw channels status` and to decide when
60
+ * to page an operator for stuck accounts.
66
61
  */
67
62
 
63
+ type AgentchatProbeResult = {
64
+ readonly ok: boolean;
65
+ readonly handle?: string;
66
+ readonly status?: 'active' | 'restricted' | 'suspended' | 'deleted';
67
+ readonly pausedByOwner?: 'none' | 'send' | 'full';
68
+ readonly error?: string;
69
+ };
70
+
68
71
  interface AgentchatResolvedAccount {
69
72
  accountId: string;
70
73
  enabled: boolean;
@@ -72,7 +75,7 @@ interface AgentchatResolvedAccount {
72
75
  config: AgentchatChannelConfig | null;
73
76
  parseError: string | null;
74
77
  }
75
- declare const agentchatPlugin: ChannelPlugin<AgentchatResolvedAccount>;
78
+ declare const agentchatPlugin: ChannelPlugin<AgentchatResolvedAccount, AgentchatProbeResult>;
76
79
  /**
77
80
  * Canonical channel-entry descriptor consumed by OpenClaw's extension loader.
78
81
  * Exported as `default` because `openclaw.extensions` in package.json points to
@@ -86,7 +89,7 @@ declare const agentchatPlugin: ChannelPlugin<AgentchatResolvedAccount>;
86
89
  declare const agentchatChannelEntry: ReturnType<typeof defineChannelPluginEntry<typeof agentchatPlugin>>;
87
90
 
88
91
  declare const agentchatSetupEntry: {
89
- plugin: openclaw_plugin_sdk_channel_core.ChannelPlugin<AgentchatResolvedAccount>;
92
+ plugin: openclaw_plugin_sdk_channel_core.ChannelPlugin<AgentchatResolvedAccount, AgentchatProbeResult>;
90
93
  };
91
94
 
92
95
  export { type AgentchatChannelConfig as A, type AgentchatResolvedAccount as a, agentchatChannelEntry as b, agentchatPlugin as c, agentchatSetupEntry as d, parseChannelConfig as p };
@@ -51,20 +51,23 @@ type AgentchatChannelConfig = z.infer<typeof agentchatChannelConfigSchema>;
51
51
  declare function parseChannelConfig(input: unknown): AgentchatChannelConfig;
52
52
 
53
53
  /**
54
- * AgentChat channel plugin entry point.
54
+ * ChannelStatusAdapter account health + configured-state probe.
55
55
  *
56
- * Wires the real OpenClaw SDK contracts builds a
57
- * `ChannelPlugin<AgentchatResolvedAccount>` with id / meta / capabilities /
58
- * config-adapter / config-schema / setup + setupWizard, and wraps it via
59
- * `defineChannelPluginEntry(...)` for OpenClaw's extension loader.
60
- *
61
- * Config adapter supports both:
62
- * - single-account flat form: `channels.agentchat.{ apiKey, apiBase, ... }`
63
- * - multi-account form: `channels.agentchat.accounts.<id>.{ apiKey, ... }`
64
- *
65
- * Loaded by OpenClaw via `package.json`'s `openclaw.extensions` entry.
56
+ * `probeAccount` hits `/v1/agents/me` with a short timeout and reports
57
+ * whether the configured key still authenticates and whether the account
58
+ * is active / restricted / suspended. The gateway uses this to surface a
59
+ * red/yellow/green status in `openclaw channels status` and to decide when
60
+ * to page an operator for stuck accounts.
66
61
  */
67
62
 
63
+ type AgentchatProbeResult = {
64
+ readonly ok: boolean;
65
+ readonly handle?: string;
66
+ readonly status?: 'active' | 'restricted' | 'suspended' | 'deleted';
67
+ readonly pausedByOwner?: 'none' | 'send' | 'full';
68
+ readonly error?: string;
69
+ };
70
+
68
71
  interface AgentchatResolvedAccount {
69
72
  accountId: string;
70
73
  enabled: boolean;
@@ -72,7 +75,7 @@ interface AgentchatResolvedAccount {
72
75
  config: AgentchatChannelConfig | null;
73
76
  parseError: string | null;
74
77
  }
75
- declare const agentchatPlugin: ChannelPlugin<AgentchatResolvedAccount>;
78
+ declare const agentchatPlugin: ChannelPlugin<AgentchatResolvedAccount, AgentchatProbeResult>;
76
79
  /**
77
80
  * Canonical channel-entry descriptor consumed by OpenClaw's extension loader.
78
81
  * Exported as `default` because `openclaw.extensions` in package.json points to
@@ -86,7 +89,7 @@ declare const agentchatPlugin: ChannelPlugin<AgentchatResolvedAccount>;
86
89
  declare const agentchatChannelEntry: ReturnType<typeof defineChannelPluginEntry<typeof agentchatPlugin>>;
87
90
 
88
91
  declare const agentchatSetupEntry: {
89
- plugin: openclaw_plugin_sdk_channel_core.ChannelPlugin<AgentchatResolvedAccount>;
92
+ plugin: openclaw_plugin_sdk_channel_core.ChannelPlugin<AgentchatResolvedAccount, AgentchatProbeResult>;
90
93
  };
91
94
 
92
95
  export { type AgentchatChannelConfig as A, type AgentchatResolvedAccount as a, agentchatChannelEntry as b, agentchatPlugin as c, agentchatSetupEntry as d, parseChannelConfig as p };