maximus Posted May 3 Author Posted May 3 Context v1.5.0 — AI Gateway Hi, just pushed a new release. The main addition is a centralized AI Gateway — a ContextAI class that any ProcessWire module can use to make AI requests through a single shared configuration: $ai = wire('context')->ai(); // Simple $text = $ai->complete('Summarize: ' . $page->title); // Full options $result = $ai->chat([ 'messages' => [['role' => 'user', 'content' => '...']], 'model' => 'openai/gpt-4o-mini', 'caller' => 'MyModule', ]); // Gateway entry point for third-party modules $result = $ai->gateway(['caller' => 'MyModule', 'messages' => [...]]); Supported providers: OpenRouter (200+ models via one key), OpenAI, or any OpenAI-compatible endpoint. New settings fieldset: provider, API key, default model, temperature, max tokens, timeout, global system prompt, and a Test Connection button that fires a live request and shows the response time. The idea is that modules don't need to implement their own HTTP clients or manage API keys — they just call wire('context')->ai() and everything is configured in one place. GitHub: https://github.com/mxmsmnv/Context 2
maximus Posted 8 hours ago Author Posted 8 hours ago Hi everyone, Context 2.0.0 has been released. This is a larger cleanup and stability release focused on making the module more useful for AI-assisted ProcessWire development, while also making the codebase easier to maintain. Highlights Added explicit export format selection: TOON, JSON, CSV TOON-only and JSON-only exports now clean up stale artifacts automatically CLI export, admin export, and auto-update now share the same export pipeline Restored and hardened documented CLI commands: php index.php --context-export php index.php --context-export --toon-only php index.php --context-export --json-only php index.php --context-stats php index.php --context-query ... php index.php --context-eval ... php index.php --context-stdin Added a dedicated context-admin permission Admin actions now require POST + CSRF validation Export path validation was hardened to avoid unsafe targets and symlinks Sample exports now skip fields matching a configurable sensitive-field denylist Dashboard was redesigned for the 2.0 workflow with current export status, CLI commands, configuration overview, and export preview The module internals were split into focused classes under src/ AI workflow The recommended AI workflow is now: php index.php --context-export --toon-only php index.php --context-stats php index.php --context-query templates php index.php --context-query pages "template=your-template, limit=10" Then start with: SKILL.md templates.toon structure.toon README.md TOON remains the recommended format for AI agents because it is much smaller than JSON while preserving the same structure. Notes This release includes a fairly large internal refactor. The main module file is now mostly ProcessWire wiring, routes, settings, and compatibility wrappers. Export logic, dashboard rendering, CLI handling, filesystem safety, serializers, docs generation, and AI gateway code now live in separate src/ classes. Release: https://github.com/mxmsmnv/Context/releases/tag/v2.0.0 Repository: https://github.com/mxmsmnv/Context Feedback, testing, and suggestions are very welcome. 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now