Repository navigation
feat: add Cosmos provider foundation and secure configuration - #32
Merged
Merged
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.
What does this PR do?
Implements Cosmos phases 1 and 2: shared provider messages and secure provider configuration. Agent, research, and debugging tool calls use explicit call IDs. Gemini SDK conversion and native continuation handling now live in the Gemini provider folder. Existing Gemini session logs are migrated in memory without rewriting the original files.
Adds provider-specific folders, validated model/reasoning metadata, bounded injectable discovery, masked API key entry, encrypted credential storage, and persisted active/remembered provider preferences. New configuration commands are
set-provider-key,set-provider, andshow-provider. Updates README, developer documentation, contributor guidance, and regression tests.Related issue(s)
None linked.
Type of change
Checks
bun run typecheckbun run src/index.ts --helpbun run test:core— 105 passedbun run test:web— 147 passedbun run test:web:browser— 3 passedbun run test:docker— 9 passedgit diff --cached --check264 tests passed locally on Windows with Bun 1.3.14, zero failures. GitHub CI is separate. No live model/API validation was performed.
Security note
Existing tool dispatch and permission enforcement remain in place. Shared messages validate tool identity; recovery marks unknown outcomes without replaying commands; native continuation data is checked for incompatible provider/model use. New key commands require masked interactive input and do not accept positional keys. Registered credentials are redacted from logs and persisted agent output. Invalid settings and failed persistence are reported explicitly.
Additional context
This is foundation/configuration work. Runtime still uses Gemini with its current fixed model and default reasoning. OpenAI/Claude runtime adapters, runtime model/reasoning overrides, authenticated model discovery, and
/provider,/model,/reasoningchat controls remain pending. Startup rejects saved selections the runtime cannot apply.Cosmos planning files under
docs/remain local because the existing repository rules ignore that folder. No dependencies or package versions changed. This PR must not be merged automatically.