@alfe.ai/openclaw 0.0.15 → 0.0.16

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +67 -1
  2. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import plugin from "./plugin.js";
2
2
  import { EventEmitter } from "node:events";
3
- import { BaseAgentClient, BaseClientOptions } from "@alfe/agent-client";
4
3
 
5
4
  //#region src/types.d.ts
6
5
 
@@ -94,6 +93,73 @@ declare function registerWithDaemon(client: IPCClient, log: {
94
93
  error(msg: string, ...args: unknown[]): void;
95
94
  }): Promise<RegisterResult | null>;
96
95
  //#endregion
96
+ //#region ../../packages-internal/agent-client/dist/types.d.ts
97
+ interface BaseClientOptions {
98
+ url: string;
99
+ token: string;
100
+ clientId: string;
101
+ displayName: string;
102
+ version?: string;
103
+ instanceId?: string;
104
+ maxPayload?: number;
105
+ logger?: Logger;
106
+ }
107
+ interface Logger {
108
+ info(msg: string, ...args: unknown[]): void;
109
+ warn(msg: string, ...args: unknown[]): void;
110
+ error(msg: string, ...args: unknown[]): void;
111
+ debug(msg: string, ...args: unknown[]): void;
112
+ }
113
+ //# sourceMappingURL=types.d.ts.map
114
+ //#endregion
115
+ //#region ../../packages-internal/agent-client/dist/base-client.d.ts
116
+ declare abstract class BaseAgentClient {
117
+ private ws;
118
+ private connected;
119
+ private closed;
120
+ private backoffMs;
121
+ private pending;
122
+ private readyResolve;
123
+ private readyReject;
124
+ private readyPromise;
125
+ protected readonly log: Logger;
126
+ protected readonly opts: BaseClientOptions;
127
+ protected readonly instanceId: string;
128
+ constructor(opts: BaseClientOptions);
129
+ get isConnected(): boolean;
130
+ start(): Promise<void>;
131
+ stop(): void;
132
+ request(method: string, params: object, opts?: {
133
+ expectFinal?: boolean;
134
+ timeoutMs?: number;
135
+ }): Promise<unknown>;
136
+ /** Perform protocol-specific handshake after WebSocket opens. */
137
+ protected abstract performHandshake(): Promise<void>;
138
+ /**
139
+ * Handle a protocol event. Base implementation handles 'chat' events.
140
+ * Subclasses should override and call super for unhandled events.
141
+ */
142
+ protected handleEvent(event: string, payload: unknown): void;
143
+ /** Called after successful handshake. Override to add service registration, health beacons, etc. */
144
+ protected onConnected(): void | Promise<void>;
145
+ /** Called when the connection is lost or stopped. Override to clean up timers, etc. */
146
+ protected onDisconnected(): void;
147
+ /** Close the underlying WebSocket connection. Useful for subclass timeout handling. */
148
+ protected closeConnection(code: number, reason: string): void;
149
+ /** Mark the client as connected and resolve the ready promise. */
150
+ protected setConnected(): void;
151
+ /** Resolve the ready promise (call after handshake + onConnected). */
152
+ protected resolveReady(): void;
153
+ /** Reject the ready promise (call on handshake failure). */
154
+ protected rejectReady(err: Error): void;
155
+ protected doConnect(): void;
156
+ private initiateHandshake;
157
+ private handleMessage;
158
+ private scheduleReconnect;
159
+ private flushPending;
160
+ }
161
+ //# sourceMappingURL=base-client.d.ts.map
162
+ //#endregion
97
163
  //#region src/ws-client.d.ts
98
164
  interface OpenClawClientOptions extends BaseClientOptions {
99
165
  /** Role for the connect handshake. Defaults to 'operator'. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/openclaw",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "OpenClaw plugin for Alfe — connects to local gateway daemon via IPC for integration management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,9 +23,10 @@
23
23
  "dependencies": {
24
24
  "@auriclabs/logger": "^0.1.1",
25
25
  "@sinclair/typebox": "^0.34.48",
26
+ "@alfe/agent-client": "^0.1.0",
26
27
  "@alfe.ai/agent-api-client": "^0.0.2",
27
28
  "@alfe.ai/config": "^0.0.5",
28
- "@alfe.ai/integrations": "^0.0.13"
29
+ "@alfe.ai/integrations": "^0.0.14"
29
30
  },
30
31
  "devDependencies": {},
31
32
  "files": [