Skip to content

Commit

Permalink
Merge pull request #45 from statelyai/davidkpiano/fix-actor-src
Browse files Browse the repository at this point in the history
Fix reading actor logic
  • Loading branch information
davidkpiano authored Aug 4, 2024
2 parents 44064b5 + 3c271f3 commit 30bba15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-snakes-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@statelyai/agent": patch
---

Fix reading the actor logic
4 changes: 2 additions & 2 deletions src/decision.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AnyMachineSnapshot, fromPromise } from 'xstate';
import { AnyActor, AnyMachineSnapshot, fromPromise } from 'xstate';
import {
AnyAgent,
AgentDecideOptions,
Expand Down Expand Up @@ -71,7 +71,7 @@ export function fromDecision(
};

const plan = await agentDecide(agent, {
machine: parentRef.src as any,
machine: (parentRef as AnyActor).logic,
state,
execute: async (event) => {
parentRef.send(event);
Expand Down

0 comments on commit 30bba15

Please sign in to comment.