@relayfx/sdk 0.4.2 → 0.5.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/dist/http-server.js +1 -1
- package/dist/{index-y9ncz0zd.js → index-8asvg7x0.js} +15 -6
- package/dist/{index-3w6txjtg.js → index-fh2ftte9.js} +7 -2
- package/dist/{index-4y9111jh.js → index-h1cf8za4.js} +1 -1
- package/dist/index.js +3 -3
- package/dist/migrations/20260721120000_steering_delivered/migration.sql +3 -0
- package/dist/migrations/mysql/0013_steering_delivered.sql +3 -0
- package/dist/migrations/pg/20260721120000_steering_delivered/migration.sql +3 -0
- package/dist/migrations/sqlite/0013_steering_delivered.sql +3 -0
- package/dist/mysql.js +11 -4
- package/dist/postgres.js +5 -4
- package/dist/sqlite.js +11 -4
- package/dist/types/relay/client-public-executions.d.ts +2 -2
- package/dist/types/relay/mysql-migrations.d.ts +1 -1
- package/dist/types/relay/operation.d.ts +7 -4
- package/dist/types/relay/sqlite-migrations.d.ts +6 -1
- package/dist/types/relay/tool-worker.d.ts +1 -1
- package/dist/types/schema/execution-schema.d.ts +8 -3
- package/dist/types/schema/ids-schema.d.ts +4 -0
- package/package.json +1 -1
package/dist/http-server.js
CHANGED
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
exports_workflow_schema,
|
|
47
47
|
exports_workspace_schema,
|
|
48
48
|
followExecutionFrom
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-fh2ftte9.js";
|
|
50
50
|
import {
|
|
51
51
|
__export
|
|
52
52
|
} from "./index-nb39b5ae.js";
|
|
@@ -15521,10 +15521,10 @@ var contentFromMessage = (message) => {
|
|
|
15521
15521
|
return textParts;
|
|
15522
15522
|
return [exports_content_schema.text(prompt.pipe(Schema81.encodeSync(Prompt5.Prompt), stringifyJson2))];
|
|
15523
15523
|
};
|
|
15524
|
-
var
|
|
15525
|
-
id: exports_ids_schema.EventId.make(`event:${drain2.drainId}:
|
|
15524
|
+
var steeringDeliveredEvent = (config, kind, drain2, messages, sequence) => ({
|
|
15525
|
+
id: exports_ids_schema.EventId.make(`event:${drain2.drainId}:delivered`),
|
|
15526
15526
|
execution_id: config.executionId,
|
|
15527
|
-
type: "steering.
|
|
15527
|
+
type: "steering.delivered",
|
|
15528
15528
|
sequence,
|
|
15529
15529
|
cursor: `${config.executionId}:steering:${kind}:${drain2.drainId}`,
|
|
15530
15530
|
content: messages.flatMap((message) => message.content),
|
|
@@ -15547,7 +15547,7 @@ var drain2 = Effect89.fn("RelaySteering.drain")(function* (config, kind, mode) {
|
|
|
15547
15547
|
consumedAt: createdAt,
|
|
15548
15548
|
createdAt
|
|
15549
15549
|
});
|
|
15550
|
-
yield* appendIdempotentTo(config.eventLog,
|
|
15550
|
+
yield* appendIdempotentTo(config.eventLog, steeringDeliveredEvent(config, kind, result.drain, result.messages, sequence));
|
|
15551
15551
|
return result.messages.map((message) => ({ prompt: promptForContent(message.content) }));
|
|
15552
15552
|
});
|
|
15553
15553
|
var append4 = (config, kind, message) => Clock16.currentTimeMillis.pipe(Effect89.flatMap((createdAt) => config.repository.append({
|
|
@@ -18851,7 +18851,16 @@ var layerFromRuntime3 = Layer84.effect(Service, Effect109.gen(function* () {
|
|
|
18851
18851
|
content: input.content,
|
|
18852
18852
|
createdAt: input.created_at
|
|
18853
18853
|
}).pipe(Effect109.mapError(toClientError));
|
|
18854
|
-
return {
|
|
18854
|
+
return {
|
|
18855
|
+
execution_id: record2.executionId,
|
|
18856
|
+
kind: record2.kind,
|
|
18857
|
+
sequence: record2.sequence,
|
|
18858
|
+
steering_message_id: exports_execution_schema.steeringMessageId({
|
|
18859
|
+
execution_id: record2.executionId,
|
|
18860
|
+
kind: record2.kind,
|
|
18861
|
+
sequence: record2.sequence
|
|
18862
|
+
})
|
|
18863
|
+
};
|
|
18855
18864
|
}),
|
|
18856
18865
|
getExecution: getExecutionOperation,
|
|
18857
18866
|
inspectExecution: inspectExecutionOperation,
|
|
@@ -59,6 +59,7 @@ __export2(exports_ids_schema, {
|
|
|
59
59
|
ToolAttemptId: () => ToolAttemptId,
|
|
60
60
|
TenantId: () => TenantId,
|
|
61
61
|
SystemTenantId: () => SystemTenantId,
|
|
62
|
+
SteeringMessageId: () => SteeringMessageId,
|
|
62
63
|
SnapshotRef: () => SnapshotRef,
|
|
63
64
|
SkillDefinitionId: () => SkillDefinitionId,
|
|
64
65
|
SessionId: () => SessionId,
|
|
@@ -110,6 +111,7 @@ var ToolAttemptId = id("Relay.ToolAttemptId");
|
|
|
110
111
|
var WaitId = id("Relay.WaitId");
|
|
111
112
|
var ScheduleId = id("Relay.ScheduleId");
|
|
112
113
|
var EventId = id("Relay.EventId");
|
|
114
|
+
var SteeringMessageId = id("Relay.SteeringMessageId");
|
|
113
115
|
var exports_shared_schema = {};
|
|
114
116
|
__export2(exports_shared_schema, {
|
|
115
117
|
canonicalValue: () => canonicalValue,
|
|
@@ -517,6 +519,7 @@ __export2(exports_child_orchestration_schema, {
|
|
|
517
519
|
});
|
|
518
520
|
var exports_execution_schema = {};
|
|
519
521
|
__export2(exports_execution_schema, {
|
|
522
|
+
steeringMessageId: () => steeringMessageId,
|
|
520
523
|
childSessionId: () => childSessionId,
|
|
521
524
|
SpawnChildRunInput: () => SpawnChildRunInput,
|
|
522
525
|
ExecutionStatus: () => ExecutionStatus,
|
|
@@ -659,6 +662,7 @@ var ChildRunAccepted = Schema7.Struct({
|
|
|
659
662
|
execution_id: ExecutionId
|
|
660
663
|
}).annotate({ identifier: "Relay.ChildRunAccepted" });
|
|
661
664
|
var childSessionId = (childExecutionId) => SessionId.make(`session:child:${childExecutionId}`);
|
|
665
|
+
var steeringMessageId = (input) => SteeringMessageId.make(`steering:${input.execution_id}:${input.kind}:${input.sequence}`);
|
|
662
666
|
var ExecutionEventType = Schema7.Literals([
|
|
663
667
|
"execution.accepted",
|
|
664
668
|
"execution.started",
|
|
@@ -679,7 +683,7 @@ var ExecutionEventType = Schema7.Literals([
|
|
|
679
683
|
"tool.approval.resolved",
|
|
680
684
|
"permission.ask.requested",
|
|
681
685
|
"permission.ask.resolved",
|
|
682
|
-
"steering.
|
|
686
|
+
"steering.delivered",
|
|
683
687
|
"state.updated",
|
|
684
688
|
"state.deleted",
|
|
685
689
|
"inbox.enqueued",
|
|
@@ -1928,7 +1932,8 @@ var SteerInput = Schema22.Struct({
|
|
|
1928
1932
|
var SteerAccepted = Schema22.Struct({
|
|
1929
1933
|
execution_id: exports_ids_schema.ExecutionId,
|
|
1930
1934
|
kind: SteeringKind,
|
|
1931
|
-
sequence: Schema22.Int.check(Schema22.isGreaterThanOrEqualTo(0))
|
|
1935
|
+
sequence: Schema22.Int.check(Schema22.isGreaterThanOrEqualTo(0)),
|
|
1936
|
+
steering_message_id: exports_ids_schema.SteeringMessageId
|
|
1932
1937
|
}).annotate({ identifier: "Relay.Operation.SteerAccepted" });
|
|
1933
1938
|
var WakeInput = Schema22.Struct({
|
|
1934
1939
|
wait_id: exports_ids_schema.WaitId,
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
exports_tool_runtime,
|
|
15
15
|
exports_workflow_definition_host,
|
|
16
16
|
makeDatabaseIdentity
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-8asvg7x0.js";
|
|
18
18
|
import {
|
|
19
19
|
exports_model_registry
|
|
20
20
|
} from "./index-x32kbvxv.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
exports_wait_schema,
|
|
47
47
|
exports_workflow_schema,
|
|
48
48
|
followExecutionFrom
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-fh2ftte9.js";
|
|
50
50
|
import {
|
|
51
51
|
__export
|
|
52
52
|
} from "./index-nb39b5ae.js";
|
|
@@ -144,7 +144,7 @@ var runOnce = Effect2.fn("ToolWorker.runOnce")(function* (options) {
|
|
|
144
144
|
});
|
|
145
145
|
var run = Effect2.fn("ToolWorker.run")(function* (options) {
|
|
146
146
|
const pollInterval = Duration.fromInputUnsafe(options.pollInterval ?? "1 second");
|
|
147
|
-
return yield* runOnce(options).pipe(Effect2.flatMap((worked) => worked ? Effect2.void : Effect2.sleep(pollInterval)), Effect2.forever);
|
|
147
|
+
return yield* runOnce(options).pipe(Effect2.catch((error) => Effect2.logWarning("relay tool worker poll failed", { message: error.message }).pipe(Effect2.as(false))), Effect2.flatMap((worked) => worked ? Effect2.void : Effect2.sleep(pollInterval)), Effect2.forever);
|
|
148
148
|
});
|
|
149
149
|
|
|
150
150
|
// src/language-model-registration.ts
|
package/dist/mysql.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
database,
|
|
4
4
|
normalizeMigrationCause
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-h1cf8za4.js";
|
|
6
6
|
import {
|
|
7
7
|
MigratorError,
|
|
8
8
|
RuntimeMigrationError,
|
|
9
9
|
SqlFailure
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-8asvg7x0.js";
|
|
11
11
|
import"./index-x32kbvxv.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-fh2ftte9.js";
|
|
13
13
|
import"./index-nb39b5ae.js";
|
|
14
14
|
|
|
15
15
|
// src/mysql.ts
|
|
@@ -83,6 +83,12 @@ RENAME TABLE relay_entity_instances TO relay_resident_instances;
|
|
|
83
83
|
ALTER TABLE relay_resident_instances RENAME INDEX idx_relay_entity_instances_kind_status TO idx_relay_resident_instances_kind_status;
|
|
84
84
|
`;
|
|
85
85
|
|
|
86
|
+
// ../../migrations/mysql/0013_steering_delivered.sql
|
|
87
|
+
var _0013_steering_delivered_default = `UPDATE relay_execution_events
|
|
88
|
+
SET type = 'steering.delivered', id = replace(id, ':received', ':delivered')
|
|
89
|
+
WHERE type = 'steering.received';
|
|
90
|
+
`;
|
|
91
|
+
|
|
86
92
|
// src/mysql-migrations.ts
|
|
87
93
|
var migrations = [
|
|
88
94
|
[1, "baseline", _0001_baseline_default],
|
|
@@ -96,7 +102,8 @@ var migrations = [
|
|
|
96
102
|
[9, "workflow_definitions", _0009_workflow_definitions_default],
|
|
97
103
|
[10, "workflow_runtime", _0010_workflow_runtime_default],
|
|
98
104
|
[11, "execution_scoped_tool_calls", _0011_execution_scoped_tool_calls_default],
|
|
99
|
-
[12, "rename_entity_to_resident", _0012_rename_entity_to_resident_default]
|
|
105
|
+
[12, "rename_entity_to_resident", _0012_rename_entity_to_resident_default],
|
|
106
|
+
[13, "steering_delivered", _0013_steering_delivered_default]
|
|
100
107
|
];
|
|
101
108
|
|
|
102
109
|
// src/mysql.ts
|
package/dist/postgres.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
database,
|
|
4
4
|
normalizeMigrationCause
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-h1cf8za4.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-
|
|
17
|
+
} from "./index-8asvg7x0.js";
|
|
18
18
|
import"./index-x32kbvxv.js";
|
|
19
19
|
import {
|
|
20
20
|
exports_ids_schema
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-fh2ftte9.js";
|
|
22
22
|
import {
|
|
23
23
|
__export
|
|
24
24
|
} from "./index-nb39b5ae.js";
|
|
@@ -745,7 +745,7 @@ var relayIdempotencyKeys = pgTable13("relay_idempotency_keys", {
|
|
|
745
745
|
uniqueIndex9("uq_relay_idempotency_scope_operation_key").on(table.tenantId, table.scope, table.operation, table.key)
|
|
746
746
|
]);
|
|
747
747
|
// src/postgres.ts
|
|
748
|
-
var schemaHead = "
|
|
748
|
+
var schemaHead = "20260721120000_steering_delivered";
|
|
749
749
|
var migrationNames = [
|
|
750
750
|
"20260701002839_sour_cerebro",
|
|
751
751
|
"20260701041134_acoustic_hulk",
|
|
@@ -773,6 +773,7 @@ var migrationNames = [
|
|
|
773
773
|
"20260712190000_workflow_definitions",
|
|
774
774
|
"20260712200000_workflow_runtime",
|
|
775
775
|
"20260718140000_execution_scoped_tool_calls",
|
|
776
|
+
"20260719120000_rename_entity_to_resident",
|
|
776
777
|
schemaHead
|
|
777
778
|
];
|
|
778
779
|
var migrationsFolderUrl = import.meta.url.endsWith("/src/postgres.ts") ? new URL("../../../migrations/pg", import.meta.url) : new URL("./migrations/pg", import.meta.url);
|
package/dist/sqlite.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
database,
|
|
4
4
|
normalizeMigrationCause
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-h1cf8za4.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-
|
|
15
|
+
} from "./index-8asvg7x0.js";
|
|
16
16
|
import"./index-x32kbvxv.js";
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-fh2ftte9.js";
|
|
18
18
|
import"./index-nb39b5ae.js";
|
|
19
19
|
|
|
20
20
|
// src/sqlite-runtime.ts
|
|
@@ -668,6 +668,12 @@ DROP INDEX idx_relay_entity_instances_kind_status;
|
|
|
668
668
|
CREATE INDEX idx_relay_resident_instances_kind_status ON relay_resident_instances (tenant_id, kind, status);
|
|
669
669
|
`;
|
|
670
670
|
|
|
671
|
+
// ../../migrations/sqlite/0013_steering_delivered.sql
|
|
672
|
+
var _0013_steering_delivered_default = `UPDATE relay_execution_events
|
|
673
|
+
SET type = 'steering.delivered', id = replace(id, ':received', ':delivered')
|
|
674
|
+
WHERE type = 'steering.received';
|
|
675
|
+
`;
|
|
676
|
+
|
|
671
677
|
// src/sqlite-migrations.ts
|
|
672
678
|
import { Effect } from "effect";
|
|
673
679
|
import { SqlClient } from "effect/unstable/sql/SqlClient";
|
|
@@ -690,7 +696,8 @@ var migrations = [
|
|
|
690
696
|
{ id: 9, name: "workflow_definitions", file: "0009_workflow_definitions.sql", source: _0009_workflow_definitions_default },
|
|
691
697
|
{ id: 10, name: "workflow_runtime", file: "0010_workflow_runtime.sql", source: _0010_workflow_runtime_default },
|
|
692
698
|
{ id: 11, name: "execution_scoped_tool_calls", file: "0011_execution_scoped_tool_calls.sql", source: _0011_execution_scoped_tool_calls_default },
|
|
693
|
-
{ id: 12, name: "rename_entity_to_resident", file: "0012_rename_entity_to_resident.sql", source: _0012_rename_entity_to_resident_default }
|
|
699
|
+
{ id: 12, name: "rename_entity_to_resident", file: "0012_rename_entity_to_resident.sql", source: _0012_rename_entity_to_resident_default },
|
|
700
|
+
{ id: 13, name: "steering_delivered", file: "0013_steering_delivered.sql", source: _0013_steering_delivered_default }
|
|
694
701
|
];
|
|
695
702
|
var loader = Effect.succeed(migrations.map(({ id, name, source }) => [id, name, Effect.succeed(execute(source))]));
|
|
696
703
|
|
|
@@ -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.
|
|
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"]>;
|
|
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.
|
|
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"]>;
|
|
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<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const migrations: readonly [readonly [1, "baseline", string], readonly [2, "durable_tool_placement", string], readonly [3, "durable_inbox", string], readonly [4, "execution_state", string], readonly [5, "durable_entities", string], readonly [6, "ephemeral_presence", string], readonly [7, "topic_subscriptions", string], readonly [8, "child_fan_out", string], readonly [9, "workflow_definitions", string], readonly [10, "workflow_runtime", string], readonly [11, "execution_scoped_tool_calls", string], readonly [12, "rename_entity_to_resident", string]];
|
|
1
|
+
export declare const migrations: readonly [readonly [1, "baseline", string], readonly [2, "durable_tool_placement", string], readonly [3, "durable_inbox", string], readonly [4, "execution_state", string], readonly [5, "durable_entities", string], readonly [6, "ephemeral_presence", string], readonly [7, "topic_subscriptions", string], readonly [8, "child_fan_out", string], readonly [9, "workflow_definitions", string], readonly [10, "workflow_runtime", string], readonly [11, "execution_scoped_tool_calls", string], readonly [12, "rename_entity_to_resident", string], readonly [13, "steering_delivered", string]];
|
|
@@ -504,6 +504,9 @@ export declare const SteerAccepted: Schema.Struct<{
|
|
|
504
504
|
};
|
|
505
505
|
readonly kind: Schema.Literals<readonly ["steering", "follow_up"]>;
|
|
506
506
|
readonly sequence: Schema.Int;
|
|
507
|
+
readonly steering_message_id: Schema.brand<Schema.String, "Relay.SteeringMessageId"> & {
|
|
508
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SteeringMessageId">;
|
|
509
|
+
};
|
|
507
510
|
}>;
|
|
508
511
|
export interface SteerAccepted extends Schema.Schema.Type<typeof SteerAccepted> {
|
|
509
512
|
}
|
|
@@ -647,7 +650,7 @@ export declare const FollowExecutionItem: Schema.Union<readonly [Schema.Struct<{
|
|
|
647
650
|
readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
648
651
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
649
652
|
}>;
|
|
650
|
-
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.
|
|
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"]>;
|
|
651
654
|
readonly sequence: Schema.Int;
|
|
652
655
|
readonly cursor: Schema.String;
|
|
653
656
|
readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -2404,7 +2407,7 @@ export declare const SessionStreamItem: Schema.Union<readonly [Schema.TaggedStru
|
|
|
2404
2407
|
readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
2405
2408
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
2406
2409
|
}>;
|
|
2407
|
-
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.
|
|
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"]>;
|
|
2408
2411
|
readonly sequence: Schema.Int;
|
|
2409
2412
|
readonly cursor: Schema.String;
|
|
2410
2413
|
readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -2715,7 +2718,7 @@ export declare const ReplayExecutionResult: Schema.Struct<{
|
|
|
2715
2718
|
readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
2716
2719
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
2717
2720
|
}>;
|
|
2718
|
-
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.
|
|
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"]>;
|
|
2719
2722
|
readonly sequence: Schema.Int;
|
|
2720
2723
|
readonly cursor: Schema.String;
|
|
2721
2724
|
readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -2797,7 +2800,7 @@ export declare const PageExecutionEventsResult: Schema.Struct<{
|
|
|
2797
2800
|
readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
2798
2801
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
2799
2802
|
}>;
|
|
2800
|
-
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.
|
|
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"]>;
|
|
2801
2804
|
readonly sequence: Schema.Int;
|
|
2802
2805
|
readonly cursor: Schema.String;
|
|
2803
2806
|
readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -60,5 +60,10 @@ export declare const migrations: readonly [{
|
|
|
60
60
|
readonly name: "rename_entity_to_resident";
|
|
61
61
|
readonly file: "0012_rename_entity_to_resident.sql";
|
|
62
62
|
readonly source: string;
|
|
63
|
+
}, {
|
|
64
|
+
readonly id: 13;
|
|
65
|
+
readonly name: "steering_delivered";
|
|
66
|
+
readonly file: "0013_steering_delivered.sql";
|
|
67
|
+
readonly source: string;
|
|
63
68
|
}];
|
|
64
|
-
export declare const loader: Effect.Effect<(readonly [1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12, "baseline" | "child_fan_out" | "durable_entities" | "durable_inbox" | "durable_tool_placement" | "ephemeral_presence" | "execution_scoped_tool_calls" | "execution_state" | "rename_entity_to_resident" | "topic_subscriptions" | "workflow_definitions" | "workflow_runtime", Effect.Effect<Effect.Effect<void, import("effect/unstable/sql/SqlError").SqlError, SqlClient>, never, never>])[], never, never>;
|
|
69
|
+
export declare const loader: Effect.Effect<(readonly [1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13, "baseline" | "child_fan_out" | "durable_entities" | "durable_inbox" | "durable_tool_placement" | "ephemeral_presence" | "execution_scoped_tool_calls" | "execution_state" | "rename_entity_to_resident" | "steering_delivered" | "topic_subscriptions" | "workflow_definitions" | "workflow_runtime", Effect.Effect<Effect.Effect<void, import("effect/unstable/sql/SqlError").SqlError, SqlClient>, never, never>])[], never, never>;
|
|
@@ -16,5 +16,5 @@ export interface Options<E = Error, R = never> {
|
|
|
16
16
|
readonly handlers: Readonly<Record<string, Handler<E, R>>>;
|
|
17
17
|
}
|
|
18
18
|
export declare const runOnce: <E, R>(options: Options<E, R>) => Effect.Effect<boolean, ClientError, R | ClientService>;
|
|
19
|
-
export declare const run: <E, R>(options: Options<E, R>) => Effect.Effect<never,
|
|
19
|
+
export declare const run: <E, R>(options: Options<E, R>) => Effect.Effect<never, never, R | ClientService>;
|
|
20
20
|
export type Error = ClientError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Definition } from "./agent-schema";
|
|
3
|
-
import { ChildExecutionId } from "./ids-schema";
|
|
3
|
+
import { ChildExecutionId, ExecutionId } from "./ids-schema";
|
|
4
4
|
export declare const ExecutionStatus: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
|
|
5
5
|
export type ExecutionStatus = typeof ExecutionStatus.Type;
|
|
6
6
|
export declare const Execution: Schema.Struct<{
|
|
@@ -385,7 +385,12 @@ export declare const ChildRunAccepted: Schema.Struct<{
|
|
|
385
385
|
export interface ChildRunAccepted extends Schema.Schema.Type<typeof ChildRunAccepted> {
|
|
386
386
|
}
|
|
387
387
|
export declare const childSessionId: (childExecutionId: ChildExecutionId) => string & import("effect/Brand").Brand<"Relay.SessionId">;
|
|
388
|
-
export declare const
|
|
388
|
+
export declare const steeringMessageId: (input: {
|
|
389
|
+
readonly execution_id: ExecutionId;
|
|
390
|
+
readonly kind: "steering" | "follow_up";
|
|
391
|
+
readonly sequence: number;
|
|
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"]>;
|
|
389
394
|
export type ExecutionEventType = typeof ExecutionEventType.Type;
|
|
390
395
|
export declare const CompactionCommittedEventData: Schema.Struct<{
|
|
391
396
|
readonly checkpoint_id: Schema.brand<Schema.String, "Relay.SessionEntryId"> & {
|
|
@@ -408,7 +413,7 @@ export declare const ExecutionEvent: Schema.Struct<{
|
|
|
408
413
|
readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
409
414
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
410
415
|
}>;
|
|
411
|
-
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.
|
|
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"]>;
|
|
412
417
|
readonly sequence: Schema.Int;
|
|
413
418
|
readonly cursor: Schema.String;
|
|
414
419
|
readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -104,3 +104,7 @@ export declare const EventId: Schema.brand<Schema.String, "Relay.EventId"> & {
|
|
|
104
104
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EventId">;
|
|
105
105
|
};
|
|
106
106
|
export type EventId = typeof EventId.Type;
|
|
107
|
+
export declare const SteeringMessageId: Schema.brand<Schema.String, "Relay.SteeringMessageId"> & {
|
|
108
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SteeringMessageId">;
|
|
109
|
+
};
|
|
110
|
+
export type SteeringMessageId = typeof SteeringMessageId.Type;
|
package/package.json
CHANGED