Skip to content

Add Streaming Execution Protocol to PROTOCOL_SPEC #3

@tercel

Description

@tercel

Summary

Add a Streaming Execution Protocol section to PROTOCOL_SPEC.md defining how modules can support incremental output via an optional stream() method.

Changes

Added new section after ContextFactory Protocol covering:

  • Stream semantics: Each yielded record is a partial chunk; complete result is shallow merge of all chunks
  • Pipeline: Steps 1-6 identical to call(), then iterate module.stream(), validate accumulated output, run after-middleware
  • Fallback: If module lacks stream(), fall back to call() yielding single chunk
  • Cross-language signatures: TypeScript AsyncGenerator / Python AsyncIterator
  • MCP bridge behavior: Use notifications/progress with progressToken opt-in; final CallToolResult is accumulated result
  • Module annotations: annotations.streaming = true declares streaming support

Files Changed

  • PROTOCOL_SPEC.md — New "Streaming Execution Protocol" section after line 3885

Source

  • tiptap-apcore integration finding: streaming is a generic capability needed across all apcore consumers

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions