@relayfx/test 0.2.14 → 0.2.15

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
@@ -341,7 +341,8 @@ var PositiveSafeInteger = Schema5.Number.check(Schema5.makeFilter((value) => Num
341
341
  var CompactionPolicy = Schema5.Struct({
342
342
  context_window: PositiveSafeInteger,
343
343
  reserve_tokens: PositiveSafeInteger,
344
- keep_recent_tokens: PositiveSafeInteger
344
+ keep_recent_tokens: PositiveSafeInteger,
345
+ summary_model: Schema5.optionalKey(ModelSelection)
345
346
  }).check(Schema5.makeFilter((policy) => policy.reserve_tokens + policy.keep_recent_tokens < policy.context_window ? undefined : "reserve_tokens + keep_recent_tokens must be less than context_window")).annotate({ identifier: "Relay.Agent.CompactionPolicy" });
346
347
  var ChildRunWorkspacePolicy = Schema5.Struct({
347
348
  mode: Schema5.Literals(["share", "fork"]),
@@ -13701,7 +13702,16 @@ var ModelInput = Schema65.Struct({
13701
13702
  model: Schema65.String,
13702
13703
  registration_key: Schema65.optionalKey(Schema65.String)
13703
13704
  }))),
13704
- compaction_policy: Schema65.optionalKey(exports_agent_schema.CompactionPolicy),
13705
+ compaction_policy: Schema65.optionalKey(Schema65.Struct({
13706
+ context_window: Schema65.Number,
13707
+ reserve_tokens: Schema65.Number,
13708
+ keep_recent_tokens: Schema65.Number,
13709
+ summary_model: Schema65.optionalKey(Schema65.Struct({
13710
+ provider: Schema65.String,
13711
+ model: Schema65.String,
13712
+ registration_key: Schema65.optionalKey(Schema65.String)
13713
+ }))
13714
+ })),
13705
13715
  tool_names: Schema65.optionalKey(Schema65.Array(Schema65.String)),
13706
13716
  permissions: Schema65.optionalKey(Schema65.Array(Schema65.String)),
13707
13717
  output_schema_ref: Schema65.optionalKey(Schema65.NullOr(Schema65.String)),
@@ -14190,6 +14200,7 @@ var forget2 = Effect58.fn("MemoryService.forget.call")(function* (input) {
14190
14200
  var exports_language_model_service = {};
14191
14201
  __export(exports_language_model_service, {
14192
14202
  testLayer: () => testLayer39,
14203
+ resolve: () => resolve4,
14193
14204
  registrations: () => registrations3,
14194
14205
  registrationFromLayer: () => registrationFromLayer3,
14195
14206
  register: () => register6,
@@ -14208,6 +14219,13 @@ var toSelection = (selection) => ({
14208
14219
  model: selection.model,
14209
14220
  ...selection.registration_key === undefined ? {} : { registrationKey: selection.registration_key }
14210
14221
  });
14222
+ var registrationKey = (value) => value.registration_key ?? value.registrationKey;
14223
+ var matchesSelection3 = (selection, registration) => registration.provider === selection.provider && registration.model === selection.model && registrationKey(registration) === registrationKey(selection);
14224
+ var notRegistered = (selection) => new LanguageModelNotRegistered2({
14225
+ provider: selection.provider,
14226
+ model: selection.model,
14227
+ ...selection.registration_key === undefined ? {} : { registration_key: selection.registration_key }
14228
+ });
14211
14229
 
14212
14230
  class Service40 extends Context53.Service()("@relayfx/runtime/LanguageModelService") {
14213
14231
  }
@@ -14232,6 +14250,11 @@ var registrations3 = Effect59.fn("LanguageModelService.registrations.call")(func
14232
14250
  const service = yield* Service40;
14233
14251
  return yield* service.registrations;
14234
14252
  });
14253
+ var resolve4 = Effect59.fn("LanguageModelService.resolve.call")(function* (selection) {
14254
+ const service = yield* Service40;
14255
+ const registered = yield* service.registrations;
14256
+ return yield* Effect59.fromNullishOr(registered.find((registration) => matchesSelection3(selection, registration))).pipe(Effect59.mapError(() => notRegistered(selection)));
14257
+ });
14235
14258
  var provide2 = (selection, effect) => Effect59.gen(function* () {
14236
14259
  const service = yield* Service40;
14237
14260
  return yield* service.provide(selection, effect);
@@ -14361,7 +14384,7 @@ var layer44 = (initialRegistrations = []) => Layer57.effect(Service43, Effect62.
14361
14384
  yield* Ref17.update(registry, (items) => upsertRegistration2(items, registration));
14362
14385
  });
14363
14386
  const registrations4 = Ref17.get(registry);
14364
- const resolve4 = Effect62.fn("SchemaRegistry.resolve")(function* (ref) {
14387
+ const resolve5 = Effect62.fn("SchemaRegistry.resolve")(function* (ref) {
14365
14388
  const items = yield* Ref17.get(registry);
14366
14389
  const found = items.find((item) => item.ref === ref);
14367
14390
  if (found === undefined) {
@@ -14369,7 +14392,7 @@ var layer44 = (initialRegistrations = []) => Layer57.effect(Service43, Effect62.
14369
14392
  }
14370
14393
  return found;
14371
14394
  });
14372
- return Service43.of({ register: register8, registrations: registrations4, resolve: resolve4 });
14395
+ return Service43.of({ register: register8, registrations: registrations4, resolve: resolve5 });
14373
14396
  }));
14374
14397
  var register8 = Effect62.fn("SchemaRegistry.register.call")(function* (registration) {
14375
14398
  const service = yield* Service43;
@@ -14379,7 +14402,7 @@ var registrations4 = Effect62.fn("SchemaRegistry.registrations.call")(function*
14379
14402
  const service = yield* Service43;
14380
14403
  return yield* service.registrations;
14381
14404
  });
14382
- var resolve4 = Effect62.fn("SchemaRegistry.resolve.call")(function* (ref) {
14405
+ var resolve5 = Effect62.fn("SchemaRegistry.resolve.call")(function* (ref) {
14383
14406
  const service = yield* Service43;
14384
14407
  return yield* service.resolve(ref);
14385
14408
  });
@@ -14448,7 +14471,7 @@ var memoryLayer37 = Layer58.effect(Service44, Effect63.gen(function* () {
14448
14471
  })
14449
14472
  });
14450
14473
  }));
14451
- var resolve5 = Effect63.fn("BlobStore.resolve.call")(function* (part) {
14474
+ var resolve6 = Effect63.fn("BlobStore.resolve.call")(function* (part) {
14452
14475
  const service = yield* Service44;
14453
14476
  return yield* service.resolve(part);
14454
14477
  });
@@ -17093,7 +17116,7 @@ var memoryServiceLayer = Layer72.effect(Service58, Effect82.gen(function* () {
17093
17116
  return Service58.of({ resolve: memory.resolve });
17094
17117
  }));
17095
17118
  var memoryLayer44 = memoryServiceLayer.pipe(Layer72.provideMerge(Layer72.effect(Memory2, makeMemory2)));
17096
- var resolve6 = Effect82.fn("ArtifactStore.resolve.call")(function* (part) {
17119
+ var resolve7 = Effect82.fn("ArtifactStore.resolve.call")(function* (part) {
17097
17120
  const service = yield* Service58;
17098
17121
  return yield* service.resolve(part);
17099
17122
  });
@@ -17226,7 +17249,7 @@ var strategy2 = (config) => {
17226
17249
  const existing = yield* config.repository.get({ executionId: config.executionId, checkpointId: id2 }).pipe(Effect84.mapError(mapRepositoryError12));
17227
17250
  if (existing !== undefined)
17228
17251
  return existing.summary;
17229
- const summary = yield* base2.summarize(plan2, request);
17252
+ const summary = yield* config.options?.summaryModel === undefined ? base2.summarize(plan2, request) : config.options.summaryModel.pipe(Effect84.flatMap((model) => base2.summarize(plan2, request).pipe(Effect84.provide(model))));
17230
17253
  const createdAt = yield* Clock12.currentTimeMillis;
17231
17254
  const input = {
17232
17255
  executionId: config.executionId,
@@ -18062,7 +18085,16 @@ var layer59 = Layer79.effect(Service54, Effect90.gen(function* () {
18062
18085
  yield* appendEvent(eventLog, inputPreparedEvent(input, definitions2), input.eventSequence + 1);
18063
18086
  const toolOutputMaxBytes = yield* effectiveToolOutputMaxBytes(input);
18064
18087
  const compactionPolicy = input.agent.compaction_policy;
18065
- const activeCompactionOptions = compactionOptions(input.agent);
18088
+ const configuredCompactionOptions = compactionOptions(input.agent);
18089
+ const activeCompactionOptions = configuredCompactionOptions === undefined ? undefined : {
18090
+ ...configuredCompactionOptions,
18091
+ ...compactionPolicy?.summary_model === undefined ? {} : {
18092
+ summaryModel: resolve4(compactionPolicy.summary_model).pipe(Effect90.provideService(Service40, languageModels), Effect90.map((registration) => registration.layer), Effect90.mapError((error5) => new exports_compaction.CompactionError({
18093
+ message: `LanguageModelNotRegistered: ${error5.provider}/${error5.model}`,
18094
+ cause: error5
18095
+ })))
18096
+ }
18097
+ };
18066
18098
  const runTokenizer = yield* Effect90.serviceOption(Tokenizer4.Tokenizer);
18067
18099
  const activeTokenizer = Option27.isSome(runTokenizer) ? runTokenizer : tokenizer;
18068
18100
  const allocator = yield* make14(input.eventSequence + 1);
@@ -79,11 +79,22 @@ 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
+ readonly compaction_policy?: {
83
+ readonly context_window: number;
84
+ readonly reserve_tokens: number;
85
+ readonly keep_recent_tokens: number;
86
+ readonly summary_model?: {
87
+ readonly provider: string;
88
+ readonly model: string;
89
+ readonly metadata?: {
90
+ readonly [x: string]: Schema.Json;
91
+ };
92
+ readonly registration_key?: string;
93
+ readonly request_options?: {
94
+ readonly [x: string]: Schema.Json;
95
+ };
96
+ };
97
+ };
87
98
  readonly output_schema_ref?: string;
88
99
  readonly skill_definition_ids?: readonly string[];
89
100
  readonly permission_rules?: {
@@ -116,11 +127,22 @@ export declare const LocalAgentTarget: Schema.Struct<{
116
127
  };
117
128
  };
118
129
  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">;
130
+ readonly compaction_policy?: {
131
+ readonly context_window: number;
132
+ readonly reserve_tokens: number;
133
+ readonly keep_recent_tokens: number;
134
+ readonly summary_model?: {
135
+ readonly provider: string;
136
+ readonly model: string;
137
+ readonly metadata?: {
138
+ readonly [x: string]: Schema.Json;
139
+ };
140
+ readonly registration_key?: string;
141
+ readonly request_options?: {
142
+ readonly [x: string]: Schema.Json;
143
+ };
144
+ };
145
+ };
124
146
  readonly tool_names?: readonly string[];
125
147
  readonly workspace_policy?: {
126
148
  readonly mode: "share" | "fork";
@@ -1,11 +1,12 @@
1
- import { Compaction } from "@batonfx/core";
1
+ import { Compaction, ModelRegistry } from "@batonfx/core";
2
2
  import { Ids } from "../../schema/index";
3
3
  import { CompactionRepository } from "@relayfx/store-sql/portable";
4
- import { Layer } from "effect";
4
+ import { Effect, Layer } from "effect";
5
5
  export interface Options {
6
6
  readonly contextWindow?: number;
7
7
  readonly reserveTokens?: number;
8
8
  readonly keepRecentTokens?: number;
9
+ readonly summaryModel?: Effect.Effect<Layer.Layer<ModelRegistry.ModelEnvironment>, Compaction.CompactionError>;
9
10
  }
10
11
  export interface Config {
11
12
  readonly executionId: Ids.ExecutionId;
@@ -20,6 +20,13 @@ export declare const Input: Schema.Struct<{
20
20
  readonly context_window: Schema.Number;
21
21
  readonly reserve_tokens: Schema.Number;
22
22
  readonly keep_recent_tokens: Schema.Number;
23
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
24
+ readonly provider: Schema.String;
25
+ readonly model: Schema.String;
26
+ readonly registration_key: Schema.optionalKey<Schema.String>;
27
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
28
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
29
+ }>>;
23
30
  }>>;
24
31
  readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
25
32
  readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -29,6 +29,7 @@ export declare const memoryLayer: (initialRegistrations?: ReadonlyArray<Registra
29
29
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
30
30
  export declare const register: (input: ModelRegistry.RegisterInput) => Effect.Effect<void, never, Service>;
31
31
  export declare const registrations: () => Effect.Effect<readonly ModelRegistry.Registration[], never, Service>;
32
+ export declare const resolve: (selection: Agent.ModelSelection) => Effect.Effect<ModelRegistry.Registration, ModelRegistry.LanguageModelNotRegistered, Service>;
32
33
  export declare const provide: <A, E, R>(selection: Agent.ModelSelection, effect: Effect.Effect<A, E, R>) => Effect.Effect<A, ModelRegistry.LanguageModelNotRegistered | E, Service | Exclude<R, ModelRegistry.ModelEnvironment>>;
33
34
  export declare const provideForAgent: <A, E, R>(agent: Agent.Definition, effect: Effect.Effect<A, E, R>) => Effect.Effect<A, ModelRegistry.LanguageModelNotRegistered | E, Service | Exclude<R, ModelRegistry.ModelEnvironment>>;
34
35
  export {};
@@ -103,11 +103,22 @@ 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
+ readonly compaction_policy?: {
107
+ readonly context_window: number;
108
+ readonly reserve_tokens: number;
109
+ readonly keep_recent_tokens: number;
110
+ readonly summary_model?: {
111
+ readonly provider: string;
112
+ readonly model: string;
113
+ readonly metadata?: {
114
+ readonly [x: string]: Schema.Json;
115
+ };
116
+ readonly registration_key?: string;
117
+ readonly request_options?: {
118
+ readonly [x: string]: Schema.Json;
119
+ };
120
+ };
121
+ };
111
122
  readonly output_schema_ref?: string;
112
123
  readonly skill_definition_ids?: readonly string[];
113
124
  readonly permission_rules?: {
@@ -140,11 +151,22 @@ export declare const StartInput: Schema.Struct<{
140
151
  };
141
152
  };
142
153
  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">;
154
+ readonly compaction_policy?: {
155
+ readonly context_window: number;
156
+ readonly reserve_tokens: number;
157
+ readonly keep_recent_tokens: number;
158
+ readonly summary_model?: {
159
+ readonly provider: string;
160
+ readonly model: string;
161
+ readonly metadata?: {
162
+ readonly [x: string]: Schema.Json;
163
+ };
164
+ readonly registration_key?: string;
165
+ readonly request_options?: {
166
+ readonly [x: string]: Schema.Json;
167
+ };
168
+ };
169
+ };
148
170
  readonly tool_names?: readonly string[];
149
171
  readonly workspace_policy?: {
150
172
  readonly mode: "share" | "fork";
@@ -371,11 +393,22 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
371
393
  readonly [x: string]: Schema.Json;
372
394
  };
373
395
  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">;
396
+ readonly compaction_policy?: {
397
+ readonly context_window: number;
398
+ readonly reserve_tokens: number;
399
+ readonly keep_recent_tokens: number;
400
+ readonly summary_model?: {
401
+ readonly provider: string;
402
+ readonly model: string;
403
+ readonly metadata?: {
404
+ readonly [x: string]: Schema.Json;
405
+ };
406
+ readonly registration_key?: string;
407
+ readonly request_options?: {
408
+ readonly [x: string]: Schema.Json;
409
+ };
410
+ };
411
+ };
379
412
  readonly output_schema_ref?: string;
380
413
  readonly skill_definition_ids?: readonly string[];
381
414
  readonly permission_rules?: {
@@ -408,11 +441,22 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
408
441
  };
409
442
  };
410
443
  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">;
444
+ readonly compaction_policy?: {
445
+ readonly context_window: number;
446
+ readonly reserve_tokens: number;
447
+ readonly keep_recent_tokens: number;
448
+ readonly summary_model?: {
449
+ readonly provider: string;
450
+ readonly model: string;
451
+ readonly metadata?: {
452
+ readonly [x: string]: Schema.Json;
453
+ };
454
+ readonly registration_key?: string;
455
+ readonly request_options?: {
456
+ readonly [x: string]: Schema.Json;
457
+ };
458
+ };
459
+ };
416
460
  readonly tool_names?: readonly string[];
417
461
  readonly workspace_policy?: {
418
462
  readonly mode: "share" | "fork";
@@ -17,6 +17,13 @@ export declare const CompactionPolicy: Schema.Struct<{
17
17
  readonly context_window: Schema.Number;
18
18
  readonly reserve_tokens: Schema.Number;
19
19
  readonly keep_recent_tokens: Schema.Number;
20
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
21
+ readonly provider: Schema.String;
22
+ readonly model: Schema.String;
23
+ readonly registration_key: Schema.optionalKey<Schema.String>;
24
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
25
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
26
+ }>>;
20
27
  }>;
21
28
  export interface CompactionPolicy extends Schema.Schema.Type<typeof CompactionPolicy> {
22
29
  }
@@ -39,6 +46,13 @@ export declare const ChildRunPreset: Schema.Struct<{
39
46
  readonly context_window: Schema.Number;
40
47
  readonly reserve_tokens: Schema.Number;
41
48
  readonly keep_recent_tokens: Schema.Number;
49
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
50
+ readonly provider: Schema.String;
51
+ readonly model: Schema.String;
52
+ readonly registration_key: Schema.optionalKey<Schema.String>;
53
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
54
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
55
+ }>>;
42
56
  }>>;
43
57
  readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
44
58
  readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -130,6 +144,13 @@ declare const DefinitionSchema: Schema.Struct<{
130
144
  readonly context_window: Schema.Number;
131
145
  readonly reserve_tokens: Schema.Number;
132
146
  readonly keep_recent_tokens: Schema.Number;
147
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
148
+ readonly provider: Schema.String;
149
+ readonly model: Schema.String;
150
+ readonly registration_key: Schema.optionalKey<Schema.String>;
151
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
152
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
153
+ }>>;
133
154
  }>>;
134
155
  readonly max_tool_turns: Schema.optionalKey<Schema.Int>;
135
156
  readonly max_wait_turns: Schema.optionalKey<Schema.Int>;
@@ -147,6 +168,13 @@ declare const DefinitionSchema: Schema.Struct<{
147
168
  readonly context_window: Schema.Number;
148
169
  readonly reserve_tokens: Schema.Number;
149
170
  readonly keep_recent_tokens: Schema.Number;
171
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
172
+ readonly provider: Schema.String;
173
+ readonly model: Schema.String;
174
+ readonly registration_key: Schema.optionalKey<Schema.String>;
175
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
176
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
177
+ }>>;
150
178
  }>>;
151
179
  readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
152
180
  readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -222,11 +250,22 @@ export declare const DefinitionRecord: Schema.Struct<{
222
250
  readonly [x: string]: Schema.Json;
223
251
  };
224
252
  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">;
253
+ readonly compaction_policy?: {
254
+ readonly context_window: number;
255
+ readonly reserve_tokens: number;
256
+ readonly keep_recent_tokens: number;
257
+ readonly summary_model?: {
258
+ readonly provider: string;
259
+ readonly model: string;
260
+ readonly metadata?: {
261
+ readonly [x: string]: Schema.Json;
262
+ };
263
+ readonly registration_key?: string;
264
+ readonly request_options?: {
265
+ readonly [x: string]: Schema.Json;
266
+ };
267
+ };
268
+ };
230
269
  readonly output_schema_ref?: string;
231
270
  readonly skill_definition_ids?: readonly string[];
232
271
  readonly permission_rules?: {
@@ -259,11 +298,22 @@ export declare const DefinitionRecord: Schema.Struct<{
259
298
  };
260
299
  };
261
300
  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">;
301
+ readonly compaction_policy?: {
302
+ readonly context_window: number;
303
+ readonly reserve_tokens: number;
304
+ readonly keep_recent_tokens: number;
305
+ readonly summary_model?: {
306
+ readonly provider: string;
307
+ readonly model: string;
308
+ readonly metadata?: {
309
+ readonly [x: string]: Schema.Json;
310
+ };
311
+ readonly registration_key?: string;
312
+ readonly request_options?: {
313
+ readonly [x: string]: Schema.Json;
314
+ };
315
+ };
316
+ };
267
317
  readonly tool_names?: readonly string[];
268
318
  readonly workspace_policy?: {
269
319
  readonly mode: "share" | "fork";
@@ -313,11 +363,22 @@ export declare const DefinitionRevisionRecord: Schema.Struct<{
313
363
  readonly [x: string]: Schema.Json;
314
364
  };
315
365
  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">;
366
+ readonly compaction_policy?: {
367
+ readonly context_window: number;
368
+ readonly reserve_tokens: number;
369
+ readonly keep_recent_tokens: number;
370
+ readonly summary_model?: {
371
+ readonly provider: string;
372
+ readonly model: string;
373
+ readonly metadata?: {
374
+ readonly [x: string]: Schema.Json;
375
+ };
376
+ readonly registration_key?: string;
377
+ readonly request_options?: {
378
+ readonly [x: string]: Schema.Json;
379
+ };
380
+ };
381
+ };
321
382
  readonly output_schema_ref?: string;
322
383
  readonly skill_definition_ids?: readonly string[];
323
384
  readonly permission_rules?: {
@@ -350,11 +411,22 @@ export declare const DefinitionRevisionRecord: Schema.Struct<{
350
411
  };
351
412
  };
352
413
  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">;
414
+ readonly compaction_policy?: {
415
+ readonly context_window: number;
416
+ readonly reserve_tokens: number;
417
+ readonly keep_recent_tokens: number;
418
+ readonly summary_model?: {
419
+ readonly provider: string;
420
+ readonly model: string;
421
+ readonly metadata?: {
422
+ readonly [x: string]: Schema.Json;
423
+ };
424
+ readonly registration_key?: string;
425
+ readonly request_options?: {
426
+ readonly [x: string]: Schema.Json;
427
+ };
428
+ };
429
+ };
358
430
  readonly tool_names?: readonly string[];
359
431
  readonly workspace_policy?: {
360
432
  readonly mode: "share" | "fork";
@@ -402,11 +474,22 @@ export declare const RegisterDefinitionPayload: Schema.Struct<{
402
474
  readonly [x: string]: Schema.Json;
403
475
  };
404
476
  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">;
477
+ readonly compaction_policy?: {
478
+ readonly context_window: number;
479
+ readonly reserve_tokens: number;
480
+ readonly keep_recent_tokens: number;
481
+ readonly summary_model?: {
482
+ readonly provider: string;
483
+ readonly model: string;
484
+ readonly metadata?: {
485
+ readonly [x: string]: Schema.Json;
486
+ };
487
+ readonly registration_key?: string;
488
+ readonly request_options?: {
489
+ readonly [x: string]: Schema.Json;
490
+ };
491
+ };
492
+ };
410
493
  readonly output_schema_ref?: string;
411
494
  readonly skill_definition_ids?: readonly string[];
412
495
  readonly permission_rules?: {
@@ -439,11 +522,22 @@ export declare const RegisterDefinitionPayload: Schema.Struct<{
439
522
  };
440
523
  };
441
524
  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">;
525
+ readonly compaction_policy?: {
526
+ readonly context_window: number;
527
+ readonly reserve_tokens: number;
528
+ readonly keep_recent_tokens: number;
529
+ readonly summary_model?: {
530
+ readonly provider: string;
531
+ readonly model: string;
532
+ readonly metadata?: {
533
+ readonly [x: string]: Schema.Json;
534
+ };
535
+ readonly registration_key?: string;
536
+ readonly request_options?: {
537
+ readonly [x: string]: Schema.Json;
538
+ };
539
+ };
540
+ };
447
541
  readonly tool_names?: readonly string[];
448
542
  readonly workspace_policy?: {
449
543
  readonly mode: "share" | "fork";
@@ -491,11 +585,22 @@ export declare const DefinitionRegistered: Schema.Struct<{
491
585
  readonly [x: string]: Schema.Json;
492
586
  };
493
587
  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">;
588
+ readonly compaction_policy?: {
589
+ readonly context_window: number;
590
+ readonly reserve_tokens: number;
591
+ readonly keep_recent_tokens: number;
592
+ readonly summary_model?: {
593
+ readonly provider: string;
594
+ readonly model: string;
595
+ readonly metadata?: {
596
+ readonly [x: string]: Schema.Json;
597
+ };
598
+ readonly registration_key?: string;
599
+ readonly request_options?: {
600
+ readonly [x: string]: Schema.Json;
601
+ };
602
+ };
603
+ };
499
604
  readonly output_schema_ref?: string;
500
605
  readonly skill_definition_ids?: readonly string[];
501
606
  readonly permission_rules?: {
@@ -528,11 +633,22 @@ export declare const DefinitionRegistered: Schema.Struct<{
528
633
  };
529
634
  };
530
635
  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">;
636
+ readonly compaction_policy?: {
637
+ readonly context_window: number;
638
+ readonly reserve_tokens: number;
639
+ readonly keep_recent_tokens: number;
640
+ readonly summary_model?: {
641
+ readonly provider: string;
642
+ readonly model: string;
643
+ readonly metadata?: {
644
+ readonly [x: string]: Schema.Json;
645
+ };
646
+ readonly registration_key?: string;
647
+ readonly request_options?: {
648
+ readonly [x: string]: Schema.Json;
649
+ };
650
+ };
651
+ };
536
652
  readonly tool_names?: readonly string[];
537
653
  readonly workspace_policy?: {
538
654
  readonly mode: "share" | "fork";
@@ -584,11 +700,22 @@ export declare const DefinitionList: Schema.Struct<{
584
700
  readonly [x: string]: Schema.Json;
585
701
  };
586
702
  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">;
703
+ readonly compaction_policy?: {
704
+ readonly context_window: number;
705
+ readonly reserve_tokens: number;
706
+ readonly keep_recent_tokens: number;
707
+ readonly summary_model?: {
708
+ readonly provider: string;
709
+ readonly model: string;
710
+ readonly metadata?: {
711
+ readonly [x: string]: Schema.Json;
712
+ };
713
+ readonly registration_key?: string;
714
+ readonly request_options?: {
715
+ readonly [x: string]: Schema.Json;
716
+ };
717
+ };
718
+ };
592
719
  readonly output_schema_ref?: string;
593
720
  readonly skill_definition_ids?: readonly string[];
594
721
  readonly permission_rules?: {
@@ -621,11 +748,22 @@ export declare const DefinitionList: Schema.Struct<{
621
748
  };
622
749
  };
623
750
  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">;
751
+ readonly compaction_policy?: {
752
+ readonly context_window: number;
753
+ readonly reserve_tokens: number;
754
+ readonly keep_recent_tokens: number;
755
+ readonly summary_model?: {
756
+ readonly provider: string;
757
+ readonly model: string;
758
+ readonly metadata?: {
759
+ readonly [x: string]: Schema.Json;
760
+ };
761
+ readonly registration_key?: string;
762
+ readonly request_options?: {
763
+ readonly [x: string]: Schema.Json;
764
+ };
765
+ };
766
+ };
629
767
  readonly tool_names?: readonly string[];
630
768
  readonly workspace_policy?: {
631
769
  readonly mode: "share" | "fork";
@@ -677,11 +815,22 @@ export declare const DefinitionRevisionList: Schema.Struct<{
677
815
  readonly [x: string]: Schema.Json;
678
816
  };
679
817
  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">;
818
+ readonly compaction_policy?: {
819
+ readonly context_window: number;
820
+ readonly reserve_tokens: number;
821
+ readonly keep_recent_tokens: number;
822
+ readonly summary_model?: {
823
+ readonly provider: string;
824
+ readonly model: string;
825
+ readonly metadata?: {
826
+ readonly [x: string]: Schema.Json;
827
+ };
828
+ readonly registration_key?: string;
829
+ readonly request_options?: {
830
+ readonly [x: string]: Schema.Json;
831
+ };
832
+ };
833
+ };
685
834
  readonly output_schema_ref?: string;
686
835
  readonly skill_definition_ids?: readonly string[];
687
836
  readonly permission_rules?: {
@@ -714,11 +863,22 @@ export declare const DefinitionRevisionList: Schema.Struct<{
714
863
  };
715
864
  };
716
865
  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">;
866
+ readonly compaction_policy?: {
867
+ readonly context_window: number;
868
+ readonly reserve_tokens: number;
869
+ readonly keep_recent_tokens: number;
870
+ readonly summary_model?: {
871
+ readonly provider: string;
872
+ readonly model: string;
873
+ readonly metadata?: {
874
+ readonly [x: string]: Schema.Json;
875
+ };
876
+ readonly registration_key?: string;
877
+ readonly request_options?: {
878
+ readonly [x: string]: Schema.Json;
879
+ };
880
+ };
881
+ };
722
882
  readonly tool_names?: readonly string[];
723
883
  readonly workspace_policy?: {
724
884
  readonly mode: "share" | "fork";
@@ -23,6 +23,13 @@ export declare const FanOutChild: Schema.Struct<{
23
23
  readonly context_window: Schema.Number;
24
24
  readonly reserve_tokens: Schema.Number;
25
25
  readonly keep_recent_tokens: Schema.Number;
26
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
27
+ readonly provider: Schema.String;
28
+ readonly model: Schema.String;
29
+ readonly registration_key: Schema.optionalKey<Schema.String>;
30
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
31
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
32
+ }>>;
26
33
  }>>;
27
34
  readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
28
35
  readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -113,6 +120,13 @@ export declare const FanOutDefinition: Schema.Struct<{
113
120
  readonly context_window: Schema.Number;
114
121
  readonly reserve_tokens: Schema.Number;
115
122
  readonly keep_recent_tokens: Schema.Number;
123
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
124
+ readonly provider: Schema.String;
125
+ readonly model: Schema.String;
126
+ readonly registration_key: Schema.optionalKey<Schema.String>;
127
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
128
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
129
+ }>>;
116
130
  }>>;
117
131
  readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
118
132
  readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -336,6 +350,13 @@ export declare const FanOutState: Schema.Struct<{
336
350
  readonly context_window: Schema.Number;
337
351
  readonly reserve_tokens: Schema.Number;
338
352
  readonly keep_recent_tokens: Schema.Number;
353
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
354
+ readonly provider: Schema.String;
355
+ readonly model: Schema.String;
356
+ readonly registration_key: Schema.optionalKey<Schema.String>;
357
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
358
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
359
+ }>>;
339
360
  }>>;
340
361
  readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
341
362
  readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -43,11 +43,22 @@ export declare const Execution: Schema.Struct<{
43
43
  readonly [x: string]: Schema.Json;
44
44
  };
45
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">;
46
+ readonly compaction_policy?: {
47
+ readonly context_window: number;
48
+ readonly reserve_tokens: number;
49
+ readonly keep_recent_tokens: number;
50
+ readonly summary_model?: {
51
+ readonly provider: string;
52
+ readonly model: string;
53
+ readonly metadata?: {
54
+ readonly [x: string]: Schema.Json;
55
+ };
56
+ readonly registration_key?: string;
57
+ readonly request_options?: {
58
+ readonly [x: string]: Schema.Json;
59
+ };
60
+ };
61
+ };
51
62
  readonly output_schema_ref?: string;
52
63
  readonly skill_definition_ids?: readonly string[];
53
64
  readonly permission_rules?: {
@@ -80,11 +91,22 @@ export declare const Execution: Schema.Struct<{
80
91
  };
81
92
  };
82
93
  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">;
94
+ readonly compaction_policy?: {
95
+ readonly context_window: number;
96
+ readonly reserve_tokens: number;
97
+ readonly keep_recent_tokens: number;
98
+ readonly summary_model?: {
99
+ readonly provider: string;
100
+ readonly model: string;
101
+ readonly metadata?: {
102
+ readonly [x: string]: Schema.Json;
103
+ };
104
+ readonly registration_key?: string;
105
+ readonly request_options?: {
106
+ readonly [x: string]: Schema.Json;
107
+ };
108
+ };
109
+ };
88
110
  readonly tool_names?: readonly string[];
89
111
  readonly workspace_policy?: {
90
112
  readonly mode: "share" | "fork";
@@ -120,6 +142,13 @@ export declare const ChildRunContext: Schema.Struct<{
120
142
  readonly context_window: Schema.Number;
121
143
  readonly reserve_tokens: Schema.Number;
122
144
  readonly keep_recent_tokens: Schema.Number;
145
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
146
+ readonly provider: Schema.String;
147
+ readonly model: Schema.String;
148
+ readonly registration_key: Schema.optionalKey<Schema.String>;
149
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
150
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
151
+ }>>;
123
152
  }>>;
124
153
  readonly tool_names: Schema.$Array<Schema.String>;
125
154
  readonly permissions: Schema.$Array<Schema.String>;
@@ -141,6 +170,13 @@ export declare const ChildRunOverride: Schema.Struct<{
141
170
  readonly context_window: Schema.Number;
142
171
  readonly reserve_tokens: Schema.Number;
143
172
  readonly keep_recent_tokens: Schema.Number;
173
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
174
+ readonly provider: Schema.String;
175
+ readonly model: Schema.String;
176
+ readonly registration_key: Schema.optionalKey<Schema.String>;
177
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
178
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
179
+ }>>;
144
180
  }>>;
145
181
  readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
146
182
  readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -166,6 +202,13 @@ export declare const ChildRunPreset: Schema.Struct<{
166
202
  readonly context_window: Schema.Number;
167
203
  readonly reserve_tokens: Schema.Number;
168
204
  readonly keep_recent_tokens: Schema.Number;
205
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
206
+ readonly provider: Schema.String;
207
+ readonly model: Schema.String;
208
+ readonly registration_key: Schema.optionalKey<Schema.String>;
209
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
210
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
211
+ }>>;
169
212
  }>>;
170
213
  readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
171
214
  readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -201,6 +244,13 @@ export declare const SpawnChildRunInput: Schema.Struct<{
201
244
  readonly context_window: Schema.Number;
202
245
  readonly reserve_tokens: Schema.Number;
203
246
  readonly keep_recent_tokens: Schema.Number;
247
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
248
+ readonly provider: Schema.String;
249
+ readonly model: Schema.String;
250
+ readonly registration_key: Schema.optionalKey<Schema.String>;
251
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
252
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
253
+ }>>;
204
254
  }>>;
205
255
  readonly tool_names: Schema.$Array<Schema.String>;
206
256
  readonly permissions: Schema.$Array<Schema.String>;
@@ -220,6 +270,13 @@ export declare const SpawnChildRunInput: Schema.Struct<{
220
270
  readonly context_window: Schema.Number;
221
271
  readonly reserve_tokens: Schema.Number;
222
272
  readonly keep_recent_tokens: Schema.Number;
273
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
274
+ readonly provider: Schema.String;
275
+ readonly model: Schema.String;
276
+ readonly registration_key: Schema.optionalKey<Schema.String>;
277
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
278
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
279
+ }>>;
223
280
  }>>;
224
281
  readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
225
282
  readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -243,6 +300,13 @@ export declare const SpawnChildRunInput: Schema.Struct<{
243
300
  readonly context_window: Schema.Number;
244
301
  readonly reserve_tokens: Schema.Number;
245
302
  readonly keep_recent_tokens: Schema.Number;
303
+ readonly summary_model: Schema.optionalKey<Schema.Struct<{
304
+ readonly provider: Schema.String;
305
+ readonly model: Schema.String;
306
+ readonly registration_key: Schema.optionalKey<Schema.String>;
307
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
308
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
309
+ }>>;
246
310
  }>>;
247
311
  readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
248
312
  readonly permissions: Schema.optionalKey<Schema.$Array<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.14",
4
+ "version": "0.2.15",
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.14",
39
+ "@relayfx/sdk": "0.2.15",
40
40
  "effect": "4.0.0-beta.93"
41
41
  },
42
42
  "peerDependencies": {