Sitelet https://github.com/moedash/cli/pull/6
Skip to content

Added the temporal stream command group. - #6

Closed
moedash wants to merge 5 commits into
moe/AI-198-st-cli-0-repinfrom
moe/AI-198-st-cli-1-stream
Closed

moedash wants to merge 5 commits into
moe/AI-198-st-cli-0-repinfrom
moe/AI-198-st-cli-1-stream

Conversation

@moedash

@moedash moedash commented Oct 3, 2026

Copy link
Copy Markdown
Owner

This PR adds temporal stream, turns streams on in the dev server and documents the commands.

What changed?

  • temporal stream create, list, describe, read, append, close, truncate and delete. --stream-id names a standalone Stream. --workflow-id or --activity-id, with an optional --run-id and --name, names an owned one.
  • read starts at the beginning, --from-offset, --from-tail or --last N, filters on --topic, and --follow long-polls until the Stream closes. create takes --retention, --max-items and --max-bytes. list covers standalone Streams only, since visibility holds no owned ones.
  • describe names the channel the Stream notifies on each append and close, with its kind and owner line, so you can hand it straight to temporal channel poll. It's worked out from the reference with no extra call, for all four owner kinds.
  • A refusal that starts with one of the server's reason tokens comes back in plain words, through the refusalError the channel commands already use.
  • The stream service has no SDK client. client.go keeps the connection the SDK dials, through an interceptor, so TLS, API keys and headers match every other command. The commands apply the payload codec by hand, since the codec interceptor only walks the public API's messages.
  • temporal server start-dev sets stream.enabled. --dynamic-config-value 'stream.enabled=false' turns it off.
  • docs/stream.md covers addressing, the refusals and the dev server switch.

Part of AI-198 (epic AI-37).

Why?

It gives native Streams a terminal front, and a local server that serves them without a build from the branch. The server ships streams off so a deployment opts in, and the dev server is where you'd opt in. create lets you make a standalone Stream to close, truncate or delete. The channel card ties the two groups together: a Stream's notifications can be watched with the channel commands from the PR below.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

A unit test against a fake stream service checks the channel card for a standalone Stream, a Workflow's default and named Streams, an Activity the Workflow scheduled and a standalone Activity. The TestStream suite cases on the shared dev server cover the standalone lifecycle with each refusal, --follow ending on close, an owned Stream, list, flag checks and a standalone Stream notifying its channel. The activity case in TestChannel now also appends to the Activity's Stream and polls its linked channel. I reran the rest of SharedServerSuite and the other packages, and go mod tidy and the generators leave no diff. By hand on temporal server start-dev --headless I ran every stream command on a standalone Stream, saw its channel carry the appends and then closed=true, read a Workflow's Stream through its linked channel, and checked the channel commands still work. No test covers the codec path.

The stream service has no SDK client, so its commands need the dialed connection with its TLS,
credentials, headers and interceptors. Dialing makes a call, so an interceptor captures it.
Create, list, describe, read, append, close, truncate and delete reach a standalone Stream or one
a Workflow or Activity owns. Describe also names the channel the Stream notifies.
The server ships streams off so a deployment opts in, and the dev server exists for local
development. A dynamic config value still turns them off.
The page covers addressing, the refusals and the dev server switch in one place for people trying
streams from a terminal.
Fake-service cases pin the channel card for each owner kind, and the shared dev server cases run
the stream lifecycle, an owned Stream and the channel a Stream notifies.
@moedash

moedash commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

Paused per the 2026-10-05 design review (the decision record is on the proposal page, section 14). Resumes in phase 2 with the CHASM notification work. The branch stays as a pin.

@moedash moedash closed this Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant