From cf8a1b43d4c5c6e6f563109cd18582b54f38a036 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 16 Mar 2024 14:49:14 +0000 Subject: [PATCH] Version Packages --- .changeset/soft-readers-attend.md | 28 ---------------------------- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 30 insertions(+), 29 deletions(-) delete mode 100644 .changeset/soft-readers-attend.md diff --git a/.changeset/soft-readers-attend.md b/.changeset/soft-readers-attend.md deleted file mode 100644 index 30babd5..0000000 --- a/.changeset/soft-readers-attend.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -'@statelyai/agent': patch ---- - -The `createSchemas(…)` function has been removed. The `defineEvents(…)` function should be used instead, as it is a simpler way of defining events and event schemas using Zod: - -```ts -import { defineEvents } from '@statelyai/agent'; -import { z } from 'zod'; -import { setup } from 'xstate'; - -const events = defineEvents({ - inc: z.object({ - by: z.number().describe('Increment amount'), - }), -}); - -const machine = setup({ - types: { - events: events.types, - }, - schema: { - events: events.schemas, - }, -}).createMachine({ - // ... -}); -``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c96bc6..f7de70d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # @statelyai/agent +## 0.0.8 + +### Patch Changes + +- [#22](https://github.com/statelyai/agent/pull/22) [`8a2c34b`](https://github.com/statelyai/agent/commit/8a2c34b8a99161bf47c72df8eed3f5d3b6a19f5f) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The `createSchemas(…)` function has been removed. The `defineEvents(…)` function should be used instead, as it is a simpler way of defining events and event schemas using Zod: + + ```ts + import { defineEvents } from "@statelyai/agent"; + import { z } from "zod"; + import { setup } from "xstate"; + + const events = defineEvents({ + inc: z.object({ + by: z.number().describe("Increment amount"), + }), + }); + + const machine = setup({ + types: { + events: events.types, + }, + schema: { + events: events.schemas, + }, + }).createMachine({ + // ... + }); + ``` + ## 0.0.7 ### Patch Changes diff --git a/package.json b/package.json index 6fd914c..7fcf97b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@statelyai/agent", - "version": "0.0.7", + "version": "0.0.8", "description": "", "main": "dist/index.js", "module": "dist/index.mjs",