@relayfx/sdk 0.0.48 → 0.0.50

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.
Files changed (34) hide show
  1. package/dist/ai.js +2054 -576
  2. package/dist/index.js +2884 -860
  3. package/dist/migrations/20260709214238_faithful_black_widow/migration.sql +53 -0
  4. package/dist/migrations/20260709214238_faithful_black_widow/snapshot.json +5426 -0
  5. package/dist/migrations/20260709220016_fearless_aaron_stack/migration.sql +2 -0
  6. package/dist/migrations/20260709220016_fearless_aaron_stack/snapshot.json +5426 -0
  7. package/dist/migrations/mysql/0002_durable_tool_placement.sql +75 -0
  8. package/dist/migrations/pg/20260709214238_faithful_black_widow/migration.sql +53 -0
  9. package/dist/migrations/pg/20260709214238_faithful_black_widow/snapshot.json +5426 -0
  10. package/dist/migrations/pg/20260709220016_fearless_aaron_stack/migration.sql +2 -0
  11. package/dist/migrations/pg/20260709220016_fearless_aaron_stack/snapshot.json +5426 -0
  12. package/dist/migrations/sqlite/0002_durable_tool_placement.sql +71 -0
  13. package/dist/types/relay/client.d.ts +27 -6
  14. package/dist/types/relay/index.d.ts +1 -0
  15. package/dist/types/relay/operation.d.ts +525 -53
  16. package/dist/types/relay/tool-worker.d.ts +19 -0
  17. package/dist/types/runtime/address/address-resolution-service.d.ts +69 -54
  18. package/dist/types/runtime/agent/relay-compaction.d.ts +1 -0
  19. package/dist/types/runtime/cluster/execution-entity.d.ts +10 -477
  20. package/dist/types/runtime/execution/event-log-service.d.ts +6 -0
  21. package/dist/types/runtime/index.d.ts +1 -0
  22. package/dist/types/runtime/runner/runner-runtime-service.d.ts +18 -15
  23. package/dist/types/runtime/tool/tool-runtime-service.d.ts +17 -1
  24. package/dist/types/runtime/tool/tool-transition-coordinator.d.ts +13 -0
  25. package/dist/types/runtime/workflow/execution-workflow.d.ts +146 -114
  26. package/dist/types/schema/agent-schema.d.ts +431 -320
  27. package/dist/types/schema/execution-schema.d.ts +69 -53
  28. package/dist/types/schema/ids-schema.d.ts +4 -0
  29. package/dist/types/schema/tool-schema.d.ts +29 -0
  30. package/dist/types/store-sql/envelope/envelope-repository.d.ts +6 -0
  31. package/dist/types/store-sql/execution/execution-event-repository.d.ts +6 -0
  32. package/dist/types/store-sql/schema/relay-schema.d.ts +386 -7
  33. package/dist/types/store-sql/tool/tool-call-repository.d.ts +160 -1
  34. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { Ids } from "../../schema/index";
1
+ import { Agent, Ids } from "../../schema/index";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
3
  import { Service as AddressBookService } from "./address-book-service";
4
4
  import { Service as AgentRegistryService } from "../agent/agent-registry-service";
@@ -54,61 +54,76 @@ export declare const LocalAgentTarget: Schema.Struct<{
54
54
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
55
55
  };
56
56
  readonly agent_revision: Schema.Int;
57
- readonly agent_snapshot: Schema.Struct<{
58
- readonly name: Schema.String;
59
- readonly instructions: Schema.optionalKey<Schema.String>;
60
- readonly model: Schema.Struct<{
61
- readonly provider: Schema.String;
62
- readonly model: Schema.String;
63
- readonly registration_key: Schema.optionalKey<Schema.String>;
64
- readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
65
- readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
66
- }>;
67
- readonly tool_names: Schema.$Array<Schema.String>;
68
- readonly permissions: Schema.$Array<Schema.Struct<{
69
- readonly name: Schema.String;
70
- readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
71
- readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
72
- }>>;
73
- readonly skill_definition_ids: Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "Relay.SkillDefinitionId"> & {
74
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SkillDefinitionId">;
75
- }>>;
76
- readonly permission_rules: Schema.optionalKey<Schema.Struct<{
77
- readonly rules: Schema.$Array<Schema.Struct<{
78
- readonly pattern: Schema.String;
79
- readonly level: Schema.Literals<readonly ["allow", "deny", "ask"]>;
80
- readonly reason: Schema.optionalKey<Schema.String>;
81
- }>>;
82
- readonly fallback: Schema.optionalKey<Schema.Literals<readonly ["allow", "deny", "ask"]>>;
83
- }>>;
84
- readonly max_tool_turns: Schema.optionalKey<Schema.Int>;
85
- readonly max_wait_turns: Schema.optionalKey<Schema.Int>;
86
- readonly token_budget: Schema.optionalKey<Schema.Int>;
87
- readonly child_run_presets: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
88
- readonly instructions: Schema.optionalKey<Schema.String>;
89
- readonly model: Schema.optionalKey<Schema.Struct<{
90
- readonly provider: Schema.String;
91
- readonly model: Schema.String;
92
- readonly registration_key: Schema.optionalKey<Schema.String>;
93
- readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
94
- readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
95
- }>>;
96
- readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
97
- readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
98
- readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
99
- readonly mode: Schema.Literals<readonly ["share", "fork"]>;
100
- readonly fallback: Schema.optionalKey<Schema.Literals<readonly ["fail", "fresh"]>>;
101
- }>>;
102
- readonly output_schema_ref: Schema.optionalKey<Schema.String>;
103
- readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
104
- }>>>;
105
- readonly handoff_targets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
57
+ readonly agent_snapshot: Schema.Codec<Agent.Definition, {
58
+ readonly name: string;
59
+ readonly permissions: readonly {
60
+ readonly name: string;
61
+ readonly value: Schema.Json;
62
+ readonly metadata?: {
63
+ readonly [x: string]: Schema.Json;
64
+ };
65
+ }[];
66
+ readonly model: {
67
+ readonly provider: string;
68
+ readonly model: string;
69
+ readonly metadata?: {
70
+ readonly [x: string]: Schema.Json;
71
+ };
72
+ readonly registration_key?: string;
73
+ readonly request_options?: {
74
+ readonly [x: string]: Schema.Json;
75
+ };
76
+ };
77
+ readonly tool_names: readonly string[];
78
+ readonly metadata?: {
79
+ readonly [x: string]: Schema.Json;
80
+ };
81
+ readonly instructions?: string;
82
+ readonly output_schema_ref?: string;
83
+ readonly skill_definition_ids?: readonly string[];
84
+ readonly permission_rules?: {
85
+ readonly rules: readonly {
86
+ readonly pattern: string;
87
+ readonly level: "allow" | "deny" | "ask";
88
+ readonly reason?: string;
89
+ }[];
90
+ readonly fallback?: "allow" | "deny" | "ask";
91
+ };
92
+ readonly turn_policy?: Agent.TurnPolicySnapshot;
93
+ readonly max_tool_turns?: number;
94
+ readonly max_wait_turns?: number;
95
+ readonly token_budget?: number;
96
+ readonly child_run_presets?: {
97
+ readonly [x: string]: {
98
+ readonly metadata?: {
99
+ readonly [x: string]: Schema.Json;
100
+ };
101
+ readonly permissions?: readonly string[];
102
+ readonly model?: {
103
+ readonly provider: string;
104
+ readonly model: string;
105
+ readonly metadata?: {
106
+ readonly [x: string]: Schema.Json;
107
+ };
108
+ readonly registration_key?: string;
109
+ readonly request_options?: {
110
+ readonly [x: string]: Schema.Json;
111
+ };
112
+ };
113
+ readonly instructions?: string;
114
+ readonly tool_names?: readonly string[];
115
+ readonly workspace_policy?: {
116
+ readonly mode: "share" | "fork";
117
+ readonly fallback?: "fail" | "fresh";
118
+ };
119
+ readonly output_schema_ref?: string;
120
+ };
121
+ };
122
+ readonly handoff_targets?: readonly Schema.Struct.ReadonlySide<{
106
123
  readonly name: Schema.String;
107
124
  readonly preset_name: Schema.String;
108
- }>>>;
109
- readonly output_schema_ref: Schema.optionalKey<Schema.String>;
110
- readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
111
- }>;
125
+ }, "Encoded">[];
126
+ }, never, never>;
112
127
  readonly tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
113
128
  }>;
114
129
  export interface LocalAgentTarget extends Schema.Schema.Type<typeof LocalAgentTarget> {
@@ -11,6 +11,7 @@ export interface Config {
11
11
  readonly executionId: Ids.ExecutionId;
12
12
  readonly repository: CompactionRepository.Interface;
13
13
  readonly options?: Options;
14
+ readonly strategy?: Compaction.Strategy;
14
15
  }
15
16
  export declare const checkpointId: (input: {
16
17
  readonly executionId: Ids.ExecutionId;