Skip to content

refactor(#2801): primary (String) -> Any? overload on LiveShow.from…#78

Merged
Skobeltsyn merged 1 commit into
mainfrom
refactor/2801-operator-overloads
May 30, 2026
Merged

refactor(#2801): primary (String) -> Any? overload on LiveShow.from…#78
Skobeltsyn merged 1 commit into
mainfrom
refactor/2801-operator-overloads

Conversation

@Skobeltsyn
Copy link
Copy Markdown
Contributor

… + LiveRunner.serve

Adds a primary lambda-taking from / serve overload alongside the six existing typed overloads. Future operator types (Swarm, Stage, Branch-of-Branch, …) call the primary overload directly — no edit to LiveShow / LiveRunner required:

LiveShow.from(myAgent::invokeSuspend) { theme = LiveShowTheme.NONE }
LiveRunner.serve(myPipeline::invokeSuspend, args)

Source-compat preserved — the typed from(Agent, ...) / from(Pipeline, ...) / etc overloads all stay and continue to delegate to the same buildShow / run helpers.

Deferred to follow-up (out of scope for this maintainability pass — flagged honestly):

  • Pipeline.then 17-overload unification + StreamableExec primitive for consistent emitter threading. Many of the 17 overloads predate streaming, and #1872's PipelineSessionExtension documents the gap; resolving it cleanly needs a streaming-aware then primitive and a deprecation cycle for non-streaming overloads. Larger than a maintainability slot.

Full ./gradlew test green; 254+ TEST-*.xml files, zero failures/errors.

… + LiveRunner.serve

Adds a primary lambda-taking `from` / `serve` overload alongside the
six existing typed overloads. Future operator types (Swarm, Stage,
Branch-of-Branch, …) call the primary overload directly — no edit to
LiveShow / LiveRunner required:

```kotlin
LiveShow.from(myAgent::invokeSuspend) { theme = LiveShowTheme.NONE }
LiveRunner.serve(myPipeline::invokeSuspend, args)
```

Source-compat preserved — the typed `from(Agent, ...)` / `from(Pipeline, ...)`
/ etc overloads all stay and continue to delegate to the same
`buildShow` / `run` helpers.

Deferred to follow-up (out of scope for this maintainability pass —
flagged honestly):
- `Pipeline.then` 17-overload unification + `StreamableExec` primitive
  for consistent emitter threading. Many of the 17 overloads predate
  streaming, and #1872's `PipelineSessionExtension` documents the
  gap; resolving it cleanly needs a streaming-aware `then` primitive
  and a deprecation cycle for non-streaming overloads. Larger than a
  maintainability slot.

Full ./gradlew test green; 254+ TEST-*.xml files, zero failures/errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Skobeltsyn Skobeltsyn merged commit 1c3240b into main May 30, 2026
2 of 3 checks passed
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