@statelyai/agent 1.1.2 → 1.1.4

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.
@@ -32,8 +32,6 @@ jobs:
32
32
  node-version: 20
33
33
  - name: install pnpm
34
34
  run: npm i pnpm@latest -g
35
- - name: Setup npmrc
36
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
37
35
  - name: setup pnpm config
38
36
  run: pnpm config set store-dir $PNPM_CACHE_FOLDER
39
37
  - name: install dependencies
@@ -45,3 +43,4 @@ jobs:
45
43
  version: pnpm run version
46
44
  env:
47
45
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @statelyai/agent
2
2
 
3
+ ## 1.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#47](https://github.com/statelyai/agent/pull/47) [`185c149`](https://github.com/statelyai/agent/commit/185c1498f63aef15a3194032df3dcdcb2b33d752) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Update `ai` and `xstate` packages
8
+
9
+ ## 1.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#45](https://github.com/statelyai/agent/pull/45) [`3c271f3`](https://github.com/statelyai/agent/commit/3c271f306c4ed9553c155e66cec8aa4284e9c813) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Fix reading the actor logic
14
+
3
15
  ## 1.1.2
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -398,7 +398,7 @@ function fromDecision(agent, defaultInput) {
398
398
  context: contextToInclude
399
399
  };
400
400
  const plan = await agentDecide(agent, {
401
- machine: parentRef.src,
401
+ machine: parentRef.logic,
402
402
  state,
403
403
  execute: async (event) => {
404
404
  parentRef.send(event);
package/dist/index.mjs CHANGED
@@ -366,7 +366,7 @@ function fromDecision(agent, defaultInput) {
366
366
  context: contextToInclude
367
367
  };
368
368
  const plan = await agentDecide(agent, {
369
- machine: parentRef.src,
369
+ machine: parentRef.logic,
370
370
  state,
371
371
  execute: async (event) => {
372
372
  parentRef.send(event);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statelyai/agent",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
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",
@@ -20,14 +20,14 @@
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.13",
23
+ "@types/node": "^20.14.14",
24
24
  "@types/object-hash": "^3.0.6",
25
25
  "dotenv": "^16.4.5",
26
26
  "json-schema-to-ts": "^3.1.0",
27
27
  "ts-node": "^10.9.2",
28
- "tsup": "^8.2.3",
28
+ "tsup": "^8.2.4",
29
29
  "typescript": "^5.5.4",
30
- "vitest": "^2.0.4",
30
+ "vitest": "^2.0.5",
31
31
  "wikipedia": "^2.1.2",
32
32
  "zod": "^3.23.8"
33
33
  },
@@ -37,9 +37,9 @@
37
37
  "dependencies": {
38
38
  "@ai-sdk/openai": "^0.0.40",
39
39
  "@xstate/graph": "^2.0.0",
40
- "ai": "^3.2.40",
40
+ "ai": "^3.3.0",
41
41
  "object-hash": "^3.0.0",
42
- "xstate": "^5.16.0"
42
+ "xstate": "^5.17.1"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "tsup src/index.ts --format cjs,esm --dts",
package/src/decision.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AnyMachineSnapshot, fromPromise } from 'xstate';
1
+ import { AnyActor, AnyMachineSnapshot, fromPromise } from 'xstate';
2
2
  import {
3
3
  AnyAgent,
4
4
  AgentDecideOptions,
@@ -71,7 +71,7 @@ export function fromDecision(
71
71
  };
72
72
 
73
73
  const plan = await agentDecide(agent, {
74
- machine: parentRef.src as any,
74
+ machine: (parentRef as AnyActor).logic,
75
75
  state,
76
76
  execute: async (event) => {
77
77
  parentRef.send(event);