@inkeep/agents-run-api 0.0.0-dev-20260105192809 → 0.0.0-dev-20260105201718

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.
@@ -422,7 +422,8 @@ async function handleTasksGet(c, _agent, request) {
422
422
  parts: [{
423
423
  kind: "text",
424
424
  text: `Task ${params.id} completed successfully`
425
- }]
425
+ }],
426
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
426
427
  }],
427
428
  kind: "task"
428
429
  };
@@ -124,7 +124,6 @@ declare class Agent {
124
124
  /**
125
125
  * Simple compression fallback: drop oldest messages to fit under token limit
126
126
  */
127
- private simpleCompression;
128
127
  /**
129
128
  * Set delegation status for this agent instance
130
129
  */
@@ -215,6 +214,53 @@ declare class Agent {
215
214
  apiKey?: string;
216
215
  };
217
216
  }): Promise<any>;
217
+ /**
218
+ * Setup generation context and initialize streaming helper
219
+ */
220
+ private setupGenerationContext;
221
+ /**
222
+ * Load all tools and system prompts in parallel, then combine and sanitize them
223
+ */
224
+ private loadToolsAndPrompts;
225
+ /**
226
+ * Build conversation history based on configuration mode and filters
227
+ */
228
+ private buildConversationHistory;
229
+ /**
230
+ * Configure model settings, timeouts, and streaming behavior
231
+ */
232
+ private configureModelSettings;
233
+ /**
234
+ * Build initial messages array with system prompt and user content
235
+ */
236
+ private buildInitialMessages;
237
+ /**
238
+ * Setup compression for the current generation
239
+ */
240
+ private setupCompression;
241
+ /**
242
+ * Prepare step function for streaming with compression logic
243
+ */
244
+ private handlePrepareStepCompression;
245
+ private handleStopWhenConditions;
246
+ private setupStreamParser;
247
+ private buildTelemetryConfig;
248
+ private buildBaseGenerationConfig;
249
+ private buildReasoningFlow;
250
+ private buildDataComponentsSchema;
251
+ private calculatePhase2Timeout;
252
+ private buildPhase2Messages;
253
+ private executeStreamingPhase2;
254
+ private executeNonStreamingPhase2;
255
+ private formatFinalResponse;
256
+ private handleGenerationError;
257
+ /**
258
+ * Public cleanup method for external lifecycle management (e.g., session cleanup)
259
+ * Performs full cleanup of compression state when agent/session is ending
260
+ */
261
+ cleanupCompression(): void;
262
+ private processStreamEvents;
263
+ private formatStreamingResponse;
218
264
  }
219
265
  //#endregion
220
266
  export { Agent, AgentConfig, DelegateRelation, ExternalAgentRelationConfig, TeamAgentRelationConfig, ToolType, hasToolCallWithPrefix };