@newbase-clawchat/openclaw-clawchat 2026.5.4 → 2026.5.12-13
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.
- package/INSTALL.md +64 -0
- package/README.md +121 -19
- package/dist/index.js +10 -19
- package/dist/setup-entry.js +3 -0
- package/dist/src/api-client.js +78 -10
- package/dist/src/api-types.test-d.js +10 -0
- package/dist/src/channel.js +25 -156
- package/dist/src/channel.setup.js +120 -0
- package/dist/src/client.js +37 -41
- package/dist/src/config.js +75 -17
- package/dist/src/inbound.js +79 -61
- package/dist/src/login.runtime.js +84 -19
- package/dist/src/media-runtime.js +8 -8
- package/dist/src/message-mapper.js +1 -1
- package/dist/src/mock-transport.js +31 -0
- package/dist/src/outbound.js +410 -26
- package/dist/src/protocol-types.js +63 -0
- package/dist/src/protocol-types.typecheck.js +1 -0
- package/dist/src/protocol.js +2 -7
- package/dist/src/reply-dispatcher.js +157 -54
- package/dist/src/runtime.js +795 -119
- package/dist/src/storage.js +689 -0
- package/dist/src/tools-schema.js +98 -16
- package/dist/src/tools.js +422 -135
- package/dist/src/ws-alignment.js +178 -0
- package/dist/src/ws-client.js +588 -0
- package/dist/src/ws-log.js +19 -0
- package/index.ts +10 -22
- package/openclaw.plugin.json +37 -2
- package/package.json +17 -4
- package/setup-entry.ts +4 -0
- package/skills/clawchat/SKILL.md +88 -0
- package/src/api-client.test.ts +274 -14
- package/src/api-client.ts +138 -23
- package/src/api-types.test-d.ts +12 -0
- package/src/api-types.ts +90 -4
- package/src/buffered-stream.test.ts +14 -12
- package/src/buffered-stream.ts +1 -1
- package/src/channel.outbound.test.ts +269 -60
- package/src/channel.setup.ts +146 -0
- package/src/channel.test.ts +130 -24
- package/src/channel.ts +30 -186
- package/src/client.test.ts +197 -11
- package/src/client.ts +50 -57
- package/src/config.test.ts +108 -6
- package/src/config.ts +95 -24
- package/src/inbound.test.ts +288 -37
- package/src/inbound.ts +96 -84
- package/src/login.runtime.test.ts +347 -13
- package/src/login.runtime.ts +105 -23
- package/src/manifest.test.ts +146 -74
- package/src/media-runtime.test.ts +57 -2
- package/src/media-runtime.ts +26 -17
- package/src/message-mapper.test.ts +2 -2
- package/src/message-mapper.ts +2 -2
- package/src/mock-transport.test.ts +35 -0
- package/src/mock-transport.ts +38 -0
- package/src/outbound.test.ts +694 -73
- package/src/outbound.ts +484 -31
- package/src/plugin-entry.test.ts +1 -0
- package/src/protocol-types.test.ts +69 -0
- package/src/protocol-types.ts +296 -0
- package/src/protocol-types.typecheck.ts +89 -0
- package/src/protocol.test.ts +1 -6
- package/src/protocol.ts +2 -7
- package/src/reply-dispatcher.test.ts +819 -119
- package/src/reply-dispatcher.ts +202 -60
- package/src/runtime.test.ts +2120 -41
- package/src/runtime.ts +935 -142
- package/src/scripts.test.ts +85 -0
- package/src/storage.test.ts +793 -0
- package/src/storage.ts +1095 -0
- package/src/streaming.test.ts +9 -8
- package/src/streaming.ts +1 -1
- package/src/tools-schema.ts +148 -20
- package/src/tools.test.ts +377 -50
- package/src/tools.ts +574 -154
- package/src/ws-alignment.test.ts +103 -0
- package/src/ws-alignment.ts +275 -0
- package/src/ws-client.test.ts +1218 -0
- package/src/ws-client.ts +662 -0
- package/src/ws-log.test.ts +32 -0
- package/src/ws-log.ts +31 -0
- package/skills/clawchat-account-tools/SKILL.md +0 -26
- package/skills/clawchat-activate/SKILL.md +0 -47
package/dist/src/tools-schema.js
CHANGED
|
@@ -2,37 +2,119 @@ import { Type } from "@sinclair/typebox";
|
|
|
2
2
|
export const ClawchatGetAccountProfileSchema = Type.Object({});
|
|
3
3
|
export const ClawchatGetUserProfileSchema = Type.Object({
|
|
4
4
|
userId: Type.String({
|
|
5
|
-
description: "
|
|
5
|
+
description: "Explicit target ClawChat user id (required). Do not infer this from a nickname; use clawchat_get_account_profile for the agent's own connected ClawChat account unless an explicit userId is provided.",
|
|
6
6
|
}),
|
|
7
7
|
});
|
|
8
|
-
export const ClawchatListAccountFriendsSchema = Type.Object({
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export const ClawchatListAccountFriendsSchema = Type.Object({});
|
|
9
|
+
export const ClawchatSearchUsersSchema = Type.Object({
|
|
10
|
+
q: Type.Optional(Type.String({
|
|
11
|
+
description: "Search query for ClawChat username or nickname",
|
|
12
|
+
})),
|
|
13
|
+
limit: Type.Optional(Type.Integer({
|
|
14
|
+
minimum: 1,
|
|
15
|
+
maximum: 100,
|
|
16
|
+
description: "Max results (default 20)",
|
|
17
|
+
})),
|
|
18
|
+
});
|
|
19
|
+
export const ClawchatListConversationsSchema = Type.Object({
|
|
20
|
+
before: Type.Optional(Type.String({
|
|
21
|
+
description: "Cursor; return conversations before this value",
|
|
22
|
+
})),
|
|
23
|
+
limit: Type.Optional(Type.Integer({
|
|
11
24
|
minimum: 1,
|
|
12
25
|
maximum: 100,
|
|
13
|
-
description: "
|
|
26
|
+
description: "Max conversations to return",
|
|
27
|
+
})),
|
|
28
|
+
});
|
|
29
|
+
export const ClawchatGetConversationSchema = Type.Object({
|
|
30
|
+
conversationId: Type.String({
|
|
31
|
+
description: "Concrete ClawChat conversation id to fetch",
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
34
|
+
export const ClawchatListMomentsSchema = Type.Object({
|
|
35
|
+
before: Type.Optional(Type.Integer({
|
|
36
|
+
minimum: 1,
|
|
37
|
+
description: "Cursor; return moments with id < before",
|
|
14
38
|
})),
|
|
39
|
+
limit: Type.Optional(Type.Integer({
|
|
40
|
+
minimum: 1,
|
|
41
|
+
maximum: 100,
|
|
42
|
+
description: "Max items (default 30)",
|
|
43
|
+
})),
|
|
44
|
+
});
|
|
45
|
+
export const ClawchatCreateMomentSchema = Type.Object({
|
|
46
|
+
text: Type.Optional(Type.String({
|
|
47
|
+
description: "Moment text. At least one of text or images is required.",
|
|
48
|
+
})),
|
|
49
|
+
images: Type.Optional(Type.Array(Type.String({
|
|
50
|
+
description: "Image URL for the moment. Upload local files first; do not pass local paths.",
|
|
51
|
+
}))),
|
|
52
|
+
});
|
|
53
|
+
export const ClawchatDeleteMomentSchema = Type.Object({
|
|
54
|
+
momentId: Type.Integer({
|
|
55
|
+
minimum: 1,
|
|
56
|
+
description: "Concrete ClawChat moment id to delete",
|
|
57
|
+
}),
|
|
58
|
+
});
|
|
59
|
+
export const ClawchatToggleMomentReactionSchema = Type.Object({
|
|
60
|
+
momentId: Type.Integer({
|
|
61
|
+
minimum: 1,
|
|
62
|
+
description: "Concrete ClawChat moment id to react to",
|
|
63
|
+
}),
|
|
64
|
+
emoji: Type.String({
|
|
65
|
+
description: "Emoji reaction to toggle",
|
|
66
|
+
}),
|
|
67
|
+
});
|
|
68
|
+
export const ClawchatCreateMomentCommentSchema = Type.Object({
|
|
69
|
+
momentId: Type.Integer({
|
|
70
|
+
minimum: 1,
|
|
71
|
+
description: "Concrete ClawChat moment id to comment on",
|
|
72
|
+
}),
|
|
73
|
+
text: Type.String({
|
|
74
|
+
description: "Top-level comment text",
|
|
75
|
+
}),
|
|
76
|
+
});
|
|
77
|
+
export const ClawchatReplyMomentCommentSchema = Type.Object({
|
|
78
|
+
momentId: Type.Integer({
|
|
79
|
+
minimum: 1,
|
|
80
|
+
description: "Concrete ClawChat moment id containing the comment",
|
|
81
|
+
}),
|
|
82
|
+
replyToCommentId: Type.Integer({
|
|
83
|
+
minimum: 1,
|
|
84
|
+
description: "Concrete comment id being replied to",
|
|
85
|
+
}),
|
|
86
|
+
text: Type.String({
|
|
87
|
+
description: "Reply text",
|
|
88
|
+
}),
|
|
89
|
+
});
|
|
90
|
+
export const ClawchatDeleteMomentCommentSchema = Type.Object({
|
|
91
|
+
momentId: Type.Integer({
|
|
92
|
+
minimum: 1,
|
|
93
|
+
description: "Concrete ClawChat moment id containing the comment",
|
|
94
|
+
}),
|
|
95
|
+
commentId: Type.Integer({
|
|
96
|
+
minimum: 1,
|
|
97
|
+
description: "Concrete comment id to delete",
|
|
98
|
+
}),
|
|
15
99
|
});
|
|
16
100
|
export const ClawchatUpdateAccountProfileSchema = Type.Object({
|
|
17
|
-
nickname: Type.Optional(Type.String({
|
|
101
|
+
nickname: Type.Optional(Type.String({
|
|
102
|
+
description: "New nickname/display name for the agent's connected ClawChat account, mirroring the local assistant identity",
|
|
103
|
+
})),
|
|
18
104
|
avatar_url: Type.Optional(Type.String({
|
|
19
|
-
description: "Avatar URL for the ClawChat account profile (use clawchat_upload_avatar_image first to obtain one from a local image)",
|
|
105
|
+
description: "Avatar URL for the agent's connected ClawChat account profile (use clawchat_upload_avatar_image first to obtain one from a local image)",
|
|
106
|
+
})),
|
|
107
|
+
bio: Type.Optional(Type.String({
|
|
108
|
+
description: "New self-introduction / bio text for the agent's connected ClawChat account, mirroring the local assistant identity",
|
|
20
109
|
})),
|
|
21
|
-
bio: Type.Optional(Type.String({ description: "New ClawChat account self-introduction / bio text" })),
|
|
22
110
|
});
|
|
23
111
|
export const ClawchatUploadMediaFileSchema = Type.Object({
|
|
24
112
|
filePath: Type.String({
|
|
25
|
-
description: "Absolute local path of the media/file to upload to ClawChat (max 20MB)",
|
|
113
|
+
description: "Absolute local path of the non-avatar media/file to upload to ClawChat for a ClawChat-accessible URL (max 20MB)",
|
|
26
114
|
}),
|
|
27
115
|
});
|
|
28
116
|
export const ClawchatUploadAvatarImageSchema = Type.Object({
|
|
29
117
|
filePath: Type.String({
|
|
30
|
-
description: "Absolute local path of the avatar image to upload
|
|
31
|
-
}),
|
|
32
|
-
});
|
|
33
|
-
export const ClawchatActivateSchema = Type.Object({
|
|
34
|
-
code: Type.String({
|
|
35
|
-
description: "The invite code (six uppercase letters/digits, e.g. 'A1B2C3') extracted from the user's message. " +
|
|
36
|
-
"Whitespace is trimmed automatically.",
|
|
118
|
+
description: "Absolute local path of the avatar image to upload for the agent's connected ClawChat account (max 20MB)",
|
|
37
119
|
}),
|
|
38
120
|
});
|