Skip to content

Add governed Ollama local chat client - #30

Merged
nagasatish007 merged 10 commits into
agentguard-ai:mainfrom
CleanDev-Fix:codex/tealtiger-319-ollama-governance
Jul 9, 2026
Merged

Add governed Ollama local chat client#30
nagasatish007 merged 10 commits into
agentguard-ai:mainfrom
CleanDev-Fix:codex/tealtiger-319-ollama-governance

Conversation

@CleanDev-Fix

@CleanDev-Fix CleanDev-Fix commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • adds TealOllama, a governed client for Ollama's OpenAI-compatible local endpoint
  • exports a tree-shakable tealtiger/providers/ollama entrypoint
  • adds a no-network Jest test proving TealEngine policy evaluation and TealAudit wrapping around a mocked Ollama chat call
  • adds a small local chat example for http://localhost:11434/v1

Changes

  • TealOllama extends TealBaseClient so local chat calls go through the existing TealEngine, guard, circuit, monitor, and audit pipeline
  • defaults to http://localhost:11434/v1 and supports optional API keys for secured local proxies
  • uses tool: "ollama.chat" and action: "ollama.chat.create" so policies can govern local Ollama separately from cloud chat providers
  • adds package export and Rollup provider bundle config for ./providers/ollama
  • repairs a current TealEngine constructor syntax issue that blocked TypeScript/Jest on main
  • adds the package-lock.json required by the existing CI workflow and updates dev tooling ranges so npm audit --audit-level=moderate passes
  • fixes the ESLint config preset names so lint can run; full repo lint still reports existing project-wide lint debt outside this Ollama patch

Testing

  • npm test -- --runTestsByPath src/client/__tests__/ollama.test.ts
  • npm run build:tsc
  • npm run build:rollup
  • npm audit --audit-level=moderate
  • npx eslint src/client/ollama.ts src/providers/ollama.ts

Known existing issue: npm run lint now starts correctly but reports broad pre-existing lint debt across the SDK. The new Ollama runtime files lint cleanly.

Related: agentguard-ai/tealtiger#319

@nagasatish007 nagasatish007 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CleanDev-Fix Merge conflicts from the v1.4.0 release that landed on main today. Can you rebase onto latest main and force-push? I'll squash-merge once it's green.

@CleanDev-Fix
CleanDev-Fix force-pushed the codex/tealtiger-319-ollama-governance branch from 2ca0f13 to dd0d9e0 Compare July 9, 2026 14:28
@nagasatish007
nagasatish007 merged commit edd18a6 into agentguard-ai:main Jul 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants