Commit fb8de90
Add workflow-streams sample (#470)
* Add workflow-streams sample
Ports the five scenarios from samples-python/workflow_streams to TypeScript,
using the @temporalio/workflow-streams contrib package (currently on the
contrib/pubsub branch of sdk-typescript). Covers basic publish/subscribe,
reconnecting subscriber, external (non-Activity) publisher, bounded log via
truncate(), and LLM token streaming with retry handling.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Use published Temporal SDK 1.18.0 for workflow-streams sample
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Add AI SDK team as code owners for AI samples
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Pin nanoid to ^3.3.8 and add workflow-streams to pnpm lockfile
Resolves semgrep supply-chain findings (CVE-2021-23566, CVE-2024-55565)
flagged on the workflow-streams sample, which was missing from the
workspace lockfile.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Register workflow-streams in shared-files sync; fix pre-push without TTY
- Add workflow-streams to list-of-samples.json so the pre-push hook's
copy-shared-files script no longer prompts on every push.
- Exclude workflow-streams from .eslintrc.js sync (it adds
src/llm-workflows.ts to the workflow lint rules) and from .post-create
sync (its run command is `npm run workflow.publisher`).
- Skip the /dev/tty redirect in the pre-push hook when no terminal is
attached, so pushes from IDE integrations and CI don't fail with
"/dev/tty: Device not configured".
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Revert pre-push hook change
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Apply suggestion from @brianstrauch
* Apply suggestion from @brianstrauch
* Re-resolve next to 16.2.9 to fix lint-format-build
The lockfile had pinned next@16.3.0-preview.0 (briefly published as
"latest"), whose @next/swc-* binaries were never published, causing a
404 during next build in CI.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Don't number the scenarios in the workflow-streams README
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Add tests for the workflow-streams sample
Mirrors the Go sample's coverage: time-skipping unit tests for the
order, pipeline, hub, ticker, and llmStreaming workflows, plus a
dev-server integration test that subscribes to the order workflow's
status and progress topics end to end. Runs in CI.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0abaf50 commit fb8de90
30 files changed
Lines changed: 3874 additions & 2356 deletions
File tree
- .github
- workflows
- .scripts
- workflow-streams
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments