@looopy-ai/core 2.1.12 → 2.1.14

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.
@@ -3,7 +3,7 @@ import z from 'zod';
3
3
  import type { AnyEvent, ExecutionContext, Plugin } from '../types';
4
4
  import type { ToolCall, ToolDefinition } from '../types/tools';
5
5
  export type HeaderFactory<AuthContext> = (context: ExecutionContext<AuthContext>, card: AgentCard) => Promise<Record<string, string | undefined>>;
6
- declare const cardSchema: z.ZodObject<{
6
+ export declare const cardSchema: z.ZodObject<{
7
7
  name: z.ZodString;
8
8
  description: z.ZodOptional<z.ZodString>;
9
9
  url: z.ZodURL;
@@ -18,7 +18,7 @@ declare const cardSchema: z.ZodObject<{
18
18
  scopes: z.ZodArray<z.ZodString>;
19
19
  }, z.core.$strip>>;
20
20
  }, z.core.$strip>;
21
- type AgentCard = z.infer<typeof cardSchema>;
21
+ export type AgentCard = z.infer<typeof cardSchema>;
22
22
  export declare class AgentToolProvider<AuthContext> implements Plugin<AuthContext> {
23
23
  readonly card: AgentCard;
24
24
  readonly getHeaders?: HeaderFactory<AuthContext> | undefined;
@@ -33,4 +33,3 @@ export declare class AgentToolProvider<AuthContext> implements Plugin<AuthContex
33
33
  listTools(): Promise<ToolDefinition[]>;
34
34
  executeTool(toolCall: ToolCall, context: ExecutionContext<AuthContext>): Observable<AnyEvent>;
35
35
  }
36
- export {};
@@ -4,7 +4,7 @@ import { Observable } from 'rxjs';
4
4
  import z from 'zod';
5
5
  import { getLogger } from '../core';
6
6
  import { toolErrorEvent } from './tool-result-events';
7
- const cardSchema = z.object({
7
+ export const cardSchema = z.object({
8
8
  name: z.string(),
9
9
  description: z.string().optional(),
10
10
  url: z.url(),
@@ -106,7 +106,7 @@ export class AgentToolProvider {
106
106
  'X-Amzn-Bedrock-AgentCore-Runtime-Session-Id': `${context.contextId}`,
107
107
  ...(await this.getHeaders?.(context, this.card)),
108
108
  },
109
- body: JSON.stringify({ prompt }),
109
+ body: JSON.stringify({ type: 'prompt', prompt }),
110
110
  signal: abortController.signal,
111
111
  });
112
112
  if (!res.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@looopy-ai/core",
3
- "version": "2.1.12",
3
+ "version": "2.1.14",
4
4
  "description": "RxJS-based AI agent framework",
5
5
  "repository": {
6
6
  "url": "https://github.com/looopy-ai/lib"