parse-stack-next 5.1.1 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env.sample +12 -0
- data/.env.test +4 -4
- data/CHANGELOG.md +545 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +6 -1
- data/README.md +167 -38
- data/Rakefile +56 -10
- data/docs/atlas_vector_search_guide.md +110 -9
- data/docs/mcp_guide.md +433 -0
- data/docs/mongodb_direct_guide.md +66 -1
- data/docs/mongodb_index_optimization_guide.md +22 -1
- data/docs/usage_guide.md +15 -0
- data/lib/parse/agent/approval_gate.rb +0 -0
- data/lib/parse/agent/constraint_translator.rb +90 -19
- data/lib/parse/agent/describe.rb +1 -0
- data/lib/parse/agent/errors.rb +16 -0
- data/lib/parse/agent/mcp_client.rb +9 -0
- data/lib/parse/agent/mcp_dispatcher.rb +139 -7
- data/lib/parse/agent/mcp_rack_app.rb +621 -17
- data/lib/parse/agent/mcp_subscriptions.rb +607 -0
- data/lib/parse/agent/metadata_dsl.rb +58 -0
- data/lib/parse/agent/metadata_registry.rb +141 -1
- data/lib/parse/agent/prompt_hardening.rb +213 -0
- data/lib/parse/agent/result_formatter.rb +18 -3
- data/lib/parse/agent/tools.rb +167 -24
- data/lib/parse/agent.rb +692 -21
- data/lib/parse/client/request.rb +55 -4
- data/lib/parse/client/response.rb +4 -0
- data/lib/parse/client.rb +205 -7
- data/lib/parse/model/classes/installation.rb +27 -10
- data/lib/parse/model/classes/user.rb +8 -0
- data/lib/parse/model/core/actions.rb +58 -4
- data/lib/parse/model/core/embed_managed.rb +19 -14
- data/lib/parse/model/core/indexing.rb +108 -16
- data/lib/parse/model/core/querying.rb +29 -0
- data/lib/parse/model/model.rb +34 -3
- data/lib/parse/model/object.rb +1 -0
- data/lib/parse/query.rb +90 -24
- data/lib/parse/retrieval/agent_tool.rb +369 -0
- data/lib/parse/retrieval/chunk.rb +74 -0
- data/lib/parse/retrieval/chunker.rb +208 -0
- data/lib/parse/retrieval/retriever.rb +274 -0
- data/lib/parse/retrieval.rb +10 -0
- data/lib/parse/schema.rb +69 -20
- data/lib/parse/stack/version.rb +2 -2
- data/parse-stack-next.gemspec +1 -1
- data/scripts/docker/docker-compose.atlas.yml +14 -10
- data/scripts/docker/docker-compose.test.yml +24 -20
- data/scripts/docker/mongo-init.js +3 -3
- data/scripts/start-parse.sh +10 -0
- data/scripts/start_mcp_server.rb +1 -1
- data/scripts/test_server_connection.rb +1 -1
- data/scripts/vector_prototype/create_vector_index.js +1 -1
- data/scripts/vector_prototype/fetch_embeddings.py +2 -2
- data/scripts/vector_prototype/query_prototype.rb +1 -1
- data/scripts/vector_prototype/run.sh +4 -4
- metadata +10 -2
data/scripts/start-parse.sh
CHANGED
|
@@ -70,6 +70,16 @@ export PARSE_SERVER_START_LIVE_QUERY_SERVER="${PARSE_SERVER_START_LIVE_QUERY_SER
|
|
|
70
70
|
# both pathways: authed upload succeeds, anon upload is rejected.
|
|
71
71
|
export PARSE_SERVER_FILE_UPLOAD="${PARSE_SERVER_FILE_UPLOAD:-{\"enableForPublic\":false,\"enableForAnonymousUser\":false,\"enableForAuthenticatedUser\":true}}"
|
|
72
72
|
|
|
73
|
+
# Request-id idempotency — test-stack only, scoped to a single probe class so
|
|
74
|
+
# it deduplicates ONLY writes the request-id integration test targets and has
|
|
75
|
+
# zero effect on every other suite. Parse Server dedups POST/PUT carrying the
|
|
76
|
+
# same X-Parse-Request-Id within the TTL for paths matching `paths` (regex).
|
|
77
|
+
# The SDK's idempotent-retry feature relies on exactly this server-side dedup
|
|
78
|
+
# when `Parse::Request.assume_server_idempotency = true`. NOTE: Parse Server
|
|
79
|
+
# names this env var with an `EXPERIMENTAL_` infix and treats the value as a
|
|
80
|
+
# JSON object (objectParser). Override the whole JSON to widen coverage.
|
|
81
|
+
export PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_OPTIONS="${PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_OPTIONS:-{\"paths\":[\"classes/IdempotencyProbe\"],\"ttl\":120}}"
|
|
82
|
+
|
|
73
83
|
echo "Environment configured:"
|
|
74
84
|
echo " PARSE_SERVER_APPLICATION_ID: $PARSE_SERVER_APPLICATION_ID"
|
|
75
85
|
echo " PARSE_SERVER_LIVE_QUERY: $PARSE_SERVER_LIVE_QUERY"
|
data/scripts/start_mcp_server.rb
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
# binding to a non-loopback host
|
|
19
19
|
#
|
|
20
20
|
# Why no fallback values: previously this script accepted
|
|
21
|
-
# `ENV["PARSE_APP_ID"] || "
|
|
21
|
+
# `ENV["PARSE_APP_ID"] || "psnextItAppId"` and the equivalent for the master
|
|
22
22
|
# key. A deployment that forgot to set the env var (typo'd name, missing
|
|
23
23
|
# secret manager binding, container startup race) would silently boot
|
|
24
24
|
# with the placeholder credentials documented in the README — credentials
|
|
@@ -75,7 +75,7 @@ end
|
|
|
75
75
|
|
|
76
76
|
puts "\n5. Connection information:"
|
|
77
77
|
puts " Parse Server: http://localhost:1337/parse"
|
|
78
|
-
puts " Parse Dashboard: http://localhost:
|
|
78
|
+
puts " Parse Dashboard: http://localhost:29040"
|
|
79
79
|
puts " Dashboard login: admin/admin"
|
|
80
80
|
|
|
81
81
|
puts "\nTo stop the containers, run:"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// fetch_embeddings.py.
|
|
11
11
|
//
|
|
12
12
|
// Run:
|
|
13
|
-
// mongosh "mongodb://localhost:
|
|
13
|
+
// mongosh "mongodb://localhost:29020/vector_prototype?directConnection=true" \
|
|
14
14
|
// scripts/vector_prototype/create_vector_index.js
|
|
15
15
|
//
|
|
16
16
|
// To switch to 1024-dim (voyage-multimodal-3 compat), set DIMS=1024
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Vector-search & RAG test fixture loader.
|
|
4
4
|
|
|
5
5
|
Pulls a subset of a pre-computed embeddings dataset from HuggingFace and
|
|
6
|
-
loads it into Atlas Local at localhost:
|
|
6
|
+
loads it into Atlas Local at localhost:29020 (the same container managed
|
|
7
7
|
by scripts/docker/docker-compose.atlas.yml). Designed to be reused by both:
|
|
8
8
|
|
|
9
9
|
1. Vector search integration tests (Parse::VectorSearch — v4.3 plan)
|
|
@@ -90,7 +90,7 @@ ID_FIELD = _p["id_field"]
|
|
|
90
90
|
|
|
91
91
|
_ext = "parquet" if DATA_FORMAT == "parquet" else "json"
|
|
92
92
|
LOCAL_FILE = os.environ.get("LOCAL_FILE", f"/tmp/parse-stack-fixture-{PRESET}.{_ext}")
|
|
93
|
-
MONGO_URI = os.environ.get("ATLAS_URI", "mongodb://localhost:
|
|
93
|
+
MONGO_URI = os.environ.get("ATLAS_URI", "mongodb://localhost:29020/?directConnection=true")
|
|
94
94
|
DB_NAME = os.environ.get("DB_NAME", "vector_prototype")
|
|
95
95
|
# Collection name mirrors the dataset shape so RAG tests can pivot
|
|
96
96
|
# without coupling test assertions to a hard-coded class name.
|
|
@@ -24,7 +24,7 @@ unless File.exist?(MANIFEST_PATH)
|
|
|
24
24
|
end
|
|
25
25
|
MANIFEST = JSON.parse(File.read(MANIFEST_PATH))
|
|
26
26
|
|
|
27
|
-
MONGO_URI = ENV.fetch("ATLAS_URI", "mongodb://localhost:
|
|
27
|
+
MONGO_URI = ENV.fetch("ATLAS_URI", "mongodb://localhost:29020/#{MANIFEST['db']}?directConnection=true")
|
|
28
28
|
INDEX_NAME = ENV.fetch("VECTOR_INDEX", MANIFEST["index_name"])
|
|
29
29
|
COLL_NAME = MANIFEST["collection"].to_sym
|
|
30
30
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Orchestrate the vector-search / RAG test fixture setup.
|
|
3
3
|
# Assumes the Atlas Local container from docker-compose.atlas.yml is up
|
|
4
|
-
# (i.e. localhost:
|
|
4
|
+
# (i.e. localhost:29020 is reachable).
|
|
5
5
|
#
|
|
6
6
|
# Usage: ./scripts/vector_prototype/run.sh
|
|
7
7
|
#
|
|
@@ -13,9 +13,9 @@ set -euo pipefail
|
|
|
13
13
|
|
|
14
14
|
HERE="$(cd "$(dirname "$0")" && pwd)"
|
|
15
15
|
|
|
16
|
-
echo "[1/3] verifying Atlas Local on localhost:
|
|
16
|
+
echo "[1/3] verifying Atlas Local on localhost:29020"
|
|
17
17
|
if ! mongosh --quiet --eval "db.runCommand({ ping: 1 })" \
|
|
18
|
-
"mongodb://localhost:
|
|
18
|
+
"mongodb://localhost:29020/?directConnection=true" >/dev/null; then
|
|
19
19
|
echo " ERROR: Atlas Local not reachable. Start it with:"
|
|
20
20
|
echo " docker-compose -f scripts/docker/docker-compose.atlas.yml up -d"
|
|
21
21
|
exit 1
|
|
@@ -26,7 +26,7 @@ echo "[2/3] downloading + loading embeddings"
|
|
|
26
26
|
python3 "$HERE/fetch_embeddings.py"
|
|
27
27
|
|
|
28
28
|
echo "[3/3] creating vectorSearch index"
|
|
29
|
-
mongosh --quiet "mongodb://localhost:
|
|
29
|
+
mongosh --quiet "mongodb://localhost:29020/vector_prototype?directConnection=true" \
|
|
30
30
|
"$HERE/create_vector_index.js"
|
|
31
31
|
|
|
32
32
|
echo
|
metadata
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: parse-stack-next
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
+
- Adrian Curtin
|
|
7
8
|
- Anthony Persaud
|
|
8
9
|
- Henry Spindell
|
|
9
|
-
- Adrian Curtin
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
@@ -257,6 +257,7 @@ files:
|
|
|
257
257
|
- lib/parse-stack.rb
|
|
258
258
|
- lib/parse/acl_scope.rb
|
|
259
259
|
- lib/parse/agent.rb
|
|
260
|
+
- lib/parse/agent/approval_gate.rb
|
|
260
261
|
- lib/parse/agent/cancellation_token.rb
|
|
261
262
|
- lib/parse/agent/constraint_translator.rb
|
|
262
263
|
- lib/parse/agent/describe.rb
|
|
@@ -265,10 +266,12 @@ files:
|
|
|
265
266
|
- lib/parse/agent/mcp_dispatcher.rb
|
|
266
267
|
- lib/parse/agent/mcp_rack_app.rb
|
|
267
268
|
- lib/parse/agent/mcp_server.rb
|
|
269
|
+
- lib/parse/agent/mcp_subscriptions.rb
|
|
268
270
|
- lib/parse/agent/metadata_audit.rb
|
|
269
271
|
- lib/parse/agent/metadata_dsl.rb
|
|
270
272
|
- lib/parse/agent/metadata_registry.rb
|
|
271
273
|
- lib/parse/agent/pipeline_validator.rb
|
|
274
|
+
- lib/parse/agent/prompt_hardening.rb
|
|
272
275
|
- lib/parse/agent/prompts.rb
|
|
273
276
|
- lib/parse/agent/rate_limiter.rb
|
|
274
277
|
- lib/parse/agent/relation_graph.rb
|
|
@@ -391,6 +394,11 @@ files:
|
|
|
391
394
|
- lib/parse/query/n_plus_one_detector.rb
|
|
392
395
|
- lib/parse/query/operation.rb
|
|
393
396
|
- lib/parse/query/ordering.rb
|
|
397
|
+
- lib/parse/retrieval.rb
|
|
398
|
+
- lib/parse/retrieval/agent_tool.rb
|
|
399
|
+
- lib/parse/retrieval/chunk.rb
|
|
400
|
+
- lib/parse/retrieval/chunker.rb
|
|
401
|
+
- lib/parse/retrieval/retriever.rb
|
|
394
402
|
- lib/parse/schema.rb
|
|
395
403
|
- lib/parse/schema/index_migrator.rb
|
|
396
404
|
- lib/parse/schema/search_index_migrator.rb
|