@ai-setting/roy-agent-core 1.5.40 → 1.5.41

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-728h32vx.js";
7
+ } from "../../shared/@ai-setting/roy-agent-core-psvwzdhj.js";
8
8
  import {
9
9
  BUILT_IN_EVENT_SOURCE_TYPES,
10
10
  BUILT_IN_EVENT_SOURCE_TYPE_LIST,
@@ -15,7 +15,7 @@ import {
15
15
  validateEventSourceConfig
16
16
  } from "../../shared/@ai-setting/roy-agent-core-xb4hvk1m.js";
17
17
  import"../../shared/@ai-setting/roy-agent-core-dxbsc1zy.js";
18
- import"../../shared/@ai-setting/roy-agent-core-2x07feb7.js";
18
+ import"../../shared/@ai-setting/roy-agent-core-e9fdm13a.js";
19
19
  import"../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
20
20
  import"../../shared/@ai-setting/roy-agent-core-92z6t4he.js";
21
21
  import"../../shared/@ai-setting/roy-agent-core-q5qj0fes.js";
package/dist/env/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  EventSourceComponent,
11
11
  builtInHandlers,
12
12
  larkCliHandler
13
- } from "../shared/@ai-setting/roy-agent-core-728h32vx.js";
13
+ } from "../shared/@ai-setting/roy-agent-core-psvwzdhj.js";
14
14
  import {
15
15
  EventSourceInitHooks,
16
16
  getDefaultConfigForType,
@@ -22,7 +22,7 @@ import"../shared/@ai-setting/roy-agent-core-dxbsc1zy.js";
22
22
  import {
23
23
  PluginComponent
24
24
  } from "../shared/@ai-setting/roy-agent-core-cevpwnq7.js";
25
- import"../shared/@ai-setting/roy-agent-core-2x07feb7.js";
25
+ import"../shared/@ai-setting/roy-agent-core-e9fdm13a.js";
26
26
  import"../shared/@ai-setting/roy-agent-core-az13yzmc.js";
27
27
  import {
28
28
  WorkflowComponent
@@ -8,7 +8,7 @@ import {
8
8
  formatExtractorInput,
9
9
  formatExtractorInputFromDescription,
10
10
  parseExtractorOutput
11
- } from "../../../shared/@ai-setting/roy-agent-core-2x07feb7.js";
11
+ } from "../../../shared/@ai-setting/roy-agent-core-e9fdm13a.js";
12
12
  import"../../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
13
13
  import"../../../shared/@ai-setting/roy-agent-core-92z6t4he.js";
14
14
  import"../../../shared/@ai-setting/roy-agent-core-q5qj0fes.js";
package/dist/index.js CHANGED
@@ -68,7 +68,7 @@ import {
68
68
  builtInHandlers,
69
69
  getBuiltInHandler,
70
70
  larkCliHandler
71
- } from "./shared/@ai-setting/roy-agent-core-728h32vx.js";
71
+ } from "./shared/@ai-setting/roy-agent-core-psvwzdhj.js";
72
72
  import {
73
73
  BUILT_IN_EVENT_SOURCE_TYPES,
74
74
  BUILT_IN_EVENT_SOURCE_TYPE_LIST,
@@ -87,7 +87,7 @@ import {
87
87
  } from "./shared/@ai-setting/roy-agent-core-cevpwnq7.js";
88
88
  import {
89
89
  TaskTagPlugin
90
- } from "./shared/@ai-setting/roy-agent-core-2x07feb7.js";
90
+ } from "./shared/@ai-setting/roy-agent-core-e9fdm13a.js";
91
91
  import {
92
92
  BasePlugin
93
93
  } from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
@@ -522,7 +522,6 @@ ${content}`;
522
522
  sendLarkMessage(options) {
523
523
  return new Promise((resolve, reject) => {
524
524
  const { chatId, messageId, content } = options;
525
- const contentJson = JSON.stringify({ text: content });
526
525
  let args;
527
526
  if (messageId) {
528
527
  args = [
@@ -530,8 +529,8 @@ ${content}`;
530
529
  "+messages-reply",
531
530
  "--message-id",
532
531
  messageId,
533
- "--text",
534
- contentJson,
532
+ "--markdown",
533
+ content,
535
534
  "--as",
536
535
  "bot"
537
536
  ];
@@ -541,8 +540,8 @@ ${content}`;
541
540
  "+messages-send",
542
541
  "--chat-id",
543
542
  chatId,
544
- "--text",
545
- contentJson
543
+ "--markdown",
544
+ content
546
545
  ];
547
546
  }
548
547
  const proc = spawn("lark-cli", args, {
@@ -596,35 +595,38 @@ ${content}`;
596
595
  }
597
596
  }
598
597
  formatTaskCreated(task) {
599
- const lines = [
600
- `**标题**: ${task.title || "无标题"}`
601
- ];
598
+ const lines = [];
599
+ if (task.title) {
600
+ lines.push(`- **标题**: ${task.title}`);
601
+ }
602
602
  if (task.description) {
603
- lines.push(`**描述**: ${task.description.substring(0, 100)}${task.description.length > 100 ? "..." : ""}`);
603
+ const desc = task.description.substring(0, 100) + (task.description.length > 100 ? "..." : "");
604
+ lines.push(`- **描述**: ${desc}`);
604
605
  }
605
606
  if (task.priority) {
606
- lines.push(`**优先级**: ${task.priority}`);
607
+ lines.push(`- **优先级**: ${task.priority}`);
607
608
  }
608
609
  return lines.join(`
609
610
  `);
610
611
  }
611
612
  formatTaskUpdate(task, changes) {
612
- const lines = [
613
- `**标题**: ${task.title || "无标题"}`,
614
- `**ID**: ${task.id}`
615
- ];
613
+ const lines = [];
614
+ if (task.title) {
615
+ lines.push(`- **标题**: ${task.title}`);
616
+ }
617
+ lines.push(`- **ID**: ${task.id}`);
616
618
  if (changes?.status) {
617
- lines.push(`**状态**: ${changes.status}`);
619
+ lines.push(`- **状态**: ${changes.status}`);
618
620
  }
619
621
  if (changes?.progress !== undefined) {
620
- lines.push(`**进度**: ${changes.progress}%`);
622
+ lines.push(`- **进度**: ${changes.progress}%`);
621
623
  }
622
624
  if (changes?.current_status) {
623
- lines.push(`**当前状态**: ${changes.current_status}`);
625
+ lines.push(`- **当前状态**: ${changes.current_status}`);
624
626
  }
625
627
  const changeKeys = Object.keys(changes || {}).filter((k) => !["status", "progress", "current_status"].includes(k));
626
628
  if (changeKeys.length > 0) {
627
- lines.push(`**变更**: ${changeKeys.join(", ")}`);
629
+ lines.push(`- **变更**: ${changeKeys.join(", ")}`);
628
630
  }
629
631
  return lines.join(`
630
632
  `);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TaskTagPlugin,
3
3
  createLarkCliTaskNotifyHook
4
- } from "./roy-agent-core-2x07feb7.js";
4
+ } from "./roy-agent-core-e9fdm13a.js";
5
5
  import {
6
6
  envKeyToConfigKey
7
7
  } from "./roy-agent-core-qxhq8ven.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-agent-core",
3
- "version": "1.5.40",
3
+ "version": "1.5.41",
4
4
  "type": "module",
5
5
  "description": "Core SDK for roy-agent - Environment, Components, Tools, Sessions, Tasks",
6
6
  "main": "./dist/index.js",