@relayfx/sdk 0.2.12 → 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/ai.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./index-aph699jp.js";
2
+ import"./index-kghdnamr.js";
3
3
  import {
4
4
  AiError,
5
5
  Chat,
@@ -34,7 +34,7 @@ import {
34
34
  exports_tool_executor,
35
35
  exports_tool_output,
36
36
  exports_turn_policy
37
- } from "./index-33d4k6kk.js";
37
+ } from "./index-3e4cs8s6.js";
38
38
 
39
39
  // src/ai.ts
40
40
  var relayAiPackage = "@relayfx/sdk/ai";
@@ -547,6 +547,7 @@ var text = (value) => ({ type: "text", text: value });
547
547
  // ../schema/src/execution-schema.ts
548
548
  var exports_execution_schema = {};
549
549
  __export(exports_execution_schema, {
550
+ childSessionId: () => childSessionId,
550
551
  SpawnChildRunInput: () => SpawnChildRunInput,
551
552
  ExecutionStatus: () => ExecutionStatus,
552
553
  ExecutionEventType: () => ExecutionEventType,
@@ -627,6 +628,7 @@ var ChildRunAccepted = Schema7.Struct({
627
628
  child_execution_id: ChildExecutionId,
628
629
  execution_id: ExecutionId
629
630
  }).annotate({ identifier: "Relay.ChildRunAccepted" });
631
+ var childSessionId = (childExecutionId) => SessionId.make(`session:child:${childExecutionId}`);
630
632
  var ExecutionEventType = Schema7.Literals([
631
633
  "execution.accepted",
632
634
  "execution.started",
@@ -15030,6 +15032,7 @@ var dispatchChild = Effect66.fn("SpawnChildRunTool.dispatchChild")(function* (co
15030
15032
  yield* config.dispatch({
15031
15033
  executionId: exports_ids_schema.ExecutionId.make(id2),
15032
15034
  rootAddressId: input.address_id,
15035
+ sessionId: exports_execution_schema.childSessionId(id2),
15033
15036
  input: input.input ?? [],
15034
15037
  eventSequence: 0,
15035
15038
  startedAt: (input.created_at ?? 0) + 2,
@@ -18497,6 +18500,7 @@ var completeExecution = (input, waitId, waitState, workspaceRuntimeLayer, turn,
18497
18500
  dispatchChildRun: (child) => StartExecutionWorkflow.execute({
18498
18501
  execution_id: child.executionId,
18499
18502
  root_address_id: child.rootAddressId,
18503
+ session_id: child.sessionId,
18500
18504
  input: child.input,
18501
18505
  event_sequence: child.eventSequence,
18502
18506
  started_at: child.startedAt,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  __export,
4
4
  exports_model_registry
5
- } from "./index-33d4k6kk.js";
5
+ } from "./index-3e4cs8s6.js";
6
6
 
7
7
  // ../ai/src/language-model/language-model-registration.ts
8
8
  var exports_language_model_registration = {};
@@ -48,7 +48,7 @@ import {
48
48
  exports_wait_service,
49
49
  exports_wait_signal,
50
50
  exports_workflow_definition_repository
51
- } from "./index-33d4k6kk.js";
51
+ } from "./index-3e4cs8s6.js";
52
52
 
53
53
  // src/operation.ts
54
54
  var exports_operation = {};
@@ -1332,7 +1332,6 @@ var wakeRuntime = Effect.fn("Client.wakeRuntime")(function* (waits, eventLog, ex
1332
1332
  };
1333
1333
  });
1334
1334
  var childJoinWaitId = (childExecutionId) => exports_ids_schema.WaitId.make(`wait:child:${childExecutionId}`);
1335
- var childSessionId = (childExecutionId) => exports_ids_schema.SessionId.make(`session:child:${childExecutionId}`);
1336
1335
  var childSpawnFingerprintKey = "relay_child_spawn_fingerprint";
1337
1336
  var childExecutionIdForSpawn = (input) => input.child_execution_id ?? exports_ids_schema.ChildExecutionId.make(`${input.execution_id}:child:${input.address_id}`);
1338
1337
  var parentContextFromDefinition = (definition, fingerprint) => ({
@@ -1433,7 +1432,7 @@ var parentDefinitionPin = Effect.fn("Client.parentDefinitionPin")(function* (exe
1433
1432
  var childStartInput = (input, accepted, pin, definition, createdAt, parentWaitId) => ({
1434
1433
  execution_id: exports_ids_schema.ExecutionId.make(accepted.child_execution_id),
1435
1434
  root_address_id: input.address_id,
1436
- session_id: childSessionId(accepted.child_execution_id),
1435
+ session_id: exports_execution_schema.childSessionId(accepted.child_execution_id),
1437
1436
  input: input.input === undefined ? [] : [...input.input],
1438
1437
  event_sequence: 0,
1439
1438
  started_at: createdAt,
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  exports_language_model_registration
4
- } from "./index-aph699jp.js";
4
+ } from "./index-kghdnamr.js";
5
5
  import {
6
6
  Service,
7
7
  exports_client,
8
8
  exports_command,
9
9
  exports_operation
10
- } from "./index-236a3f4t.js";
10
+ } from "./index-rmaq3qc8.js";
11
11
  import {
12
12
  Dialect,
13
13
  __export,
@@ -59,7 +59,7 @@ import {
59
59
  fromDbTimestamp,
60
60
  fromNullableDbTimestamp,
61
61
  timestampParam
62
- } from "./index-33d4k6kk.js";
62
+ } from "./index-3e4cs8s6.js";
63
63
 
64
64
  // src/adapter-outbox.ts
65
65
  var exports_adapter_outbox = {};
package/dist/sqlite.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  exports_client,
4
4
  exports_operation
5
- } from "./index-236a3f4t.js";
5
+ } from "./index-rmaq3qc8.js";
6
6
  import {
7
7
  __export,
8
8
  exports_activity_version_registry,
@@ -46,7 +46,7 @@ import {
46
46
  exports_wait_service,
47
47
  exports_workflow_definition_repository,
48
48
  exports_workflow_schema
49
- } from "./index-33d4k6kk.js";
49
+ } from "./index-3e4cs8s6.js";
50
50
  // src/sqlite-runtime.ts
51
51
  var exports_sqlite_runtime = {};
52
52
  __export(exports_sqlite_runtime, {
@@ -190,6 +190,7 @@ export interface TransferInput extends Schema.Schema.Type<typeof TransferInput>
190
190
  export interface DispatchInput {
191
191
  readonly executionId: Ids.ExecutionId;
192
192
  readonly rootAddressId: Ids.AddressId;
193
+ readonly sessionId: Ids.SessionId;
193
194
  readonly input: ReadonlyArray<Content.Part>;
194
195
  readonly eventSequence: Execution.ExecutionEventSequence;
195
196
  readonly startedAt: number;
@@ -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<{
@@ -316,6 +317,7 @@ export declare const ChildRunAccepted: Schema.Struct<{
316
317
  }>;
317
318
  export interface ChildRunAccepted extends Schema.Schema.Type<typeof ChildRunAccepted> {
318
319
  }
320
+ export declare const childSessionId: (childExecutionId: ChildExecutionId) => string & import("effect/Brand").Brand<"Relay.SessionId">;
319
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"]>;
320
322
  export type ExecutionEventType = typeof ExecutionEventType.Type;
321
323
  export declare const ExecutionEvent: 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/sdk",
4
- "version": "0.2.12",
4
+ "version": "0.2.13",
5
5
  "description": "Effect-native durable execution SDK for addressable agents and tools",
6
6
  "type": "module",
7
7
  "exports": {