jev-recipes 0.9.10 → 0.9.12
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/README.md +1 -1
- package/dist/adapters/ai-sdk/index.d.ts +3 -3
- package/dist/adapters/langchain/index.d.ts +1 -1
- package/dist/adapters/shared.d.ts +2 -1
- package/dist/catalog/generated/metadata.js +564 -370
- package/dist/catalog/search.js +45 -11
- package/dist/evaluation/archive.d.ts +3 -3
- package/dist/evaluation/engine.js +6 -2
- package/dist/evaluation/schema.d.ts +2 -2
- package/dist/recipes/game-action/index.js +3 -3
- package/dist/src/batch.d.ts +1 -8
- package/dist/src/batch.js +15 -24
- package/dist/src/create-client.d.ts +1 -0
- package/dist/src/create-client.js +1 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -284,7 +284,7 @@ Any recipe becomes a tool with `recipeTools(['route', 'verify'])`. The LangChain
|
|
|
284
284
|
Recipes talk to any server that implements the TypeSafe `systemOne` wire format. Point the SDK client at it with `baseURL`, or set `TYPESAFE_BASE_URL` in the environment, and pass the client to any recipe:
|
|
285
285
|
|
|
286
286
|
```js
|
|
287
|
-
import { createClient } from 'jev-recipes';
|
|
287
|
+
import { createClient } from 'jev-recipes/client';
|
|
288
288
|
import { route } from 'jev-recipes/route';
|
|
289
289
|
|
|
290
290
|
const client = createClient({
|
|
@@ -2,9 +2,9 @@ import type { FlexibleSchema, LanguageModel, PrepareStepFunction, StopCondition,
|
|
|
2
2
|
import type { RecipeName } from '../../catalog/schema.js';
|
|
3
3
|
import type { ModelRouteResult } from '../../recipes/model-route/index.js';
|
|
4
4
|
import type { RecipeOptions } from '../../src/schema.js';
|
|
5
|
-
import type { BlockedToolOutput, CompletionOptions, CompletionToolOutput, GuardOptions, RecipeToolOptions } from '../shared.js';
|
|
6
|
-
export type { BlockedToolOutput, CompletionEvent, CompletionOptions, CompletionToolOutput, GuardEvent, GuardOptions, RecipeToolOptions, } from '../shared.js';
|
|
7
|
-
export type RecipeTool = Tool<Record<string, unknown>,
|
|
5
|
+
import type { BlockedToolOutput, CompletionOptions, CompletionToolOutput, GuardOptions, RecipeToolOptions, RecipeToolOutput } from '../shared.js';
|
|
6
|
+
export type { BlockedToolOutput, CompletionEvent, CompletionOptions, CompletionToolOutput, GuardEvent, GuardOptions, RecipeToolOptions, RecipeToolOutput, } from '../shared.js';
|
|
7
|
+
export type RecipeTool = Tool<Record<string, unknown>, RecipeToolOutput>;
|
|
8
8
|
export declare function recipeTool(name: RecipeName, options?: RecipeToolOptions): RecipeTool;
|
|
9
9
|
export declare function recipeTools(names: readonly RecipeName[], options?: RecipeToolOptions): Record<string, RecipeTool>;
|
|
10
10
|
export type GuardToolsOptions = GuardOptions & {
|
|
@@ -2,7 +2,7 @@ import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
|
2
2
|
import type { RecipeName } from '../../catalog/schema.js';
|
|
3
3
|
import { COMPLETION_TOOL_INPUT_SCHEMA } from '../shared.js';
|
|
4
4
|
import type { CompletionOptions, GuardOptions, RecipeToolOptions } from '../shared.js';
|
|
5
|
-
export type { BlockedToolOutput, CompletionEvent, CompletionOptions, CompletionToolOutput, GuardEvent, GuardOptions, RecipeToolOptions, } from '../shared.js';
|
|
5
|
+
export type { BlockedToolOutput, CompletionEvent, CompletionOptions, CompletionToolOutput, GuardEvent, GuardOptions, RecipeToolOptions, RecipeToolOutput, } from '../shared.js';
|
|
6
6
|
type JsonSchema = Record<string, unknown>;
|
|
7
7
|
export type RecipeTool = DynamicStructuredTool<JsonSchema>;
|
|
8
8
|
export declare function recipeTool(name: RecipeName, options?: RecipeToolOptions): RecipeTool;
|
|
@@ -5,11 +5,12 @@ import type { RecipeOptions } from '../src/schema.js';
|
|
|
5
5
|
export type RecipeToolOptions = RecipeOptions & {
|
|
6
6
|
description?: string;
|
|
7
7
|
};
|
|
8
|
+
export type RecipeToolOutput = Record<string, unknown> | null;
|
|
8
9
|
export type RecipeToolDefinition = {
|
|
9
10
|
name: RecipeName;
|
|
10
11
|
description: string;
|
|
11
12
|
inputSchema: Record<string, unknown>;
|
|
12
|
-
execute: (input: unknown, signal?: AbortSignal) => Promise<
|
|
13
|
+
execute: (input: unknown, signal?: AbortSignal) => Promise<RecipeToolOutput>;
|
|
13
14
|
};
|
|
14
15
|
export type GuardOptions = RecipeOptions & {
|
|
15
16
|
policy?: string;
|