MCPcopy Index your code
hub / github.com/dahlia/vertana

github.com/dahlia/vertana @0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2.0 ↗ · + Follow
292 symbols 710 edges 80 files 60 documented · 21%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Vertana: LLM-powered agentic translation library for TypeScript

JSR npm GitHub Actions

[!CAUTION] Vertana is currently in early development for proof of concept purposes, and is not yet ready for production use. The API is subject to change, and there may be bugs or missing features.

Vertana[^1] is an LLM-powered agentic translation library for TypeScript/JavaScript. It goes beyond simple LLM prompting by using autonomous agent workflows to gather rich contextual information, ensuring high-quality translations that preserve meaning, tone, and formatting.

[^1]: The name Vertana is derived from the Sanskrit word वर्तन (vartana), meaning turning, moving, or abiding.

Features

  • Agentic context gathering: Automatically invoke external sources before translation, or let the LLM query passive sources as needed via tools
  • Smart chunking: Content-aware chunkers for plain text, Markdown, and HTML that respect structural boundaries while staying within token limits
  • Glossary support: Static glossaries for consistent terminology, plus dynamic glossary accumulation across chunks
  • Quality evaluation: Assess translations on accuracy, fluency, terminology, and style dimensions
  • Iterative refinement: Re-translate low-scoring chunks with boundary evaluation until quality thresholds are met
  • Best-of-N selection: Generate translations with multiple models and select the best result via parallel per-chunk evaluation
  • Progress reporting: Track translation stages via callbacks
  • Multi-runtime support: Works seamlessly with Deno, Node.js, and Bun

Quick example

import { translate } from "@vertana/facade";
import { openai } from "@ai-sdk/openai";

const result = await translate(
  openai("gpt-4o"),
  "ko",
  "Hello, world!  Welcome to Vertana.",
);

console.log(result.text);

Docs

Vertana provides comprehensive documentation to help you get started quickly: https://vertana.org/.

API reference documentation for each package is available on JSR (see below).

Packages

Vertana is a monorepo which contains multiple packages. If you are looking for one package to start with, check out @vertana/facade. The following is a list of the available packages:

Package JSR npm Description
@vertana/core JSR npm Core translation logic and utilities
@vertana/facade JSR npm High-level facade for easy translation tasks
@vertana/context-web JSR npm Web page fetch/search for translation context
@vertana/context-memory JSR npm Translation memory lookup for consistency
@vertana/cli JSR npm Command-line interface for translation

Extension points exported contracts — how you extend this code

BaseProgress (Interface)
* Base progress information shared by all stages.
packages/facade/src/types.ts
HtmlBlock (Interface)
* A parsed HTML block representing a translatable unit.
packages/core/src/html.ts
TranslationMemoryStore (Interface)
(no doc) [2 implementers]
packages/context-memory/src/store.ts
ParsedModelCode (Interface)
(no doc)
packages/cli/src/model.ts
WebSearchResult (Interface)
(no doc)
packages/context-web/src/search.ts
BuildTranslationOptions (Interface)
(no doc)
packages/facade/src/result.ts
Section (Interface)
* A section of Markdown content starting with a heading.
packages/core/src/markdown.ts
LookupMemoryParams (Interface)
(no doc)
packages/context-memory/src/lookup.ts

Core symbols most depended-on inside this repo

translate
called by 45
packages/facade/src/index.ts
gather
called by 34
packages/core/src/context.ts
buildTranslation
called by 21
packages/facade/src/result.ts
countTokens
called by 20
packages/core/src/tokens.ts
fetchLinkedPages
called by 19
packages/context-web/src/fetch.ts
search
called by 18
packages/context-memory/src/store.ts
accumulateEvent
called by 17
packages/core/src/accumulator.ts
evaluate
called by 16
packages/core/src/evaluation.ts

Shape

Function 197
Interface 84
Method 9
Class 2

Languages

TypeScript100%

Modules by API surface

packages/context-memory/src/in-memory.ts24 symbols
packages/context-web/src/fetch.ts20 symbols
packages/context-memory/src/lookup.ts15 symbols
packages/core/src/html.ts14 symbols
packages/context-web/src/search.ts14 symbols
packages/facade/src/types.ts12 symbols
packages/core/src/refine.ts11 symbols
packages/core/src/markdown.ts11 symbols
packages/core/src/evaluation.ts9 symbols
packages/core/src/context.ts9 symbols
packages/core/src/translate.ts8 symbols
packages/core/src/prompt.ts8 symbols

For agents

$ claude mcp add vertana \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact