Skip to content

Add a shared channel context type for orchestrion integrations #25173

Description

@andreiborza

Almost every orchestrion integration in packages/server-utils/src/integrations/ defines its own *ChannelContext interface. About 29 files have one (for example typesafe.ts, google-genai.ts, postgres.ts, dataloader.ts, amqplib.ts, mastra-classifier.ts).

All of them describe the same orchestrion payload: arguments: unknown[], plus some of self?, result?, error? and moduleVersion?. Some integrations make the types narrower (for example self?: KnexRunner or arguments: [TediousRequest?, ...unknown[]]).

Add one generic type in orchestrion/ (for example OrchestrionChannelContext<TArgs = unknown[], TSelf = unknown, TResult = unknown>) and use it in the integrations. Integrations that need more fields can extend it.

Found in review: #25044 (comment)

Activity

  1. linear-code commented on Oct 8, 2026

    @linear-code
  2. self-assigned this
    on Oct 9, 2026
  3. added a commit that references this issue on Oct 9, 2026
    31717a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions