-
Notifications
You must be signed in to change notification settings - Fork 61
feat(runtime): add Runtime invocation #1820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aidandaly24
wants to merge
35
commits into
refactor
Choose a base branch
from
feat/runtime-invoke-lean
base: refactor
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
ce97a2b
feat(runtime): add IAM invoke vertical slice
aidandaly24 7d21c9e
test(runtime): include invoke in command hierarchy
aidandaly24 0ed12ad
feat(runtime): add persistent invoke console
aidandaly24 090ad0f
refactor(runtime): simplify invoke console tests
aidandaly24 c96217b
test(runtime): prove invoke history ownership
aidandaly24 e279d1d
test(runtime): prove response is not duplicated
aidandaly24 d0f73cc
fix(runtime): handle invoke console navigation errors
aidandaly24 6ce02e7
feat(runtime): add invoke request options and JWT
aidandaly24 e347c21
refactor(runtime): simplify invoke request flow
aidandaly24 647a52b
fix(runtime): keep invoke options at UI boundary
aidandaly24 a0c30cc
fix(runtime): protect invoke secrets and endpoint paths
aidandaly24 752b4eb
feat(runtime): add native invoke output
aidandaly24 d0fd5b2
test(runtime): consolidate invoke output coverage
aidandaly24 cb3c63b
fix(runtime): snapshot buffered response chunks
aidandaly24 00b0929
fix(runtime): preserve native output bytes
aidandaly24 d6def5c
refactor(runtime): consolidate invoke behavior
aidandaly24 e37e74c
fix(runtime): complete invoke contracts
aidandaly24 6ddb900
fix(runtime): preserve usage and cancellation contracts
aidandaly24 e36d841
fix(runtime): abort stdin and omit hidden MCP options
aidandaly24 e8906b9
docs(runtime): document invoke workflows
aidandaly24 2ab0779
docs(runtime): clarify MCP session invocation
aidandaly24 df700c3
fix(runtime): default MCP response types
aidandaly24 924c535
fix(runtime): protect target-scoped request secrets
aidandaly24 3075f0f
fix(runtime): close invoke review gaps
aidandaly24 caf19b7
test(runtime): preserve Core call recording shape
aidandaly24 bdd13ae
refactor(runtime): simplify invoke implementation
aidandaly24 f72a58d
refactor(runtime): remove redundant invoke guards
aidandaly24 1fe8f8f
fix(runtime): tighten invoke error handling
aidandaly24 049be16
fix(runtime): remove arbitrary header limits
aidandaly24 d404b33
refactor(runtime): simplify invoke validation and cleanup
aidandaly24 1f79e4d
chore(runtime): format invoke header flag
aidandaly24 a296cd0
test(runtime): complete invoke failure coverage
aidandaly24 e25c3db
test(core): simplify data client fixtures
aidandaly24 0a5a952
docs(core): explain abortable stream semantics
aidandaly24 cbd491b
refactor(core): generalize fetch dependency type
aidandaly24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /** | ||
| * Relays `source` while making an in-flight read reject as soon as `signal` aborts. | ||
| * | ||
| * Aborts use `signal.reason` or an `AbortError` fallback. The rejection remains | ||
| * observed when no read is pending, and source cleanup is fire-and-forget because | ||
| * a stalled stream may also stall `iterator.return()`. | ||
| */ | ||
| export async function* abortable<T>( | ||
| source: AsyncIterable<T>, | ||
| signal: AbortSignal, | ||
| ): AsyncGenerator<T> { | ||
| let abort = () => {}; | ||
| const aborted = new Promise<never>((_, reject) => { | ||
| abort = () => | ||
| reject(signal.reason ?? new DOMException("The operation was aborted", "AbortError")); | ||
| if (signal.aborted) abort(); | ||
| else signal.addEventListener("abort", abort, { once: true }); | ||
| }); | ||
| aborted.catch(() => {}); | ||
|
|
||
| const iterator = source[Symbol.asyncIterator](); | ||
| try { | ||
| for (;;) { | ||
| const result = await Promise.race([iterator.next(), aborted]); | ||
| if (result.done) return; | ||
| yield result.value; | ||
| } | ||
| } finally { | ||
| signal.removeEventListener("abort", abort); | ||
| void iterator.return?.()?.catch(() => {}); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to allow this to be overridden? My understanding is the
escconsistently means go back to the last page right now in the tui, and by allowing an override we open the door to potentially unexpected behavior.