[pull] main from danny-avila:main - #164
Merged
Merged
Conversation
* feat: support resumable HITL in subagents * fix: prioritize stream breaker failures * fix: preserve subagent resume state * fix: scope rebuilt run resumes * fix: preserve resumable child state * fix: persist subagent replay lifecycle * test: align HITL checkpointer expectation * fix: restore cached subagent replay metadata * fix: harden subagent replay lifecycle * fix: preserve approval policy branches * fix: fail closed on malformed approvals * fix: preserve child checkpoint ownership * fix: preserve one-shot approval replay * fix: isolate reconstructed subagent branches * fix: snapshot resumable subagent state * fix: make subagent replay restoration atomic * fix: isolate repeated resume attempts * fix: preserve live approval hook evaluation * fix: isolate subagent approval resume branches * test: cover subagent resume isolation * fix: isolate subagent resume lifecycle * fix: scope Send subagent replay batches * fix: preserve custom interrupt payloads * fix: restore rebuilt resume output
* feat(search): add RagApiReranker for public rag_api /v1/rerank
Implements the fast-v1 reranker profile against public danny-avila/rag_api
(Track 5 of the search-stack plan), matching the existing Jina/Cohere
reranker conventions in src/tools/search/rerankers.ts:
- RagApiReranker extends BaseReranker, calling POST {baseUrl}/v1/rerank
with { profile, query, candidates: [{id, text, base_score}], top_n } and
parsing { profile, model, results: [{id, index, score}] }.
- Auth via an async token supplier (short-lived JWTs minted per call by the
host app) instead of a static API key.
- Configurable timeout; on timeout, non-2xx, malformed response, or a
rejected token supplier, falls back to the candidates' original order
(BaseReranker.getDefaultRanking) rather than throwing into the search
flow. Successful responses are sorted deterministically (score desc,
index asc tiebreak) rather than trusting response order.
- Client-side enforcement of the contract limits (<=50 candidates, top_n
<=25) via truncation + a debug log, never an error.
- Wired into RerankerType ('rag-api'), createReranker, and
SearchToolConfig/createSearchTool alongside the existing jina/cohere
fields (ragApiUrl, ragApiTokenSupplier, ragApiProfile).
Tests mock the axios HTTP boundary per project convention and cover
success, timeout fallback, error fallback, malformed-response fallback,
tie ordering, and candidate/top_n truncation.
* fix(search): harden RagApiReranker bounds, validation, and URL handling
- Bound the whole rerank operation (token acquisition + request) with the
configured timeout; a stalled token supplier previously ran before axios
started, so the search could hang indefinitely. The deadline aborts any
in-flight request and falls back to the original candidate order.
- Validate every result row against the candidates actually submitted rather
than the full document list, and reject the entire batch when any row is
invalid, instead of silently accepting partially malformed responses.
- Strip trailing slashes from the base URL before appending `/v1/rerank`,
matching the other base-URL-based search clients.
- Cap documents before building candidates so each call only allocates the
bounded work it can submit.
* fix(search): cancel rag_api token acquisition and reject duplicate indices
- Hand the rerank deadline's `AbortSignal` to the token supplier so a supplier
that mints its token over the network can cancel that request when the
deadline fires, instead of leaving auth requests and sockets running past
their caller. The signal is an optional argument, so existing zero-argument
suppliers keep working unchanged.
- Reject the whole batch when a result index repeats: duplicates previously
passed validation and mapped one document into several `top_n` slots,
silently omitting distinct results. Seen indices are tracked in the same
pass that validates each row.
* feat: resolve selected subagent inputs lazily * fix: harden lazy subagent resume errors * fix: harden lazy subagent execution * fix: harden lazy subagent replay and concurrency * fix: harden lazy subagent lifecycle * fix: close lazy subagent replay races * fix: bind subagent replay to effective type * refactor: centralize durable subagent executions * fix: harden durable subagent execution lifecycle
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )