@sider-ai/chrome-openclaw-sider 1.0.31

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 (61) hide show
  1. package/README.md +75 -0
  2. package/README.zh_CN.md +108 -0
  3. package/dist/account-cW9SLuNu.d.ts +75 -0
  4. package/dist/index.d.ts +12 -0
  5. package/dist/index.js +87 -0
  6. package/dist/setup-entry.d.ts +6 -0
  7. package/dist/setup-entry.js +11 -0
  8. package/dist/setup-plugin-api.d.ts +7 -0
  9. package/dist/setup-plugin-api.js +4 -0
  10. package/dist/src/account.d.ts +6 -0
  11. package/dist/src/account.js +260 -0
  12. package/dist/src/auth.d.ts +30 -0
  13. package/dist/src/auth.js +225 -0
  14. package/dist/src/channel-auto-title.d.ts +6 -0
  15. package/dist/src/channel-auto-title.js +102 -0
  16. package/dist/src/channel-builders.d.ts +105 -0
  17. package/dist/src/channel-builders.js +238 -0
  18. package/dist/src/channel-hooks.d.ts +30 -0
  19. package/dist/src/channel-hooks.js +380 -0
  20. package/dist/src/channel-monitor.d.ts +34 -0
  21. package/dist/src/channel-monitor.js +335 -0
  22. package/dist/src/channel-parts.d.ts +26 -0
  23. package/dist/src/channel-parts.js +32 -0
  24. package/dist/src/channel-relay.d.ts +117 -0
  25. package/dist/src/channel-relay.js +574 -0
  26. package/dist/src/channel-runtime.d.ts +33 -0
  27. package/dist/src/channel-runtime.js +138 -0
  28. package/dist/src/channel-send-result.d.ts +19 -0
  29. package/dist/src/channel-send-result.js +126 -0
  30. package/dist/src/channel-send.d.ts +73 -0
  31. package/dist/src/channel-send.js +291 -0
  32. package/dist/src/channel-session-model.d.ts +19 -0
  33. package/dist/src/channel-session-model.js +244 -0
  34. package/dist/src/channel-shared.d.ts +153 -0
  35. package/dist/src/channel-shared.js +96 -0
  36. package/dist/src/channel-state.d.ts +93 -0
  37. package/dist/src/channel-state.js +475 -0
  38. package/dist/src/channel-streaming.d.ts +117 -0
  39. package/dist/src/channel-streaming.js +681 -0
  40. package/dist/src/channel-types.d.ts +209 -0
  41. package/dist/src/channel-types.js +40 -0
  42. package/dist/src/channel-typing.d.ts +17 -0
  43. package/dist/src/channel-typing.js +79 -0
  44. package/dist/src/channel-util.d.ts +78 -0
  45. package/dist/src/channel-util.js +604 -0
  46. package/dist/src/channel.d.ts +14 -0
  47. package/dist/src/channel.js +834 -0
  48. package/dist/src/channel.setup.d.ts +10 -0
  49. package/dist/src/channel.setup.js +9 -0
  50. package/dist/src/config.d.ts +18 -0
  51. package/dist/src/config.js +38 -0
  52. package/dist/src/inbound-media.d.ts +37 -0
  53. package/dist/src/inbound-media.js +148 -0
  54. package/dist/src/media-upload.d.ts +87 -0
  55. package/dist/src/media-upload.js +1308 -0
  56. package/dist/src/setup-core.d.ts +72 -0
  57. package/dist/src/setup-core.js +343 -0
  58. package/dist/src/user-agent.d.ts +4 -0
  59. package/dist/src/user-agent.js +6 -0
  60. package/openclaw.plugin.json +96 -0
  61. package/package.json +47 -0
@@ -0,0 +1,72 @@
1
+ import { OpenClawConfig, ChannelSetupInput, ChannelSetupAdapter } from 'openclaw/plugin-sdk/setup';
2
+
3
+ declare const SIDER_PAIR_REQUEST_API_PATH = "/v1/claws/pair/request";
4
+ declare const SIDER_PAIR_STATUS_API_PATH = "/v1/claws/pair/status";
5
+ declare const SIDER_EXTENSION_INSTALL_URL = "https://chromewebstore.google.com/detail/sider-chat-with-all-ai-gp/difoiogjjojoaoomphldepapgpbgkhkb?utm_source=openclaw";
6
+ type SiderPairStatusResponse = {
7
+ status: "pending";
8
+ } | {
9
+ status: "paired";
10
+ claw_id: string;
11
+ token: string;
12
+ };
13
+ type SiderPairingSession = {
14
+ pairingCode: string;
15
+ pairingToken: string;
16
+ expiresAt: number;
17
+ pollIntervalMs: number;
18
+ };
19
+ type SiderPairingResult = {
20
+ clawId: string;
21
+ token: string;
22
+ };
23
+ declare class SiderPairingExpiredError extends Error {
24
+ constructor(message?: string);
25
+ }
26
+ declare class SiderPairingTransientError extends Error {
27
+ constructor(message: string);
28
+ }
29
+ declare function formatSiderPairingTtl(remainingMs: number): string;
30
+ declare function formatSiderPairingPendingMessage(params: {
31
+ pairingCode: string;
32
+ remainingMs: number;
33
+ }): string;
34
+ declare function formatSiderPairingRetryMessage(params: {
35
+ pairingCode: string;
36
+ remainingMs: number;
37
+ retryAfterMs: number;
38
+ detail: string;
39
+ }): string;
40
+ declare function createSiderPairingPendingUpdateReporter(params: {
41
+ pairingCode: string;
42
+ report: (message: string) => void | Promise<void>;
43
+ intervalMs?: number;
44
+ }): (state: {
45
+ remainingMs: number;
46
+ pollIntervalMs: number;
47
+ }) => void | Promise<void>;
48
+ declare function applySiderSetupAccountConfig(params: {
49
+ cfg: OpenClawConfig;
50
+ accountId: string;
51
+ input: Pick<ChannelSetupInput, "name" | "token">;
52
+ }): OpenClawConfig;
53
+ declare const siderSetupAdapter: ChannelSetupAdapter;
54
+ declare function requestSiderPairing(): Promise<SiderPairingSession>;
55
+ declare function readSiderPairingStatus(pairingToken: string): Promise<SiderPairStatusResponse | {
56
+ status: "expired";
57
+ }>;
58
+ declare function waitForSiderPairing(params: {
59
+ pairing: SiderPairingSession;
60
+ onPending?: (state: {
61
+ remainingMs: number;
62
+ pollIntervalMs: number;
63
+ }) => void | Promise<void>;
64
+ onRetryableError?: (message: string) => void | Promise<void>;
65
+ }): Promise<SiderPairingResult>;
66
+ declare function formatSiderPairingInstructions(params: {
67
+ pairingCode: string;
68
+ leadLine?: string;
69
+ }): string;
70
+ declare function getSiderSetupChannelId(): string;
71
+
72
+ export { SIDER_EXTENSION_INSTALL_URL, SIDER_PAIR_REQUEST_API_PATH, SIDER_PAIR_STATUS_API_PATH, SiderPairingExpiredError, type SiderPairingResult, type SiderPairingSession, SiderPairingTransientError, applySiderSetupAccountConfig, createSiderPairingPendingUpdateReporter, formatSiderPairingInstructions, formatSiderPairingPendingMessage, formatSiderPairingRetryMessage, formatSiderPairingTtl, getSiderSetupChannelId, readSiderPairingStatus, requestSiderPairing, siderSetupAdapter, waitForSiderPairing };
@@ -0,0 +1,343 @@
1
+ import {
2
+ DEFAULT_ACCOUNT_ID,
3
+ normalizeAccountId
4
+ } from "openclaw/plugin-sdk/setup";
5
+ import {
6
+ cloneOpenClawConfig,
7
+ formatAuthorizationHeader,
8
+ resolveSiderApiUrl,
9
+ resolveWritableSiderAccountConfig
10
+ } from "./auth.js";
11
+ import { SIDER_CHANNEL_ID } from "./config.js";
12
+ import { SIDER_USER_AGENT } from "./user-agent.js";
13
+ const SIDER_PAIR_REQUEST_API_PATH = "/v1/claws/pair/request";
14
+ const SIDER_PAIR_STATUS_API_PATH = "/v1/claws/pair/status";
15
+ const SIDER_EXTENSION_INSTALL_URL = "https://chromewebstore.google.com/detail/sider-chat-with-all-ai-gp/difoiogjjojoaoomphldepapgpbgkhkb?utm_source=openclaw";
16
+ const DEFAULT_POLL_INTERVAL_MS = 5e3;
17
+ const DEFAULT_PENDING_UPDATE_INTERVAL_MS = 3e4;
18
+ const ANSI_ESCAPE = "\x1B";
19
+ const ANSI_RESET = `${ANSI_ESCAPE}[0m`;
20
+ const ANSI_BOLD = `${ANSI_ESCAPE}[1m`;
21
+ const ANSI_CODE_COLOR = `${ANSI_ESCAPE}[38;5;214m`;
22
+ class SiderPairingExpiredError extends Error {
23
+ constructor(message = "Sider pairing code expired") {
24
+ super(message);
25
+ this.name = "SiderPairingExpiredError";
26
+ }
27
+ }
28
+ class SiderPairingTransientError extends Error {
29
+ constructor(message) {
30
+ super(message);
31
+ this.name = "SiderPairingTransientError";
32
+ }
33
+ }
34
+ function trimMaybe(value) {
35
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
36
+ }
37
+ function readJsonObject(payload, errorMessage) {
38
+ if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
39
+ throw new Error(errorMessage);
40
+ }
41
+ return payload;
42
+ }
43
+ function parsePairRequestResponse(payload) {
44
+ const data = readJsonObject(payload, "selfclaw pairing response is not a JSON object");
45
+ const pairingCode = trimMaybe(data.pairing_code);
46
+ const pairingToken = trimMaybe(data.pairing_token);
47
+ const expiresAt = typeof data.expires_at === "number" && Number.isFinite(data.expires_at) ? data.expires_at : 0;
48
+ const pollInterval = typeof data.poll_interval === "number" && Number.isFinite(data.poll_interval) ? Math.floor(data.poll_interval) : void 0;
49
+ if (!pairingCode || !pairingToken || expiresAt <= 0) {
50
+ throw new Error("selfclaw pairing response missing pairing_code/pairing_token/expires_at");
51
+ }
52
+ return {
53
+ pairing_code: pairingCode,
54
+ pairing_token: pairingToken,
55
+ expires_at: expiresAt,
56
+ poll_interval: pollInterval
57
+ };
58
+ }
59
+ function parsePairStatusResponse(payload) {
60
+ const data = readJsonObject(payload, "selfclaw pairing status is not a JSON object");
61
+ const status = trimMaybe(data.status);
62
+ if (status === "pending") {
63
+ return { status: "pending" };
64
+ }
65
+ if (status === "paired") {
66
+ const clawId = trimMaybe(data.claw_id);
67
+ const token = trimMaybe(data.token);
68
+ if (!clawId || !token) {
69
+ throw new Error("selfclaw pairing status missing claw_id/token");
70
+ }
71
+ return {
72
+ status: "paired",
73
+ claw_id: clawId,
74
+ token
75
+ };
76
+ }
77
+ throw new Error("selfclaw pairing status missing valid status");
78
+ }
79
+ async function parseErrorDetail(response) {
80
+ try {
81
+ const text = (await response.text()).trim();
82
+ return text ? `: ${text}` : "";
83
+ } catch {
84
+ return "";
85
+ }
86
+ }
87
+ async function readJsonResponse(response) {
88
+ try {
89
+ return await response.json();
90
+ } catch {
91
+ return null;
92
+ }
93
+ }
94
+ function sleep(ms) {
95
+ return new Promise((resolve) => setTimeout(resolve, ms));
96
+ }
97
+ function describeUnknownError(error) {
98
+ if (error instanceof Error && error.message) {
99
+ return error.message;
100
+ }
101
+ return String(error);
102
+ }
103
+ function isRetryableFetchError(error) {
104
+ if (!(error instanceof Error)) {
105
+ return false;
106
+ }
107
+ if (error.name === "TypeError" && /fetch failed/i.test(error.message)) {
108
+ return true;
109
+ }
110
+ const cause = "cause" in error ? error.cause : void 0;
111
+ const causeCode = cause && typeof cause === "object" && "code" in cause && typeof cause.code === "string" ? cause.code : void 0;
112
+ return Boolean(
113
+ causeCode && [
114
+ "ECONNRESET",
115
+ "ECONNREFUSED",
116
+ "EHOSTUNREACH",
117
+ "ENETUNREACH",
118
+ "ENOTFOUND",
119
+ "ETIMEDOUT",
120
+ "UND_ERR_CONNECT_TIMEOUT",
121
+ "UND_ERR_HEADERS_TIMEOUT",
122
+ "UND_ERR_BODY_TIMEOUT",
123
+ "UND_ERR_SOCKET"
124
+ ].includes(causeCode)
125
+ );
126
+ }
127
+ function supportsTerminalFormatting() {
128
+ return Boolean(process.stdout.isTTY);
129
+ }
130
+ function stripAnsiEscapes(value) {
131
+ return value.replaceAll(ANSI_ESCAPE, "");
132
+ }
133
+ function formatTerminalLink(url, label = url) {
134
+ const safeUrl = stripAnsiEscapes(url);
135
+ const safeLabel = stripAnsiEscapes(label);
136
+ if (!supportsTerminalFormatting()) {
137
+ return safeUrl;
138
+ }
139
+ return `\x1B]8;;${safeUrl}\x07${safeLabel}\x1B]8;;\x07`;
140
+ }
141
+ function formatHighlightedPairingCode(pairingCode) {
142
+ const safePairingCode = stripAnsiEscapes(pairingCode);
143
+ if (!supportsTerminalFormatting()) {
144
+ return safePairingCode;
145
+ }
146
+ return `${ANSI_BOLD}${ANSI_CODE_COLOR}${safePairingCode}${ANSI_RESET}`;
147
+ }
148
+ function formatSiderExtensionInstallLink() {
149
+ return formatTerminalLink(SIDER_EXTENSION_INSTALL_URL);
150
+ }
151
+ function formatSiderPairingTtl(remainingMs) {
152
+ const totalSeconds = Math.max(0, Math.ceil(remainingMs / 1e3));
153
+ const minutes = Math.floor(totalSeconds / 60);
154
+ const seconds = totalSeconds % 60;
155
+ return `${minutes}:${String(seconds).padStart(2, "0")}`;
156
+ }
157
+ function formatSiderPairingPendingMessage(params) {
158
+ return `Waiting for connection... Pairing code: ${formatHighlightedPairingCode(params.pairingCode)}. Pairing code expires in ${formatSiderPairingTtl(params.remainingMs)}.`;
159
+ }
160
+ function formatSiderPairingRetryMessage(params) {
161
+ return `Temporary connection issue while checking pairing status (${params.detail}). Retrying in ${formatSiderPairingTtl(params.retryAfterMs)}. Pairing code: ${formatHighlightedPairingCode(params.pairingCode)}. Pairing code expires in ${formatSiderPairingTtl(params.remainingMs)}.`;
162
+ }
163
+ function createSiderPairingPendingUpdateReporter(params) {
164
+ const intervalMs = Math.max(1e3, Math.floor(params.intervalMs ?? DEFAULT_PENDING_UPDATE_INTERVAL_MS));
165
+ let lastReportedAt = Date.now();
166
+ let hasReported = false;
167
+ return async ({ remainingMs }) => {
168
+ const now = Date.now();
169
+ const shouldReport = hasReported ? now - lastReportedAt >= intervalMs : now - lastReportedAt >= intervalMs || remainingMs <= intervalMs;
170
+ if (!shouldReport) {
171
+ return;
172
+ }
173
+ hasReported = true;
174
+ lastReportedAt = now;
175
+ await params.report(
176
+ formatSiderPairingPendingMessage({
177
+ pairingCode: params.pairingCode,
178
+ remainingMs
179
+ })
180
+ );
181
+ };
182
+ }
183
+ function applySiderSetupAccountConfig(params) {
184
+ const next = cloneOpenClawConfig(params.cfg);
185
+ const accountCfg = resolveWritableSiderAccountConfig(next, params.accountId);
186
+ const token = trimMaybe(params.input.token);
187
+ const name = trimMaybe(params.input.name);
188
+ if (name) {
189
+ accountCfg.name = name;
190
+ }
191
+ if (token) {
192
+ accountCfg.token = token;
193
+ }
194
+ delete accountCfg.setupToken;
195
+ accountCfg.enabled = true;
196
+ return next;
197
+ }
198
+ const siderSetupAdapter = {
199
+ resolveAccountId: ({ accountId }) => normalizeAccountId(accountId) ?? DEFAULT_ACCOUNT_ID,
200
+ validateInput: ({ input }) => {
201
+ if (input.useEnv) {
202
+ return "Sider setup does not support --use-env.";
203
+ }
204
+ return null;
205
+ },
206
+ applyAccountConfig: ({ cfg, accountId, input }) => applySiderSetupAccountConfig({
207
+ cfg,
208
+ accountId,
209
+ input
210
+ })
211
+ };
212
+ async function requestSiderPairing() {
213
+ const url = resolveSiderApiUrl(SIDER_PAIR_REQUEST_API_PATH);
214
+ const response = await fetch(url, {
215
+ method: "POST",
216
+ headers: {
217
+ "User-Agent": SIDER_USER_AGENT
218
+ }
219
+ });
220
+ if (!response.ok) {
221
+ throw new Error(
222
+ `selfclaw pairing request failed (${url} ${response.status} ${response.statusText})${await parseErrorDetail(response)}`
223
+ );
224
+ }
225
+ const parsed = parsePairRequestResponse(await readJsonResponse(response));
226
+ return {
227
+ pairingCode: parsed.pairing_code,
228
+ pairingToken: parsed.pairing_token,
229
+ expiresAt: parsed.expires_at,
230
+ pollIntervalMs: parsed.poll_interval && parsed.poll_interval > 0 ? parsed.poll_interval * 1e3 : DEFAULT_POLL_INTERVAL_MS
231
+ };
232
+ }
233
+ async function readSiderPairingStatus(pairingToken) {
234
+ const url = resolveSiderApiUrl(SIDER_PAIR_STATUS_API_PATH);
235
+ let response;
236
+ try {
237
+ response = await fetch(url, {
238
+ method: "GET",
239
+ headers: {
240
+ Authorization: formatAuthorizationHeader(pairingToken),
241
+ "User-Agent": SIDER_USER_AGENT
242
+ }
243
+ });
244
+ } catch (error) {
245
+ if (isRetryableFetchError(error)) {
246
+ throw new SiderPairingTransientError(describeUnknownError(error));
247
+ }
248
+ throw error;
249
+ }
250
+ if (response.status === 410) {
251
+ return { status: "expired" };
252
+ }
253
+ if ([502, 503, 504].includes(response.status)) {
254
+ throw new SiderPairingTransientError(
255
+ `server returned ${response.status} ${response.statusText}${await parseErrorDetail(response)}`
256
+ );
257
+ }
258
+ if (!response.ok) {
259
+ throw new Error(
260
+ `selfclaw pairing status failed (${url} ${response.status} ${response.statusText})${await parseErrorDetail(response)}`
261
+ );
262
+ }
263
+ return parsePairStatusResponse(await readJsonResponse(response));
264
+ }
265
+ async function waitForSiderPairing(params) {
266
+ const expiresAtMs = params.pairing.expiresAt * 1e3;
267
+ while (true) {
268
+ let status;
269
+ try {
270
+ status = await readSiderPairingStatus(params.pairing.pairingToken);
271
+ } catch (error) {
272
+ const remainingMs2 = Math.max(0, expiresAtMs - Date.now());
273
+ if (error instanceof SiderPairingTransientError && remainingMs2 > 0) {
274
+ const retryAfterMs = Math.min(params.pairing.pollIntervalMs, remainingMs2);
275
+ await params.onRetryableError?.(
276
+ formatSiderPairingRetryMessage({
277
+ pairingCode: params.pairing.pairingCode,
278
+ remainingMs: remainingMs2,
279
+ retryAfterMs,
280
+ detail: error.message
281
+ })
282
+ );
283
+ await sleep(retryAfterMs);
284
+ continue;
285
+ }
286
+ throw error;
287
+ }
288
+ if (status.status === "paired") {
289
+ return {
290
+ clawId: status.claw_id,
291
+ token: status.token
292
+ };
293
+ }
294
+ const remainingMs = Math.max(0, expiresAtMs - Date.now());
295
+ if (status.status === "expired" || remainingMs <= 0) {
296
+ throw new SiderPairingExpiredError();
297
+ }
298
+ await params.onPending?.({
299
+ remainingMs,
300
+ pollIntervalMs: params.pairing.pollIntervalMs
301
+ });
302
+ await sleep(Math.min(params.pairing.pollIntervalMs, remainingMs));
303
+ }
304
+ }
305
+ function formatSiderPairingInstructions(params) {
306
+ return [
307
+ params.leadLine?.trim() || "Plugin installed. One more step to connect:",
308
+ "",
309
+ "PAIRING CODE",
310
+ ` ${formatHighlightedPairingCode(params.pairingCode)}`,
311
+ "",
312
+ "CHROME EXTENSION",
313
+ ` ${formatSiderExtensionInstallLink()}`,
314
+ "",
315
+ "1. Install the Sider Chrome extension from the link above",
316
+ "2. Click the Sider icon in your browser toolbar to open the side panel",
317
+ "3. In the right sidebar, find and click the Claw icon (the paw-shaped icon, 2nd from top)",
318
+ `4. Enter the pairing code "${params.pairingCode}" and click Connect`,
319
+ "",
320
+ "I'm waiting for the connection..."
321
+ ].join("\n");
322
+ }
323
+ function getSiderSetupChannelId() {
324
+ return SIDER_CHANNEL_ID;
325
+ }
326
+ export {
327
+ SIDER_EXTENSION_INSTALL_URL,
328
+ SIDER_PAIR_REQUEST_API_PATH,
329
+ SIDER_PAIR_STATUS_API_PATH,
330
+ SiderPairingExpiredError,
331
+ SiderPairingTransientError,
332
+ applySiderSetupAccountConfig,
333
+ createSiderPairingPendingUpdateReporter,
334
+ formatSiderPairingInstructions,
335
+ formatSiderPairingPendingMessage,
336
+ formatSiderPairingRetryMessage,
337
+ formatSiderPairingTtl,
338
+ getSiderSetupChannelId,
339
+ readSiderPairingStatus,
340
+ requestSiderPairing,
341
+ siderSetupAdapter,
342
+ waitForSiderPairing
343
+ };
@@ -0,0 +1,4 @@
1
+ declare const SIDER_PLUGIN_VERSION: string;
2
+ declare const SIDER_USER_AGENT: string;
3
+
4
+ export { SIDER_PLUGIN_VERSION, SIDER_USER_AGENT };
@@ -0,0 +1,6 @@
1
+ const SIDER_PLUGIN_VERSION = "1.0.31";
2
+ const SIDER_USER_AGENT = `openclaw-sider/${SIDER_PLUGIN_VERSION}`;
3
+ export {
4
+ SIDER_PLUGIN_VERSION,
5
+ SIDER_USER_AGENT
6
+ };
@@ -0,0 +1,96 @@
1
+ {
2
+ "id": "chrome-openclaw-sider",
3
+ "channels": ["chrome-openclaw-sider"],
4
+ "channelConfigs": {
5
+ "chrome-openclaw-sider": {
6
+ "label": "Chrome channel for Openclaw by Sider",
7
+ "description": "Command your OpenClaw from Chrome Sidebar directly.",
8
+ "schema": {
9
+ "type": "object",
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "enabled": { "type": "boolean" },
13
+ "name": { "type": "string" },
14
+ "setupToken": { "type": "string" },
15
+ "token": { "type": "string" },
16
+ "autoTitle": {
17
+ "oneOf": [
18
+ { "type": "boolean" },
19
+ {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "properties": {
23
+ "enabled": { "type": "boolean" },
24
+ "prompt": { "type": "string" }
25
+ }
26
+ }
27
+ ]
28
+ },
29
+ "defaultTo": { "type": "string" },
30
+ "connectTimeoutMs": { "type": "number", "minimum": 1 },
31
+ "sendTimeoutMs": { "type": "number", "minimum": 1 },
32
+ "reconnectDelayMs": { "type": "number", "minimum": 1 },
33
+ "accounts": {
34
+ "type": "object",
35
+ "additionalProperties": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "properties": {
39
+ "enabled": { "type": "boolean" },
40
+ "name": { "type": "string" },
41
+ "setupToken": { "type": "string" },
42
+ "token": { "type": "string" },
43
+ "autoTitle": {
44
+ "oneOf": [
45
+ { "type": "boolean" },
46
+ {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "properties": {
50
+ "enabled": { "type": "boolean" },
51
+ "prompt": { "type": "string" }
52
+ }
53
+ }
54
+ ]
55
+ },
56
+ "defaultTo": { "type": "string" },
57
+ "connectTimeoutMs": { "type": "number", "minimum": 1 },
58
+ "sendTimeoutMs": { "type": "number", "minimum": 1 },
59
+ "reconnectDelayMs": { "type": "number", "minimum": 1 }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "uiHints": {
66
+ "setupToken": {
67
+ "label": "Setup token",
68
+ "sensitive": true
69
+ },
70
+ "token": {
71
+ "label": "Token",
72
+ "sensitive": true
73
+ },
74
+ "defaultTo": {
75
+ "label": "Default target",
76
+ "placeholder": "session:<sessionId>"
77
+ },
78
+ "connectTimeoutMs": {
79
+ "label": "Connect timeout (ms)"
80
+ },
81
+ "sendTimeoutMs": {
82
+ "label": "Send timeout (ms)"
83
+ },
84
+ "reconnectDelayMs": {
85
+ "label": "Reconnect delay (ms)"
86
+ }
87
+ }
88
+ }
89
+ },
90
+ "skills": [],
91
+ "configSchema": {
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "properties": {}
95
+ }
96
+ }
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@sider-ai/chrome-openclaw-sider",
3
+ "private": false,
4
+ "version": "1.0.31",
5
+ "description": "Official Chrome channel plugin for connecting OpenClaw in Sider Chrome extension",
6
+ "type": "module",
7
+ "files": [
8
+ "dist/",
9
+ "README.md",
10
+ "openclaw.plugin.json"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsup --config tsup.config.ts",
14
+ "typecheck": "tsc -p tsconfig.build.json --noEmit",
15
+ "prepublishOnly": "pnpm run typecheck && pnpm run build"
16
+ },
17
+ "dependencies": {
18
+ "ws": "^8.20.0"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^22.19.13",
22
+ "@types/ws": "^8.18.1",
23
+ "openclaw": "2026.5.12",
24
+ "tsup": "^8.5.1",
25
+ "typescript": "^5.9.3"
26
+ },
27
+ "openclaw": {
28
+ "extensions": [
29
+ "./dist/index.js"
30
+ ],
31
+ "compat": {
32
+ "pluginApi": ">=2026.3.22"
33
+ },
34
+ "build": {
35
+ "openclawVersion": "2026.5.12"
36
+ },
37
+ "setupEntry": "./dist/setup-entry.js",
38
+ "channel": {
39
+ "id": "chrome-openclaw-sider",
40
+ "label": "Chrome OpenClaw Sider",
41
+ "selectionLabel": "Chrome OpenClaw Sider"
42
+ },
43
+ "install": {
44
+ "minHostVersion": ">=2026.3.22"
45
+ }
46
+ }
47
+ }