@relayfx/test 0.2.11 → 0.2.13
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 +156 -100
- package/dist/types/runtime/address/address-resolution-service.d.ts +10 -0
- package/dist/types/runtime/agent/agent-loop-service.d.ts +4 -6
- package/dist/types/runtime/child/child-run-service.d.ts +3 -0
- package/dist/types/runtime/child/spawn-child-run-tool.d.ts +6 -0
- package/dist/types/runtime/workflow/execution-workflow.d.ts +20 -0
- package/dist/types/schema/agent-schema.d.ts +83 -0
- package/dist/types/schema/child-orchestration-schema.d.ts +15 -0
- package/dist/types/schema/execution-schema.d.ts +44 -2
- package/package.json +2 -2
|
@@ -79,6 +79,11 @@ export declare const LocalAgentTarget: Schema.Struct<{
|
|
|
79
79
|
readonly [x: string]: Schema.Json;
|
|
80
80
|
};
|
|
81
81
|
readonly instructions?: string;
|
|
82
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
83
|
+
readonly context_window: Schema.Number;
|
|
84
|
+
readonly reserve_tokens: Schema.Number;
|
|
85
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
86
|
+
}, "Encoded">;
|
|
82
87
|
readonly output_schema_ref?: string;
|
|
83
88
|
readonly skill_definition_ids?: readonly string[];
|
|
84
89
|
readonly permission_rules?: {
|
|
@@ -111,6 +116,11 @@ export declare const LocalAgentTarget: Schema.Struct<{
|
|
|
111
116
|
};
|
|
112
117
|
};
|
|
113
118
|
readonly instructions?: string;
|
|
119
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
120
|
+
readonly context_window: Schema.Number;
|
|
121
|
+
readonly reserve_tokens: Schema.Number;
|
|
122
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
123
|
+
}, "Encoded">;
|
|
114
124
|
readonly tool_names?: readonly string[];
|
|
115
125
|
readonly workspace_policy?: {
|
|
116
126
|
readonly mode: "share" | "fork";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Agent, Content, Execution, Ids, Shared, Tool } from "../../schema/index";
|
|
2
2
|
import { AgentChatRepository } from "@relayfx/store-sql/portable";
|
|
3
|
-
import { Context, Effect, Layer, Schema } from "effect";
|
|
3
|
+
import { Cause, Context, Effect, Layer, Schema } from "effect";
|
|
4
4
|
import { Tool as AiTool } from "effect/unstable/ai";
|
|
5
5
|
import type { DispatchInput } from "../child/spawn-child-run-tool";
|
|
6
6
|
import { Service as EventLogService } from "../execution/event-log-service";
|
|
@@ -9,11 +9,10 @@ import { Service as ModelCallPolicyService } from "../model/model-call-policy";
|
|
|
9
9
|
import { Service as SchemaRegistryService } from "../schema-registry/schema-registry-service";
|
|
10
10
|
import { Service as ToolRuntimeService } from "../tool/tool-runtime-service";
|
|
11
11
|
import { Service as PromptAssemblerService } from "./prompt-assembler-service";
|
|
12
|
-
import type { Options } from "./relay-compaction";
|
|
13
12
|
declare const AgentLoopError_base: Schema.Class<AgentLoopError, Schema.TaggedStruct<"AgentLoopError", {
|
|
14
13
|
readonly message: Schema.String;
|
|
15
14
|
readonly next_event_sequence: Schema.optionalKey<Schema.Int>;
|
|
16
|
-
}>,
|
|
15
|
+
}>, Cause.YieldableError>;
|
|
17
16
|
export declare class AgentLoopError extends AgentLoopError_base {
|
|
18
17
|
}
|
|
19
18
|
declare const AgentLoopWaitRequested_base: Schema.Class<AgentLoopWaitRequested, Schema.TaggedStruct<"AgentLoopWaitRequested", {
|
|
@@ -29,14 +28,14 @@ declare const AgentLoopWaitRequested_base: Schema.Class<AgentLoopWaitRequested,
|
|
|
29
28
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
30
29
|
}>;
|
|
31
30
|
readonly next_event_sequence: Schema.Int;
|
|
32
|
-
}>,
|
|
31
|
+
}>, Cause.YieldableError>;
|
|
33
32
|
export declare class AgentLoopWaitRequested extends AgentLoopWaitRequested_base {
|
|
34
33
|
}
|
|
35
34
|
declare const AgentLoopBudgetExceeded_base: Schema.Class<AgentLoopBudgetExceeded, Schema.TaggedStruct<"AgentLoopBudgetExceeded", {
|
|
36
35
|
readonly tokens_used: Schema.Int;
|
|
37
36
|
readonly token_budget: Schema.Int;
|
|
38
37
|
readonly next_event_sequence: Schema.Int;
|
|
39
|
-
}>,
|
|
38
|
+
}>, Cause.YieldableError>;
|
|
40
39
|
export declare class AgentLoopBudgetExceeded extends AgentLoopBudgetExceeded_base {
|
|
41
40
|
}
|
|
42
41
|
export interface RunInput {
|
|
@@ -54,7 +53,6 @@ export interface RunInput {
|
|
|
54
53
|
readonly completedAt: number;
|
|
55
54
|
readonly steeringEnabled?: boolean;
|
|
56
55
|
readonly toolOutputMaxBytes?: number | null;
|
|
57
|
-
readonly compaction?: Options | null;
|
|
58
56
|
readonly sessionEntryScope?: string;
|
|
59
57
|
readonly dispatchChildRun?: (input: DispatchInput) => Effect.Effect<void, unknown, any>;
|
|
60
58
|
}
|
|
@@ -29,6 +29,7 @@ export declare class ChildRunModelMissing extends ChildRunModelMissing_base {
|
|
|
29
29
|
export interface AgentContext {
|
|
30
30
|
readonly instructions?: string;
|
|
31
31
|
readonly model?: Agent.ModelSelection;
|
|
32
|
+
readonly compactionPolicy?: Agent.CompactionPolicy;
|
|
32
33
|
readonly toolNames: ReadonlyArray<string>;
|
|
33
34
|
readonly permissions: ReadonlyArray<string>;
|
|
34
35
|
readonly outputSchemaRef?: string;
|
|
@@ -37,6 +38,7 @@ export interface AgentContext {
|
|
|
37
38
|
export interface ChildRunOverride {
|
|
38
39
|
readonly instructions?: string;
|
|
39
40
|
readonly model?: Agent.ModelSelection;
|
|
41
|
+
readonly compactionPolicy?: Agent.CompactionPolicy;
|
|
40
42
|
readonly toolNames?: ReadonlyArray<string>;
|
|
41
43
|
readonly permissions?: ReadonlyArray<string>;
|
|
42
44
|
readonly workspacePolicy?: Agent.ChildRunWorkspacePolicy;
|
|
@@ -74,6 +76,7 @@ export declare class Service extends Service_base {
|
|
|
74
76
|
export interface ResolvedChildContext {
|
|
75
77
|
readonly instructions?: string;
|
|
76
78
|
readonly model?: Agent.ModelSelection;
|
|
79
|
+
readonly compactionPolicy?: Agent.CompactionPolicy;
|
|
77
80
|
readonly toolNames: ReadonlyArray<string>;
|
|
78
81
|
readonly permissions: ReadonlyArray<string>;
|
|
79
82
|
readonly workspacePolicy?: Agent.ChildRunWorkspacePolicy;
|
|
@@ -16,6 +16,11 @@ export declare const Input: Schema.Struct<{
|
|
|
16
16
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
17
17
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
18
18
|
}>>;
|
|
19
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
20
|
+
readonly context_window: Schema.Number;
|
|
21
|
+
readonly reserve_tokens: Schema.Number;
|
|
22
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
23
|
+
}>>;
|
|
19
24
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
20
25
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
21
26
|
readonly output_schema_ref: Schema.optionalKey<Schema.String>;
|
|
@@ -185,6 +190,7 @@ export interface TransferInput extends Schema.Schema.Type<typeof TransferInput>
|
|
|
185
190
|
export interface DispatchInput {
|
|
186
191
|
readonly executionId: Ids.ExecutionId;
|
|
187
192
|
readonly rootAddressId: Ids.AddressId;
|
|
193
|
+
readonly sessionId: Ids.SessionId;
|
|
188
194
|
readonly input: ReadonlyArray<Content.Part>;
|
|
189
195
|
readonly eventSequence: Execution.ExecutionEventSequence;
|
|
190
196
|
readonly startedAt: number;
|
|
@@ -103,6 +103,11 @@ export declare const StartInput: Schema.Struct<{
|
|
|
103
103
|
readonly [x: string]: Schema.Json;
|
|
104
104
|
};
|
|
105
105
|
readonly instructions?: string;
|
|
106
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
107
|
+
readonly context_window: Schema.Number;
|
|
108
|
+
readonly reserve_tokens: Schema.Number;
|
|
109
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
110
|
+
}, "Encoded">;
|
|
106
111
|
readonly output_schema_ref?: string;
|
|
107
112
|
readonly skill_definition_ids?: readonly string[];
|
|
108
113
|
readonly permission_rules?: {
|
|
@@ -135,6 +140,11 @@ export declare const StartInput: Schema.Struct<{
|
|
|
135
140
|
};
|
|
136
141
|
};
|
|
137
142
|
readonly instructions?: string;
|
|
143
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
144
|
+
readonly context_window: Schema.Number;
|
|
145
|
+
readonly reserve_tokens: Schema.Number;
|
|
146
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
147
|
+
}, "Encoded">;
|
|
138
148
|
readonly tool_names?: readonly string[];
|
|
139
149
|
readonly workspace_policy?: {
|
|
140
150
|
readonly mode: "share" | "fork";
|
|
@@ -361,6 +371,11 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
|
|
|
361
371
|
readonly [x: string]: Schema.Json;
|
|
362
372
|
};
|
|
363
373
|
readonly instructions?: string;
|
|
374
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
375
|
+
readonly context_window: Schema.Number;
|
|
376
|
+
readonly reserve_tokens: Schema.Number;
|
|
377
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
378
|
+
}, "Encoded">;
|
|
364
379
|
readonly output_schema_ref?: string;
|
|
365
380
|
readonly skill_definition_ids?: readonly string[];
|
|
366
381
|
readonly permission_rules?: {
|
|
@@ -393,6 +408,11 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
|
|
|
393
408
|
};
|
|
394
409
|
};
|
|
395
410
|
readonly instructions?: string;
|
|
411
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
412
|
+
readonly context_window: Schema.Number;
|
|
413
|
+
readonly reserve_tokens: Schema.Number;
|
|
414
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
415
|
+
}, "Encoded">;
|
|
396
416
|
readonly tool_names?: readonly string[];
|
|
397
417
|
readonly workspace_policy?: {
|
|
398
418
|
readonly mode: "share" | "fork";
|
|
@@ -13,6 +13,13 @@ export declare const ModelSelection: Schema.Struct<{
|
|
|
13
13
|
}>;
|
|
14
14
|
export interface ModelSelection extends Schema.Schema.Type<typeof ModelSelection> {
|
|
15
15
|
}
|
|
16
|
+
export declare const CompactionPolicy: Schema.Struct<{
|
|
17
|
+
readonly context_window: Schema.Number;
|
|
18
|
+
readonly reserve_tokens: Schema.Number;
|
|
19
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
20
|
+
}>;
|
|
21
|
+
export interface CompactionPolicy extends Schema.Schema.Type<typeof CompactionPolicy> {
|
|
22
|
+
}
|
|
16
23
|
export declare const ChildRunWorkspacePolicy: Schema.Struct<{
|
|
17
24
|
readonly mode: Schema.Literals<readonly ["share", "fork"]>;
|
|
18
25
|
readonly fallback: Schema.optionalKey<Schema.Literals<readonly ["fail", "fresh"]>>;
|
|
@@ -28,6 +35,11 @@ export declare const ChildRunPreset: Schema.Struct<{
|
|
|
28
35
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
29
36
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
30
37
|
}>>;
|
|
38
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
39
|
+
readonly context_window: Schema.Number;
|
|
40
|
+
readonly reserve_tokens: Schema.Number;
|
|
41
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
42
|
+
}>>;
|
|
31
43
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
32
44
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
33
45
|
readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
|
|
@@ -114,6 +126,11 @@ declare const DefinitionSchema: Schema.Struct<{
|
|
|
114
126
|
readonly fallback: Schema.optionalKey<Schema.Literals<readonly ["allow", "deny", "ask"]>>;
|
|
115
127
|
}>>;
|
|
116
128
|
readonly turn_policy: Schema.optionalKey<Schema.Codec<TurnPolicySnapshot, TurnPolicySnapshot, never, never>>;
|
|
129
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
130
|
+
readonly context_window: Schema.Number;
|
|
131
|
+
readonly reserve_tokens: Schema.Number;
|
|
132
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
133
|
+
}>>;
|
|
117
134
|
readonly max_tool_turns: Schema.optionalKey<Schema.Int>;
|
|
118
135
|
readonly max_wait_turns: Schema.optionalKey<Schema.Int>;
|
|
119
136
|
readonly token_budget: Schema.optionalKey<Schema.Int>;
|
|
@@ -126,6 +143,11 @@ declare const DefinitionSchema: Schema.Struct<{
|
|
|
126
143
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
127
144
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
128
145
|
}>>;
|
|
146
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
147
|
+
readonly context_window: Schema.Number;
|
|
148
|
+
readonly reserve_tokens: Schema.Number;
|
|
149
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
150
|
+
}>>;
|
|
129
151
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
130
152
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
131
153
|
readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
|
|
@@ -160,6 +182,7 @@ export interface DefineInput {
|
|
|
160
182
|
readonly skill_definition_ids?: ReadonlyArray<SkillDefinitionId>;
|
|
161
183
|
readonly permission_rules?: PermissionRuleset;
|
|
162
184
|
readonly turn_policy?: TurnPolicySnapshot;
|
|
185
|
+
readonly compaction_policy?: CompactionPolicy;
|
|
163
186
|
readonly max_tool_turns?: number;
|
|
164
187
|
readonly max_wait_turns?: number;
|
|
165
188
|
readonly token_budget?: number;
|
|
@@ -199,6 +222,11 @@ export declare const DefinitionRecord: Schema.Struct<{
|
|
|
199
222
|
readonly [x: string]: Schema.Json;
|
|
200
223
|
};
|
|
201
224
|
readonly instructions?: string;
|
|
225
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
226
|
+
readonly context_window: Schema.Number;
|
|
227
|
+
readonly reserve_tokens: Schema.Number;
|
|
228
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
229
|
+
}, "Encoded">;
|
|
202
230
|
readonly output_schema_ref?: string;
|
|
203
231
|
readonly skill_definition_ids?: readonly string[];
|
|
204
232
|
readonly permission_rules?: {
|
|
@@ -231,6 +259,11 @@ export declare const DefinitionRecord: Schema.Struct<{
|
|
|
231
259
|
};
|
|
232
260
|
};
|
|
233
261
|
readonly instructions?: string;
|
|
262
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
263
|
+
readonly context_window: Schema.Number;
|
|
264
|
+
readonly reserve_tokens: Schema.Number;
|
|
265
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
266
|
+
}, "Encoded">;
|
|
234
267
|
readonly tool_names?: readonly string[];
|
|
235
268
|
readonly workspace_policy?: {
|
|
236
269
|
readonly mode: "share" | "fork";
|
|
@@ -280,6 +313,11 @@ export declare const DefinitionRevisionRecord: Schema.Struct<{
|
|
|
280
313
|
readonly [x: string]: Schema.Json;
|
|
281
314
|
};
|
|
282
315
|
readonly instructions?: string;
|
|
316
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
317
|
+
readonly context_window: Schema.Number;
|
|
318
|
+
readonly reserve_tokens: Schema.Number;
|
|
319
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
320
|
+
}, "Encoded">;
|
|
283
321
|
readonly output_schema_ref?: string;
|
|
284
322
|
readonly skill_definition_ids?: readonly string[];
|
|
285
323
|
readonly permission_rules?: {
|
|
@@ -312,6 +350,11 @@ export declare const DefinitionRevisionRecord: Schema.Struct<{
|
|
|
312
350
|
};
|
|
313
351
|
};
|
|
314
352
|
readonly instructions?: string;
|
|
353
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
354
|
+
readonly context_window: Schema.Number;
|
|
355
|
+
readonly reserve_tokens: Schema.Number;
|
|
356
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
357
|
+
}, "Encoded">;
|
|
315
358
|
readonly tool_names?: readonly string[];
|
|
316
359
|
readonly workspace_policy?: {
|
|
317
360
|
readonly mode: "share" | "fork";
|
|
@@ -359,6 +402,11 @@ export declare const RegisterDefinitionPayload: Schema.Struct<{
|
|
|
359
402
|
readonly [x: string]: Schema.Json;
|
|
360
403
|
};
|
|
361
404
|
readonly instructions?: string;
|
|
405
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
406
|
+
readonly context_window: Schema.Number;
|
|
407
|
+
readonly reserve_tokens: Schema.Number;
|
|
408
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
409
|
+
}, "Encoded">;
|
|
362
410
|
readonly output_schema_ref?: string;
|
|
363
411
|
readonly skill_definition_ids?: readonly string[];
|
|
364
412
|
readonly permission_rules?: {
|
|
@@ -391,6 +439,11 @@ export declare const RegisterDefinitionPayload: Schema.Struct<{
|
|
|
391
439
|
};
|
|
392
440
|
};
|
|
393
441
|
readonly instructions?: string;
|
|
442
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
443
|
+
readonly context_window: Schema.Number;
|
|
444
|
+
readonly reserve_tokens: Schema.Number;
|
|
445
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
446
|
+
}, "Encoded">;
|
|
394
447
|
readonly tool_names?: readonly string[];
|
|
395
448
|
readonly workspace_policy?: {
|
|
396
449
|
readonly mode: "share" | "fork";
|
|
@@ -438,6 +491,11 @@ export declare const DefinitionRegistered: Schema.Struct<{
|
|
|
438
491
|
readonly [x: string]: Schema.Json;
|
|
439
492
|
};
|
|
440
493
|
readonly instructions?: string;
|
|
494
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
495
|
+
readonly context_window: Schema.Number;
|
|
496
|
+
readonly reserve_tokens: Schema.Number;
|
|
497
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
498
|
+
}, "Encoded">;
|
|
441
499
|
readonly output_schema_ref?: string;
|
|
442
500
|
readonly skill_definition_ids?: readonly string[];
|
|
443
501
|
readonly permission_rules?: {
|
|
@@ -470,6 +528,11 @@ export declare const DefinitionRegistered: Schema.Struct<{
|
|
|
470
528
|
};
|
|
471
529
|
};
|
|
472
530
|
readonly instructions?: string;
|
|
531
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
532
|
+
readonly context_window: Schema.Number;
|
|
533
|
+
readonly reserve_tokens: Schema.Number;
|
|
534
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
535
|
+
}, "Encoded">;
|
|
473
536
|
readonly tool_names?: readonly string[];
|
|
474
537
|
readonly workspace_policy?: {
|
|
475
538
|
readonly mode: "share" | "fork";
|
|
@@ -521,6 +584,11 @@ export declare const DefinitionList: Schema.Struct<{
|
|
|
521
584
|
readonly [x: string]: Schema.Json;
|
|
522
585
|
};
|
|
523
586
|
readonly instructions?: string;
|
|
587
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
588
|
+
readonly context_window: Schema.Number;
|
|
589
|
+
readonly reserve_tokens: Schema.Number;
|
|
590
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
591
|
+
}, "Encoded">;
|
|
524
592
|
readonly output_schema_ref?: string;
|
|
525
593
|
readonly skill_definition_ids?: readonly string[];
|
|
526
594
|
readonly permission_rules?: {
|
|
@@ -553,6 +621,11 @@ export declare const DefinitionList: Schema.Struct<{
|
|
|
553
621
|
};
|
|
554
622
|
};
|
|
555
623
|
readonly instructions?: string;
|
|
624
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
625
|
+
readonly context_window: Schema.Number;
|
|
626
|
+
readonly reserve_tokens: Schema.Number;
|
|
627
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
628
|
+
}, "Encoded">;
|
|
556
629
|
readonly tool_names?: readonly string[];
|
|
557
630
|
readonly workspace_policy?: {
|
|
558
631
|
readonly mode: "share" | "fork";
|
|
@@ -604,6 +677,11 @@ export declare const DefinitionRevisionList: Schema.Struct<{
|
|
|
604
677
|
readonly [x: string]: Schema.Json;
|
|
605
678
|
};
|
|
606
679
|
readonly instructions?: string;
|
|
680
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
681
|
+
readonly context_window: Schema.Number;
|
|
682
|
+
readonly reserve_tokens: Schema.Number;
|
|
683
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
684
|
+
}, "Encoded">;
|
|
607
685
|
readonly output_schema_ref?: string;
|
|
608
686
|
readonly skill_definition_ids?: readonly string[];
|
|
609
687
|
readonly permission_rules?: {
|
|
@@ -636,6 +714,11 @@ export declare const DefinitionRevisionList: Schema.Struct<{
|
|
|
636
714
|
};
|
|
637
715
|
};
|
|
638
716
|
readonly instructions?: string;
|
|
717
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
718
|
+
readonly context_window: Schema.Number;
|
|
719
|
+
readonly reserve_tokens: Schema.Number;
|
|
720
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
721
|
+
}, "Encoded">;
|
|
639
722
|
readonly tool_names?: readonly string[];
|
|
640
723
|
readonly workspace_policy?: {
|
|
641
724
|
readonly mode: "share" | "fork";
|
|
@@ -19,6 +19,11 @@ export declare const FanOutChild: Schema.Struct<{
|
|
|
19
19
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
20
20
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
21
21
|
}>>;
|
|
22
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
23
|
+
readonly context_window: Schema.Number;
|
|
24
|
+
readonly reserve_tokens: Schema.Number;
|
|
25
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
26
|
+
}>>;
|
|
22
27
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
23
28
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
24
29
|
readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
|
|
@@ -104,6 +109,11 @@ export declare const FanOutDefinition: Schema.Struct<{
|
|
|
104
109
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
105
110
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
106
111
|
}>>;
|
|
112
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
113
|
+
readonly context_window: Schema.Number;
|
|
114
|
+
readonly reserve_tokens: Schema.Number;
|
|
115
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
116
|
+
}>>;
|
|
107
117
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
108
118
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
109
119
|
readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
|
|
@@ -322,6 +332,11 @@ export declare const FanOutState: Schema.Struct<{
|
|
|
322
332
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
323
333
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
324
334
|
}>>;
|
|
335
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
336
|
+
readonly context_window: Schema.Number;
|
|
337
|
+
readonly reserve_tokens: Schema.Number;
|
|
338
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
339
|
+
}>>;
|
|
325
340
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
326
341
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
327
342
|
readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Definition } from "./agent-schema";
|
|
3
|
+
import { ChildExecutionId } from "./ids-schema";
|
|
3
4
|
export declare const ExecutionStatus: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
|
|
4
5
|
export type ExecutionStatus = typeof ExecutionStatus.Type;
|
|
5
6
|
export declare const Execution: Schema.Struct<{
|
|
@@ -42,6 +43,11 @@ export declare const Execution: Schema.Struct<{
|
|
|
42
43
|
readonly [x: string]: Schema.Json;
|
|
43
44
|
};
|
|
44
45
|
readonly instructions?: string;
|
|
46
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
47
|
+
readonly context_window: Schema.Number;
|
|
48
|
+
readonly reserve_tokens: Schema.Number;
|
|
49
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
50
|
+
}, "Encoded">;
|
|
45
51
|
readonly output_schema_ref?: string;
|
|
46
52
|
readonly skill_definition_ids?: readonly string[];
|
|
47
53
|
readonly permission_rules?: {
|
|
@@ -74,6 +80,11 @@ export declare const Execution: Schema.Struct<{
|
|
|
74
80
|
};
|
|
75
81
|
};
|
|
76
82
|
readonly instructions?: string;
|
|
83
|
+
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
84
|
+
readonly context_window: Schema.Number;
|
|
85
|
+
readonly reserve_tokens: Schema.Number;
|
|
86
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
87
|
+
}, "Encoded">;
|
|
77
88
|
readonly tool_names?: readonly string[];
|
|
78
89
|
readonly workspace_policy?: {
|
|
79
90
|
readonly mode: "share" | "fork";
|
|
@@ -105,6 +116,11 @@ export declare const ChildRunContext: Schema.Struct<{
|
|
|
105
116
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
106
117
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
107
118
|
}>>;
|
|
119
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
120
|
+
readonly context_window: Schema.Number;
|
|
121
|
+
readonly reserve_tokens: Schema.Number;
|
|
122
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
123
|
+
}>>;
|
|
108
124
|
readonly tool_names: Schema.$Array<Schema.String>;
|
|
109
125
|
readonly permissions: Schema.$Array<Schema.String>;
|
|
110
126
|
readonly output_schema_ref: Schema.optionalKey<Schema.String>;
|
|
@@ -121,6 +137,11 @@ export declare const ChildRunOverride: Schema.Struct<{
|
|
|
121
137
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
122
138
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
123
139
|
}>>;
|
|
140
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
141
|
+
readonly context_window: Schema.Number;
|
|
142
|
+
readonly reserve_tokens: Schema.Number;
|
|
143
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
144
|
+
}>>;
|
|
124
145
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
125
146
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
126
147
|
readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
|
|
@@ -141,6 +162,11 @@ export declare const ChildRunPreset: Schema.Struct<{
|
|
|
141
162
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
142
163
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
143
164
|
}>>;
|
|
165
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
166
|
+
readonly context_window: Schema.Number;
|
|
167
|
+
readonly reserve_tokens: Schema.Number;
|
|
168
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
169
|
+
}>>;
|
|
144
170
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
145
171
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
146
172
|
readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
|
|
@@ -171,6 +197,11 @@ export declare const SpawnChildRunInput: Schema.Struct<{
|
|
|
171
197
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
172
198
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
173
199
|
}>>;
|
|
200
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
201
|
+
readonly context_window: Schema.Number;
|
|
202
|
+
readonly reserve_tokens: Schema.Number;
|
|
203
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
204
|
+
}>>;
|
|
174
205
|
readonly tool_names: Schema.$Array<Schema.String>;
|
|
175
206
|
readonly permissions: Schema.$Array<Schema.String>;
|
|
176
207
|
readonly output_schema_ref: Schema.optionalKey<Schema.String>;
|
|
@@ -185,6 +216,11 @@ export declare const SpawnChildRunInput: Schema.Struct<{
|
|
|
185
216
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
186
217
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
187
218
|
}>>;
|
|
219
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
220
|
+
readonly context_window: Schema.Number;
|
|
221
|
+
readonly reserve_tokens: Schema.Number;
|
|
222
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
223
|
+
}>>;
|
|
188
224
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
189
225
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
190
226
|
readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
|
|
@@ -203,6 +239,11 @@ export declare const SpawnChildRunInput: Schema.Struct<{
|
|
|
203
239
|
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
204
240
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
205
241
|
}>>;
|
|
242
|
+
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
243
|
+
readonly context_window: Schema.Number;
|
|
244
|
+
readonly reserve_tokens: Schema.Number;
|
|
245
|
+
readonly keep_recent_tokens: Schema.Number;
|
|
246
|
+
}>>;
|
|
206
247
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
207
248
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
208
249
|
readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
|
|
@@ -276,7 +317,8 @@ export declare const ChildRunAccepted: Schema.Struct<{
|
|
|
276
317
|
}>;
|
|
277
318
|
export interface ChildRunAccepted extends Schema.Schema.Type<typeof ChildRunAccepted> {
|
|
278
319
|
}
|
|
279
|
-
export declare const
|
|
320
|
+
export declare const childSessionId: (childExecutionId: ChildExecutionId) => string & import("effect/Brand").Brand<"Relay.SessionId">;
|
|
321
|
+
export declare const ExecutionEventType: Schema.Literals<readonly ["execution.accepted", "execution.started", "execution.completed", "execution.failed", "execution.cancelled", "model.input.prepared", "model.output.delta", "model.reasoning.delta", "model.toolcall.delta", "model.output.completed", "model.usage.reported", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.received", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "entity.created", "entity.destroyed", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "child_fan_out.created", "child_fan_out.member.admitted", "child_fan_out.member.terminal", "child_fan_out.terminal", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
|
|
280
322
|
export type ExecutionEventType = typeof ExecutionEventType.Type;
|
|
281
323
|
export declare const ExecutionEvent: Schema.Struct<{
|
|
282
324
|
readonly id: Schema.brand<Schema.String, "Relay.EventId"> & {
|
|
@@ -288,7 +330,7 @@ export declare const ExecutionEvent: Schema.Struct<{
|
|
|
288
330
|
readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
289
331
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
290
332
|
}>;
|
|
291
|
-
readonly type: Schema.Literals<readonly ["execution.accepted", "execution.started", "execution.completed", "execution.failed", "execution.cancelled", "model.input.prepared", "model.output.delta", "model.reasoning.delta", "model.output.completed", "model.usage.reported", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.received", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "entity.created", "entity.destroyed", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "child_fan_out.created", "child_fan_out.member.admitted", "child_fan_out.member.terminal", "child_fan_out.terminal", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
|
|
333
|
+
readonly type: Schema.Literals<readonly ["execution.accepted", "execution.started", "execution.completed", "execution.failed", "execution.cancelled", "model.input.prepared", "model.output.delta", "model.reasoning.delta", "model.toolcall.delta", "model.output.completed", "model.usage.reported", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.received", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "entity.created", "entity.destroyed", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "child_fan_out.created", "child_fan_out.member.admitted", "child_fan_out.member.terminal", "child_fan_out.terminal", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
|
|
292
334
|
readonly sequence: Schema.Int;
|
|
293
335
|
readonly cursor: Schema.String;
|
|
294
336
|
readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
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.13",
|
|
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.13",
|
|
40
40
|
"effect": "4.0.0-beta.93"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|