@inkeep/agents-run-api 0.0.0-dev-20251014185355 → 0.0.0-dev-20251014185809
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/index.cjs +1 -30
- package/dist/index.js +1 -30
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1133,7 +1133,6 @@ async function a2aHandler(c, agent) {
|
|
|
1133
1133
|
});
|
|
1134
1134
|
}
|
|
1135
1135
|
switch (rpcRequest.method) {
|
|
1136
|
-
// Google A2A Protocol Methods
|
|
1137
1136
|
case "message/send":
|
|
1138
1137
|
return await handleMessageSend(c, agent, rpcRequest);
|
|
1139
1138
|
case "message/stream":
|
|
@@ -1144,7 +1143,6 @@ async function a2aHandler(c, agent) {
|
|
|
1144
1143
|
return await handleTasksCancel(c, agent, rpcRequest);
|
|
1145
1144
|
case "tasks/resubscribe":
|
|
1146
1145
|
return await handleTasksResubscribe(c, agent, rpcRequest);
|
|
1147
|
-
// Legacy/simplified methods
|
|
1148
1146
|
case "agent.invoke":
|
|
1149
1147
|
return await handleAgentInvoke(c, agent, rpcRequest);
|
|
1150
1148
|
case "agent.getCapabilities":
|
|
@@ -1192,7 +1190,6 @@ async function handleMessageSend(c, agent, request) {
|
|
|
1192
1190
|
metadata: {
|
|
1193
1191
|
blocking: params.configuration?.blocking ?? false,
|
|
1194
1192
|
custom: { agent_id: agentId || "" },
|
|
1195
|
-
// Pass through streaming metadata from the original message
|
|
1196
1193
|
...params.message.metadata
|
|
1197
1194
|
}
|
|
1198
1195
|
}
|
|
@@ -1380,7 +1377,6 @@ async function handleMessageSend(c, agent, request) {
|
|
|
1380
1377
|
const taskStatus = {
|
|
1381
1378
|
state: result.status.state,
|
|
1382
1379
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1383
|
-
// Don't include message field since it expects Message object, not string
|
|
1384
1380
|
};
|
|
1385
1381
|
if (params.configuration?.blocking === false) {
|
|
1386
1382
|
const taskResponse = {
|
|
@@ -3029,13 +3025,10 @@ var _ArtifactParser = class _ArtifactParser {
|
|
|
3029
3025
|
return await this.artifactService.getArtifactSummary(artifactId, toolCallId, artifactMap);
|
|
3030
3026
|
}
|
|
3031
3027
|
};
|
|
3032
|
-
// Shared regex patterns - support both single and double quotes
|
|
3033
3028
|
__publicField(_ArtifactParser, "ARTIFACT_REGEX", /<artifact:ref\s+id=(['"])([^'"]*?)\1\s+tool=(['"])([^'"]*?)\3\s*\/>/gs);
|
|
3034
3029
|
__publicField(_ArtifactParser, "ARTIFACT_CHECK_REGEX", /<artifact:ref\s+(?=.*id=['"][^'"]+['"])(?=.*tool=['"][^'"]+['"])[^>]*\/>/);
|
|
3035
|
-
// Artifact creation patterns
|
|
3036
3030
|
__publicField(_ArtifactParser, "ARTIFACT_CREATE_REGEX", /<artifact:create\s+([^>]+?)(?:\s*\/)?>(?:(.*?)<\/artifact:create>)?/gs);
|
|
3037
3031
|
__publicField(_ArtifactParser, "ATTR_REGEX", /(\w+)="([^"]*)"|(\w+)='([^']*)'|(\w+)=({[^}]+})/g);
|
|
3038
|
-
// Simple patterns for detecting incomplete artifacts at end of text
|
|
3039
3032
|
__publicField(_ArtifactParser, "ARTIFACT_PATTERNS", [
|
|
3040
3033
|
"<a",
|
|
3041
3034
|
"<ar",
|
|
@@ -3682,7 +3675,6 @@ ${previousSummaries.map((s, i) => `${i + 1}. ${s}`).join("\n")}
|
|
|
3682
3675
|
` : "";
|
|
3683
3676
|
const selectionSchema = z6.z.object(
|
|
3684
3677
|
Object.fromEntries([
|
|
3685
|
-
// Add no_relevant_updates schema
|
|
3686
3678
|
[
|
|
3687
3679
|
"no_relevant_updates",
|
|
3688
3680
|
z6.z.object({
|
|
@@ -3691,7 +3683,6 @@ ${previousSummaries.map((s, i) => `${i + 1}. ${s}`).join("\n")}
|
|
|
3691
3683
|
"Use when nothing substantially new to report. Should only use on its own."
|
|
3692
3684
|
)
|
|
3693
3685
|
],
|
|
3694
|
-
// Add all other component schemas
|
|
3695
3686
|
...statusComponents.map((component) => [
|
|
3696
3687
|
component.type,
|
|
3697
3688
|
this.getComponentSchema(component).optional().describe(component.description || component.type)
|
|
@@ -3921,7 +3912,6 @@ ${this.statusUpdateState?.config.prompt?.trim() || ""}`;
|
|
|
3921
3912
|
);
|
|
3922
3913
|
break;
|
|
3923
3914
|
}
|
|
3924
|
-
// INTERNAL OPERATIONS - DO NOT EXPOSE TO STATUS UPDATES
|
|
3925
3915
|
case "transfer":
|
|
3926
3916
|
case "delegation_sent":
|
|
3927
3917
|
case "delegation_returned":
|
|
@@ -4872,7 +4862,6 @@ var _IncrementalStreamParser = class _IncrementalStreamParser {
|
|
|
4872
4862
|
}
|
|
4873
4863
|
}
|
|
4874
4864
|
};
|
|
4875
|
-
// Memory management constants
|
|
4876
4865
|
__publicField(_IncrementalStreamParser, "MAX_SNAPSHOT_SIZE", 100);
|
|
4877
4866
|
// Max number of snapshots to keep
|
|
4878
4867
|
__publicField(_IncrementalStreamParser, "MAX_STREAMED_SIZE", 1e3);
|
|
@@ -5838,7 +5827,6 @@ var A2AClient = class {
|
|
|
5838
5827
|
const endpoint = await this._getServiceEndpoint();
|
|
5839
5828
|
const clientRequestId = this.requestIdCounter++;
|
|
5840
5829
|
const rpcRequest = {
|
|
5841
|
-
// This is the initial JSON-RPC request to establish the stream
|
|
5842
5830
|
jsonrpc: "2.0",
|
|
5843
5831
|
method: "message/stream",
|
|
5844
5832
|
params,
|
|
@@ -5941,7 +5929,6 @@ var A2AClient = class {
|
|
|
5941
5929
|
const endpoint = await this._getServiceEndpoint();
|
|
5942
5930
|
const clientRequestId = this.requestIdCounter++;
|
|
5943
5931
|
const rpcRequest = {
|
|
5944
|
-
// Initial JSON-RPC request to establish the stream
|
|
5945
5932
|
jsonrpc: "2.0",
|
|
5946
5933
|
method: "tasks/resubscribe",
|
|
5947
5934
|
params,
|
|
@@ -6981,7 +6968,6 @@ ${creationInstructions}
|
|
|
6981
6968
|
toolXml = toolXml.replace("{{TOOL_PARAMETERS_SCHEMA}}", parametersXml);
|
|
6982
6969
|
return toolXml;
|
|
6983
6970
|
}
|
|
6984
|
-
// Data component methods removed - handled by Phase2Config
|
|
6985
6971
|
generateParametersXml(inputSchema) {
|
|
6986
6972
|
if (!inputSchema) {
|
|
6987
6973
|
return "<type>object</type>\n <properties>\n </properties>\n <required>[]</required>";
|
|
@@ -7437,11 +7423,8 @@ var logger18 = agentsCore.getLogger("Agent");
|
|
|
7437
7423
|
var CONSTANTS = {
|
|
7438
7424
|
MAX_GENERATION_STEPS: 12,
|
|
7439
7425
|
PHASE_1_TIMEOUT_MS: 27e4,
|
|
7440
|
-
// 4.5 minutes for streaming phase 1
|
|
7441
7426
|
NON_STREAMING_PHASE_1_TIMEOUT_MS: 9e4,
|
|
7442
|
-
// 1.5 minutes for non-streaming phase 1
|
|
7443
7427
|
PHASE_2_TIMEOUT_MS: 9e4
|
|
7444
|
-
// 1.5 minutes for phase 2 structured output
|
|
7445
7428
|
};
|
|
7446
7429
|
function validateModel(modelString, modelType) {
|
|
7447
7430
|
if (!modelString?.trim()) {
|
|
@@ -7496,7 +7479,6 @@ var Agent = class {
|
|
|
7496
7479
|
this.config = {
|
|
7497
7480
|
...config,
|
|
7498
7481
|
dataComponents: processedDataComponents,
|
|
7499
|
-
// Set default conversation history if not provided
|
|
7500
7482
|
conversationHistoryConfig: config.conversationHistoryConfig || createDefaultConversationHistoryConfig()
|
|
7501
7483
|
};
|
|
7502
7484
|
this.credentialStoreRegistry = credentialStoreRegistry;
|
|
@@ -9311,7 +9293,6 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
9311
9293
|
transferRelations: []
|
|
9312
9294
|
})),
|
|
9313
9295
|
delegateRelations: [
|
|
9314
|
-
// Internal delegate relations
|
|
9315
9296
|
...enhancedInternalRelations.filter((relation) => relation.relationType === "delegate").map((relation) => ({
|
|
9316
9297
|
type: "internal",
|
|
9317
9298
|
config: {
|
|
@@ -9329,7 +9310,6 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
9329
9310
|
transferRelations: []
|
|
9330
9311
|
}
|
|
9331
9312
|
})),
|
|
9332
|
-
// External delegate relations
|
|
9333
9313
|
...externalRelations.map((relation) => ({
|
|
9334
9314
|
type: "external",
|
|
9335
9315
|
config: {
|
|
@@ -9956,7 +9936,6 @@ var SSEStreamHelper = class {
|
|
|
9956
9936
|
this.stream = stream2;
|
|
9957
9937
|
this.requestId = requestId2;
|
|
9958
9938
|
this.timestamp = timestamp;
|
|
9959
|
-
// Stream queuing for proper event ordering
|
|
9960
9939
|
__publicField(this, "isTextStreaming", false);
|
|
9961
9940
|
__publicField(this, "queuedEvents", []);
|
|
9962
9941
|
}
|
|
@@ -10136,14 +10115,11 @@ var _VercelDataStreamHelper = class _VercelDataStreamHelper {
|
|
|
10136
10115
|
__publicField(this, "sessionId");
|
|
10137
10116
|
// 5MB limit (more generous during request)
|
|
10138
10117
|
__publicField(this, "isCompleted", false);
|
|
10139
|
-
// Stream queuing for proper event ordering
|
|
10140
10118
|
__publicField(this, "isTextStreaming", false);
|
|
10141
10119
|
__publicField(this, "queuedEvents", []);
|
|
10142
|
-
// Timing tracking for text sequences (text-end to text-start gap)
|
|
10143
10120
|
__publicField(this, "lastTextEndTimestamp", 0);
|
|
10144
10121
|
__publicField(this, "TEXT_GAP_THRESHOLD", 2e3);
|
|
10145
10122
|
// milliseconds - if gap between text sequences is less than this, queue operations
|
|
10146
|
-
// Connection management and forced cleanup
|
|
10147
10123
|
__publicField(this, "connectionDropTimer");
|
|
10148
10124
|
__publicField(this, "MAX_LIFETIME_MS", 6e5);
|
|
10149
10125
|
this.connectionDropTimer = setTimeout(() => {
|
|
@@ -10153,7 +10129,6 @@ var _VercelDataStreamHelper = class _VercelDataStreamHelper {
|
|
|
10153
10129
|
setSessionId(sessionId) {
|
|
10154
10130
|
this.sessionId = sessionId;
|
|
10155
10131
|
}
|
|
10156
|
-
// This mirrors SSEStreamHelper API but outputs using Vercel AI SDK writer
|
|
10157
10132
|
async writeRole(_ = "assistant") {
|
|
10158
10133
|
}
|
|
10159
10134
|
async writeContent(content) {
|
|
@@ -10451,7 +10426,6 @@ var _VercelDataStreamHelper = class _VercelDataStreamHelper {
|
|
|
10451
10426
|
this.cleanup();
|
|
10452
10427
|
}
|
|
10453
10428
|
};
|
|
10454
|
-
// Memory management - focused on connection completion cleanup
|
|
10455
10429
|
__publicField(_VercelDataStreamHelper, "MAX_BUFFER_SIZE", 5 * 1024 * 1024);
|
|
10456
10430
|
var VercelDataStreamHelper = _VercelDataStreamHelper;
|
|
10457
10431
|
function createVercelStreamHelper(writer) {
|
|
@@ -10523,7 +10497,6 @@ function createMCPStreamHelper() {
|
|
|
10523
10497
|
var logger22 = agentsCore.getLogger("ExecutionHandler");
|
|
10524
10498
|
var ExecutionHandler = class {
|
|
10525
10499
|
constructor() {
|
|
10526
|
-
// Hardcoded error limit - separate from configurable stopWhen
|
|
10527
10500
|
__publicField(this, "MAX_ERRORS", 3);
|
|
10528
10501
|
}
|
|
10529
10502
|
/**
|
|
@@ -11912,9 +11885,7 @@ var handleExistingSessionRequest = async (body, executionContext, validatedConte
|
|
|
11912
11885
|
await agentsCore.updateConversation(dbClient_default)({
|
|
11913
11886
|
scopes: { tenantId, projectId },
|
|
11914
11887
|
conversationId: sessionId,
|
|
11915
|
-
data: {
|
|
11916
|
-
// Just updating the timestamp by calling update
|
|
11917
|
-
}
|
|
11888
|
+
data: {}
|
|
11918
11889
|
});
|
|
11919
11890
|
const transport = new streamableHttp_js.StreamableHTTPServerTransport({
|
|
11920
11891
|
sessionIdGenerator: () => sessionId
|
package/dist/index.js
CHANGED
|
@@ -234,7 +234,6 @@ async function a2aHandler(c, agent) {
|
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
236
|
switch (rpcRequest.method) {
|
|
237
|
-
// Google A2A Protocol Methods
|
|
238
237
|
case "message/send":
|
|
239
238
|
return await handleMessageSend(c, agent, rpcRequest);
|
|
240
239
|
case "message/stream":
|
|
@@ -245,7 +244,6 @@ async function a2aHandler(c, agent) {
|
|
|
245
244
|
return await handleTasksCancel(c, agent, rpcRequest);
|
|
246
245
|
case "tasks/resubscribe":
|
|
247
246
|
return await handleTasksResubscribe(c, agent, rpcRequest);
|
|
248
|
-
// Legacy/simplified methods
|
|
249
247
|
case "agent.invoke":
|
|
250
248
|
return await handleAgentInvoke(c, agent, rpcRequest);
|
|
251
249
|
case "agent.getCapabilities":
|
|
@@ -293,7 +291,6 @@ async function handleMessageSend(c, agent, request) {
|
|
|
293
291
|
metadata: {
|
|
294
292
|
blocking: params.configuration?.blocking ?? false,
|
|
295
293
|
custom: { agent_id: agentId || "" },
|
|
296
|
-
// Pass through streaming metadata from the original message
|
|
297
294
|
...params.message.metadata
|
|
298
295
|
}
|
|
299
296
|
}
|
|
@@ -481,7 +478,6 @@ async function handleMessageSend(c, agent, request) {
|
|
|
481
478
|
const taskStatus = {
|
|
482
479
|
state: result.status.state,
|
|
483
480
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
484
|
-
// Don't include message field since it expects Message object, not string
|
|
485
481
|
};
|
|
486
482
|
if (params.configuration?.blocking === false) {
|
|
487
483
|
const taskResponse = {
|
|
@@ -2109,13 +2105,10 @@ var _ArtifactParser = class _ArtifactParser {
|
|
|
2109
2105
|
return await this.artifactService.getArtifactSummary(artifactId, toolCallId, artifactMap);
|
|
2110
2106
|
}
|
|
2111
2107
|
};
|
|
2112
|
-
// Shared regex patterns - support both single and double quotes
|
|
2113
2108
|
__publicField(_ArtifactParser, "ARTIFACT_REGEX", /<artifact:ref\s+id=(['"])([^'"]*?)\1\s+tool=(['"])([^'"]*?)\3\s*\/>/gs);
|
|
2114
2109
|
__publicField(_ArtifactParser, "ARTIFACT_CHECK_REGEX", /<artifact:ref\s+(?=.*id=['"][^'"]+['"])(?=.*tool=['"][^'"]+['"])[^>]*\/>/);
|
|
2115
|
-
// Artifact creation patterns
|
|
2116
2110
|
__publicField(_ArtifactParser, "ARTIFACT_CREATE_REGEX", /<artifact:create\s+([^>]+?)(?:\s*\/)?>(?:(.*?)<\/artifact:create>)?/gs);
|
|
2117
2111
|
__publicField(_ArtifactParser, "ATTR_REGEX", /(\w+)="([^"]*)"|(\w+)='([^']*)'|(\w+)=({[^}]+})/g);
|
|
2118
|
-
// Simple patterns for detecting incomplete artifacts at end of text
|
|
2119
2112
|
__publicField(_ArtifactParser, "ARTIFACT_PATTERNS", [
|
|
2120
2113
|
"<a",
|
|
2121
2114
|
"<ar",
|
|
@@ -2762,7 +2755,6 @@ ${previousSummaries.map((s, i) => `${i + 1}. ${s}`).join("\n")}
|
|
|
2762
2755
|
` : "";
|
|
2763
2756
|
const selectionSchema = z.object(
|
|
2764
2757
|
Object.fromEntries([
|
|
2765
|
-
// Add no_relevant_updates schema
|
|
2766
2758
|
[
|
|
2767
2759
|
"no_relevant_updates",
|
|
2768
2760
|
z.object({
|
|
@@ -2771,7 +2763,6 @@ ${previousSummaries.map((s, i) => `${i + 1}. ${s}`).join("\n")}
|
|
|
2771
2763
|
"Use when nothing substantially new to report. Should only use on its own."
|
|
2772
2764
|
)
|
|
2773
2765
|
],
|
|
2774
|
-
// Add all other component schemas
|
|
2775
2766
|
...statusComponents.map((component) => [
|
|
2776
2767
|
component.type,
|
|
2777
2768
|
this.getComponentSchema(component).optional().describe(component.description || component.type)
|
|
@@ -3001,7 +2992,6 @@ ${this.statusUpdateState?.config.prompt?.trim() || ""}`;
|
|
|
3001
2992
|
);
|
|
3002
2993
|
break;
|
|
3003
2994
|
}
|
|
3004
|
-
// INTERNAL OPERATIONS - DO NOT EXPOSE TO STATUS UPDATES
|
|
3005
2995
|
case "transfer":
|
|
3006
2996
|
case "delegation_sent":
|
|
3007
2997
|
case "delegation_returned":
|
|
@@ -3943,7 +3933,6 @@ var _IncrementalStreamParser = class _IncrementalStreamParser {
|
|
|
3943
3933
|
}
|
|
3944
3934
|
}
|
|
3945
3935
|
};
|
|
3946
|
-
// Memory management constants
|
|
3947
3936
|
__publicField(_IncrementalStreamParser, "MAX_SNAPSHOT_SIZE", 100);
|
|
3948
3937
|
// Max number of snapshots to keep
|
|
3949
3938
|
__publicField(_IncrementalStreamParser, "MAX_STREAMED_SIZE", 1e3);
|
|
@@ -4898,7 +4887,6 @@ var A2AClient = class {
|
|
|
4898
4887
|
const endpoint = await this._getServiceEndpoint();
|
|
4899
4888
|
const clientRequestId = this.requestIdCounter++;
|
|
4900
4889
|
const rpcRequest = {
|
|
4901
|
-
// This is the initial JSON-RPC request to establish the stream
|
|
4902
4890
|
jsonrpc: "2.0",
|
|
4903
4891
|
method: "message/stream",
|
|
4904
4892
|
params,
|
|
@@ -5001,7 +4989,6 @@ var A2AClient = class {
|
|
|
5001
4989
|
const endpoint = await this._getServiceEndpoint();
|
|
5002
4990
|
const clientRequestId = this.requestIdCounter++;
|
|
5003
4991
|
const rpcRequest = {
|
|
5004
|
-
// Initial JSON-RPC request to establish the stream
|
|
5005
4992
|
jsonrpc: "2.0",
|
|
5006
4993
|
method: "tasks/resubscribe",
|
|
5007
4994
|
params,
|
|
@@ -6036,7 +6023,6 @@ ${creationInstructions}
|
|
|
6036
6023
|
toolXml = toolXml.replace("{{TOOL_PARAMETERS_SCHEMA}}", parametersXml);
|
|
6037
6024
|
return toolXml;
|
|
6038
6025
|
}
|
|
6039
|
-
// Data component methods removed - handled by Phase2Config
|
|
6040
6026
|
generateParametersXml(inputSchema) {
|
|
6041
6027
|
if (!inputSchema) {
|
|
6042
6028
|
return "<type>object</type>\n <properties>\n </properties>\n <required>[]</required>";
|
|
@@ -6492,11 +6478,8 @@ var logger16 = getLogger("Agent");
|
|
|
6492
6478
|
var CONSTANTS = {
|
|
6493
6479
|
MAX_GENERATION_STEPS: 12,
|
|
6494
6480
|
PHASE_1_TIMEOUT_MS: 27e4,
|
|
6495
|
-
// 4.5 minutes for streaming phase 1
|
|
6496
6481
|
NON_STREAMING_PHASE_1_TIMEOUT_MS: 9e4,
|
|
6497
|
-
// 1.5 minutes for non-streaming phase 1
|
|
6498
6482
|
PHASE_2_TIMEOUT_MS: 9e4
|
|
6499
|
-
// 1.5 minutes for phase 2 structured output
|
|
6500
6483
|
};
|
|
6501
6484
|
function validateModel(modelString, modelType) {
|
|
6502
6485
|
if (!modelString?.trim()) {
|
|
@@ -6551,7 +6534,6 @@ var Agent = class {
|
|
|
6551
6534
|
this.config = {
|
|
6552
6535
|
...config,
|
|
6553
6536
|
dataComponents: processedDataComponents,
|
|
6554
|
-
// Set default conversation history if not provided
|
|
6555
6537
|
conversationHistoryConfig: config.conversationHistoryConfig || createDefaultConversationHistoryConfig()
|
|
6556
6538
|
};
|
|
6557
6539
|
this.credentialStoreRegistry = credentialStoreRegistry;
|
|
@@ -8366,7 +8348,6 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
8366
8348
|
transferRelations: []
|
|
8367
8349
|
})),
|
|
8368
8350
|
delegateRelations: [
|
|
8369
|
-
// Internal delegate relations
|
|
8370
8351
|
...enhancedInternalRelations.filter((relation) => relation.relationType === "delegate").map((relation) => ({
|
|
8371
8352
|
type: "internal",
|
|
8372
8353
|
config: {
|
|
@@ -8384,7 +8365,6 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
8384
8365
|
transferRelations: []
|
|
8385
8366
|
}
|
|
8386
8367
|
})),
|
|
8387
|
-
// External delegate relations
|
|
8388
8368
|
...externalRelations.map((relation) => ({
|
|
8389
8369
|
type: "external",
|
|
8390
8370
|
config: {
|
|
@@ -8997,7 +8977,6 @@ var SSEStreamHelper = class {
|
|
|
8997
8977
|
this.stream = stream2;
|
|
8998
8978
|
this.requestId = requestId2;
|
|
8999
8979
|
this.timestamp = timestamp;
|
|
9000
|
-
// Stream queuing for proper event ordering
|
|
9001
8980
|
__publicField(this, "isTextStreaming", false);
|
|
9002
8981
|
__publicField(this, "queuedEvents", []);
|
|
9003
8982
|
}
|
|
@@ -9177,14 +9156,11 @@ var _VercelDataStreamHelper = class _VercelDataStreamHelper {
|
|
|
9177
9156
|
__publicField(this, "sessionId");
|
|
9178
9157
|
// 5MB limit (more generous during request)
|
|
9179
9158
|
__publicField(this, "isCompleted", false);
|
|
9180
|
-
// Stream queuing for proper event ordering
|
|
9181
9159
|
__publicField(this, "isTextStreaming", false);
|
|
9182
9160
|
__publicField(this, "queuedEvents", []);
|
|
9183
|
-
// Timing tracking for text sequences (text-end to text-start gap)
|
|
9184
9161
|
__publicField(this, "lastTextEndTimestamp", 0);
|
|
9185
9162
|
__publicField(this, "TEXT_GAP_THRESHOLD", 2e3);
|
|
9186
9163
|
// milliseconds - if gap between text sequences is less than this, queue operations
|
|
9187
|
-
// Connection management and forced cleanup
|
|
9188
9164
|
__publicField(this, "connectionDropTimer");
|
|
9189
9165
|
__publicField(this, "MAX_LIFETIME_MS", 6e5);
|
|
9190
9166
|
this.connectionDropTimer = setTimeout(() => {
|
|
@@ -9194,7 +9170,6 @@ var _VercelDataStreamHelper = class _VercelDataStreamHelper {
|
|
|
9194
9170
|
setSessionId(sessionId) {
|
|
9195
9171
|
this.sessionId = sessionId;
|
|
9196
9172
|
}
|
|
9197
|
-
// This mirrors SSEStreamHelper API but outputs using Vercel AI SDK writer
|
|
9198
9173
|
async writeRole(_ = "assistant") {
|
|
9199
9174
|
}
|
|
9200
9175
|
async writeContent(content) {
|
|
@@ -9492,7 +9467,6 @@ var _VercelDataStreamHelper = class _VercelDataStreamHelper {
|
|
|
9492
9467
|
this.cleanup();
|
|
9493
9468
|
}
|
|
9494
9469
|
};
|
|
9495
|
-
// Memory management - focused on connection completion cleanup
|
|
9496
9470
|
__publicField(_VercelDataStreamHelper, "MAX_BUFFER_SIZE", 5 * 1024 * 1024);
|
|
9497
9471
|
var VercelDataStreamHelper = _VercelDataStreamHelper;
|
|
9498
9472
|
function createVercelStreamHelper(writer) {
|
|
@@ -9564,7 +9538,6 @@ function createMCPStreamHelper() {
|
|
|
9564
9538
|
var logger20 = getLogger("ExecutionHandler");
|
|
9565
9539
|
var ExecutionHandler = class {
|
|
9566
9540
|
constructor() {
|
|
9567
|
-
// Hardcoded error limit - separate from configurable stopWhen
|
|
9568
9541
|
__publicField(this, "MAX_ERRORS", 3);
|
|
9569
9542
|
}
|
|
9570
9543
|
/**
|
|
@@ -10944,9 +10917,7 @@ var handleExistingSessionRequest = async (body, executionContext, validatedConte
|
|
|
10944
10917
|
await updateConversation(dbClient_default)({
|
|
10945
10918
|
scopes: { tenantId, projectId },
|
|
10946
10919
|
conversationId: sessionId,
|
|
10947
|
-
data: {
|
|
10948
|
-
// Just updating the timestamp by calling update
|
|
10949
|
-
}
|
|
10920
|
+
data: {}
|
|
10950
10921
|
});
|
|
10951
10922
|
const transport = new StreamableHTTPServerTransport({
|
|
10952
10923
|
sessionIdGenerator: () => sessionId
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-run-api",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20251014185809",
|
|
4
4
|
"description": "Agents Run API for Inkeep Agent Framework - handles chat, agent execution, and streaming",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"traverse": "^0.6.11",
|
|
52
52
|
"ts-pattern": "^5.7.1",
|
|
53
53
|
"zod": "^4.1.11",
|
|
54
|
-
"@inkeep/agents-core": "^0.0.0-dev-
|
|
54
|
+
"@inkeep/agents-core": "^0.0.0-dev-20251014185809"
|
|
55
55
|
},
|
|
56
56
|
"optionalDependencies": {
|
|
57
57
|
"keytar": "^7.9.0"
|