vantage-peers-mcp 2.13.0 → 2.13.1
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.
- package/dist/src/tools.js +32 -20
- package/package.json +1 -1
package/dist/src/tools.js
CHANGED
|
@@ -1724,16 +1724,23 @@ export function registerTools(server, convex, oauthCtx) {
|
|
|
1724
1724
|
};
|
|
1725
1725
|
}
|
|
1726
1726
|
const memories = await convex.query("memories:listMemories", queryArgs);
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1727
|
+
// S3.3 B8 — extract from Convex paginationOpts shape {value, continueCursor, isDone}
|
|
1728
|
+
// Pre-fix bug: handler read memories?.page (undefined) → rawList = [] always.
|
|
1729
|
+
const rawList = Array.isArray(memories?.value)
|
|
1730
|
+
? memories.value
|
|
1731
|
+
: [];
|
|
1732
1732
|
const filteredList = scopeFilterList(oauthCtx, rawList);
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
const
|
|
1733
|
+
// Encode continueCursor → opaque nextCursor token for the MCP caller.
|
|
1734
|
+
const backendNextCursor = memories?.continueCursor ?? null;
|
|
1735
|
+
const isDone = memories?.isDone ?? true;
|
|
1736
|
+
const nextCursor = !isDone && backendNextCursor !== null
|
|
1737
|
+
? encodeCursor({ backendCursor: backendNextCursor })
|
|
1738
|
+
: undefined;
|
|
1739
|
+
const envelope = {
|
|
1740
|
+
items: filteredList,
|
|
1741
|
+
...(nextCursor !== undefined ? { nextCursor } : {}),
|
|
1742
|
+
};
|
|
1743
|
+
const text = capListResponseBytes(filteredList, JSON.stringify(envelope, null, 2), "list_episodes");
|
|
1737
1744
|
return {
|
|
1738
1745
|
content: [{ type: "text", text }],
|
|
1739
1746
|
};
|
|
@@ -2002,22 +2009,27 @@ export function registerTools(server, convex, oauthCtx) {
|
|
|
2002
2009
|
};
|
|
2003
2010
|
}
|
|
2004
2011
|
const memories = await convex.query("memories:listMemories", queryArgs);
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2012
|
+
// S3.3 B8 — extract from Convex paginationOpts shape {value, continueCursor, isDone}
|
|
2013
|
+
// Pre-fix bug: handler read memories?.page (undefined) → rawList = [] always.
|
|
2014
|
+
const rawList = Array.isArray(memories?.value)
|
|
2015
|
+
? memories.value
|
|
2016
|
+
: [];
|
|
2010
2017
|
// S3.1.A Wave A — row-level scope filter on the post-query list.
|
|
2011
2018
|
// Master + legacy bearer pass through unchanged. Non-master clients
|
|
2012
2019
|
// see only rows whose createdBy ∈ fromAllowList OR whose namespace
|
|
2013
2020
|
// matches one of namespaceReadPrefixes (exact or '/' boundary).
|
|
2014
2021
|
const filteredList = scopeFilterList(oauthCtx, rawList);
|
|
2015
|
-
//
|
|
2016
|
-
|
|
2017
|
-
const
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2022
|
+
// Encode continueCursor → opaque nextCursor token for the MCP caller.
|
|
2023
|
+
const backendNextCursor = memories?.continueCursor ?? null;
|
|
2024
|
+
const isDone = memories?.isDone ?? true;
|
|
2025
|
+
const nextCursor = !isDone && backendNextCursor !== null
|
|
2026
|
+
? encodeCursor({ backendCursor: backendNextCursor })
|
|
2027
|
+
: undefined;
|
|
2028
|
+
const filteredEnvelope = {
|
|
2029
|
+
items: filteredList,
|
|
2030
|
+
...(nextCursor !== undefined ? { nextCursor } : {}),
|
|
2031
|
+
};
|
|
2032
|
+
const baseText = capListResponseBytes(filteredList, JSON.stringify(filteredEnvelope, null, 2), "list_memories");
|
|
2021
2033
|
const text = appendMarkerIfEnabled(baseText, () => ({
|
|
2022
2034
|
kind: "memory-quote",
|
|
2023
2035
|
items: filteredList.map((m) => ({
|
package/package.json
CHANGED