GLOST v0.5.0 Release Notes
Overview
GLOST v0.5.0 is a major release that transforms GLOST into a unified/remark-style ecosystem with enhanced plugin management, discovery, and composition capabilities.
What’s New
🚀 Unified-Style Processor API
Fluent API for plugin composition inspired by unified/remark:
import { glost } from "@glotblocks/glost";
import { languageLearningPreset } from "@glotblocks/glost/presets";
const processor = glost()
.use(languageLearningPreset)
.freeze();
const result = await processor.process(document);🔍 Enhanced Plugin Registry
Comprehensive plugin discovery and validation:
import { pluginRegistry } from "@glotblocks/glost/registry";
const plugins = pluginRegistry.search({ language: "th" });
const report = pluginRegistry.checkConflicts(["plugin1", "plugin2"]);📦 Preset System
Pre-configured plugin combinations for common use cases:
languageLearningPreset- Full language learning stackreadingAppPreset- Interactive reading featuresvocabularyBuilderPreset- Word frequency and difficultygrammarAnalyzerPreset- POS and clause analysisminimalPreset- Just the essentials
🔧 CLI Tools
Command-line plugin management:
glost plugins list
glost plugins search transcription
glost plugins info transcription
glost plugins validate transcription translation frequency🌍 Language Extensions Foundation
Complete provider infrastructure for language-specific features:
Base Classes (@glotblocks/glost-common):
BaseLanguageProvider- Language validation, logging, error handlingBaseDataProvider<TData>- Lazy loading, caching, resource management
Data Loaders:
JsonLoader- Load from JSON files or URLs (Node.js & Browser)ApiLoader- HTTP API with retry logic and timeoutCachedLoader- Caching wrapper with TTL and localStorage
Provider Scaffolding:
- Thai (5/5): Transcription, Translation, Frequency, Difficulty, POS
- Japanese (5/5): Transcription, Translation, Frequency, Difficulty, POS
- Korean (5/5): Transcription, Translation, Frequency, Difficulty, POS
See Implementing Language Providers for details.
🎯 Package Restructure
glost- Main facade package (new)@glotblocks/glost-core- Core types and nodes (renamed fromglost)@glotblocks/glost-processor- Processor API (new)@glotblocks/glost-registry- Plugin registry (new)@glotblocks/glost-presets- Preset configurations (new)@glotblocks/glost-cli- CLI tools (new)@glotblocks/glost-common- Enhanced with provider base classes and data loaders
Breaking Changes
Package Names
The core package has been renamed:
- Before:
glost(the core package) - After:
@glotblocks/glost-core(core implementation),glost(facade package)
Import Changes
// v0.4.x - Still works but deprecated
import { processGLOSTWithExtensions } from "@glotblocks/glost-plugins";
const result = processGLOSTWithExtensions(doc, [ext1, ext2]);
// v0.5.0 - Recommended
import { glost } from "@glotblocks/glost";
const result = await glost().use(ext1).use(ext2).process(doc);Async-Only Processing
The new processor API is always async:
// Add await to all process() calls
const result = await processor.process(document);Migration
See the Migration Guide for detailed migration instructions.
Quick Migration
- Install new packages:
npm install glost@0.5.0- Update imports:
// Old
import { processGLOSTWithExtensions } from "@glotblocks/glost-plugins";
// New
import { glost } from "@glotblocks/glost";- Convert to fluent API:
// Old
const result = processGLOSTWithExtensions(doc, [ext1, ext2]);
// New
const doc = await glost().use(ext1).use(ext2).process(document);Backwards Compatibility
✅ The old API (processGLOSTWithExtensions) still works in v0.5.0 but is deprecated.
⚠️ You’ll see deprecation warnings in the console.
❌ The old API will be removed in v1.0.
New Features
Hooks and Middleware
processor
.before("translation", (doc) => console.log("Starting translation"))
.after("translation", (doc) => console.log("Translation complete"))
.onError((error, plugin) => console.error(`${plugin} failed:`, error))
.onProgress((stats) => console.log(`${stats.completed}/${stats.total}`));Data Storage
Share data between plugins:
processor
.data("config", { theme: "dark" })
.use(plugin1)
.use(plugin2);Processor Freezing
Freeze for reuse across multiple documents:
const frozen = processor.freeze();
const result1 = await frozen.process(doc1);
const result2 = await frozen.process(doc2);Performance
All performance targets exceeded:
- ✅ Small docs (10-50 words): < 1ms (target: < 10ms)
- ✅ Medium docs (100-500 words): 2-15ms (target: < 50ms)
- ✅ Large docs (1000+ words): 15-70ms (target: < 200ms)
- ✅ Handles 100K word documents
- ✅ 290+ tests passing across the codebase
Language Extensions Foundation Statistics:
- 15 providers across 3 languages (Thai, Japanese, Korean)
- 70% reduction in provider boilerplate via base classes
- ~4,500 lines of infrastructure code
- Full TypeScript type safety
- Multi-environment support (Node.js & Browser)
Documentation
- Migration Guide
- Processor API Guide
- Registry Guide
- Implementing Language Providers ⭐ NEW
- Package Refactoring
- Unified Pipeline Implementation
Acknowledgments
This release brings GLOST in line with modern JavaScript ecosystem patterns (unified, remark, babel) while maintaining its unique focus on language learning and multilingual text processing.
What’s Next
v0.6 will focus on:
- Registry website for plugin discovery
- Comprehensive test coverage for new packages
- Additional community presets
- Performance optimizations
Full Changelog: v0.4.0…v0.5.0