@statelyai/agent 1.1.2 → 1.1.3

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,11 @@
1
1
  # @statelyai/agent
2
2
 
3
+ ## 1.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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
8
+
3
9
  ## 1.1.2
4
10
 
5
11
  ### 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.3",
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",
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);