@pmate/cli 0.24.10 → 0.24.11
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/dist/index.d.ts +4 -0
- package/dist/index.js +16 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -575,6 +575,10 @@ type ChatRoomCommandArgs = (ChatRoomCommonArgs & {
|
|
|
575
575
|
to: string;
|
|
576
576
|
requestId?: string;
|
|
577
577
|
message?: string;
|
|
578
|
+
}) | (ChatRoomCommonArgs & {
|
|
579
|
+
action: "delete-friend";
|
|
580
|
+
to: string;
|
|
581
|
+
reason?: string;
|
|
578
582
|
}) | (ChatRoomCommonArgs & {
|
|
579
583
|
action: "send";
|
|
580
584
|
to: string;
|
package/dist/index.js
CHANGED
|
@@ -16076,6 +16076,10 @@ var ChatRoomCommandHandler = class {
|
|
|
16076
16076
|
await client.acceptFriend({ to: args.to, requestId: args.requestId, message: args.message });
|
|
16077
16077
|
ui.success("friend request accepted");
|
|
16078
16078
|
return;
|
|
16079
|
+
case "delete-friend":
|
|
16080
|
+
await client.removeFriend({ to: args.to, reason: args.reason });
|
|
16081
|
+
ui.success("friend deleted");
|
|
16082
|
+
return;
|
|
16079
16083
|
case "send":
|
|
16080
16084
|
await client.sendDm({ to: args.to, text: args.text });
|
|
16081
16085
|
ui.success("message sent");
|
|
@@ -16108,6 +16112,7 @@ var ChatRoomCommandHandler = class {
|
|
|
16108
16112
|
const groupId = `smoke-${Date.now()}`;
|
|
16109
16113
|
await a.createGroup({ groupId, members: [botB.name], title: "Smoke Group" });
|
|
16110
16114
|
await a.sendGroup({ groupId, text: "smoke group message", recipients: [botB.name] });
|
|
16115
|
+
await a.removeFriend({ to: botB.name, reason: "smoke cleanup" });
|
|
16111
16116
|
ui.success("chat-room smoke passed");
|
|
16112
16117
|
} finally {
|
|
16113
16118
|
a.close();
|
|
@@ -23334,7 +23339,7 @@ function parseChatRoomArgs(tokens) {
|
|
|
23334
23339
|
const rest = [...tokens];
|
|
23335
23340
|
const action = rest.shift();
|
|
23336
23341
|
if (!action) {
|
|
23337
|
-
throw new Error("Usage: chat-room <join|request-friend|accept-friend|send|group-create|group-send|smoke>");
|
|
23342
|
+
throw new Error("Usage: chat-room <join|request-friend|accept-friend|delete-friend|send|group-create|group-send|smoke>");
|
|
23338
23343
|
}
|
|
23339
23344
|
const parsed = parseShared(rest);
|
|
23340
23345
|
const { options, multiOptions, ...shared } = parsed;
|
|
@@ -23368,6 +23373,14 @@ function parseChatRoomArgs(tokens) {
|
|
|
23368
23373
|
requestId: options.get("--request-id"),
|
|
23369
23374
|
message: options.get("--message")
|
|
23370
23375
|
};
|
|
23376
|
+
case "delete-friend":
|
|
23377
|
+
return {
|
|
23378
|
+
type: "chat-room" /* ChatRoom */,
|
|
23379
|
+
action,
|
|
23380
|
+
...withBot(shared, options),
|
|
23381
|
+
to: requiredOption(options, "--to"),
|
|
23382
|
+
reason: options.get("--reason")
|
|
23383
|
+
};
|
|
23371
23384
|
case "send":
|
|
23372
23385
|
return {
|
|
23373
23386
|
type: "chat-room" /* ChatRoom */,
|
|
@@ -23413,6 +23426,7 @@ function parseShared(tokens) {
|
|
|
23413
23426
|
case "--auth-base-url":
|
|
23414
23427
|
case "--to":
|
|
23415
23428
|
case "--message":
|
|
23429
|
+
case "--reason":
|
|
23416
23430
|
case "--request-id":
|
|
23417
23431
|
case "--text":
|
|
23418
23432
|
case "--group":
|
|
@@ -23630,7 +23644,7 @@ var HELP_TEXT = [
|
|
|
23630
23644
|
` ${import_chalk4.default.cyan("collect")} Collect threads/messages from Electron chat app via CDP`,
|
|
23631
23645
|
` ${import_chalk4.default.gray(" sync (--source <cc|yelling> | --endpoint <url>)")}`,
|
|
23632
23646
|
` ${import_chalk4.default.cyan("chat-room")} Run social chat regression commands with PMate bot key JSON`,
|
|
23633
|
-
` ${import_chalk4.default.gray(" join|request-friend|accept-friend|send|group-create|group-send|smoke --app <ns:app> --bot <file>")}`,
|
|
23647
|
+
` ${import_chalk4.default.gray(" join|request-friend|accept-friend|delete-friend|send|group-create|group-send|smoke --app <ns:app> --bot <file>")}`,
|
|
23634
23648
|
` ${import_chalk4.default.cyan("agent")} Manage agent registry entries and call agents for debugging`,
|
|
23635
23649
|
` ${import_chalk4.default.gray(" namespaces [--base-url <url>] [--json]")}`,
|
|
23636
23650
|
` ${import_chalk4.default.gray(" list [--namespace <ns>] [--base-url <url>] [--json]")}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pmate/cli",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.11",
|
|
4
4
|
"description": "CLI utilities for the pMate project",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@alicloud/openapi-client": "^0.4.15",
|
|
41
41
|
"@alicloud/sts20150401": "^1.2.0",
|
|
42
42
|
"@linear/sdk": "^70.0.0",
|
|
43
|
-
"@pmate/chat-sdk": "^0.1.
|
|
43
|
+
"@pmate/chat-sdk": "^0.1.9",
|
|
44
44
|
"@types/ali-oss": "^6.16.13",
|
|
45
45
|
"ajv": "^8.17.1",
|
|
46
46
|
"ali-oss": "^6.23.0",
|