@statelyai/agent 1.1.4 → 1.1.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @statelyai/agent
2
2
 
3
+ ## 1.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#54](https://github.com/statelyai/agent/pull/54) [`140fdce`](https://github.com/statelyai/agent/commit/140fdceb879dea5a32f243e89a8d87a9c524e454) Thanks [@XavierDK](https://github.com/XavierDK)! - - Addressing an issue where the fullStream property was not properly copied when using the spread operator (...). The problem occurred because fullStream is an iterator, and as such, it was not included in the shallow copy of the result object.
8
+ - Update all packages
9
+
10
+ ## 1.1.5
11
+
12
+ ### Patch Changes
13
+
14
+ - [#49](https://github.com/statelyai/agent/pull/49) [`ae505d5`](https://github.com/statelyai/agent/commit/ae505d56b432a92875699507fb694628ef4d773d) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Update `ai` package
15
+
3
16
  ## 1.1.4
4
17
 
5
18
  ### Patch Changes
package/dist/index.js CHANGED
@@ -202,8 +202,11 @@ async function agentStreamText(agent, options) {
202
202
  usage: res.usage,
203
203
  warnings: res.warnings,
204
204
  rawResponse: res.rawResponse,
205
- roundtrips: []
206
- // TODO: how do we get this information?
205
+ roundtrips: [],
206
+ // TODO: how do we get this information?,
207
+ steps: res.steps,
208
+ response: res.response,
209
+ experimental_providerMetadata: res.experimental_providerMetadata
207
210
  },
208
211
  content: res.text,
209
212
  id: randomId(),
@@ -216,6 +219,8 @@ async function agentStreamText(agent, options) {
216
219
  });
217
220
  return {
218
221
  ...result,
222
+ textStream: result.textStream,
223
+ fullStream: result.fullStream,
219
224
  parentCorrelationId: resolvedOptions.parentCorrelationId,
220
225
  correlationId: resolvedOptions.correlationId
221
226
  };
package/dist/index.mjs CHANGED
@@ -170,8 +170,11 @@ async function agentStreamText(agent, options) {
170
170
  usage: res.usage,
171
171
  warnings: res.warnings,
172
172
  rawResponse: res.rawResponse,
173
- roundtrips: []
174
- // TODO: how do we get this information?
173
+ roundtrips: [],
174
+ // TODO: how do we get this information?,
175
+ steps: res.steps,
176
+ response: res.response,
177
+ experimental_providerMetadata: res.experimental_providerMetadata
175
178
  },
176
179
  content: res.text,
177
180
  id: randomId(),
@@ -184,6 +187,8 @@ async function agentStreamText(agent, options) {
184
187
  });
185
188
  return {
186
189
  ...result,
190
+ textStream: result.textStream,
191
+ fullStream: result.fullStream,
187
192
  parentCorrelationId: resolvedOptions.parentCorrelationId,
188
193
  correlationId: resolvedOptions.correlationId
189
194
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statelyai/agent",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Stateful agents that make decisions based on finite-state machine models",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -16,18 +16,18 @@
16
16
  "license": "MIT",
17
17
  "devDependencies": {
18
18
  "@changesets/changelog-github": "^0.5.0",
19
- "@changesets/cli": "^2.27.7",
19
+ "@changesets/cli": "^2.27.8",
20
20
  "@langchain/community": "^0.0.53",
21
21
  "@langchain/core": "^0.1.63",
22
22
  "@langchain/openai": "^0.0.28",
23
- "@types/node": "^20.14.14",
23
+ "@types/node": "^20.16.9",
24
24
  "@types/object-hash": "^3.0.6",
25
25
  "dotenv": "^16.4.5",
26
- "json-schema-to-ts": "^3.1.0",
26
+ "json-schema-to-ts": "^3.1.1",
27
27
  "ts-node": "^10.9.2",
28
- "tsup": "^8.2.4",
29
- "typescript": "^5.5.4",
30
- "vitest": "^2.0.5",
28
+ "tsup": "^8.3.0",
29
+ "typescript": "^5.6.2",
30
+ "vitest": "^2.1.1",
31
31
  "wikipedia": "^2.1.2",
32
32
  "zod": "^3.23.8"
33
33
  },
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@ai-sdk/openai": "^0.0.40",
39
- "@xstate/graph": "^2.0.0",
40
- "ai": "^3.3.0",
39
+ "@xstate/graph": "^2.0.1",
40
+ "ai": "^3.4.6",
41
41
  "object-hash": "^3.0.0",
42
- "xstate": "^5.17.1"
42
+ "xstate": "^5.18.2"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "tsup src/index.ts --format cjs,esm --dts",
package/src/text.ts CHANGED
@@ -153,7 +153,10 @@ export async function agentStreamText(
153
153
  usage: res.usage,
154
154
  warnings: res.warnings,
155
155
  rawResponse: res.rawResponse,
156
- roundtrips: [], // TODO: how do we get this information?
156
+ roundtrips: [], // TODO: how do we get this information?,
157
+ steps: res.steps,
158
+ response: res.response,
159
+ experimental_providerMetadata: res.experimental_providerMetadata,
157
160
  },
158
161
  content: res.text,
159
162
  id: randomId(),
@@ -167,6 +170,8 @@ export async function agentStreamText(
167
170
 
168
171
  return {
169
172
  ...result,
173
+ textStream: result.textStream,
174
+ fullStream: result.fullStream,
170
175
  parentCorrelationId: resolvedOptions.parentCorrelationId,
171
176
  correlationId: resolvedOptions.correlationId,
172
177
  } as unknown as AgentStreamTextResult; // TODO: fix