@ai-setting/roy-agent-core 1.5.69 → 1.5.70

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.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  AgentComponent,
3
3
  AgentComponentConfigSchema
4
- } from "../../shared/@ai-setting/roy-agent-core-pv0812hg.js";
5
- import"../../shared/@ai-setting/roy-agent-core-wmdrsbwe.js";
4
+ } from "../../shared/@ai-setting/roy-agent-core-4hctvbr8.js";
5
+ import"../../shared/@ai-setting/roy-agent-core-ke7wmra6.js";
6
6
  import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
7
7
  import"../../shared/@ai-setting/roy-agent-core-nx3c3ce2.js";
8
8
  import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
package/dist/env/index.js CHANGED
@@ -39,8 +39,8 @@ import"../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
39
39
  import {
40
40
  AgentComponent,
41
41
  AgentComponentConfigSchema
42
- } from "../shared/@ai-setting/roy-agent-core-pv0812hg.js";
43
- import"../shared/@ai-setting/roy-agent-core-wmdrsbwe.js";
42
+ } from "../shared/@ai-setting/roy-agent-core-4hctvbr8.js";
43
+ import"../shared/@ai-setting/roy-agent-core-ke7wmra6.js";
44
44
  import"../shared/@ai-setting/roy-agent-core-e25xkv53.js";
45
45
  import {
46
46
  TaskComponent
@@ -8,13 +8,13 @@ import {
8
8
  ProviderCapabilitiesSchema,
9
9
  ProviderConfigSchema,
10
10
  ProviderManager
11
- } from "../../shared/@ai-setting/roy-agent-core-k8xx1h03.js";
11
+ } from "../../shared/@ai-setting/roy-agent-core-8e1cac6w.js";
12
12
  import {
13
13
  createInvokeConfig,
14
14
  invoke,
15
15
  invokeNonStream,
16
16
  parseModelString
17
- } from "../../shared/@ai-setting/roy-agent-core-wmdrsbwe.js";
17
+ } from "../../shared/@ai-setting/roy-agent-core-ke7wmra6.js";
18
18
  import"../../shared/@ai-setting/roy-agent-core-ctdhjv68.js";
19
19
  import"../../shared/@ai-setting/roy-agent-core-fp6f15av.js";
20
20
  import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  ModelLimitsSchema,
12
12
  ProviderCapabilitiesSchema,
13
13
  ProviderConfigSchema
14
- } from "./shared/@ai-setting/roy-agent-core-k8xx1h03.js";
14
+ } from "./shared/@ai-setting/roy-agent-core-8e1cac6w.js";
15
15
  import {
16
16
  ConfigComponent
17
17
  } from "./shared/@ai-setting/roy-agent-core-prdngx28.js";
@@ -116,13 +116,13 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
116
116
  import {
117
117
  AgentComponent,
118
118
  AgentComponentConfigSchema
119
- } from "./shared/@ai-setting/roy-agent-core-pv0812hg.js";
119
+ } from "./shared/@ai-setting/roy-agent-core-4hctvbr8.js";
120
120
  import {
121
121
  createInvokeConfig,
122
122
  invoke,
123
123
  invokeNonStream,
124
124
  parseModelString
125
- } from "./shared/@ai-setting/roy-agent-core-wmdrsbwe.js";
125
+ } from "./shared/@ai-setting/roy-agent-core-ke7wmra6.js";
126
126
  import {
127
127
  AskUserError,
128
128
  init_workflow_hil
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTimeout
3
- } from "./roy-agent-core-wmdrsbwe.js";
3
+ } from "./roy-agent-core-ke7wmra6.js";
4
4
  import {
5
5
  AskUserError,
6
6
  init_workflow_hil
@@ -111,9 +111,10 @@ function toLLMMessage(msg) {
111
111
  toolCallId = toolResult?.toolCallId;
112
112
  toolName = toolResult?.toolName;
113
113
  } else {
114
- const textParts = msg.content.filter((part) => part.type === "text");
115
114
  const toolCallParts = msg.content.filter((part) => part.type === "tool-call");
116
- content = textParts.map((part) => part.text || "").join("");
115
+ const contentParts = msg.content.filter((part) => part.type === "text" || part.type === "reasoning").map((part) => part.text || "");
116
+ content = contentParts.join(`
117
+ `);
117
118
  if (msg.role === "assistant" && toolCallParts.length > 0) {
118
119
  toolCalls = toolCallParts.map((part) => {
119
120
  const argsString = typeof part.input === "string" ? part.input : JSON.stringify(part.input || {});
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  invoke
3
- } from "./roy-agent-core-wmdrsbwe.js";
3
+ } from "./roy-agent-core-ke7wmra6.js";
4
4
  import {
5
5
  ContextError,
6
6
  ErrorCodes
@@ -113,9 +113,14 @@ function convertToSDKMessages(messages) {
113
113
  input
114
114
  };
115
115
  });
116
+ const contentParts = [];
117
+ if (msg.content) {
118
+ contentParts.push({ type: "text", text: msg.content });
119
+ }
120
+ contentParts.push(...toolCallParts);
116
121
  return {
117
122
  role: "assistant",
118
- content: toolCallParts
123
+ content: contentParts
119
124
  };
120
125
  }
121
126
  if (msg.role === "tool") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-agent-core",
3
- "version": "1.5.69",
3
+ "version": "1.5.70",
4
4
  "type": "module",
5
5
  "description": "Core SDK for roy-agent - Environment, Components, Tools, Sessions, Tasks",
6
6
  "main": "./dist/index.js",