@relayfx/sdk 0.0.50 → 0.2.0
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/README.md +5 -0
- package/dist/ai.js +42 -17222
- package/dist/index-2xztzkfr.js +20596 -0
- package/dist/index-bcbbm5wt.js +137 -0
- package/dist/index-qgt9z94q.js +2443 -0
- package/dist/index.js +830 -18839
- package/dist/migrations/20260712120000_durable_inbox/migration.sql +9 -0
- package/dist/migrations/20260712140000_execution_state/migration.sql +5 -0
- package/dist/migrations/20260712150000_durable_entities/migration.sql +15 -0
- package/dist/migrations/20260712160000_ephemeral_presence/migration.sql +13 -0
- package/dist/migrations/20260712170000_topic_subscriptions/migration.sql +3 -0
- package/dist/migrations/20260712180000_child_fan_out/migration.sql +27 -0
- package/dist/migrations/20260712190000_workflow_definitions/migration.sql +3 -0
- package/dist/migrations/20260712200000_workflow_runtime/migration.sql +2 -0
- package/dist/migrations/mysql/0003_durable_inbox.sql +3 -0
- package/dist/migrations/mysql/0004_execution_state.sql +3 -0
- package/dist/migrations/mysql/0005_durable_entities.sql +13 -0
- package/dist/migrations/mysql/0006_ephemeral_presence.sql +12 -0
- package/dist/migrations/mysql/0007_topic_subscriptions.sql +1 -0
- package/dist/migrations/mysql/0008_child_fan_out.sql +26 -0
- package/dist/migrations/mysql/0009_workflow_definitions.sql +3 -0
- package/dist/migrations/mysql/0010_workflow_runtime.sql +3 -0
- package/dist/migrations/pg/20260712120000_durable_inbox/migration.sql +9 -0
- package/dist/migrations/pg/20260712140000_execution_state/migration.sql +5 -0
- package/dist/migrations/pg/20260712150000_durable_entities/migration.sql +15 -0
- package/dist/migrations/pg/20260712160000_ephemeral_presence/migration.sql +13 -0
- package/dist/migrations/pg/20260712170000_topic_subscriptions/migration.sql +3 -0
- package/dist/migrations/pg/20260712180000_child_fan_out/migration.sql +27 -0
- package/dist/migrations/pg/20260712190000_workflow_definitions/migration.sql +3 -0
- package/dist/migrations/pg/20260712200000_workflow_runtime/migration.sql +2 -0
- package/dist/migrations/sqlite/0003_durable_inbox.sql +9 -0
- package/dist/migrations/sqlite/0004_execution_state.sql +3 -0
- package/dist/migrations/sqlite/0005_durable_entities.sql +15 -0
- package/dist/migrations/sqlite/0006_ephemeral_presence.sql +12 -0
- package/dist/migrations/sqlite/0007_topic_subscriptions.sql +3 -0
- package/dist/migrations/sqlite/0008_child_fan_out.sql +27 -0
- package/dist/migrations/sqlite/0009_workflow_definitions.sql +3 -0
- package/dist/migrations/sqlite/0010_workflow_runtime.sql +3 -0
- package/dist/sqlite.js +737 -0
- package/dist/types/relay/adapter-outbox.d.ts +3 -3
- package/dist/types/relay/client.d.ts +335 -25
- package/dist/types/relay/command.d.ts +41 -0
- package/dist/types/relay/database.d.ts +1 -0
- package/dist/types/relay/index.d.ts +3 -2
- package/dist/types/relay/operation.d.ts +1082 -7
- package/dist/types/relay/sqlite-migrations.d.ts +54 -0
- package/dist/types/relay/sqlite-runtime.d.ts +10 -0
- package/dist/types/relay/sqlite.d.ts +29 -0
- package/dist/types/runtime/address/address-book-service.d.ts +4 -4
- package/dist/types/runtime/address/address-resolution-service.d.ts +1 -1
- package/dist/types/runtime/agent/agent-loop-service.d.ts +2 -2
- package/dist/types/runtime/agent/agent-registry-service.d.ts +1 -1
- package/dist/types/runtime/agent/relay-compaction.d.ts +1 -1
- package/dist/types/runtime/agent/relay-permissions.d.ts +1 -1
- package/dist/types/runtime/agent/relay-steering.d.ts +1 -1
- package/dist/types/runtime/child/child-fan-out-admission-service.d.ts +30 -0
- package/dist/types/runtime/child/child-fan-out-runtime.d.ts +34 -0
- package/dist/types/runtime/child/child-fan-out-transition-service.d.ts +25 -0
- package/dist/types/runtime/child/child-run-service.d.ts +1 -1
- package/dist/types/runtime/child/parent-notifier-service.d.ts +1 -1
- package/dist/types/runtime/cluster/execution-entity.d.ts +5 -3
- package/dist/types/runtime/entity/entity-instance-service.d.ts +67 -0
- package/dist/types/runtime/entity/entity-registry-service.d.ts +35 -0
- package/dist/types/runtime/envelope/envelope-service.d.ts +7 -3
- package/dist/types/runtime/execution/active-execution-registry.d.ts +12 -0
- package/dist/types/runtime/execution/event-log-service.d.ts +1 -1
- package/dist/types/runtime/execution/execution-service.d.ts +2 -1
- package/dist/types/runtime/execution/execution-watch-service.d.ts +32 -0
- package/dist/types/runtime/execution/session-stream-service.d.ts +33 -0
- package/dist/types/runtime/inbox/inbox-service.d.ts +76 -0
- package/dist/types/runtime/inbox/send-message-tool.d.ts +27 -0
- package/dist/types/runtime/inbox/wait-for-messages-tool.d.ts +34 -0
- package/dist/types/runtime/index.d.ts +18 -0
- package/dist/types/runtime/memory/memory-service.d.ts +1 -1
- package/dist/types/runtime/presence/presence-service.d.ts +30 -0
- package/dist/types/runtime/presence/presence-tool.d.ts +20 -0
- package/dist/types/runtime/runner/runner-runtime-service.d.ts +18 -18
- package/dist/types/runtime/schedule/scheduler-service.d.ts +1 -1
- package/dist/types/runtime/session/session-store-service.d.ts +1 -1
- package/dist/types/runtime/skill/skill-registry-service.d.ts +1 -1
- package/dist/types/runtime/state/execution-state-service.d.ts +57 -0
- package/dist/types/runtime/state/state-tools.d.ts +5 -0
- package/dist/types/runtime/tool/tool-runtime-service.d.ts +1 -1
- package/dist/types/runtime/topic/publish-to-topic-tool.d.ts +24 -0
- package/dist/types/runtime/topic/topic-service.d.ts +50 -0
- package/dist/types/runtime/wait/wait-service.d.ts +2 -1
- package/dist/types/runtime/wait/wait-signal.d.ts +1 -1
- package/dist/types/runtime/workflow/definition-runtime.d.ts +78 -0
- package/dist/types/runtime/workflow/execution-workflow.d.ts +7 -7
- package/dist/types/runtime/workspace/workspace-planner-service.d.ts +1 -1
- package/dist/types/schema/address-schema.d.ts +6 -6
- package/dist/types/schema/child-orchestration-schema.d.ts +393 -0
- package/dist/types/schema/entity-schema.d.ts +40 -0
- package/dist/types/schema/envelope-schema.d.ts +1 -0
- package/dist/types/schema/execution-schema.d.ts +2 -2
- package/dist/types/schema/ids-schema.d.ts +20 -0
- package/dist/types/schema/inbox-schema.d.ts +81 -0
- package/dist/types/schema/index.d.ts +7 -0
- package/dist/types/schema/presence-schema.d.ts +28 -0
- package/dist/types/schema/state-schema.d.ts +35 -0
- package/dist/types/schema/wait-schema.d.ts +98 -0
- package/dist/types/schema/workflow-schema.d.ts +2062 -0
- package/dist/types/store-sql/address/address-book-repository.d.ts +1 -1
- package/dist/types/store-sql/child/child-fan-out-repository.d.ts +53 -0
- package/dist/types/store-sql/database/database-service.d.ts +4 -18
- package/dist/types/store-sql/database/notification-bus.d.ts +2 -0
- package/dist/types/store-sql/database/sql-dialect.d.ts +13 -0
- package/dist/types/store-sql/entity/entity-repository.d.ts +36 -0
- package/dist/types/store-sql/envelope/envelope-repository.d.ts +1 -0
- package/dist/types/store-sql/execution/execution-event-repository.d.ts +2 -1
- package/dist/types/store-sql/execution/execution-repository.d.ts +12 -2
- package/dist/types/store-sql/inbox/inbox-repository.d.ts +56 -0
- package/dist/types/store-sql/index.d.ts +8 -0
- package/dist/types/store-sql/portable.d.ts +29 -0
- package/dist/types/store-sql/presence/presence-repository.d.ts +51 -0
- package/dist/types/store-sql/schema/relay-schema.d.ts +3064 -587
- package/dist/types/store-sql/state/execution-state-repository.d.ts +80 -0
- package/dist/types/store-sql/tenant/tenant-id.d.ts +0 -2
- package/dist/types/store-sql/topic/topic-repository.d.ts +44 -0
- package/dist/types/store-sql/workflow/workflow-definition-repository.d.ts +29 -0
- package/package.json +26 -4
- package/dist/migrations/20260701002839_sour_cerebro/snapshot.json +0 -1971
- package/dist/migrations/20260701041134_acoustic_hulk/snapshot.json +0 -2372
- package/dist/migrations/20260701160543_condemned_stryfe/snapshot.json +0 -2442
- package/dist/migrations/20260701220315_heavy_gorgon/snapshot.json +0 -2495
- package/dist/migrations/20260701225444_polite_lord_hawal/snapshot.json +0 -2821
- package/dist/migrations/20260702030128_flaky_misty_knight/snapshot.json +0 -2821
- package/dist/migrations/20260705003847_nervous_banshee/snapshot.json +0 -2954
- package/dist/migrations/20260705012626_common_stryfe/snapshot.json +0 -3378
- package/dist/migrations/20260705015420_sweet_captain_marvel/snapshot.json +0 -3485
- package/dist/migrations/20260705023041_chunky_scalphunter/snapshot.json +0 -3753
- package/dist/migrations/20260705030344_short_patriot/snapshot.json +0 -3873
- package/dist/migrations/20260705045546_heavy_ben_grimm/snapshot.json +0 -4193
- package/dist/migrations/20260706185931_regular_shadow_king/snapshot.json +0 -4844
- package/dist/migrations/20260706233300_equal_cyclops/snapshot.json +0 -4883
- package/dist/migrations/20260709030349_agent_id_rename/snapshot.json +0 -4883
- package/dist/migrations/20260709214238_faithful_black_widow/snapshot.json +0 -5426
- package/dist/migrations/20260709220016_fearless_aaron_stack/snapshot.json +0 -5426
- package/dist/migrations/pg/20260701002839_sour_cerebro/snapshot.json +0 -1971
- package/dist/migrations/pg/20260701041134_acoustic_hulk/snapshot.json +0 -2372
- package/dist/migrations/pg/20260701160543_condemned_stryfe/snapshot.json +0 -2442
- package/dist/migrations/pg/20260701220315_heavy_gorgon/snapshot.json +0 -2495
- package/dist/migrations/pg/20260701225444_polite_lord_hawal/snapshot.json +0 -2821
- package/dist/migrations/pg/20260702030128_flaky_misty_knight/snapshot.json +0 -2821
- package/dist/migrations/pg/20260705003847_nervous_banshee/snapshot.json +0 -2954
- package/dist/migrations/pg/20260705012626_common_stryfe/snapshot.json +0 -3378
- package/dist/migrations/pg/20260705015420_sweet_captain_marvel/snapshot.json +0 -3485
- package/dist/migrations/pg/20260705023041_chunky_scalphunter/snapshot.json +0 -3753
- package/dist/migrations/pg/20260705030344_short_patriot/snapshot.json +0 -3873
- package/dist/migrations/pg/20260705045546_heavy_ben_grimm/snapshot.json +0 -4193
- package/dist/migrations/pg/20260706185931_regular_shadow_king/snapshot.json +0 -4844
- package/dist/migrations/pg/20260706233300_equal_cyclops/snapshot.json +0 -4883
- package/dist/migrations/pg/20260709030349_agent_id_rename/snapshot.json +0 -4883
- package/dist/migrations/pg/20260709214238_faithful_black_widow/snapshot.json +0 -5426
- package/dist/migrations/pg/20260709220016_fearless_aaron_stack/snapshot.json +0 -5426
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const KindDefinition: Schema.Struct<{
|
|
3
|
+
readonly kind: Schema.brand<Schema.String, "Relay.EntityKindName"> & {
|
|
4
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKindName">;
|
|
5
|
+
};
|
|
6
|
+
readonly agent_id: Schema.brand<Schema.String, "Relay.AgentId"> & {
|
|
7
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
|
|
8
|
+
};
|
|
9
|
+
readonly inbox: Schema.optionalKey<Schema.Struct<{
|
|
10
|
+
readonly drain: Schema.Literals<readonly ["all", "one"]>;
|
|
11
|
+
readonly max_batch: Schema.optionalKey<Schema.Int>;
|
|
12
|
+
}>>;
|
|
13
|
+
readonly state_enabled: Schema.optionalKey<Schema.Boolean>;
|
|
14
|
+
readonly continue_as_new_after_turns: Schema.optionalKey<Schema.Int>;
|
|
15
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
16
|
+
}>;
|
|
17
|
+
export interface KindDefinition extends Schema.Schema.Type<typeof KindDefinition> {
|
|
18
|
+
}
|
|
19
|
+
export declare const InstanceStatus: Schema.Literals<readonly ["active", "destroyed"]>;
|
|
20
|
+
export type InstanceStatus = typeof InstanceStatus.Type;
|
|
21
|
+
export declare const Instance: Schema.Struct<{
|
|
22
|
+
readonly kind: Schema.brand<Schema.String, "Relay.EntityKindName"> & {
|
|
23
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKindName">;
|
|
24
|
+
};
|
|
25
|
+
readonly key: Schema.brand<Schema.String, "Relay.EntityKey"> & {
|
|
26
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKey">;
|
|
27
|
+
};
|
|
28
|
+
readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
|
|
29
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
|
|
30
|
+
};
|
|
31
|
+
readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
|
|
32
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
33
|
+
};
|
|
34
|
+
readonly generation: Schema.Int;
|
|
35
|
+
readonly status: Schema.Literals<readonly ["active", "destroyed"]>;
|
|
36
|
+
readonly created_at: Schema.Int;
|
|
37
|
+
readonly destroyed_at: Schema.optionalKey<Schema.Int>;
|
|
38
|
+
}>;
|
|
39
|
+
export interface Instance extends Schema.Schema.Type<typeof Instance> {
|
|
40
|
+
}
|
|
@@ -139,6 +139,7 @@ export declare const SendInput: Schema.Struct<{
|
|
|
139
139
|
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
140
140
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
141
141
|
}>]>>;
|
|
142
|
+
readonly idempotency_key: Schema.optionalKey<Schema.String>;
|
|
142
143
|
readonly wait: Schema.optionalKey<Schema.Struct<{
|
|
143
144
|
readonly mode: Schema.Literals<readonly ["reply", "event", "until", "child"]>;
|
|
144
145
|
readonly timeout: Schema.optionalKey<Schema.String>;
|
|
@@ -276,7 +276,7 @@ export declare const ChildRunAccepted: Schema.Struct<{
|
|
|
276
276
|
}>;
|
|
277
277
|
export interface ChildRunAccepted extends Schema.Schema.Type<typeof ChildRunAccepted> {
|
|
278
278
|
}
|
|
279
|
-
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.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", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
|
|
279
|
+
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.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
280
|
export type ExecutionEventType = typeof ExecutionEventType.Type;
|
|
281
281
|
export declare const ExecutionEvent: Schema.Struct<{
|
|
282
282
|
readonly id: Schema.brand<Schema.String, "Relay.EventId"> & {
|
|
@@ -288,7 +288,7 @@ export declare const ExecutionEvent: Schema.Struct<{
|
|
|
288
288
|
readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
289
289
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
290
290
|
}>;
|
|
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", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
|
|
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"]>;
|
|
292
292
|
readonly sequence: Schema.Int;
|
|
293
293
|
readonly cursor: Schema.String;
|
|
294
294
|
readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -16,6 +16,22 @@ export declare const AgentId: Schema.brand<Schema.String, "Relay.AgentId"> & {
|
|
|
16
16
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
|
|
17
17
|
};
|
|
18
18
|
export type AgentId = typeof AgentId.Type;
|
|
19
|
+
export declare const WorkflowDefinitionId: Schema.brand<Schema.String, "Relay.WorkflowDefinitionId"> & {
|
|
20
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WorkflowDefinitionId">;
|
|
21
|
+
};
|
|
22
|
+
export type WorkflowDefinitionId = typeof WorkflowDefinitionId.Type;
|
|
23
|
+
export declare const WorkflowOperationId: Schema.brand<Schema.String, "Relay.WorkflowOperationId"> & {
|
|
24
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WorkflowOperationId">;
|
|
25
|
+
};
|
|
26
|
+
export type WorkflowOperationId = typeof WorkflowOperationId.Type;
|
|
27
|
+
export declare const EntityKindName: Schema.brand<Schema.String, "Relay.EntityKindName"> & {
|
|
28
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKindName">;
|
|
29
|
+
};
|
|
30
|
+
export type EntityKindName = typeof EntityKindName.Type;
|
|
31
|
+
export declare const EntityKey: Schema.brand<Schema.String, "Relay.EntityKey"> & {
|
|
32
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EntityKey">;
|
|
33
|
+
};
|
|
34
|
+
export type EntityKey = typeof EntityKey.Type;
|
|
19
35
|
export declare const SkillDefinitionId: Schema.brand<Schema.String, "Relay.SkillDefinitionId"> & {
|
|
20
36
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SkillDefinitionId">;
|
|
21
37
|
};
|
|
@@ -36,6 +52,10 @@ export declare const ChildExecutionId: Schema.brand<Schema.String, "Relay.ChildE
|
|
|
36
52
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
37
53
|
};
|
|
38
54
|
export type ChildExecutionId = typeof ChildExecutionId.Type;
|
|
55
|
+
export declare const ChildFanOutId: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
|
|
56
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
|
|
57
|
+
};
|
|
58
|
+
export type ChildFanOutId = typeof ChildFanOutId.Type;
|
|
39
59
|
export declare const MemorySubjectId: Schema.brand<Schema.String, "Relay.MemorySubjectId"> & {
|
|
40
60
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.MemorySubjectId">;
|
|
41
61
|
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const MessageSequence: Schema.Int;
|
|
3
|
+
export type MessageSequence = typeof MessageSequence.Type;
|
|
4
|
+
export declare const Message: Schema.Struct<{
|
|
5
|
+
readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
|
|
6
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
7
|
+
};
|
|
8
|
+
readonly sequence: Schema.Int;
|
|
9
|
+
readonly from: Schema.brand<Schema.String, "Relay.AddressId"> & {
|
|
10
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
|
|
11
|
+
};
|
|
12
|
+
readonly envelope_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.EnvelopeId"> & {
|
|
13
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EnvelopeId">;
|
|
14
|
+
}>;
|
|
15
|
+
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
16
|
+
readonly type: Schema.Literal<"text">;
|
|
17
|
+
readonly text: Schema.String;
|
|
18
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
19
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
20
|
+
}>, Schema.Struct<{
|
|
21
|
+
readonly type: Schema.Literal<"structured">;
|
|
22
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
23
|
+
readonly schema_ref: Schema.optionalKey<Schema.String>;
|
|
24
|
+
readonly provider_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
|
+
}>, Schema.Struct<{
|
|
27
|
+
readonly type: Schema.Literal<"blob-reference">;
|
|
28
|
+
readonly uri: Schema.String;
|
|
29
|
+
readonly media_type: Schema.String;
|
|
30
|
+
readonly filename: Schema.optionalKey<Schema.String>;
|
|
31
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
32
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
33
|
+
}>, Schema.Struct<{
|
|
34
|
+
readonly type: Schema.Literal<"artifact-reference">;
|
|
35
|
+
readonly artifact_id: Schema.String;
|
|
36
|
+
readonly media_type: Schema.optionalKey<Schema.String>;
|
|
37
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
38
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
39
|
+
}>, Schema.Struct<{
|
|
40
|
+
readonly type: Schema.Literal<"tool-call">;
|
|
41
|
+
readonly call: Schema.Struct<{
|
|
42
|
+
readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
43
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
44
|
+
};
|
|
45
|
+
readonly name: Schema.String;
|
|
46
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
47
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
48
|
+
}>;
|
|
49
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
50
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
51
|
+
}>, Schema.Struct<{
|
|
52
|
+
readonly type: Schema.Literal<"tool-result">;
|
|
53
|
+
readonly result: Schema.Struct<{
|
|
54
|
+
readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
55
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
56
|
+
};
|
|
57
|
+
readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
58
|
+
readonly error: Schema.optionalKey<Schema.String>;
|
|
59
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
60
|
+
}>;
|
|
61
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
62
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
63
|
+
}>]>>;
|
|
64
|
+
readonly reply_wait_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
65
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
66
|
+
}>;
|
|
67
|
+
readonly correlation_key: Schema.optionalKey<Schema.String>;
|
|
68
|
+
readonly idempotency_key: Schema.optionalKey<Schema.String>;
|
|
69
|
+
readonly drain_id: Schema.optionalKey<Schema.String>;
|
|
70
|
+
readonly consumed_at: Schema.optionalKey<Schema.Int>;
|
|
71
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
72
|
+
readonly created_at: Schema.Int;
|
|
73
|
+
}>;
|
|
74
|
+
export interface Message extends Schema.Schema.Type<typeof Message> {
|
|
75
|
+
}
|
|
76
|
+
export declare const InboxPolicy: Schema.Struct<{
|
|
77
|
+
readonly drain: Schema.Literals<readonly ["all", "one"]>;
|
|
78
|
+
readonly max_batch: Schema.optionalKey<Schema.Int>;
|
|
79
|
+
}>;
|
|
80
|
+
export interface InboxPolicy extends Schema.Schema.Type<typeof InboxPolicy> {
|
|
81
|
+
}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export * as Address from "./address-schema";
|
|
2
2
|
export * as Agent from "./agent-schema";
|
|
3
|
+
export * as ChildOrchestration from "./child-orchestration-schema";
|
|
3
4
|
export * as Content from "./content-schema";
|
|
4
5
|
export * as Envelope from "./envelope-schema";
|
|
6
|
+
export * as Entity from "./entity-schema";
|
|
5
7
|
export * as Execution from "./execution-schema";
|
|
6
8
|
export * as Ids from "./ids-schema";
|
|
9
|
+
export * as Inbox from "./inbox-schema";
|
|
10
|
+
export * as Presence from "./presence-schema";
|
|
7
11
|
export * as Schedule from "./schedule-schema";
|
|
8
12
|
export * as Shared from "./shared-schema";
|
|
9
13
|
export * as Skill from "./skill-schema";
|
|
14
|
+
export * as State from "./state-schema";
|
|
10
15
|
export * as Tool from "./tool-schema";
|
|
16
|
+
export * as Waits from "./wait-schema";
|
|
17
|
+
export * as Workflow from "./workflow-schema";
|
|
11
18
|
export * as Workspace from "./workspace-schema";
|
|
12
19
|
export declare const schemaPackage = "./index";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const Scope: Schema.Struct<{
|
|
3
|
+
readonly kind: Schema.Literals<readonly ["execution", "session"]>;
|
|
4
|
+
readonly id: Schema.String;
|
|
5
|
+
}>;
|
|
6
|
+
export interface Scope extends Schema.Schema.Type<typeof Scope> {
|
|
7
|
+
}
|
|
8
|
+
export declare const Entry: Schema.Struct<{
|
|
9
|
+
readonly id: Schema.String;
|
|
10
|
+
readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
11
|
+
readonly connected_at: Schema.Int;
|
|
12
|
+
}>;
|
|
13
|
+
export interface Entry extends Schema.Schema.Type<typeof Entry> {
|
|
14
|
+
}
|
|
15
|
+
export declare const View: Schema.Struct<{
|
|
16
|
+
readonly scope: Schema.Struct<{
|
|
17
|
+
readonly kind: Schema.Literals<readonly ["execution", "session"]>;
|
|
18
|
+
readonly id: Schema.String;
|
|
19
|
+
}>;
|
|
20
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
21
|
+
readonly id: Schema.String;
|
|
22
|
+
readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
23
|
+
readonly connected_at: Schema.Int;
|
|
24
|
+
}>>;
|
|
25
|
+
readonly observed_at: Schema.Int;
|
|
26
|
+
}>;
|
|
27
|
+
export interface View extends Schema.Schema.Type<typeof View> {
|
|
28
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const StateKey: Schema.String;
|
|
3
|
+
export type StateKey = typeof StateKey.Type;
|
|
4
|
+
export declare const StateIdempotencyKey: Schema.String;
|
|
5
|
+
export type StateIdempotencyKey = typeof StateIdempotencyKey.Type;
|
|
6
|
+
export declare const StateVersion: Schema.Int;
|
|
7
|
+
export type StateVersion = typeof StateVersion.Type;
|
|
8
|
+
export declare const StateRecordView: Schema.Struct<{
|
|
9
|
+
readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
|
|
10
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
11
|
+
};
|
|
12
|
+
readonly key: Schema.String;
|
|
13
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
14
|
+
readonly version: Schema.Int;
|
|
15
|
+
readonly created_at: Schema.Int;
|
|
16
|
+
readonly updated_at: Schema.Int;
|
|
17
|
+
}>;
|
|
18
|
+
export interface StateRecordView extends Schema.Schema.Type<typeof StateRecordView> {
|
|
19
|
+
}
|
|
20
|
+
export declare const StateUpdatedEventData: Schema.Union<readonly [Schema.Struct<{
|
|
21
|
+
readonly key: Schema.String;
|
|
22
|
+
readonly version: Schema.Int;
|
|
23
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
24
|
+
}>, Schema.Struct<{
|
|
25
|
+
readonly key: Schema.String;
|
|
26
|
+
readonly version: Schema.Int;
|
|
27
|
+
readonly blob_ref: Schema.String;
|
|
28
|
+
}>]>;
|
|
29
|
+
export type StateUpdatedEventData = typeof StateUpdatedEventData.Type;
|
|
30
|
+
export declare const StateDeletedEventData: Schema.Struct<{
|
|
31
|
+
readonly key: Schema.String;
|
|
32
|
+
readonly version: Schema.Int;
|
|
33
|
+
}>;
|
|
34
|
+
export interface StateDeletedEventData extends Schema.Schema.Type<typeof StateDeletedEventData> {
|
|
35
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { WaitMode } from "./envelope-schema";
|
|
3
|
+
import { EnvelopeId, WaitId } from "./ids-schema";
|
|
4
|
+
export declare const WaitKind: Schema.Literals<readonly ["permission", "tool_approval", "tool_placement", "child_join", "inbox", "reply", "timer", "external"]>;
|
|
5
|
+
export type WaitKind = typeof WaitKind.Type;
|
|
6
|
+
export declare const PermissionWait: Schema.Struct<{
|
|
7
|
+
readonly kind: Schema.Literal<"permission">;
|
|
8
|
+
readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
9
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
10
|
+
};
|
|
11
|
+
readonly tool_call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
12
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
export declare const ToolApprovalWait: Schema.Struct<{
|
|
16
|
+
readonly kind: Schema.Literal<"tool_approval">;
|
|
17
|
+
readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
18
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
19
|
+
};
|
|
20
|
+
readonly tool_call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
21
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
22
|
+
};
|
|
23
|
+
}>;
|
|
24
|
+
export declare const ToolPlacementWait: Schema.Struct<{
|
|
25
|
+
readonly kind: Schema.Literal<"tool_placement">;
|
|
26
|
+
readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
27
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
28
|
+
};
|
|
29
|
+
readonly tool_call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
30
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
33
|
+
export declare const ChildJoinWait: Schema.Struct<{
|
|
34
|
+
readonly kind: Schema.Literal<"child_join">;
|
|
35
|
+
readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
36
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
37
|
+
};
|
|
38
|
+
readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
39
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
export declare const InboxWait: Schema.Struct<{
|
|
43
|
+
readonly kind: Schema.Literal<"inbox">;
|
|
44
|
+
readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
45
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
46
|
+
};
|
|
47
|
+
readonly tool_call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
48
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
export declare const ReplyWait: Schema.Struct<{
|
|
52
|
+
readonly kind: Schema.Literal<"reply">;
|
|
53
|
+
readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
54
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
55
|
+
};
|
|
56
|
+
readonly envelope_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.EnvelopeId"> & {
|
|
57
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EnvelopeId">;
|
|
58
|
+
}>;
|
|
59
|
+
}>;
|
|
60
|
+
export declare const TimerWait: Schema.Struct<{
|
|
61
|
+
readonly kind: Schema.Literal<"timer">;
|
|
62
|
+
readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
63
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
64
|
+
};
|
|
65
|
+
}>;
|
|
66
|
+
export declare const ExternalWait: Schema.Struct<{
|
|
67
|
+
readonly kind: Schema.Literal<"external">;
|
|
68
|
+
readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
69
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
70
|
+
};
|
|
71
|
+
readonly mode: Schema.Literals<readonly ["reply", "event", "until", "child"]>;
|
|
72
|
+
}>;
|
|
73
|
+
export type Classification = typeof PermissionWait.Type | typeof ToolApprovalWait.Type | typeof ToolPlacementWait.Type | typeof ChildJoinWait.Type | typeof InboxWait.Type | typeof ReplyWait.Type | typeof TimerWait.Type | typeof ExternalWait.Type;
|
|
74
|
+
export declare const Classification: Schema.Schema<Classification>;
|
|
75
|
+
export interface ClassifyInput {
|
|
76
|
+
readonly wait_id: WaitId;
|
|
77
|
+
readonly mode: WaitMode;
|
|
78
|
+
readonly envelope_id?: EnvelopeId;
|
|
79
|
+
readonly correlation_key?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Derives a wait's public kind from its persisted fields.
|
|
83
|
+
*
|
|
84
|
+
* Relay mints every runtime-owned wait id inside a reserved namespace, so the
|
|
85
|
+
* namespace is the classification authority; envelope anchoring and mode only
|
|
86
|
+
* classify what no namespace claims. Reconnecting clients and replay consumers
|
|
87
|
+
* get the same answer Relay does without interpreting internal metadata.
|
|
88
|
+
*/
|
|
89
|
+
export declare const classify: (input: ClassifyInput) => Classification;
|
|
90
|
+
export declare const Resolver: Schema.Literals<readonly ["resolve_permission", "resolve_tool_approval", "wake"]>;
|
|
91
|
+
export type Resolver = typeof Resolver.Type;
|
|
92
|
+
/**
|
|
93
|
+
* Names the one public resolver a classification admits. Runtime-owned kinds
|
|
94
|
+
* (child joins, inbox parks, tool placement) return undefined: deliveries,
|
|
95
|
+
* child completion, and tool completion resolve them — callers never do.
|
|
96
|
+
*/
|
|
97
|
+
export declare const resolverFor: (classification: Classification) => Resolver | undefined;
|
|
98
|
+
export declare const externallyResolvable: (classification: Classification) => boolean;
|