@looopy-ai/core 2.0.0 → 2.0.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.
|
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import z from 'zod';
|
|
3
3
|
import type { ContextAnyEvent, ExecutionContext } from '../types';
|
|
4
4
|
import type { ToolCall, ToolDefinition, ToolProvider } from '../types/tools';
|
|
5
|
-
export type HeaderFactory = (context
|
|
5
|
+
export type HeaderFactory = (context: ExecutionContext, card: AgentCard) => Promise<Record<string, string | undefined>>;
|
|
6
6
|
declare const cardSchema: z.ZodObject<{
|
|
7
7
|
name: z.ZodString;
|
|
8
8
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -97,7 +97,7 @@ export class AgentToolProvider {
|
|
|
97
97
|
headers: {
|
|
98
98
|
Accept: 'text/event-stream',
|
|
99
99
|
'X-Amzn-Bedrock-AgentCore-Runtime-Session-Id': context.contextId,
|
|
100
|
-
...(await this.getHeaders?.(context)),
|
|
100
|
+
...(await this.getHeaders?.(context, this.card)),
|
|
101
101
|
},
|
|
102
102
|
body: JSON.stringify({ prompt }),
|
|
103
103
|
signal: abortController.signal,
|