@ai-setting/roy-agent-core 1.5.60 → 1.5.61

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.
@@ -4,7 +4,7 @@ import {
4
4
  builtInHandlers,
5
5
  getBuiltInHandler,
6
6
  larkCliHandler
7
- } from "../../shared/@ai-setting/roy-agent-core-s2zz85a9.js";
7
+ } from "../../shared/@ai-setting/roy-agent-core-c4a0rte6.js";
8
8
  import {
9
9
  BUILT_IN_EVENT_SOURCE_TYPES,
10
10
  BUILT_IN_EVENT_SOURCE_TYPE_LIST,
package/dist/env/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  EventSourceComponent,
6
6
  builtInHandlers,
7
7
  larkCliHandler
8
- } from "../shared/@ai-setting/roy-agent-core-s2zz85a9.js";
8
+ } from "../shared/@ai-setting/roy-agent-core-c4a0rte6.js";
9
9
  import {
10
10
  EventSourceInitHooks,
11
11
  getDefaultConfigForType,
package/dist/index.js CHANGED
@@ -63,7 +63,7 @@ import {
63
63
  builtInHandlers,
64
64
  getBuiltInHandler,
65
65
  larkCliHandler
66
- } from "./shared/@ai-setting/roy-agent-core-s2zz85a9.js";
66
+ } from "./shared/@ai-setting/roy-agent-core-c4a0rte6.js";
67
67
  import {
68
68
  BUILT_IN_EVENT_SOURCE_TYPES,
69
69
  BUILT_IN_EVENT_SOURCE_TYPE_LIST,
@@ -459,7 +459,8 @@ class LarkCliInstance {
459
459
  chatId: replyChannel.chatId,
460
460
  userId: replyChannel.params?.userId,
461
461
  content: markdown,
462
- as: "bot"
462
+ as: "bot",
463
+ format: "markdown"
463
464
  });
464
465
  },
465
466
  sendMessage: async (content) => {
@@ -483,14 +484,15 @@ class LarkCliInstance {
483
484
  }
484
485
  async sendLarkMessage(options) {
485
486
  return new Promise((resolve, reject) => {
486
- const { chatId, userId, messageId, content, as: identity } = options;
487
+ const { chatId, userId, messageId, content, as: identity, format = "text" } = options;
488
+ const contentFlag = format === "markdown" ? "--markdown" : "--text";
487
489
  const args = ["im", "+messages-send", "--as", identity];
488
490
  if (messageId) {
489
- args.push("+messages-reply", "--message-id", messageId, "--text", content);
491
+ args.push("+messages-reply", "--message-id", messageId, contentFlag, content);
490
492
  } else if (chatId) {
491
- args.push("--chat-id", chatId, "--text", content);
493
+ args.push("--chat-id", chatId, contentFlag, content);
492
494
  } else if (userId) {
493
- args.push("--user-id", userId, "--text", content);
495
+ args.push("--user-id", userId, contentFlag, content);
494
496
  } else {
495
497
  reject(new Error("No target specified for sending message"));
496
498
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-agent-core",
3
- "version": "1.5.60",
3
+ "version": "1.5.61",
4
4
  "type": "module",
5
5
  "description": "Core SDK for roy-agent - Environment, Components, Tools, Sessions, Tasks",
6
6
  "main": "./dist/index.js",