feat(runtime): byo-cloud and ozwell backends (Phase 2 Slice 4) - #9
Merged
Conversation
Complete the three-way runtime split with API key support, Manager-host Ozwell defaults, and local Ollama fallback when Ozwell is unavailable. Co-authored-by: Cursor <cursoragent@cursor.com>
Agent keys were overriding parent keys and binding Ozwell-side persona/tools, so Jerry skipped local summarize_activity. Prefer OZWELL_API_KEY, probe via chat (not unauthenticated /v1/models), and fall back on stream auth errors. Co-authored-by: Cursor <cursoragent@cursor.com>
Add Quick start runtime backends section and refresh agent-runtime README with env vars, ozw_ key guidance, and fallback notes. Co-authored-by: Cursor <cursoragent@cursor.com>
resolveApiKey reads OZWELL_API_KEY from the environment, so a leaked key skipped the intended no-key fallback path. Co-authored-by: Cursor <cursoragent@cursor.com>
ozwellai ships types from gitignored dist/, so CI failed to resolve the module; build it before tsc. Also remove unused mock import in byo-cloud tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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
byo-cloudandozwellAgentRuntime backends alongsidelocal, wired throughresolveRuntimeand CLI env profile fields (JERRY_RUNTIME,JERRY_MODEL, API keys, endpoints).https://ozwellapi.os.mieweb.org), prefers parentozw_keys for Jerry’s local tool loop, probes via chat completion, and falls back to local Ollama on auth/network failure.packages/agent-runtime/README.md; updatesdocs/plans/phase-2.mdSlice 4 status.Test plan
pnpm --filter @mieweb/jerry-agent-runtime test(mock suite)pnpm dev); local:JERRY_RUNTIME=local JERRY_MODEL=ollama:qwen2.5:3b jerry "summarize my last 2 hours"unset OZWELL_AGENT_KEY; JERRY_RUNTIME=ozwell OZWELL_API_KEY=ozw_… jerry "summarize my work from July 13th"(tools + full summary)JERRY_RUNTIME=ozwell OZWELL_API_KEY=ozw_bad jerry "hello"→[jerry] Ozwell unavailable…then OllamaJERRY_RUNTIME=byo-cloud JERRY_MODEL='https://api.openai.com/v1#gpt-4o' OPENAI_API_KEY=… jerry "…"