[PR #96] [MERGED] Version Packages #102

Closed
opened 2026-02-16 03:16:11 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/workflows-ts/pull/96
Author: @github-actions[bot]
Created: 4/30/2025
Status: Merged
Merged: 4/30/2025
Merged by: @himself65

Base: mainHead: changeset-release/main


📝 Commits (2)

📊 Changes

7 files changed (+135 additions, -69 deletions)

View changed files

.changeset/hip-bags-walk.md (+0 -65)
📝 docs/package.json (+1 -1)
📝 packages/core/CHANGELOG.md (+64 -0)
📝 packages/core/jsr.json (+1 -1)
📝 packages/core/package.json (+1 -1)
📝 packages/llamaindex/CHANGELOG.md (+67 -0)
📝 packages/llamaindex/package.json (+1 -1)

📄 Description

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@llama-flow/core@0.4.0

Minor Changes

  • 1fb2d98: feat: add createStatefulMiddleware API

    Remove withState API, because its createContext API type is confusing people,
    causing people cannot figure out what does state belong to (whether context or workflow instance)

    Breaking Changes

    State Middleware API Changes (formerly Store Middleware)

    The state middleware has been significantly improved with a new API and renamed from "store" to "state". Here are the key changes:

    Before

    import { withState } from "@llama-flow/core/middleware/state";
    
    const workflow = withState(
      () => ({
        count: 0,
        history: [],
      }),
      createWorkflow(),
    );
    
    // Access state via getState()
    const state = workflow.getState();
    

    After

    import { createStatefulMiddleware } from "@llama-flow/core/middleware/state";
    
    const { withState, getContext } = createStatefulMiddleware(() => ({
      count: 0,
      history: [],
    }));
    
    const workflow = withState(createWorkflow());
    
    workflow.handle([], () => {
      const { state } = getContext();
    });
    
    // Access state via context.state
    const { state } = getContext();
    

    Migration Guide

    To migrate existing code:

    1. Replace withState import with createStatefulMiddleware
    2. Update state initialization to use the new API
    3. Replace workflow.getState() calls with getContext().state
    4. If using input parameters, update the state initialization accordingly
    5. Update all variable names from state to state in your code

    The new API provides better type safety, more flexibility with input parameters, and a more consistent way to access the state through the workflow context.

@llama-flow/docs@0.0.7

Patch Changes

  • 1fb2d98: feat: add createStatefulMiddleware API

    Remove withState API, because its createContext API type is confusing people,
    causing people cannot figure out what does state belong to (whether context or workflow instance)

    Breaking Changes

    State Middleware API Changes (formerly Store Middleware)

    The state middleware has been significantly improved with a new API and renamed from "store" to "state". Here are the key changes:

    Before

    import { withState } from "@llama-flow/core/middleware/state";
    
    const workflow = withState(
      () => ({
        count: 0,
        history: [],
      }),
      createWorkflow(),
    );
    
    // Access state via getState()
    const state = workflow.getState();
    

    After

    import { createStatefulMiddleware } from "@llama-flow/core/middleware/state";
    
    const { withState, getContext } = createStatefulMiddleware(() => ({
      count: 0,
      history: [],
    }));
    
    const workflow = withState(createWorkflow());
    
    workflow.handle([], () => {
      const { state } = getContext();
    });
    
    // Access state via context.state
    const { state } = getContext();
    

    Migration Guide

    To migrate existing code:

    1. Replace withState import with createStatefulMiddleware
    2. Update state initialization to use the new API
    3. Replace workflow.getState() calls with getContext().state
    4. If using input parameters, update the state initialization accordingly
    5. Update all variable names from state to state in your code

    The new API provides better type safety, more flexibility with input parameters, and a more consistent way to access the state through the workflow context.

@llama-flow/llamaindex@0.0.14

Patch Changes

  • 1fb2d98: feat: add createStatefulMiddleware API

    Remove withState API, because its createContext API type is confusing people,
    causing people cannot figure out what does state belong to (whether context or workflow instance)

    Breaking Changes

    State Middleware API Changes (formerly Store Middleware)

    The state middleware has been significantly improved with a new API and renamed from "store" to "state". Here are the key changes:

    Before

    import { withState } from "@llama-flow/core/middleware/state";
    
    const workflow = withState(
      () => ({
        count: 0,
        history: [],
      }),
      createWorkflow(),
    );
    
    // Access state via getState()
    const state = workflow.getState();
    

    After

    import { createStatefulMiddleware } from "@llama-flow/core/middleware/state";
    
    const { withState, getContext } = createStatefulMiddleware(() => ({
      count: 0,
      history: [],
    }));
    
    const workflow = withState(createWorkflow());
    
    workflow.handle([], () => {
      const { state } = getContext();
    });
    
    // Access state via context.state
    const { state } = getContext();
    

    Migration Guide

    To migrate existing code:

    1. Replace withState import with createStatefulMiddleware
    2. Update state initialization to use the new API
    3. Replace workflow.getState() calls with getContext().state
    4. If using input parameters, update the state initialization accordingly
    5. Update all variable names from state to state in your code

    The new API provides better type safety, more flexibility with input parameters, and a more consistent way to access the state through the workflow context.

  • Updated dependencies [1fb2d98]

    • @llama-flow/core@0.4.0

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/workflows-ts/pull/96 **Author:** [@github-actions[bot]](https://github.com/apps/github-actions) **Created:** 4/30/2025 **Status:** ✅ Merged **Merged:** 4/30/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `main` ← **Head:** `changeset-release/main` --- ### 📝 Commits (2) - [`267aa68`](https://github.com/run-llama/workflows-ts/commit/267aa68612a35b6c19018652a4ac7fd6c59607ce) Version Packages - [`195332e`](https://github.com/run-llama/workflows-ts/commit/195332e758f7d59b3c19a4c07e4c65a8e715b4bf) chore: update jsr.json ### 📊 Changes **7 files changed** (+135 additions, -69 deletions) <details> <summary>View changed files</summary> ➖ `.changeset/hip-bags-walk.md` (+0 -65) 📝 `docs/package.json` (+1 -1) 📝 `packages/core/CHANGELOG.md` (+64 -0) 📝 `packages/core/jsr.json` (+1 -1) 📝 `packages/core/package.json` (+1 -1) 📝 `packages/llamaindex/CHANGELOG.md` (+67 -0) 📝 `packages/llamaindex/package.json` (+1 -1) </details> ### 📄 Description This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @llama-flow/core@0.4.0 ### Minor Changes - 1fb2d98: feat: add `createStatefulMiddleware` API Remove `withState` API, because its createContext API type is confusing people, causing people cannot figure out what does state belong to (whether context or workflow instance) # Breaking Changes ## State Middleware API Changes (formerly Store Middleware) The state middleware has been significantly improved with a new API and renamed from "store" to "state". Here are the key changes: ### Before ```typescript import { withState } from "@llama-flow/core/middleware/state"; const workflow = withState( () => ({ count: 0, history: [], }), createWorkflow(), ); // Access state via getState() const state = workflow.getState(); ``` ### After ```typescript import { createStatefulMiddleware } from "@llama-flow/core/middleware/state"; const { withState, getContext } = createStatefulMiddleware(() => ({ count: 0, history: [], })); const workflow = withState(createWorkflow()); workflow.handle([], () => { const { state } = getContext(); }); // Access state via context.state const { state } = getContext(); ``` ### Migration Guide To migrate existing code: 1. Replace `withState` import with `createStatefulMiddleware` 2. Update state initialization to use the new API 3. Replace `workflow.getState()` calls with `getContext().state` 4. If using input parameters, update the state initialization accordingly 5. Update all variable names from `state` to `state` in your code The new API provides better type safety, more flexibility with input parameters, and a more consistent way to access the state through the workflow context. ## @llama-flow/docs@0.0.7 ### Patch Changes - 1fb2d98: feat: add `createStatefulMiddleware` API Remove `withState` API, because its createContext API type is confusing people, causing people cannot figure out what does state belong to (whether context or workflow instance) # Breaking Changes ## State Middleware API Changes (formerly Store Middleware) The state middleware has been significantly improved with a new API and renamed from "store" to "state". Here are the key changes: ### Before ```typescript import { withState } from "@llama-flow/core/middleware/state"; const workflow = withState( () => ({ count: 0, history: [], }), createWorkflow(), ); // Access state via getState() const state = workflow.getState(); ``` ### After ```typescript import { createStatefulMiddleware } from "@llama-flow/core/middleware/state"; const { withState, getContext } = createStatefulMiddleware(() => ({ count: 0, history: [], })); const workflow = withState(createWorkflow()); workflow.handle([], () => { const { state } = getContext(); }); // Access state via context.state const { state } = getContext(); ``` ### Migration Guide To migrate existing code: 1. Replace `withState` import with `createStatefulMiddleware` 2. Update state initialization to use the new API 3. Replace `workflow.getState()` calls with `getContext().state` 4. If using input parameters, update the state initialization accordingly 5. Update all variable names from `state` to `state` in your code The new API provides better type safety, more flexibility with input parameters, and a more consistent way to access the state through the workflow context. ## @llama-flow/llamaindex@0.0.14 ### Patch Changes - 1fb2d98: feat: add `createStatefulMiddleware` API Remove `withState` API, because its createContext API type is confusing people, causing people cannot figure out what does state belong to (whether context or workflow instance) # Breaking Changes ## State Middleware API Changes (formerly Store Middleware) The state middleware has been significantly improved with a new API and renamed from "store" to "state". Here are the key changes: ### Before ```typescript import { withState } from "@llama-flow/core/middleware/state"; const workflow = withState( () => ({ count: 0, history: [], }), createWorkflow(), ); // Access state via getState() const state = workflow.getState(); ``` ### After ```typescript import { createStatefulMiddleware } from "@llama-flow/core/middleware/state"; const { withState, getContext } = createStatefulMiddleware(() => ({ count: 0, history: [], })); const workflow = withState(createWorkflow()); workflow.handle([], () => { const { state } = getContext(); }); // Access state via context.state const { state } = getContext(); ``` ### Migration Guide To migrate existing code: 1. Replace `withState` import with `createStatefulMiddleware` 2. Update state initialization to use the new API 3. Replace `workflow.getState()` calls with `getContext().state` 4. If using input parameters, update the state initialization accordingly 5. Update all variable names from `state` to `state` in your code The new API provides better type safety, more flexibility with input parameters, and a more consistent way to access the state through the workflow context. - Updated dependencies [1fb2d98] - @llama-flow/core@0.4.0 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 03:16:11 -05:00
yindo closed this issue 2026-02-16 03:16:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-ts#102