[PR #89] [MERGED] feat: stream.on API #96

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

📋 Pull Request Information

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

Base: mainHead: stream.on


📝 Commits (4)

📊 Changes

4 files changed (+131 additions, -2 deletions)

View changed files

.changeset/serious-peas-tan.md (+18 -0)
📝 packages/core/src/core/context.ts (+10 -2)
packages/core/src/core/stream.ts (+78 -0)
packages/core/tests/core/listener.spec.ts (+25 -0)

📄 Description

Related: https://github.com/run-llama/llama-flow/issues/88

Support stream.on API

workflow.handle([startEvent], () => {
  const { sendEvent } = getContext();
  sendEvent(messageEvent.with("Hello World"));
});

const { stream, sendEvent } = workflow.createContext();
const unsubscribe = stream.on(messageEvent, (event) => {
  expect(event.data).toBe("Hello World");
});
sendEvent(startEvent.with());

🔄 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/89 **Author:** [@himself65](https://github.com/himself65) **Created:** 4/25/2025 **Status:** ✅ Merged **Merged:** 4/25/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `main` ← **Head:** `stream.on` --- ### 📝 Commits (4) - [`26a0cda`](https://github.com/run-llama/workflows-ts/commit/26a0cda3379a09bfd67aa9d2b5764bf7dc58367f) feat: stream on API - [`63076b4`](https://github.com/run-llama/workflows-ts/commit/63076b49ef2697e39b44a3c3da852aef3f2fde6e) fix: type - [`c631f93`](https://github.com/run-llama/workflows-ts/commit/c631f9361cb3e3af578be1cc0387d6c5be438528) fix: type - [`885d7c8`](https://github.com/run-llama/workflows-ts/commit/885d7c829c75a3276c7436ced85df2253a59b294) Create serious-peas-tan.md ### 📊 Changes **4 files changed** (+131 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/serious-peas-tan.md` (+18 -0) 📝 `packages/core/src/core/context.ts` (+10 -2) ➕ `packages/core/src/core/stream.ts` (+78 -0) ➕ `packages/core/tests/core/listener.spec.ts` (+25 -0) </details> ### 📄 Description Related: https://github.com/run-llama/llama-flow/issues/88 Support `stream.on` API ```ts workflow.handle([startEvent], () => { const { sendEvent } = getContext(); sendEvent(messageEvent.with("Hello World")); }); const { stream, sendEvent } = workflow.createContext(); const unsubscribe = stream.on(messageEvent, (event) => { expect(event.data).toBe("Hello World"); }); sendEvent(startEvent.with()); ``` --- <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:09 -05:00
yindo closed this issue 2026-02-16 03:16:09 -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#96