Version Packages (alpha) - #89
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to next, this PR will be updated.
nextis currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exitonnext.Releases
@statelyai/agent@2.0.0-alpha.15
Minor Changes
#88
d857a8aThanks @davidkpiano! - Machine input is validated against its schema, and defaulted fields are optional at the call site.XState's
schemasare types only — it never validates, and it resolvesschemas.inputto one type shared bycreateActor'sinputoption and thecontext: ({ input })factory. A field declared with a default was therefore both absent at runtime and required at the call site.runAgent/createAgentActornow validateoptions.inputagainst the machine's declared input schema before the actor starts: defaults are filled and transforms applied, and the resolved value is what reaches the actor, the replayable event log, and therun.starttrace — so a replay reproduces the run even if a default is computed. Invalid input throws anAgentErrorwith codeinvalid-machine-input(like a mismatched resume snapshot; the actor never starts). Omittinginputentirely still skips validation.Standard Schema throughout — no validation library is referenced, so this works with whatever the machine was declared with.
Types:
runAgent'sinputis nowAgentInputFrom<TMachine>, which reads the schema's pre-validation side (~standard.types.input) while the context factory keeps the validated side. Machines reached through.provide(...)lose the brand and fall back to xstate'sInputFrom. New exported type helpers:AgentInputFrom,InferInput.@statelyai/agent-demo@0.0.1-alpha.3
Patch Changes
d857a8a]:@statelyai/example-cloudflare-agent-host@0.0.1-alpha.3
Patch Changes
d857a8a]:@statelyai/example-cloudflare-workers-ai-host@0.0.1-alpha.3
Patch Changes
d857a8a]:@statelyai/example-next-host@0.0.1-alpha.3
Patch Changes
d857a8a]:@statelyai/example-tanstack-ai-stream@0.0.1-alpha.3
Patch Changes
d857a8a]:@statelyai/example-tanstack-start-host@0.0.1-alpha.3
Patch Changes
d857a8a]: