@inkeep/agents-run-api 0.0.0-dev-20251009194333 → 0.0.0-dev-20251009215610
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.
|
@@ -45,8 +45,8 @@ async function saveA2AMessageResponse(response, params) {
|
|
|
45
45
|
},
|
|
46
46
|
visibility: params.visibility,
|
|
47
47
|
messageType: params.messageType,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
fromSubAgentId: params.fromSubAgentId,
|
|
49
|
+
toSubAgentId: params.toSubAgentId,
|
|
50
50
|
fromExternalAgentId: params.fromExternalAgentId,
|
|
51
51
|
toExternalAgentId: params.toExternalAgentId,
|
|
52
52
|
a2aTaskId: params.a2aTaskId,
|
|
@@ -67,23 +67,23 @@ async function getScopedHistory({
|
|
|
67
67
|
conversationId,
|
|
68
68
|
options
|
|
69
69
|
});
|
|
70
|
-
if (!filters || !filters.
|
|
70
|
+
if (!filters || !filters.subAgentId && !filters.taskId) {
|
|
71
71
|
return messages;
|
|
72
72
|
}
|
|
73
73
|
const relevantMessages = messages.filter((msg) => {
|
|
74
74
|
if (msg.role === "user") return true;
|
|
75
75
|
let matchesAgent = true;
|
|
76
76
|
let matchesTask = true;
|
|
77
|
-
if (filters.
|
|
78
|
-
matchesAgent = msg.role === "agent" && msg.visibility === "user-facing" || msg.toAgentId === filters.
|
|
77
|
+
if (filters.subAgentId) {
|
|
78
|
+
matchesAgent = msg.role === "agent" && msg.visibility === "user-facing" || msg.toAgentId === filters.subAgentId || msg.fromAgentId === filters.subAgentId;
|
|
79
79
|
}
|
|
80
80
|
if (filters.taskId) {
|
|
81
81
|
matchesTask = msg.taskId === filters.taskId || msg.a2aTaskId === filters.taskId;
|
|
82
82
|
}
|
|
83
|
-
if (filters.
|
|
83
|
+
if (filters.subAgentId && filters.taskId) {
|
|
84
84
|
return matchesAgent && matchesTask;
|
|
85
85
|
}
|
|
86
|
-
if (filters.
|
|
86
|
+
if (filters.subAgentId) {
|
|
87
87
|
return matchesAgent;
|
|
88
88
|
}
|
|
89
89
|
if (filters.taskId) {
|
|
@@ -184,7 +184,9 @@ async function getConversationScopedArtifacts(params) {
|
|
|
184
184
|
if (visibleMessages.length === 0) {
|
|
185
185
|
return [];
|
|
186
186
|
}
|
|
187
|
-
const visibleMessageIds = visibleMessages.filter(
|
|
187
|
+
const visibleMessageIds = visibleMessages.filter(
|
|
188
|
+
(msg) => !(msg.messageType === "system" && msg.content?.text?.includes("Previous conversation history truncated"))
|
|
189
|
+
).map((msg) => msg.id);
|
|
188
190
|
if (visibleMessageIds.length === 0) {
|
|
189
191
|
return [];
|
|
190
192
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultConversationHistoryConfig, getConversationScopedArtifacts, getFormattedConversationHistory, getFullConversationContext, getScopedHistory, getUserFacingHistory, saveA2AMessageResponse } from './chunk-
|
|
1
|
+
export { createDefaultConversationHistoryConfig, getConversationScopedArtifacts, getFormattedConversationHistory, getFullConversationContext, getScopedHistory, getUserFacingHistory, saveA2AMessageResponse } from './chunk-DQQRVSJS.js';
|