@earzbook/openclaw 0.1.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.
Files changed (42) hide show
  1. package/README.md +46 -0
  2. package/dist/adapter.d.ts +29 -0
  3. package/dist/adapter.d.ts.map +1 -0
  4. package/dist/adapter.js +368 -0
  5. package/dist/adapter.js.map +1 -0
  6. package/dist/config.d.ts +7 -0
  7. package/dist/config.d.ts.map +1 -0
  8. package/dist/config.js +84 -0
  9. package/dist/config.js.map +1 -0
  10. package/dist/dispatch.d.ts +48 -0
  11. package/dist/dispatch.d.ts.map +1 -0
  12. package/dist/dispatch.js +261 -0
  13. package/dist/dispatch.js.map +1 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +571 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/lockfile.d.ts +20 -0
  19. package/dist/lockfile.d.ts.map +1 -0
  20. package/dist/lockfile.js +113 -0
  21. package/dist/lockfile.js.map +1 -0
  22. package/dist/logging.d.ts +5 -0
  23. package/dist/logging.d.ts.map +1 -0
  24. package/dist/logging.js +98 -0
  25. package/dist/logging.js.map +1 -0
  26. package/dist/platform/launchd.d.ts +12 -0
  27. package/dist/platform/launchd.d.ts.map +1 -0
  28. package/dist/platform/launchd.js +37 -0
  29. package/dist/platform/launchd.js.map +1 -0
  30. package/dist/platform/systemd.d.ts +10 -0
  31. package/dist/platform/systemd.d.ts.map +1 -0
  32. package/dist/platform/systemd.js +18 -0
  33. package/dist/platform/systemd.js.map +1 -0
  34. package/dist/self-update.d.ts +36 -0
  35. package/dist/self-update.d.ts.map +1 -0
  36. package/dist/self-update.js +151 -0
  37. package/dist/self-update.js.map +1 -0
  38. package/dist/types.d.ts +236 -0
  39. package/dist/types.d.ts.map +1 -0
  40. package/dist/types.js +22 -0
  41. package/dist/types.js.map +1 -0
  42. package/package.json +48 -0
@@ -0,0 +1,236 @@
1
+ export declare const PROTOCOL_VERSION = 1;
2
+ export interface HelloFrame {
3
+ type: "hello";
4
+ version: number;
5
+ role: "plugin";
6
+ deviceToken: string;
7
+ /** Sequence of the last server frame we successfully processed. */
8
+ lastAckSeq?: number;
9
+ /** Optional client metadata for diagnostics. Never include secrets. */
10
+ client?: {
11
+ sidecarVersion: string;
12
+ nodeVersion?: string;
13
+ platform?: string;
14
+ };
15
+ }
16
+ export interface AckFrame {
17
+ type: "ack";
18
+ /** Sequence of the inbound frame we are acknowledging. */
19
+ seq: number;
20
+ }
21
+ export interface AgentReplyFrame {
22
+ type: "agent_reply";
23
+ /** Conversation we are replying inside, copied from the originating user_message. */
24
+ conversationId: string;
25
+ /** Server-generated chunk sequence for ordered reassembly on the app side. */
26
+ chunkSeq: number;
27
+ /** Append-only text chunk (markdown allowed). Empty string on isFinal=true is valid. */
28
+ text: string;
29
+ /** True on the LAST chunk of a turn. App marks the AI bubble complete on this frame. */
30
+ isFinal: boolean;
31
+ /** Optional opaque id correlating to the inbound user_message that triggered the reply. */
32
+ inReplyTo?: string;
33
+ /**
34
+ * Per-session routing tag echoed back from the originating user_message
35
+ * (v2 flat sessions). The app uses this to look up the right local
36
+ * Conversation row when persisting the reply.
37
+ */
38
+ sessionKey?: string;
39
+ }
40
+ export interface SessionsListFrame {
41
+ type: "sessions_list";
42
+ /**
43
+ * The session-keys for which a trajectory file currently exists on
44
+ * this sidecar's disk. Each entry is the BARE sessionKey (i.e. the
45
+ * portion after the `earzbook-app:` namespace prefix that we add when
46
+ * invoking openclaw). The app compares directly to its
47
+ * `openclaw_session_key` Watermelon column to derive lock state.
48
+ */
49
+ sessionKeys: string[];
50
+ }
51
+ export interface DeleteSessionAckFrame {
52
+ type: "delete_session_ack";
53
+ /** The session-key the app asked us to delete; echoed verbatim. */
54
+ sessionKey: string;
55
+ /** True iff the trajectory file was successfully removed (or didn't exist). */
56
+ success: boolean;
57
+ /** Free-form failure detail (set only when success=false). */
58
+ error?: string;
59
+ }
60
+ /**
61
+ * One restored message from an on-disk OpenClaw session trajectory.
62
+ * Shared shape between the `history` wire frame and the adapter callback.
63
+ */
64
+ export interface OpenClawHistoryMessage {
65
+ /** Who spoke. We only surface user + assistant turns (tool noise dropped). */
66
+ role: "user" | "assistant";
67
+ /** Plain visible text (assistant text blocks joined; thinking/tool stripped). */
68
+ text: string;
69
+ /** Original message timestamp (ms since epoch) so the app preserves order. */
70
+ at: number;
71
+ }
72
+ export interface HistoryFrame {
73
+ type: "history";
74
+ /** The session-key the app asked about; echoed verbatim so it can match the response. */
75
+ sessionKey: string;
76
+ /**
77
+ * Chronological user+assistant messages parsed from the session's
78
+ * trajectory .jsonl on disk. Empty when the session has no displayable
79
+ * content OR when `error` is set.
80
+ */
81
+ messages: OpenClawHistoryMessage[];
82
+ /** Set only on failure (bad sessionKey, read error). messages is [] then. */
83
+ error?: string;
84
+ }
85
+ export interface PingFrame {
86
+ type: "ping";
87
+ /** Monotonic timestamp (ms since epoch) for round-trip diagnostics only. */
88
+ t: number;
89
+ }
90
+ export type ClientFrame = HelloFrame | AckFrame | AgentReplyFrame | SessionsListFrame | DeleteSessionAckFrame | HistoryFrame | PingFrame;
91
+ export interface WelcomeFrame {
92
+ type: "welcome";
93
+ /** Server has accepted hello and advertises the last seq it saw from us. */
94
+ lastAckSeq: number;
95
+ /** Identity confirmation (userId only — no PII). */
96
+ userId: string;
97
+ /** Server time so we can detect clock skew for diagnostics. */
98
+ serverTime: number;
99
+ }
100
+ export interface UserMessageFrame {
101
+ type: "user_message";
102
+ /** Server-monotonic sequence within this connection. Sidecar must ack. */
103
+ seq: number;
104
+ /** App-generated stable id (idempotency key); echo back on agent_reply.inReplyTo. */
105
+ clientMessageId: string;
106
+ /** Local conversation id from the app. */
107
+ conversationId: string;
108
+ /** Plain user text (markdown allowed but rare in inbound). */
109
+ text: string;
110
+ /** App-side send timestamp (ms). May lag real time on slow networks. */
111
+ sentAt: number;
112
+ /**
113
+ * Per-session routing tag (v2 flat sessions). When present, the sidecar
114
+ * invokes openclaw with `--session-key earzbook-app:<sessionKey>` so
115
+ * each chat gets its own isolated trajectory file on disk. When absent,
116
+ * falls back to the legacy bare `earzbook-app` constant for compat
117
+ * with older app versions.
118
+ */
119
+ sessionKey?: string;
120
+ }
121
+ export interface ListSessionsFrame {
122
+ type: "list_sessions";
123
+ }
124
+ export interface DeleteSessionFrame {
125
+ type: "delete_session";
126
+ /**
127
+ * The session-key whose on-disk files should be removed. The sidecar
128
+ * looks up the OpenClaw manifest entry under
129
+ * `agent:<agentId>:earzbook-app:<sessionKey>`
130
+ * to find the actual file basename (a UUID OpenClaw assigned), then
131
+ * unlinks the three associated files (.jsonl, .trajectory.jsonl,
132
+ * .trajectory-path.json) + scrubs the entry from sessions.json.
133
+ *
134
+ * Validated against [a-zA-Z0-9_-]+ before any filesystem access to
135
+ * prevent path traversal.
136
+ */
137
+ sessionKey: string;
138
+ }
139
+ export interface FetchHistoryFrame {
140
+ type: "fetch_history";
141
+ /**
142
+ * The session-key whose on-disk message history the app wants restored.
143
+ * The sidecar looks up the OpenClaw manifest entry under
144
+ * `agent:<agentId>:earzbook-app:<sessionKey>`
145
+ * and parses the associated trajectory .jsonl. Validated against
146
+ * [a-zA-Z0-9_-]+ before any filesystem access to prevent path traversal.
147
+ */
148
+ sessionKey: string;
149
+ }
150
+ export interface PongFrame {
151
+ type: "pong";
152
+ /** Echoes the t from the originating ping. */
153
+ t: number;
154
+ }
155
+ export interface ErrorFrame {
156
+ type: "error";
157
+ /** Stable machine code (e.g. "auth_invalid", "rate_limited", "version_mismatch"). */
158
+ code: string;
159
+ /** Human-readable detail, safe to log. */
160
+ message: string;
161
+ /** When true, the sidecar should NOT auto-reconnect (auth failed permanently). */
162
+ fatal: boolean;
163
+ }
164
+ export type ServerFrame = WelcomeFrame | UserMessageFrame | ListSessionsFrame | DeleteSessionFrame | FetchHistoryFrame | PongFrame | ErrorFrame;
165
+ export interface InboundEnvelope {
166
+ seq: number;
167
+ clientMessageId: string;
168
+ conversationId: string;
169
+ text: string;
170
+ sentAt: number;
171
+ /** Per-session routing tag from the originating user_message (v2 flat sessions). */
172
+ sessionKey?: string;
173
+ }
174
+ export interface DeleteSessionResult {
175
+ success: boolean;
176
+ error?: string;
177
+ }
178
+ export interface AdapterCallbacks {
179
+ /** Called for every inbound user_message AFTER the adapter has updated lastAckSeq. */
180
+ onMessage(envelope: InboundEnvelope): Promise<void> | void;
181
+ /** Called once after a successful welcome (initial connect AND every reconnect). */
182
+ onConnected(welcome: WelcomeFrame): void;
183
+ /** Called when the socket closes; reconnect will follow unless fatal=true. */
184
+ onDisconnected(info: {
185
+ fatal: boolean;
186
+ reason: string;
187
+ }): void;
188
+ /**
189
+ * Called for each inbound `list_sessions` frame. The handler returns
190
+ * the set of session-keys currently on disk (bare, without the
191
+ * `earzbook-app:` prefix). The adapter wraps them in a `sessions_list`
192
+ * frame and sends it back to the app.
193
+ */
194
+ onListSessions?(): Promise<string[]>;
195
+ /**
196
+ * Called for each inbound `delete_session` frame. The handler resolves
197
+ * the trajectory file on disk and removes it. The adapter sends a
198
+ * `delete_session_ack` carrying the returned success/error fields.
199
+ */
200
+ onDeleteSession?(frame: {
201
+ sessionKey: string;
202
+ }): Promise<DeleteSessionResult>;
203
+ /**
204
+ * Called for each inbound `fetch_history` frame. The handler reads the
205
+ * session's on-disk trajectory .jsonl and returns its user+assistant
206
+ * messages. The adapter wraps them in a `history` frame back to the app
207
+ * (used to restore chats after the user cleared app data / re-paired).
208
+ */
209
+ onFetchHistory?(frame: {
210
+ sessionKey: string;
211
+ }): Promise<{
212
+ messages: OpenClawHistoryMessage[];
213
+ error?: string;
214
+ }>;
215
+ }
216
+ export interface SidecarConfig {
217
+ /** wss:// or ws:// URL of the Earzbook backend relay. */
218
+ relayUrl: string;
219
+ /** Long-lived device token issued at pairing time. Treated as opaque. */
220
+ deviceToken: string;
221
+ /** Earzbook user id this sidecar is bound to. */
222
+ userId: string;
223
+ /** OpenClaw agent id to dispatch inbound messages to (typically "main"). */
224
+ agentId: string;
225
+ /** HTTPS URL to GET for version-check polling. */
226
+ versionEndpoint: string;
227
+ /** Optional override for ping interval (ms). Default 30_000. */
228
+ pingIntervalMs?: number;
229
+ /** Optional override for reconnect base delay (ms). Default 3_000. */
230
+ reconnectBaseMs?: number;
231
+ /** Optional override for reconnect max delay (ms). Default 300_000 (5 min). */
232
+ reconnectMaxMs?: number;
233
+ /** Optional override for openclaw agent spawn timeout (ms). Default 120_000. */
234
+ agentTimeoutMs?: number;
235
+ }
236
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAIlC,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,MAAM,CAAC,EAAE;QACP,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,KAAK,CAAC;IACZ,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,qFAAqF;IACrF,cAAc,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC;IACb,wFAAwF;IACxF,OAAO,EAAE,OAAO,CAAC;IACjB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,C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AAC;CACzB"}
package/dist/types.js ADDED
@@ -0,0 +1,22 @@
1
+ // Frame and message types exchanged between the Earzbook sidecar (running
2
+ // on the user's machine) and the Earzbook backend relay
3
+ // (recall_backend/websocket/openclaw-relay.js).
4
+ //
5
+ // Wire protocol (JSON over WebSocket) — same as the plugin path:
6
+ // client → server : hello | ack | agent_reply | sessions_list | delete_session_ack | history | ping
7
+ // server → client : welcome | user_message | list_sessions | delete_session | fetch_history | pong | error
8
+ //
9
+ // All frames are JSON objects with a `type` discriminator. The sidecar
10
+ // presents itself as `role: "plugin"` so the relay routes app messages
11
+ // here exactly as it would route them to the channel plugin.
12
+ //
13
+ // v2 (flat sessions): `user_message` + `agent_reply` carry `sessionKey`
14
+ // (per-chat AI-memory isolation: `--session-key earzbook-app:<sessionKey>`).
15
+ // `list_sessions` (app→sidecar) + `sessions_list` (sidecar→app) drives
16
+ // the per-chat strict lock: the app marks a chat 🔒 when its sessionKey
17
+ // is NOT in the sidecar's reported set (i.e. the trajectory file isn't
18
+ // on this machine). `delete_session` cascade-deletes a chat's files.
19
+ // `deviceId` was removed from frames — flat model routes by sessionKey
20
+ // only; the relay still enforces one-plugin-per-user.
21
+ export const PROTOCOL_VERSION = 1;
22
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,wDAAwD;AACxD,gDAAgD;AAChD,EAAE;AACF,iEAAiE;AACjE,sGAAsG;AACtG,6GAA6G;AAC7G,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,6DAA6D;AAC7D,EAAE;AACF,wEAAwE;AACxE,6EAA6E;AAC7E,uEAAuE;AACvE,wEAAwE;AACxE,uEAAuE;AACvE,qEAAqE;AACrE,uEAAuE;AACvE,sDAAsD;AAEtD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@earzbook/openclaw",
3
+ "version": "0.1.0",
4
+ "description": "Earzbook ↔ OpenClaw sidecar daemon. Bridges the Earzbook mobile app to a locally-running OpenClaw agent via a WebSocket relay.",
5
+ "type": "module",
6
+ "bin": {
7
+ "earzbook-openclaw": "./dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "README.md",
12
+ "LICENSE"
13
+ ],
14
+ "main": "./dist/index.js",
15
+ "engines": {
16
+ "node": ">=18"
17
+ },
18
+ "scripts": {
19
+ "build": "tsc -p tsconfig.json && node ./scripts/post-build.mjs",
20
+ "watch": "tsc -p tsconfig.json --watch",
21
+ "clean": "rm -rf dist",
22
+ "test": "node --test --import tsx 'tests/*.test.ts'",
23
+ "lint": "tsc --noEmit",
24
+ "prepublishOnly": "npm run clean && npm run build && npm test"
25
+ },
26
+ "dependencies": {
27
+ "ws": "^8.18.0"
28
+ },
29
+ "devDependencies": {
30
+ "@types/node": "^22.10.0",
31
+ "@types/ws": "^8.5.13",
32
+ "tsx": "^4.19.0",
33
+ "typescript": "^5.6.0"
34
+ },
35
+ "keywords": [
36
+ "earzbook",
37
+ "openclaw",
38
+ "sidecar",
39
+ "websocket",
40
+ "chat-bridge"
41
+ ],
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/earzbook/earzbook.git",
45
+ "directory": "openclaw/earzbook-sidecar"
46
+ },
47
+ "license": "MIT"
48
+ }