@relayfx/sdk 0.6.1 → 0.7.1

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/mysql.js CHANGED
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  database,
4
4
  normalizeMigrationCause
5
- } from "./index-dm4yqr8f.js";
5
+ } from "./index-rppc919a.js";
6
6
  import {
7
7
  MigratorError,
8
8
  RuntimeMigrationError,
9
9
  SqlFailure
10
- } from "./index-ftgf8py0.js";
11
- import"./index-5vjhqzbk.js";
12
- import"./index-fh2ftte9.js";
10
+ } from "./index-s3mmg704.js";
11
+ import"./index-qa93yf6j.js";
12
+ import"./index-q7xzf506.js";
13
13
  import"./index-nb39b5ae.js";
14
14
 
15
15
  // src/mysql.ts
package/dist/postgres.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  database,
4
4
  normalizeMigrationCause
5
- } from "./index-dm4yqr8f.js";
5
+ } from "./index-rppc919a.js";
6
6
  import {
7
7
  Dialect,
8
8
  RuntimeMigrationError,
@@ -14,11 +14,11 @@ import {
14
14
  fromDbTimestamp,
15
15
  fromNullableDbTimestamp,
16
16
  timestampParam
17
- } from "./index-ftgf8py0.js";
18
- import"./index-5vjhqzbk.js";
17
+ } from "./index-s3mmg704.js";
18
+ import"./index-qa93yf6j.js";
19
19
  import {
20
20
  exports_ids_schema
21
- } from "./index-fh2ftte9.js";
21
+ } from "./index-q7xzf506.js";
22
22
  import {
23
23
  __export
24
24
  } from "./index-nb39b5ae.js";
package/dist/sqlite.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  database,
4
4
  normalizeMigrationCause
5
- } from "./index-dm4yqr8f.js";
5
+ } from "./index-rppc919a.js";
6
6
  import {
7
7
  DatabaseAlreadyOwned,
8
8
  RuntimeConfigurationError,
@@ -12,9 +12,9 @@ import {
12
12
  make,
13
13
  makeDatabaseIdentity,
14
14
  runtimeLayer
15
- } from "./index-ftgf8py0.js";
16
- import"./index-5vjhqzbk.js";
17
- import"./index-fh2ftte9.js";
15
+ } from "./index-s3mmg704.js";
16
+ import"./index-qa93yf6j.js";
17
+ import"./index-q7xzf506.js";
18
18
  import"./index-nb39b5ae.js";
19
19
 
20
20
  // src/sqlite-runtime.ts
@@ -31,7 +31,7 @@ export declare const followExecution: (input: FollowExecutionInput) => Stream.St
31
31
  readonly child_execution_id: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Relay.ChildExecutionId"> & {
32
32
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
33
33
  }>;
34
- readonly type: import("effect/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", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
34
+ readonly type: import("effect/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", "agent.compaction.started", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
35
35
  readonly sequence: import("effect/Schema").Int;
36
36
  readonly cursor: import("effect/Schema").String;
37
37
  readonly content: import("effect/Schema").optionalKey<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
@@ -151,7 +151,7 @@ export declare const streamSession: (input: StreamSessionInput) => Stream.Stream
151
151
  readonly child_execution_id: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Relay.ChildExecutionId"> & {
152
152
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
153
153
  }>;
154
- readonly type: import("effect/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", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
154
+ readonly type: import("effect/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", "agent.compaction.started", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
155
155
  readonly sequence: import("effect/Schema").Int;
156
156
  readonly cursor: import("effect/Schema").String;
157
157
  readonly content: import("effect/Schema").optionalKey<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
@@ -650,7 +650,7 @@ export declare const FollowExecutionItem: Schema.Union<readonly [Schema.Struct<{
650
650
  readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
651
651
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
652
652
  }>;
653
- 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", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
653
+ 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", "agent.compaction.started", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
654
654
  readonly sequence: Schema.Int;
655
655
  readonly cursor: Schema.String;
656
656
  readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -2407,7 +2407,7 @@ export declare const SessionStreamItem: Schema.Union<readonly [Schema.TaggedStru
2407
2407
  readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
2408
2408
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
2409
2409
  }>;
2410
- 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", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
2410
+ 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", "agent.compaction.started", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
2411
2411
  readonly sequence: Schema.Int;
2412
2412
  readonly cursor: Schema.String;
2413
2413
  readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -2718,7 +2718,7 @@ export declare const ReplayExecutionResult: Schema.Struct<{
2718
2718
  readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
2719
2719
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
2720
2720
  }>;
2721
- 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", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
2721
+ 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", "agent.compaction.started", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
2722
2722
  readonly sequence: Schema.Int;
2723
2723
  readonly cursor: Schema.String;
2724
2724
  readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -2800,7 +2800,7 @@ export declare const PageExecutionEventsResult: Schema.Struct<{
2800
2800
  readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
2801
2801
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
2802
2802
  }>;
2803
- 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", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
2803
+ 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", "agent.compaction.started", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
2804
2804
  readonly sequence: Schema.Int;
2805
2805
  readonly cursor: Schema.String;
2806
2806
  readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -13,6 +13,10 @@ export interface Config {
13
13
  readonly repository: CompactionRepository.Interface;
14
14
  readonly options?: Options;
15
15
  readonly strategy?: Compaction.Strategy;
16
+ readonly onSummarizeStarted?: (info: {
17
+ readonly turn: number;
18
+ readonly overflow: boolean;
19
+ }) => Effect.Effect<void, Compaction.CompactionError>;
16
20
  }
17
21
  export declare const checkpointId: (input: {
18
22
  readonly executionId: Ids.ExecutionId;
@@ -390,8 +390,14 @@ export declare const steeringMessageId: (input: {
390
390
  readonly kind: "steering" | "follow_up";
391
391
  readonly sequence: number;
392
392
  }) => string & import("effect/Brand").Brand<"Relay.SteeringMessageId">;
393
- 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", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
393
+ 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", "agent.compaction.started", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
394
394
  export type ExecutionEventType = typeof ExecutionEventType.Type;
395
+ export declare const CompactionStartedEventData: Schema.Struct<{
396
+ readonly turn: Schema.Finite;
397
+ readonly overflow: Schema.Boolean;
398
+ }>;
399
+ export interface CompactionStartedEventData extends Schema.Schema.Type<typeof CompactionStartedEventData> {
400
+ }
395
401
  export declare const CompactionCommittedEventData: Schema.Struct<{
396
402
  readonly checkpoint_id: Schema.brand<Schema.String, "Relay.SessionEntryId"> & {
397
403
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SessionEntryId">;
@@ -413,7 +419,7 @@ export declare const ExecutionEvent: Schema.Struct<{
413
419
  readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
414
420
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
415
421
  }>;
416
- 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", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
422
+ 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", "agent.compaction.started", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.delivered", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "resident.created", "resident.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"]>;
417
423
  readonly sequence: Schema.Int;
418
424
  readonly cursor: Schema.String;
419
425
  readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -0,0 +1,4 @@
1
+ import { Shared } from "../schema/index";
2
+ import { Prompt } from "effect/unstable/ai";
3
+ export declare const encodePrompt: (prompt: Prompt.Prompt) => Shared.JsonValue;
4
+ export declare const decodePrompt: (value: Shared.JsonValue) => Prompt.Prompt;
@@ -1,3 +1,4 @@
1
+ import { ModelTelemetry } from "@batonfx/core";
1
2
  import { Ids, Shared } from "../../schema/index";
2
3
  import { Effect, Schema } from "effect";
3
4
  import { Prompt } from "effect/unstable/ai";
@@ -43,6 +44,8 @@ export declare const makeSessionEntryRecords: (errors: SessionEntryRecordErrors)
43
44
  parentId: Ids.SessionEntryId | null;
44
45
  _tag: "Compaction";
45
46
  version: 2;
47
+ telemetry: ReadonlyArray<ModelTelemetry.Event>;
48
+ compactionCommit?: ModelTelemetry.CompactionCommit;
46
49
  summary?: string;
47
50
  metadata?: Shared.Metadata;
48
51
  createdAt: number;
@@ -1,3 +1,4 @@
1
+ import { ModelTelemetry } from "@batonfx/core";
1
2
  import { Ids, Shared } from "../../schema/index";
2
3
  import { Context, Effect, Layer, Schema } from "effect";
3
4
  import { Prompt } from "effect/unstable/ai";
@@ -123,6 +124,8 @@ export type AppendSessionEntryInput = {
123
124
  readonly _tag: "Compaction";
124
125
  readonly version: 2;
125
126
  readonly projectedHistory: Prompt.Prompt;
127
+ readonly telemetry: ReadonlyArray<ModelTelemetry.Event>;
128
+ readonly compactionCommit?: ModelTelemetry.CompactionCommit;
126
129
  readonly summary?: string;
127
130
  readonly metadata?: Shared.Metadata;
128
131
  } | {
@@ -205,6 +208,8 @@ export type SessionEntryRecord = {
205
208
  readonly _tag: "Compaction";
206
209
  readonly version: 2;
207
210
  readonly projectedHistory: Prompt.Prompt;
211
+ readonly telemetry: ReadonlyArray<ModelTelemetry.Event>;
212
+ readonly compactionCommit?: ModelTelemetry.CompactionCommit;
208
213
  readonly summary?: string;
209
214
  readonly metadata?: Shared.Metadata;
210
215
  readonly createdAt: number;
@@ -231,6 +236,8 @@ export interface AppendCheckpointInput {
231
236
  readonly sessionId: Ids.SessionId;
232
237
  readonly parentId: Ids.SessionEntryId | null;
233
238
  readonly projectedHistory: Prompt.Prompt;
239
+ readonly telemetry: ReadonlyArray<ModelTelemetry.Event>;
240
+ readonly compactionCommit?: ModelTelemetry.CompactionCommit;
234
241
  readonly summary?: string;
235
242
  readonly createdAt: number;
236
243
  readonly expectedWriter?: ExpectedSessionWriter;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@relayfx/sdk",
4
- "version": "0.6.1",
4
+ "version": "0.7.1",
5
5
  "description": "Effect-native durable execution SDK for addressable agents and tools",
6
6
  "type": "module",
7
7
  "exports": {
@@ -51,14 +51,14 @@
51
51
  "url": "https://github.com/In-Time-Tec/relayfx/issues"
52
52
  },
53
53
  "scripts": {
54
- "build": "rm -rf dist && bun build ./src/index.ts ./src/ai.ts ./src/http-server.ts ./src/sqlite.ts ./src/postgres.ts ./src/mysql.ts --outdir dist --target bun --format esm --splitting --external effect --external 'effect/*' --external '@effect/*' --external drizzle-orm --external 'drizzle-orm/*' --external pg && mkdir -p dist/migrations && cp -R ../../migrations/pg dist/migrations/pg && bun scripts/build-types.ts",
54
+ "build": "rm -rf dist && bun build ./src/index.ts ./src/ai.ts ./src/http-server.ts ./src/sqlite.ts ./src/postgres.ts ./src/mysql.ts --outdir dist --target bun --format esm --splitting --external effect --external 'effect/*' --external '@effect/*' --external drizzle-orm --external 'drizzle-orm/*' --external pg && bun scripts/build-types.ts",
55
55
  "lint": "bun --cwd ../.. oxlint packages/relay/src packages/relay/scripts packages/relay/test",
56
56
  "test": "bun --cwd ../.. vitest run packages/relay/test --passWithNoTests && bun test/sqlite.integration.ts",
57
57
  "typecheck": "bun tsc --noEmit"
58
58
  },
59
59
  "dependencies": {
60
- "@batonfx/core": "0.9.1",
61
- "@batonfx/providers": "0.9.1",
60
+ "@batonfx/core": "0.11.3",
61
+ "@batonfx/providers": "0.11.3",
62
62
  "@effect/ai-anthropic": "4.0.0-beta.98",
63
63
  "@effect/ai-openai": "4.0.0-beta.98",
64
64
  "@effect/ai-openai-compat": "4.0.0-beta.98",
@@ -69,5 +69,16 @@
69
69
  "drizzle-orm": "1.0.0-rc.3",
70
70
  "effect": "4.0.0-beta.98",
71
71
  "pg": "8.21.0"
72
+ },
73
+ "devDependencies": {
74
+ "@effect/platform-bun": "4.0.0-beta.98",
75
+ "@effect/vitest": "4.0.0-beta.98",
76
+ "@relayfx/ai": "0.0.0",
77
+ "@relayfx/runtime": "0.0.0",
78
+ "@relayfx/schema": "0.7.1",
79
+ "@relayfx/store-sql": "0.0.0",
80
+ "@types/bun": "1.3.14",
81
+ "typescript": "7.0.2",
82
+ "vitest": "4.1.10"
72
83
  }
73
84
  }