[PR #3] [MERGED] feat: middleware and util #18

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

📋 Pull Request Information

Original PR: https://github.com/run-llama/workflows-ts/pull/3
Author: @himself65
Created: 3/17/2025
Status: Merged
Merged: 3/17/2025
Merged by: @himself65

Base: mainHead: parse


📝 Commits (2)

📊 Changes

21 files changed (+272 additions, -43 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 demo/hono/app.ts (+1 -1)
📝 demo/node/file-parse-agent.ts (+1 -1)
demo/node/llama-parse-workflow.ts (+13 -0)
📝 demo/node/tool-call-agent.ts (+1 -1)
📝 demo/package.json (+3 -1)
📝 demo/tsconfig.json (+1 -0)
📝 demo/workflows/file-parse-agent.ts (+0 -1)
demo/workflows/llama-parse-workflow.ts (+86 -0)
📝 packages/fluere/package.json (+10 -0)
📝 packages/fluere/src/core/event.ts (+6 -2)
📝 packages/fluere/src/core/index.ts (+1 -0)
📝 packages/fluere/src/middleware/log.ts (+35 -23)
packages/fluere/src/middleware/store.ts (+34 -0)
packages/fluere/src/util/p-retry.ts (+18 -0)
📝 packages/fluere/src/util/zod.ts (+8 -3)
📝 packages/fluere/tests/middleware.test.ts (+6 -7)
📝 packages/fluere/tests/snapshot.test.ts (+1 -1)
📝 packages/fluere/tsconfig.json (+0 -1)
📝 packages/fluere/tsup.config.ts (+10 -1)

...and 1 more files

📄 Description

Concept

  • Interrupter decices how to run a workflow, like promiseHandler will await until reach stopEvent,
  • Middleware is the wrapper of the workflow, will change the behavior of the whole workflow, like extends class, but it more like the idea from zustand
  • Util is smaller piece of the functions, like zodEvent only check event with zod schema, pRetryHandler will retry a single handler

🔄 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/3 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/17/2025 **Status:** ✅ Merged **Merged:** 3/17/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `main` ← **Head:** `parse` --- ### 📝 Commits (2) - [`1a60b1f`](https://github.com/run-llama/workflows-ts/commit/1a60b1fd29c68b5b706d617ac7bbe64889129af9) feat: `middleware` and `util` - [`21e4f0d`](https://github.com/run-llama/workflows-ts/commit/21e4f0d57e650badd11bfc0854535def98d1e446) fix: bundler ### 📊 Changes **21 files changed** (+272 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `demo/hono/app.ts` (+1 -1) 📝 `demo/node/file-parse-agent.ts` (+1 -1) ➕ `demo/node/llama-parse-workflow.ts` (+13 -0) 📝 `demo/node/tool-call-agent.ts` (+1 -1) 📝 `demo/package.json` (+3 -1) 📝 `demo/tsconfig.json` (+1 -0) 📝 `demo/workflows/file-parse-agent.ts` (+0 -1) ➕ `demo/workflows/llama-parse-workflow.ts` (+86 -0) 📝 `packages/fluere/package.json` (+10 -0) 📝 `packages/fluere/src/core/event.ts` (+6 -2) 📝 `packages/fluere/src/core/index.ts` (+1 -0) 📝 `packages/fluere/src/middleware/log.ts` (+35 -23) ➕ `packages/fluere/src/middleware/store.ts` (+34 -0) ➕ `packages/fluere/src/util/p-retry.ts` (+18 -0) 📝 `packages/fluere/src/util/zod.ts` (+8 -3) 📝 `packages/fluere/tests/middleware.test.ts` (+6 -7) 📝 `packages/fluere/tests/snapshot.test.ts` (+1 -1) 📝 `packages/fluere/tsconfig.json` (+0 -1) 📝 `packages/fluere/tsup.config.ts` (+10 -1) _...and 1 more files_ </details> ### 📄 Description ## Concept - Interrupter decices how to run a workflow, like `promiseHandler` will await until reach `stopEvent`, - Middleware is the wrapper of the `workflow`, will change the behavior of the whole workflow, like `extends class`, but it more like the idea from [zustand](https://github.com/pmndrs/zustand) - Util is smaller piece of the functions, like `zodEvent` only check event with zod schema, `pRetryHandler` will retry a single handler --- <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:15:57 -05:00
yindo closed this issue 2026-02-16 03:15:57 -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#18