v5.0.0 - RAG Foundation, Client-Mode Agent, Ambient Sessions, Redis Cache
Headline Release
Largest feature release since the v4 MCP server. Adds first-class RAG support (:vector property + six embedding-provider adapters + find_similar + embed DSL), a client-mode Parse::Agent that authorizes through session tokens instead of the master key, fiber-local ambient session tokens for ergonomic auth scoping, a managed Parse::Cache::Redis cache with built-in pooling and namespacing, a GraphQL type generator, and end-to-end ActiveSupport::Notifications coverage of the cache and MongoDB paths.
Breaking Changes
- BREAKING:
Parse::Hyperdrive.config!removed. The remote-ENV-merge helper had no env-var allowlist, no SSRF gate, and no response authentication — a compromised config endpoint could writePATH,RUBYLIB,LD_PRELOAD,PARSE_MASTER_KEY, etc. into the process at boot. Operators should switch to dotenv, Rails encrypted credentials, Vault, AWS/GCP secret managers, or platform-native config vars. - BREAKING:
Parse::Agent.new(acl_user:/acl_role:)now refuses construction when the underlying client has nomaster_key, instead of failing per-call at first dispatch with an unclear error. Usesession_token:for client-mode agents or switch to a master-key client.
Changes
- NEW:
Parse::Vectorvalue class and:vectorproperty type. Declare a dense numeric embedding on anyParse::Objectsubclass withproperty :embedding, :vector, dimensions: 1536, provider: :openai, model: "text-embedding-3-small". Validates element types, caps dimensions at 16384, and serializes as a plain JSON array. - NEW:
Parse::Embeddingsprovider registry with six text-embedding adapters out of the box — OpenAI, Cohere (v3 + v4 families), Voyage (v4 + v3 + domain-specific), Jina (v3 / v4 / v5), Qwen3-Embedding via DashScope, and a genericLocalHTTPfor self-hosted gateways (Ollama, LM Studio, vLLM, TEI, llama.cpp). Includes a deterministicFixtureprovider for tests. SSRF gate onLocalHTTPreusesParse::File::BLOCKED_CIDRS. - NEW:
Klass.find_similar(vector:/text:, k:, ...)class method on any model with a:vectorproperty. Resolves the field automatically, auto-discovers the covering Atlas vectorSearch index, and routes throughParse::MongoDBso ACL / CLP /protectedFieldsenforcement runs for scoped agents. - NEW:
embed *source_fields, into: :vector_propertyclass macro. Concatenates source fields, SHA-256-digests them, and only re-embeds when the digest changes. Direct assignment to the managed vector field is locked behind the digest-tracked recompute path. - NEW: Client-mode
Parse::Agent— construct an agent against aParse::Clientwithsession_token:and nomaster_key, and every dispatched tool routes through session-token REST so Parse Server natively enforces ACL + CLP +protectedFields. Per-agentallow_mutations:gate (defaultfalsein client mode,truein master-key mode), and aTools.register(client_safe: true)flag for custom tools. - NEW:
Parse.with_session(token) { ... }runs a block with a fiber-local ambient session token.Parse.login(username, password, mfa_token:)/Parse.logout(revoke: true)provide imperative companions for REPL and Rake-console use.Parse::User#with_session { ... }instance sugar. Resolution order: explicit kwarg > ambient > master key. - NEW:
Parse.watch(klass, where:, on:, ...) { ... }andParse.wait_for(klass, where:, timeout:, ...) { predicate }LiveQuery convenience helpers for blocking-until-event console use. Also available asKlass.watch/Klass.wait_for. - NEW:
acl_policy :public_readandacl_policy :owner_but_public_read, owner: :author. Catalog/lookup tables and publicly-viewable single-author content respectively. - NEW:
Parse::User.anonymous_signupcreates an anonymous user with a client-generated UUID.Parse::User#upgrade_anonymous!(username:, password:, email:)upgrades in place and unlinks the anonymous provider in a single PUT to close a known auth-takeover foot-gun. - NEW:
Parse::Cache::Redis— ergonomic Redis cache with a built-inConnectionPool, key namespacing (namespace:), and per-callexpires_in:honoring. Drop-in for the existing cache contract. - NEW:
Parse::GraphQL::TypeGenerator— generates graphql-ruby type definitions from a Parse Server schema. Mirrors fields, ACLs, and pointers. - NEW:
Parse.slow_query_threshold_msandparse.mongodb.aggregate/parse.mongodb.findActiveSupport::Notificationsevents. Slow-query subscriber auto-attaches when threshold is set at boot via ENV. - NEW: Cache instrumentation via
ActiveSupport::Notifications—parse.cache.read/write/delete/fetch_hit/fetch_miss. - CHANGED:
Parse::Client#requestresolves the ambient session token when the caller didn't pass an explicitsession_token:and didn't passuse_master_key: true. SetsX-Disable-Parse-Master-Key: truewhenever a session token is in play so the auth context cannot silently widen. - CHANGED: MCP Streamable HTTP transport — session-id header renamed to spec-compliant
Mcp-Session-Id, protocol-version validation, and explicit session lifecycle handling. - CHANGED: Built-in MCP tools now emit
structuredContentper MCP spec 2025-06-18. - CHANGED: Gem published as
parse-stack-nexton RubyGems under the neurosynq organization (wasparse-stack). - CHANGED: Cross-user
_Userhydration stripsauthDataand limits trusted self-fetch scope to the authenticated user. - CHANGED:
Parse::User.session!rejectssession_token:in the opts hash to prevent a client-mode caller from impersonating a different session at the API boundary. - CHANGED:
request_password_resetis now rate-limited per email address. - CHANGED: Ruby 3.x optimization — class variables (
@@) replaced with mutex-guarded class-instance state onParse::ModelandParse::LiveQuery::Subscription. - CHANGED: Deprecation warning emitted on connection to unsupported Parse Server versions.
- NEW:
mongo_relation_index :field, dedup: true— compound{owningId, relatedId}unique index. - NEW:
Parse::NOT_PROVIDEDpromoted to a top-level sentinel for distinguishingnilfrom omitted in optional parameters. - NEW: MCP health check endpoint helper.
Date: May 24, 2026