Repository navigation
Runtime/unify invocation context - #39
Merged
likun666661 merged 2 commits intoJun 18, 2026
Merged
Conversation
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
Runtime/unify invocation context
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
Runtime/unify invocation context
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
Runtime/unify invocation context
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
Runtime/unify invocation context
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
本 PR 主要完成 Runtime 中
InvocationContext的类型收敛,并补充相关测试与文档更新。主要改动:
AgentFlow使用的InvocationContext统一到 runtime canonicalInvocationContext。agent-flow.ts中重复维护一套较窄的InvocationContext定义。AiSdkFlow,使其直接从invocation-context引入 canonical context。fetch failed,同时保留快速失败的断言。Why
之前 Runtime 中存在两套结构兼容但定义重复的
InvocationContext:虽然 TypeScript 的结构类型让当前代码可以正常工作,但这种重复定义容易造成后续维护中的语义漂移,也会让 RuntimeRunner 与 AgentFlow 的边界变得不够清晰。
本 PR 将
AgentFlow统一到 canonicalInvocationContext,让 runner / flow 边界只依赖同一套 context contract,降低后续重构和扩展时的歧义。Validation
已执行:
npm --workspace @maka/runtime run testgit diff --checkNotes
InvocationContext相关修改主要是类型/API 边界收敛,预期不改变运行时行为。fetch failed而不是显式 timeout message 的情况。