feat(llm-core): add andThen and pipe auth combinators#466
Open
quangdang46 wants to merge 3 commits into
Open
Conversation
Add consolidated PR backlog from 13 reference repos (A-J, ~80 features) and supporting docs (MASTER_GOAL_PROMPT, GOAL_DRIVEN_PROMPT, CONSOLIDATED_FINDINGS).
Adds sequential chaining and fluent transformation to the Auth trait, matching opencode's auth.ts combinator surface. Changes: - AndThenAuth struct: runs first auth, then second; short-circuits on failure - dyn Auth::and_then() method: Box<dyn Auth> -> Box<dyn Auth> - dyn Auth::pipe() method: fluent transformation via closure - 5 new tests: both_succeed, first_fails, second_fails, describe, pipe - Fix stale lib.rs test (wrong API usage) - Fix stale route.rs test generics (Route no longer generic) - Add PartialEq/Eq to ModelRef for test assertions - PARITY.md §IX: mark A1 Auth as implemented - PR_BACKLOG.md: update A1 status to PR Open Refs: docs/pr-plans/A1-auth-trait-combinators.md
…atuses After systematic audit of the codebase: - A2-A5, B1: already implemented on master (backlog was wrong) - A6: indeed stub-only (real gap) - A7, A9: already implemented (backlog was wrong) - A8: missing (real gap) - A10: partially implemented - Added Sections D-J with remaining features from reference repos - P0 is 100% complete - Reorganized statuses to reflect reality
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
Adds sequential chaining (
andThen) and fluent transformation (pipe) to the Auth trait, matching opencode'sauth.tscombinator surface.Reference:
/tmp/feature-research/opencode/packages/llm/src/route/auth.ts(andThen, pipe, orElse)Plan: docs/pr-plans/A1-auth-trait-combinators.md
Changes
dyn Auth::and_then()— chain two auths sequentiallydyn Auth::pipe()— apply a function for fluent transformationsTest Results
cargo test -p jcode-llm-core: 61 passed, 0 failedcargo check -p jcode-llm-core: cleanFiles Changed