docs(skills): Add AsyncIterator kind and two-plugin pattern to orchestrion#7652
docs(skills): Add AsyncIterator kind and two-plugin pattern to orchestrion#7652
Conversation
…trion Documents how Orchestrion's AsyncIterator kind works: - Creates TWO channels: base + _next - Requires TWO plugins to handle both channels - Main plugin creates span - Next plugin finishes span when result.done === true This pattern is needed for async generator/iterator methods like Pregel.stream() that return Promise<IterableReadableStream>. Without this documentation, agents wouldn't know to: 1. Use kind: 'AsyncIterator' in the config 2. Create both plugins 3. Check result.done in asyncEnd Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
BenchmarksBenchmark execution time: 2026-03-03 23:06:55 Comparing candidate commit d8230ab in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 230 metrics, 30 unstable metrics. |
wconti27
left a comment
There was a problem hiding this comment.
all looks good with content, lets just modularize a bit more since only some integrations will need that context
Overall package sizeSelf size: 4.89 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.6 | 81.92 kB | 816.75 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7652 +/- ##
==========================================
+ Coverage 80.27% 80.28% +0.01%
==========================================
Files 734 738 +4
Lines 31644 31897 +253
==========================================
+ Hits 25402 25610 +208
- Misses 6242 6287 +45 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Moved detailed AsyncIterator pattern documentation from orchestrion.md to a dedicated async-iterator-pattern.md reference file for better organization and emphasis. Changes: 1. Created async-iterator-pattern.md with comprehensive AsyncIterator guide - When to use AsyncIterator kind - Two-channel pattern explanation - Complete two-plugin pattern with examples - Common mistakes and how to avoid them - Full LangGraph example - Testing strategies - Implementation checklist 2. Updated orchestrion.md with high-level overview and prominent link - Replaced 60+ line detailed section with concise summary - Added CRITICAL warning that AsyncIterator requires TWO plugins - Added REQUIRED READING directive linking to full reference - Updated table entry with link to reference This ensures agents: - See clear warning that AsyncIterator is special/complex - Are directed to read the complete reference before implementing - Have all implementation details in one dedicated document - Don't miss critical requirements (two plugins, _next suffix, etc.) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
…Graph example Removed generic plugin examples and kept only the complete LangGraph implementation as the reference example. This makes the document less bloated and more focused. Changes: - Removed generic Main/Next plugin code examples (60+ lines) - Removed generic plugin export example - Kept critical implementation requirements - Kept common mistakes with ❌ examples - Kept complete LangGraph example (orchestrion config + full plugin implementation) - Kept testing section and checklist The LangGraph example is a real, working implementation that demonstrates all the critical requirements in context. Agents can learn from one complete example rather than piecing together generic snippets. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Keep only mistake headings without code examples. The complete LangGraph example demonstrates the correct implementation, so showing wrong examples adds unnecessary bloat. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
wconti27
left a comment
There was a problem hiding this comment.
Awesome, looks great! Once langgraph is merged, we can just use file pointers as well!
…trion (#7652) * docs(skills): Add AsyncIterator kind and two-plugin pattern to orchestrion
…trion (#7652) * docs(skills): Add AsyncIterator kind and two-plugin pattern to orchestrion
…trion (#7652) * docs(skills): Add AsyncIterator kind and two-plugin pattern to orchestrion
Summary
Documents how Orchestrion's AsyncIterator kind works for async generator/iterator methods.
Changes
Details
When
kind: 'AsyncIterator'is used in orchestrion config, Orchestrion automatically creates TWO channels:tracing:orchestrion:{package}:{channelName}:*tracing:orchestrion:{package}:{channelName}_next:*Two plugins are required:
result.done === trueThis pattern is needed for methods that return
Promise<AsyncIterable>,Promise<IterableReadableStream>, orPromise<AsyncIterableIterator>.Testing
Co-Authored-By: Claude Sonnet 4.5 [email protected]