feat: support optional Lite Harness CLI provider#80
Open
ishaan-berri wants to merge 1 commit into
Open
Conversation
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 a small local Agent SDK adapter for Claudable's CLI services. The default path still uses
@anthropic-ai/claude-agent-sdk, so current Claude and GLM flows keep the same behavior.When
CLAUDABLE_AGENT_SDK_PROVIDER=lite-harnessis set, the adapter loads Lite Harness and keeps the existingquery()call sites while allowing the runtime harness to be selected either in code or with env vars.Swap harnesses in code
The CLI services can keep importing the local adapter:
Then callers can choose the harness at the call site:
The default remains Claude Agent SDK unless
CLAUDABLE_AGENT_SDK_PROVIDER=lite-harnessis enabled.LITE_HARNESS_HARNESScan also set the default harness for existing call sites without touching each query call.Why
I am a LiteLLM maintainer, and we are working on Lite Harness to solve the agent harness problem: letting developers keep one common SDK shape while swapping the runtime harness they want to use.
Claudable already supports multiple local CLI agents, and these two services already route through the Claude Agent SDK
query()shape. This PR keeps that code path stable while making Claude Code, Codex, PI AI, or another Lite Harness runtime a small adapter/config choice. We would love feedback on whether this is useful for Claudable's agent runtime workflow.How to try it
Default behavior remains unchanged.
Try Lite Harness after installing/packing the preview SDK in your environment:
Swap
LITE_HARNESS_HARNESStoclaude-code,codex, orpi-aito choose the harness without changing the app command.Verification
PATH="/Users/ishaanjaffer/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH" npm ciPATH="/Users/ishaanjaffer/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH" npm run type-checkgit diff --checkNote:
npm cireports existing dependency audit findings and runs the repo postinstall setup, which creates local.envfiles. No env files are included in this PR.