Skip to content

@xstate/webmcp@0.1.0-beta.2

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 06 Dec 08:29
· 6 commits to next since this release
8d42e24

Patch Changes

  • f0830c5: Custom tools whose execute function declares the context parameter no longer fail to typecheck with "Type instantiation is excessively deep and possibly infinite" on TypeScript 5.4 to 5.6 when the target is a large machine actor.

    createWebMCP(appActor, {
      events: [],
      tools: ({ tool }) => ({
        search_notes: tool({
          description: 'Search notes by keyword.',
          input: z.object({ value: z.string() }),
          execute: async ({ value }, { send, waitFor }) => {
            send({ type: 'search', value });
            return (await waitFor((s) => !s.hasTag('loading'))).context.notes;
          }
        })
      })
    });