@relayfx/test 0.2.4 → 0.2.5
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.js
CHANGED
|
@@ -415,8 +415,8 @@ var makeTurnPolicySnapshotTree = () => {
|
|
|
415
415
|
return tree;
|
|
416
416
|
};
|
|
417
417
|
var TurnPolicySnapshot = makeTurnPolicySnapshotTree().check(turnPolicySnapshotNodeCount).annotate({ identifier: "Relay.Agent.TurnPolicySnapshot" });
|
|
418
|
-
var defaultMaxToolTurns =
|
|
419
|
-
var defaultMaxWaitTurns =
|
|
418
|
+
var defaultMaxToolTurns = Number.POSITIVE_INFINITY;
|
|
419
|
+
var defaultMaxWaitTurns = Number.POSITIVE_INFINITY;
|
|
420
420
|
var DefinitionSchema = Schema5.Struct({
|
|
421
421
|
name: NonEmptyString,
|
|
422
422
|
instructions: Schema5.optionalKey(Schema5.String),
|
|
@@ -17605,8 +17605,11 @@ var turnPolicyFromSnapshot = (snapshot2) => {
|
|
|
17605
17605
|
}
|
|
17606
17606
|
};
|
|
17607
17607
|
var turnPolicyFromDefinition = (agent) => {
|
|
17608
|
-
const
|
|
17609
|
-
|
|
17608
|
+
const policy = agent.turn_policy === undefined ? undefined : turnPolicyFromSnapshot(agent.turn_policy);
|
|
17609
|
+
if (agent.max_tool_turns === undefined)
|
|
17610
|
+
return policy ?? exports_turn_policy.recurs(Number.POSITIVE_INFINITY);
|
|
17611
|
+
const cap = exports_turn_policy.recurs(agent.max_tool_turns);
|
|
17612
|
+
return policy === undefined ? cap : exports_turn_policy.both(cap, policy);
|
|
17610
17613
|
};
|
|
17611
17614
|
var availableRegisteredTools = (agent, registered) => {
|
|
17612
17615
|
const names = toolNames(agent);
|
|
@@ -84,8 +84,8 @@ export type TurnPolicySnapshot = RecursTurnPolicySnapshot | UntilToolCallTurnPol
|
|
|
84
84
|
export declare const maxTurnPolicySnapshotDepth = 16;
|
|
85
85
|
export declare const maxTurnPolicySnapshotNodes = 64;
|
|
86
86
|
export declare const TurnPolicySnapshot: Schema.Codec<TurnPolicySnapshot>;
|
|
87
|
-
export declare const defaultMaxToolTurns
|
|
88
|
-
export declare const defaultMaxWaitTurns
|
|
87
|
+
export declare const defaultMaxToolTurns: number;
|
|
88
|
+
export declare const defaultMaxWaitTurns: number;
|
|
89
89
|
declare const DefinitionSchema: Schema.Struct<{
|
|
90
90
|
readonly name: Schema.String;
|
|
91
91
|
readonly instructions: Schema.optionalKey<Schema.String>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@relayfx/test",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.5",
|
|
5
5
|
"description": "Experimental deterministic test kit for Relay applications",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"typecheck": "bun tsc --noEmit"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@relayfx/sdk": "0.2.
|
|
39
|
+
"@relayfx/sdk": "0.2.5",
|
|
40
40
|
"effect": "4.0.0-beta.93"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|