@productbrain/mcp 0.0.1-beta.1919 → 0.0.1-beta.1934
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/{chunk-ZKW7JZUF.js → chunk-P65NSWZE.js} +22 -4
- package/dist/{chunk-ZKW7JZUF.js.map → chunk-P65NSWZE.js.map} +1 -1
- package/dist/{chunk-6JNK5DIZ.js → chunk-VFSXDXLC.js} +108 -41
- package/dist/chunk-VFSXDXLC.js.map +1 -0
- package/dist/cli/index.js +1 -1
- package/dist/http.js +5 -5
- package/dist/http.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{setup-XWKTPL7V.js → setup-EALJFCQF.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-6JNK5DIZ.js.map +0 -1
- /package/dist/{setup-XWKTPL7V.js.map → setup-EALJFCQF.js.map} +0 -0
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
getAgentSessionId,
|
|
5
5
|
getApiKeyScope,
|
|
6
6
|
getAuditLog,
|
|
7
|
+
getConversationId,
|
|
7
8
|
getRequestApiKey,
|
|
8
9
|
getWorkspaceContext,
|
|
9
10
|
getWorkspaceId,
|
|
@@ -37,7 +38,7 @@ import {
|
|
|
37
38
|
trackSessionCaptureRate,
|
|
38
39
|
trackWriteBackHintServed,
|
|
39
40
|
trackZeroCaptureAuditFired
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-VFSXDXLC.js";
|
|
41
42
|
|
|
42
43
|
// src/server.ts
|
|
43
44
|
import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -10666,7 +10667,11 @@ async function buildOrientResponse(wsCtx, agentSessionId, errors, task) {
|
|
|
10666
10667
|
let priorSessions = [];
|
|
10667
10668
|
let recoveryBlock = null;
|
|
10668
10669
|
try {
|
|
10669
|
-
const
|
|
10670
|
+
const recentConversationId = getConversationId();
|
|
10671
|
+
const sessionsResult = await kernelQuery(
|
|
10672
|
+
"agent.recentSessions",
|
|
10673
|
+
recentConversationId ? { limit: 3, conversationId: recentConversationId } : { limit: 3 }
|
|
10674
|
+
);
|
|
10670
10675
|
priorSessions = sessionsResult?.sessions ?? [];
|
|
10671
10676
|
recoveryBlock = sessionsResult?.recoveryBlock ?? null;
|
|
10672
10677
|
} catch {
|
|
@@ -12102,7 +12107,16 @@ function reportOrientWrapperBytes(toolResult, truncated, tier, taskProvided) {
|
|
|
12102
12107
|
try {
|
|
12103
12108
|
const fullToolOutput = JSON.stringify({ content: toolResult.content ?? [] });
|
|
12104
12109
|
const bytes = Buffer.byteLength(fullToolOutput, "utf8");
|
|
12105
|
-
|
|
12110
|
+
const sessionId = getAgentSessionId();
|
|
12111
|
+
const conversationId = getConversationId();
|
|
12112
|
+
void kernelMutation("agent.reportOrientMetric", {
|
|
12113
|
+
bytes,
|
|
12114
|
+
truncated,
|
|
12115
|
+
tier,
|
|
12116
|
+
taskProvided,
|
|
12117
|
+
...sessionId ? { sessionId } : {},
|
|
12118
|
+
...conversationId ? { conversationId } : {}
|
|
12119
|
+
}).catch(() => {
|
|
12106
12120
|
});
|
|
12107
12121
|
} catch {
|
|
12108
12122
|
}
|
|
@@ -12205,6 +12219,10 @@ async function _handleOrient({ mode = "full", tier, task, scope }) {
|
|
|
12205
12219
|
if (task) orientArgs.task = task;
|
|
12206
12220
|
if (scope) orientArgs.scope = scope;
|
|
12207
12221
|
if (callTier) orientArgs.tier = callTier;
|
|
12222
|
+
orientArgs.renderMode = "json";
|
|
12223
|
+
if (agentSessionId) orientArgs.sessionId = agentSessionId;
|
|
12224
|
+
const orientConversationId = getConversationId();
|
|
12225
|
+
if (orientConversationId) orientArgs.conversationId = orientConversationId;
|
|
12208
12226
|
orientView = await kernelQuery("chain.getOrientView", orientArgs);
|
|
12209
12227
|
} catch {
|
|
12210
12228
|
}
|
|
@@ -14773,4 +14791,4 @@ export {
|
|
|
14773
14791
|
createProductBrainServer,
|
|
14774
14792
|
initFeatureFlags
|
|
14775
14793
|
};
|
|
14776
|
-
//# sourceMappingURL=chunk-
|
|
14794
|
+
//# sourceMappingURL=chunk-P65NSWZE.js.map
|