@relayfx/sdk 0.3.6 → 0.4.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/ai.js +1 -1
- package/dist/http-server.js +1 -1
- package/dist/{index-mtvz1bjn.js → index-3w6txjtg.js} +63 -426
- package/dist/{index-2vsf6dks.js → index-cs3be24t.js} +1 -1
- package/dist/{index-e02krw55.js → index-p43mg4kt.js} +5882 -5127
- package/dist/{index-8fpd6kvj.js → index-x32kbvxv.js} +1004 -970
- package/dist/index.js +487 -22
- package/dist/migrations/20260719120000_rename_entity_to_resident/migration.sql +9 -0
- package/dist/migrations/mysql/0012_rename_entity_to_resident.sql +5 -0
- package/dist/migrations/pg/20260719120000_rename_entity_to_resident/migration.sql +9 -0
- package/dist/migrations/sqlite/0012_rename_entity_to_resident.sql +7 -0
- package/dist/mysql.js +18 -5
- package/dist/postgres.js +569 -550
- package/dist/sqlite.js +16 -5
- package/dist/types/relay/client-baton-agent.d.ts +30 -0
- package/dist/types/relay/client-child-runs.d.ts +35 -0
- package/dist/types/relay/client-error-mapping.d.ts +5 -0
- package/dist/types/relay/client-event-sequence.d.ts +3 -0
- package/dist/types/relay/client-execution-payloads.d.ts +12 -0
- package/dist/types/relay/client-public-agents.d.ts +15 -0
- package/dist/types/relay/client-public-child-runs.d.ts +9 -0
- package/dist/types/relay/client-public-envelope-ready.d.ts +6 -0
- package/dist/types/relay/client-public-executions.d.ts +247 -0
- package/dist/types/relay/client-public-messaging.d.ts +18 -0
- package/dist/types/relay/client-public-residents.d.ts +14 -0
- package/dist/types/relay/client-public-schedules.d.ts +6 -0
- package/dist/types/relay/client-public-tools.d.ts +12 -0
- package/dist/types/relay/client-public-workflows.d.ts +10 -0
- package/dist/types/relay/client-public.d.ts +133 -313
- package/dist/types/relay/client-runtime-wake.d.ts +10 -0
- package/dist/types/relay/client-tool-outcome.d.ts +16 -0
- package/dist/types/relay/client-view-mappers.d.ts +16 -0
- package/dist/types/relay/client-wait-signal.d.ts +5 -0
- package/dist/types/relay/client.d.ts +118 -1
- package/dist/types/relay/command.d.ts +6 -6
- package/dist/types/relay/http-server.d.ts +55 -37
- package/dist/types/relay/index.d.ts +3 -4
- package/dist/types/relay/internal-client.d.ts +5 -5
- package/dist/types/relay/mysql-migrations.d.ts +1 -1
- package/dist/types/relay/operation.d.ts +44 -41
- package/dist/types/relay/sqlite-migrations.d.ts +6 -1
- package/dist/types/runtime/address/address-resolution-service.d.ts +3 -0
- package/dist/types/runtime/agent/agent-loop-events.d.ts +24 -0
- package/dist/types/runtime/agent/relay-tool-executor.d.ts +2 -2
- package/dist/types/runtime/agent/sequence-allocator.d.ts +1 -0
- package/dist/types/runtime/execution/event-log-memory.d.ts +7 -0
- package/dist/types/runtime/execution/event-log-repository.d.ts +8 -0
- package/dist/types/runtime/execution/event-log-service.d.ts +3 -1
- package/dist/types/runtime/index.d.ts +2 -2
- package/dist/types/runtime/resident/resident-instance-service.d.ts +76 -0
- package/dist/types/runtime/resident/resident-registry-service.d.ts +35 -0
- package/dist/types/runtime/runner/runner-runtime-service.d.ts +14 -14
- package/dist/types/runtime/tool/tool-runtime-contract.d.ts +4 -1
- package/dist/types/runtime/workflow/execution-workflow-state.d.ts +43 -0
- package/dist/types/runtime/workflow/execution-workflow.d.ts +6 -0
- package/dist/types/schema/agent-schema.d.ts +24 -0
- package/dist/types/schema/execution-schema.d.ts +5 -2
- package/dist/types/schema/ids-schema.d.ts +6 -6
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/{entity-schema.d.ts → resident-schema.d.ts} +6 -6
- package/dist/types/store-sql/envelope/envelope-ready-records.d.ts +51 -0
- package/dist/types/store-sql/envelope/envelope-records.d.ts +43 -0
- package/dist/types/store-sql/envelope/envelope-repository.d.ts +1 -2
- package/dist/types/store-sql/envelope/wait-records.d.ts +64 -0
- package/dist/types/store-sql/execution/execution-event-repository-memory.d.ts +8 -0
- package/dist/types/store-sql/execution/execution-event-repository-sql.d.ts +13 -0
- package/dist/types/store-sql/execution/execution-event-repository.d.ts +13 -5
- package/dist/types/store-sql/index.d.ts +1 -1
- package/dist/types/store-sql/portable.d.ts +1 -1
- package/dist/types/store-sql/resident/resident-repository.d.ts +36 -0
- package/dist/types/store-sql/schema/address-book-schema.d.ts +131 -0
- package/dist/types/store-sql/schema/agent-schema.d.ts +954 -0
- package/dist/types/store-sql/schema/communication-schema.d.ts +743 -0
- package/dist/types/store-sql/schema/envelope-schema.d.ts +701 -0
- package/dist/types/store-sql/schema/execution-schema.d.ts +1119 -0
- package/dist/types/store-sql/schema/idempotency-schema.d.ts +161 -0
- package/dist/types/store-sql/schema/presence-schema.d.ts +116 -0
- package/dist/types/store-sql/schema/relay-schema.d.ts +13 -6684
- package/dist/types/store-sql/schema/resident-schema.d.ts +294 -0
- package/dist/types/store-sql/schema/schedule-schema.d.ts +282 -0
- package/dist/types/store-sql/schema/schema-columns.d.ts +1 -0
- package/dist/types/store-sql/schema/session-schema.d.ts +228 -0
- package/dist/types/store-sql/schema/tool-schema.d.ts +627 -0
- package/dist/types/store-sql/schema/workflow-schema.d.ts +996 -0
- package/dist/types/store-sql/schema/workspace-schema.d.ts +338 -0
- package/dist/types/store-sql/session/session-entry-records.d.ts +52 -0
- package/dist/types/store-sql/session/session-records.d.ts +51 -0
- package/dist/types/store-sql/session/session-repository.d.ts +2 -3
- package/dist/types/store-sql/tool/tool-attempt-records.d.ts +52 -0
- package/dist/types/store-sql/tool/tool-call-records.d.ts +121 -0
- package/dist/types/store-sql/tool/tool-call-repository.d.ts +1 -2
- package/dist/types/store-sql/tool/tool-work-operations.d.ts +11 -0
- package/package.json +3 -3
- package/dist/types/runtime/entity/entity-instance-service.d.ts +0 -76
- package/dist/types/runtime/entity/entity-registry-service.d.ts +0 -35
- package/dist/types/store-sql/entity/entity-repository.d.ts +0 -36
package/dist/sqlite.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
database,
|
|
4
4
|
normalizeMigrationCause
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-cs3be24t.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-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
15
|
+
} from "./index-p43mg4kt.js";
|
|
16
|
+
import"./index-x32kbvxv.js";
|
|
17
|
+
import"./index-3w6txjtg.js";
|
|
18
18
|
import"./index-nb39b5ae.js";
|
|
19
19
|
|
|
20
20
|
// src/sqlite-runtime.ts
|
|
@@ -658,6 +658,16 @@ CREATE UNIQUE INDEX "uq_relay_tool_attempts_number" ON "relay_tool_attempts" ("t
|
|
|
658
658
|
CREATE INDEX "idx_relay_tool_attempts_call" ON "relay_tool_attempts" ("tenant_id", "execution_id", "tool_call_id", "attempt_number");
|
|
659
659
|
`;
|
|
660
660
|
|
|
661
|
+
// ../../migrations/sqlite/0012_rename_entity_to_resident.sql
|
|
662
|
+
var _0012_rename_entity_to_resident_default = `ALTER TABLE relay_entity_kinds RENAME TO relay_resident_kinds;
|
|
663
|
+
--> statement-breakpoint
|
|
664
|
+
ALTER TABLE relay_entity_instances RENAME TO relay_resident_instances;
|
|
665
|
+
--> statement-breakpoint
|
|
666
|
+
DROP INDEX idx_relay_entity_instances_kind_status;
|
|
667
|
+
--> statement-breakpoint
|
|
668
|
+
CREATE INDEX idx_relay_resident_instances_kind_status ON relay_resident_instances (tenant_id, kind, status);
|
|
669
|
+
`;
|
|
670
|
+
|
|
661
671
|
// src/sqlite-migrations.ts
|
|
662
672
|
import { Effect } from "effect";
|
|
663
673
|
import { SqlClient } from "effect/unstable/sql/SqlClient";
|
|
@@ -679,7 +689,8 @@ var migrations = [
|
|
|
679
689
|
{ id: 8, name: "child_fan_out", file: "0008_child_fan_out.sql", source: _0008_child_fan_out_default },
|
|
680
690
|
{ id: 9, name: "workflow_definitions", file: "0009_workflow_definitions.sql", source: _0009_workflow_definitions_default },
|
|
681
691
|
{ id: 10, name: "workflow_runtime", file: "0010_workflow_runtime.sql", source: _0010_workflow_runtime_default },
|
|
682
|
-
{ id: 11, name: "execution_scoped_tool_calls", file: "0011_execution_scoped_tool_calls.sql", source: _0011_execution_scoped_tool_calls_default }
|
|
692
|
+
{ 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 }
|
|
683
694
|
];
|
|
684
695
|
var loader = Effect.succeed(migrations.map(({ id, name, source }) => [id, name, Effect.succeed(execute(source))]));
|
|
685
696
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Agent as BatonAgent } from "@batonfx/core";
|
|
2
|
+
import { Agent } from "../schema/index";
|
|
3
|
+
import { Effect, Schema } from "effect";
|
|
4
|
+
import type { Tool as BatonTool } from "effect/unstable/ai";
|
|
5
|
+
import { ClientError, type RegisterAgentInput, type RegisterBatonAgentInput } from "./client-public";
|
|
6
|
+
export declare const isRegisterBatonAgentInput: <Tools extends Record<string, BatonTool.Any>, Requirements>(input: RegisterAgentInput<Tools, Requirements>) => input is RegisterBatonAgentInput<Tools, Requirements>;
|
|
7
|
+
export declare const toolRefsFromBatonAgent: <Tools extends Record<string, BatonTool.Any>, Requirements>(agent: BatonAgent.Agent<Tools, Requirements>) => ReadonlyArray<Agent.ToolRef>;
|
|
8
|
+
export declare const modelSelectionFromBatonAgent: <Tools extends Record<string, BatonTool.Any>, Requirements>(selection: NonNullable<BatonAgent.Agent<Tools, Requirements>["model"]>) => Agent.ModelSelection;
|
|
9
|
+
export declare const decodeBatonAgentName: (name: string) => Effect.Effect<string, ClientError, never>;
|
|
10
|
+
export declare const decodeBatonAgentMetadata: (metadata: Readonly<Record<string, unknown>> | undefined) => Effect.Effect<void, never, never> | Effect.Effect<{
|
|
11
|
+
readonly [x: string]: Schema.Json;
|
|
12
|
+
}, ClientError, never>;
|
|
13
|
+
export declare const decodeBatonMemorySubject: (subject: string) => Effect.Effect<string & import("effect/Brand").Brand<"Relay.MemorySubjectId">, ClientError, never>;
|
|
14
|
+
export declare const metadataFromBatonAgent: <Tools extends Record<string, BatonTool.Any>, Requirements>(input: RegisterBatonAgentInput<Tools, Requirements>) => Effect.Effect<{
|
|
15
|
+
readonly [x: string]: Schema.Json;
|
|
16
|
+
} | undefined, ClientError, never>;
|
|
17
|
+
export declare const modelSelectionFromRegisterInput: <Tools extends Record<string, BatonTool.Any>, Requirements>(input: RegisterBatonAgentInput<Tools, Requirements>) => Effect.Effect<never, ClientError, never> | Effect.Effect<Agent.ModelSelection, never, never>;
|
|
18
|
+
export declare const batonTurnPolicyInvalid: (detail: string) => ClientError;
|
|
19
|
+
export declare const turnPolicySnapshotFromBaton: (snapshot: unknown) => Effect.Effect<Agent.TurnPolicySnapshot, ClientError, never>;
|
|
20
|
+
export declare const turnPolicyFieldsFromRegisterInput: <Tools extends Record<string, BatonTool.Any>, Requirements>(input: RegisterBatonAgentInput<Tools, Requirements>) => Effect.Effect<{
|
|
21
|
+
max_tool_turns: number;
|
|
22
|
+
turn_policy?: never;
|
|
23
|
+
} | {
|
|
24
|
+
max_tool_turns?: never;
|
|
25
|
+
turn_policy?: never;
|
|
26
|
+
} | {
|
|
27
|
+
max_tool_turns?: never;
|
|
28
|
+
turn_policy: Agent.BothTurnPolicySnapshot | Agent.RecursTurnPolicySnapshot | Agent.UntilToolCallTurnPolicySnapshot;
|
|
29
|
+
}, ClientError, never>;
|
|
30
|
+
export declare const registerAgentPayload: <Tools extends Record<string, BatonTool.Any>, Requirements>(input: RegisterAgentInput<Tools, Requirements>) => Effect.Effect<Agent.RegisterDefinitionPayload, ClientError, never>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Interface as EventLogInterface } from "../runtime/execution/event-log-service";
|
|
2
|
+
import type { Interface as WaitServiceInterface } from "../runtime/wait/wait-service";
|
|
3
|
+
import { Agent, Execution, Ids } from "../schema/index";
|
|
4
|
+
import { ChildExecutionRepository, ExecutionRepository } from "../store-sql/portable";
|
|
5
|
+
import { Effect } from "effect";
|
|
6
|
+
import { ClientError } from "./client-public";
|
|
7
|
+
import type { SpawnChildRunInput, StartExecutionInput } from "./operation";
|
|
8
|
+
export interface ParentDefinitionPin {
|
|
9
|
+
readonly agentId: Ids.AgentId;
|
|
10
|
+
readonly agentRevision: Agent.DefinitionRevision;
|
|
11
|
+
readonly agentSnapshot: Agent.Definition;
|
|
12
|
+
readonly agentToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
|
|
13
|
+
}
|
|
14
|
+
declare const internalSpawnChildRunInput: (input: SpawnChildRunInput, pin: ParentDefinitionPin, createdAt: number) => Execution.SpawnChildRunInput;
|
|
15
|
+
export declare const createChildJoinWait: (waits: WaitServiceInterface, eventLog: EventLogInterface, input: Execution.SpawnChildRunInput, accepted: Execution.ChildRunAccepted, createdAt: number) => Effect.Effect<string & import("effect/Brand").Brand<"Relay.WaitId">, ClientError, never>;
|
|
16
|
+
export declare const reconcileExistingChildSpawn: (childExecutions: ChildExecutionRepository.Interface, waits: WaitServiceInterface, eventLog: EventLogInterface, input: SpawnChildRunInput) => Effect.Effect<{
|
|
17
|
+
accepted: {
|
|
18
|
+
child_execution_id: string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
19
|
+
execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
20
|
+
};
|
|
21
|
+
createdAt: number;
|
|
22
|
+
parentWaitId: (string & import("effect/Brand").Brand<"Relay.WaitId">) | undefined;
|
|
23
|
+
} | undefined, ClientError, never>;
|
|
24
|
+
export declare const parentDefinitionPin: (executionRepository: ExecutionRepository.Interface, executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<{
|
|
25
|
+
agentId: string & import("effect/Brand").Brand<"Relay.AgentId">;
|
|
26
|
+
agentRevision: number;
|
|
27
|
+
agentSnapshot: Agent.Definition;
|
|
28
|
+
agentToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
|
|
29
|
+
}, ClientError, never>;
|
|
30
|
+
declare const childStartInput: (input: Execution.SpawnChildRunInput, accepted: Execution.ChildRunAccepted, pin: ParentDefinitionPin, definition: Agent.Definition, createdAt: number, parentWaitId: Ids.WaitId | undefined) => StartExecutionInput;
|
|
31
|
+
export declare const childRunInternals: {
|
|
32
|
+
childStartInput: typeof childStartInput;
|
|
33
|
+
internalSpawnChildRunInput: typeof internalSpawnChildRunInput;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { EventLogCursorNotFound } from "./operation";
|
|
2
|
+
import { ClientError } from "./client-public";
|
|
3
|
+
export declare const errorMessage: (error: unknown) => string;
|
|
4
|
+
export declare const toClientError: (error: unknown) => ClientError;
|
|
5
|
+
export declare const toStreamError: (error: unknown) => ClientError | EventLogCursorNotFound;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Interface as EventLogInterface } from "../runtime/execution/event-log-service";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
export declare const nextEventSequence: (eventLog: EventLogInterface, executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<number, import("./client-public").ClientError, never>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Agent } from "../schema/index";
|
|
2
|
+
import { ExecutionRepository } from "../store-sql/portable";
|
|
3
|
+
import { Effect } from "effect";
|
|
4
|
+
import type { StartExecutionInput } from "./operation";
|
|
5
|
+
import type { StartExecutionByAddressInput, StartExecutionByAgentDefinitionInput } from "./client-public";
|
|
6
|
+
export declare const encodeExecutionCursor: (cursor: ExecutionRepository.ExecutionCursor) => Effect.Effect<string, import("./client-public").ClientError, never>;
|
|
7
|
+
export declare const startExecutionByAddressPayload: (input: StartExecutionByAddressInput) => StartExecutionInput;
|
|
8
|
+
declare const startExecutionByAgentDefinitionPayload: (input: StartExecutionByAgentDefinitionInput, definition: Agent.DefinitionRevisionRecord) => StartExecutionInput;
|
|
9
|
+
export declare const executionPayloadInternals: {
|
|
10
|
+
startExecutionByAgentDefinitionPayload: typeof startExecutionByAgentDefinitionPayload;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Tool as BatonTool } from "effect/unstable/ai";
|
|
2
|
+
import { Agent, Ids, Skill } from "../schema/index";
|
|
3
|
+
import { Effect } from "effect";
|
|
4
|
+
import type { ClientError, RegisterBatonAgentInput, RegisterDefinedAgentInput } from "./client-public";
|
|
5
|
+
import { Service } from "./client-public";
|
|
6
|
+
export declare const registerAgentDefinition: (input: Agent.RegisterDefinitionPayload) => Effect.Effect<Agent.DefinitionRegistered, ClientError, Service>;
|
|
7
|
+
export declare function registerAgent<Tools extends Record<string, BatonTool.Any>, Requirements>(input: RegisterBatonAgentInput<Tools, Requirements>): Effect.Effect<Agent.DefinitionRegistered, ClientError, Service>;
|
|
8
|
+
export declare function registerAgent(input: RegisterDefinedAgentInput): Effect.Effect<Agent.DefinitionRegistered, ClientError, Service>;
|
|
9
|
+
export declare const getAgentDefinition: (id: string & import("effect/Brand").Brand<"Relay.AgentId">) => Effect.Effect<Agent.DefinitionRecord | undefined, ClientError, Service>;
|
|
10
|
+
export declare const listAgentDefinitions: () => Effect.Effect<Agent.DefinitionList, ClientError, Service>;
|
|
11
|
+
export declare const listAgentDefinitionRevisions: (id: string & import("effect/Brand").Brand<"Relay.AgentId">) => Effect.Effect<Agent.DefinitionRevisionList, ClientError, Service>;
|
|
12
|
+
export declare const getSkillDefinition: (id: Ids.SkillDefinitionId) => Effect.Effect<Skill.DefinitionRecord | undefined, ClientError, Service>;
|
|
13
|
+
declare const listSkillDefinitions: () => Effect.Effect<Skill.DefinitionList, ClientError, Service>;
|
|
14
|
+
export declare const listSkillDefinitionRevisions: (id: Ids.SkillDefinitionId) => Effect.Effect<Skill.DefinitionRevisionList, ClientError, Service>;
|
|
15
|
+
export { listSkillDefinitions };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChildOrchestration, Execution } from "../schema/index";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import { Service, type ClientError } from "./client-public";
|
|
4
|
+
import type { RuntimeCapabilityUnavailable } from "./runtime-capability-policy";
|
|
5
|
+
import type { CancelChildFanOutInput, CreateChildFanOutInput, InspectChildFanOutInput, SpawnChildRunInput } from "./operation";
|
|
6
|
+
export declare const spawnChildRun: (input: SpawnChildRunInput) => Effect.Effect<Execution.ChildRunAccepted, ClientError, Service>;
|
|
7
|
+
export declare const createChildFanOut: (input: CreateChildFanOutInput) => Effect.Effect<ChildOrchestration.FanOutState, ClientError | RuntimeCapabilityUnavailable, Service>;
|
|
8
|
+
export declare const cancelChildFanOut: (input: CancelChildFanOutInput) => Effect.Effect<import("./operation").CancelChildFanOutResult, ClientError, Service>;
|
|
9
|
+
export declare const inspectChildFanOut: (input: InspectChildFanOutInput) => Effect.Effect<import("./operation").InspectChildFanOutResult, ClientError, Service>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { Service } from "./client-public";
|
|
3
|
+
import type { AckEnvelopeReadyInput, ClaimEnvelopeReadyInput, ReleaseEnvelopeReadyInput } from "./operation";
|
|
4
|
+
export declare const claimEnvelopeReady: (input: ClaimEnvelopeReadyInput) => Effect.Effect<import("./operation").EnvelopeReadyLease | null, import("./client-public").ClientError, Service>;
|
|
5
|
+
export declare const ackEnvelopeReady: (input: AckEnvelopeReadyInput) => Effect.Effect<import("./operation").EnvelopeReadyAcked, import("./client-public").ClientError, Service>;
|
|
6
|
+
export declare const releaseEnvelopeReady: (input: ReleaseEnvelopeReadyInput) => Effect.Effect<import("./operation").EnvelopeReadyReleased, import("./client-public").ClientError, Service>;
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { Execution, Ids } from "../schema/index";
|
|
2
|
+
import { Effect, Stream } from "effect";
|
|
3
|
+
import type { ClientError, EventLogCursorNotFound, StartExecutionByAddressInput, StartExecutionByAgentDefinitionInput } from "./client-public";
|
|
4
|
+
import { Service } from "./client-public";
|
|
5
|
+
import type { CancelExecutionInput, FollowExecutionInput, GetSessionInput, ListExecutionsInput, ListSessionsInput, ListWaitsInput, PageExecutionEventsInput, ReplayExecutionInput, StartExecutionInput, SteerInput, StreamExecutionInput, StreamSessionInput, WatchExecutionsInput } from "./operation";
|
|
6
|
+
export declare const startExecution: (input: StartExecutionInput) => Effect.Effect<import("./operation").StartExecutionResult, ClientError | import("./client-public").ResidentNamespaceReserved, Service>;
|
|
7
|
+
export declare const startExecutionByAddress: (input: StartExecutionByAddressInput) => Effect.Effect<import("./operation").StartExecutionResult, ClientError | import("./client-public").ResidentNamespaceReserved, Service>;
|
|
8
|
+
export declare const startExecutionByAgentDefinition: (input: StartExecutionByAgentDefinitionInput) => Effect.Effect<import("./operation").StartExecutionResult, ClientError | import("./client-public").ResidentNamespaceReserved, Service>;
|
|
9
|
+
export declare const cancelExecution: (input: CancelExecutionInput) => Effect.Effect<import("./operation").CancelExecutionAccepted, ClientError, Service>;
|
|
10
|
+
export declare const steer: (input: SteerInput) => Effect.Effect<import("./operation").SteerAccepted, ClientError, Service>;
|
|
11
|
+
export declare const getExecution: (id: Ids.ExecutionId) => Effect.Effect<Execution.Execution | undefined, ClientError, Service>;
|
|
12
|
+
export declare const listExecutions: (input: ListExecutionsInput) => Effect.Effect<import("./operation").ListExecutionsResult, ClientError, Service>;
|
|
13
|
+
export declare const listSessions: (input: ListSessionsInput) => Effect.Effect<import("./operation").ListSessionsResult, ClientError, Service>;
|
|
14
|
+
export declare const getSession: (input: GetSessionInput) => Effect.Effect<import("./operation").GetSessionResult, ClientError, Service>;
|
|
15
|
+
export declare const listWaits: (input: ListWaitsInput) => Effect.Effect<readonly import("./operation").WaitView[], ClientError, Service>;
|
|
16
|
+
export declare const replayExecution: (input: ReplayExecutionInput) => Effect.Effect<import("./operation").ReplayExecutionResult, ClientError, Service>;
|
|
17
|
+
export declare const pageExecutionEvents: (input: PageExecutionEventsInput) => Effect.Effect<import("./operation").PageExecutionEventsResult, ClientError | EventLogCursorNotFound, Service>;
|
|
18
|
+
export declare const listRunners: () => Effect.Effect<import("./operation").ListRunnersResult, ClientError, Service>;
|
|
19
|
+
export declare const routeExecution: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<import("./operation").RouteExecutionResult, ClientError, Service>;
|
|
20
|
+
export declare const inspectExecution: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<import("./operation").ExecutionInspection, ClientError | import("./client-public").ExecutionNotFound, Service>;
|
|
21
|
+
export declare const streamExecution: (input: StreamExecutionInput) => Stream.Stream<Execution.ExecutionEvent, EventLogCursorNotFound | ClientError, Service>;
|
|
22
|
+
export declare const followExecution: (input: FollowExecutionInput) => Stream.Stream<import("effect/Schema").Struct.ReadonlySide<{
|
|
23
|
+
readonly _tag: import("effect/Schema").tag<"event">;
|
|
24
|
+
readonly event: import("effect/Schema").Struct<{
|
|
25
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.EventId"> & {
|
|
26
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EventId">;
|
|
27
|
+
};
|
|
28
|
+
readonly execution_id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.ExecutionId"> & {
|
|
29
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
30
|
+
};
|
|
31
|
+
readonly child_execution_id: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Relay.ChildExecutionId"> & {
|
|
32
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
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.received", "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
|
+
readonly sequence: import("effect/Schema").Int;
|
|
36
|
+
readonly cursor: import("effect/Schema").String;
|
|
37
|
+
readonly content: import("effect/Schema").optionalKey<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
38
|
+
readonly type: import("effect/Schema").Literal<"text">;
|
|
39
|
+
readonly text: import("effect/Schema").String;
|
|
40
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
41
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
42
|
+
}>, import("effect/Schema").Struct<{
|
|
43
|
+
readonly type: import("effect/Schema").Literal<"structured">;
|
|
44
|
+
readonly value: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
45
|
+
readonly schema_ref: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
46
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
47
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
48
|
+
}>, import("effect/Schema").Struct<{
|
|
49
|
+
readonly type: import("effect/Schema").Literal<"blob-reference">;
|
|
50
|
+
readonly uri: import("effect/Schema").String;
|
|
51
|
+
readonly media_type: import("effect/Schema").String;
|
|
52
|
+
readonly filename: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
53
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
54
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
55
|
+
}>, import("effect/Schema").Struct<{
|
|
56
|
+
readonly type: import("effect/Schema").Literal<"artifact-reference">;
|
|
57
|
+
readonly artifact_id: import("effect/Schema").String;
|
|
58
|
+
readonly media_type: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
59
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
60
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
61
|
+
}>, import("effect/Schema").Struct<{
|
|
62
|
+
readonly type: import("effect/Schema").Literal<"tool-call">;
|
|
63
|
+
readonly call: import("effect/Schema").Struct<{
|
|
64
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.ToolCallId"> & {
|
|
65
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
66
|
+
};
|
|
67
|
+
readonly name: import("effect/Schema").String;
|
|
68
|
+
readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
69
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
70
|
+
}>;
|
|
71
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
72
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
73
|
+
}>, import("effect/Schema").Struct<{
|
|
74
|
+
readonly type: import("effect/Schema").Literal<"tool-result">;
|
|
75
|
+
readonly result: import("effect/Schema").Struct<{
|
|
76
|
+
readonly call_id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.ToolCallId"> & {
|
|
77
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
78
|
+
};
|
|
79
|
+
readonly output: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
80
|
+
readonly error: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
81
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
82
|
+
}>;
|
|
83
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
84
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
85
|
+
}>]>>>;
|
|
86
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
87
|
+
readonly created_at: import("effect/Schema").Int;
|
|
88
|
+
}>;
|
|
89
|
+
}, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
|
|
90
|
+
readonly _tag: import("effect/Schema").tag<"reconnecting">;
|
|
91
|
+
readonly message: import("effect/Schema").String;
|
|
92
|
+
readonly attempt: import("effect/Schema").Int;
|
|
93
|
+
}, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
|
|
94
|
+
readonly _tag: import("effect/Schema").tag<"stopped">;
|
|
95
|
+
readonly reason: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
96
|
+
readonly _tag: import("effect/Schema").tag<"terminal">;
|
|
97
|
+
readonly status: import("effect/Schema").Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
|
|
98
|
+
}>, import("effect/Schema").Struct<{
|
|
99
|
+
readonly _tag: import("effect/Schema").tag<"actionable_wait">;
|
|
100
|
+
readonly wait: import("effect/Schema").Struct<{
|
|
101
|
+
readonly wait_id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.WaitId"> & {
|
|
102
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
103
|
+
};
|
|
104
|
+
readonly execution_id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.ExecutionId"> & {
|
|
105
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
106
|
+
};
|
|
107
|
+
readonly envelope_id: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Relay.EnvelopeId"> & {
|
|
108
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EnvelopeId">;
|
|
109
|
+
}>;
|
|
110
|
+
readonly kind: import("effect/Schema").optionalKey<import("effect/Schema").Literals<readonly ["permission", "tool_approval", "tool_placement", "child_join", "inbox", "reply", "timer", "external"]>>;
|
|
111
|
+
readonly mode: import("effect/Schema").Literals<readonly ["reply", "event", "until", "child"]>;
|
|
112
|
+
readonly correlation_key: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
113
|
+
readonly state: import("effect/Schema").Literals<readonly ["open", "resolved", "timed_out", "cancelled"]>;
|
|
114
|
+
readonly metadata: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
115
|
+
readonly created_at: import("effect/Schema").Int;
|
|
116
|
+
readonly resolved_at: import("effect/Schema").optionalKey<import("effect/Schema").Int>;
|
|
117
|
+
}>;
|
|
118
|
+
}>]>;
|
|
119
|
+
readonly cursor: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
120
|
+
}, "Type">, ClientError | EventLogCursorNotFound, Service>;
|
|
121
|
+
export declare const streamSession: (input: StreamSessionInput) => Stream.Stream<import("effect/Schema").Struct.ReadonlySide<{
|
|
122
|
+
readonly _tag: import("effect/Schema").tag<"execution_joined">;
|
|
123
|
+
readonly execution: import("effect/Schema").Struct<{
|
|
124
|
+
readonly execution_id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.ExecutionId"> & {
|
|
125
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
126
|
+
};
|
|
127
|
+
readonly root_address_id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.AddressId"> & {
|
|
128
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
|
|
129
|
+
};
|
|
130
|
+
readonly session_id: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Relay.SessionId"> & {
|
|
131
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SessionId">;
|
|
132
|
+
}>;
|
|
133
|
+
readonly status: import("effect/Schema").Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
|
|
134
|
+
readonly kind: import("effect/Schema").Literals<readonly ["user-agent", "agent-agent"]>;
|
|
135
|
+
readonly agent_id: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Relay.AgentId"> & {
|
|
136
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
|
|
137
|
+
}>;
|
|
138
|
+
readonly metadata: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
139
|
+
readonly created_at: import("effect/Schema").Int;
|
|
140
|
+
readonly updated_at: import("effect/Schema").Int;
|
|
141
|
+
}>;
|
|
142
|
+
}, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
|
|
143
|
+
readonly _tag: import("effect/Schema").tag<"execution_event">;
|
|
144
|
+
readonly event: import("effect/Schema").Struct<{
|
|
145
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.EventId"> & {
|
|
146
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EventId">;
|
|
147
|
+
};
|
|
148
|
+
readonly execution_id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.ExecutionId"> & {
|
|
149
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
150
|
+
};
|
|
151
|
+
readonly child_execution_id: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Relay.ChildExecutionId"> & {
|
|
152
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
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.received", "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
|
+
readonly sequence: import("effect/Schema").Int;
|
|
156
|
+
readonly cursor: import("effect/Schema").String;
|
|
157
|
+
readonly content: import("effect/Schema").optionalKey<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
158
|
+
readonly type: import("effect/Schema").Literal<"text">;
|
|
159
|
+
readonly text: import("effect/Schema").String;
|
|
160
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
161
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
162
|
+
}>, import("effect/Schema").Struct<{
|
|
163
|
+
readonly type: import("effect/Schema").Literal<"structured">;
|
|
164
|
+
readonly value: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
165
|
+
readonly schema_ref: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
166
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
167
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
168
|
+
}>, import("effect/Schema").Struct<{
|
|
169
|
+
readonly type: import("effect/Schema").Literal<"blob-reference">;
|
|
170
|
+
readonly uri: import("effect/Schema").String;
|
|
171
|
+
readonly media_type: import("effect/Schema").String;
|
|
172
|
+
readonly filename: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
173
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
174
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
175
|
+
}>, import("effect/Schema").Struct<{
|
|
176
|
+
readonly type: import("effect/Schema").Literal<"artifact-reference">;
|
|
177
|
+
readonly artifact_id: import("effect/Schema").String;
|
|
178
|
+
readonly media_type: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
179
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
180
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
181
|
+
}>, import("effect/Schema").Struct<{
|
|
182
|
+
readonly type: import("effect/Schema").Literal<"tool-call">;
|
|
183
|
+
readonly call: import("effect/Schema").Struct<{
|
|
184
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.ToolCallId"> & {
|
|
185
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
186
|
+
};
|
|
187
|
+
readonly name: import("effect/Schema").String;
|
|
188
|
+
readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
189
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
190
|
+
}>;
|
|
191
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
192
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
193
|
+
}>, import("effect/Schema").Struct<{
|
|
194
|
+
readonly type: import("effect/Schema").Literal<"tool-result">;
|
|
195
|
+
readonly result: import("effect/Schema").Struct<{
|
|
196
|
+
readonly call_id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.ToolCallId"> & {
|
|
197
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
198
|
+
};
|
|
199
|
+
readonly output: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
200
|
+
readonly error: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
201
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
202
|
+
}>;
|
|
203
|
+
readonly provider_options: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
204
|
+
readonly metadata: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
205
|
+
}>]>>>;
|
|
206
|
+
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>>;
|
|
207
|
+
readonly created_at: import("effect/Schema").Int;
|
|
208
|
+
}>;
|
|
209
|
+
}, "Type">, ClientError | EventLogCursorNotFound, Service>;
|
|
210
|
+
export declare const watchExecutions: (input: WatchExecutionsInput) => Stream.Stream<import("effect/Schema").Struct.ReadonlySide<{
|
|
211
|
+
readonly _tag: import("effect/Schema").tag<"upsert">;
|
|
212
|
+
readonly record: import("effect/Schema").Struct<{
|
|
213
|
+
readonly execution_id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.ExecutionId"> & {
|
|
214
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
215
|
+
};
|
|
216
|
+
readonly root_address_id: import("effect/Schema").brand<import("effect/Schema").String, "Relay.AddressId"> & {
|
|
217
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
|
|
218
|
+
};
|
|
219
|
+
readonly session_id: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Relay.SessionId"> & {
|
|
220
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SessionId">;
|
|
221
|
+
}>;
|
|
222
|
+
readonly status: import("effect/Schema").Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
|
|
223
|
+
readonly kind: import("effect/Schema").Literals<readonly ["user-agent", "agent-agent"]>;
|
|
224
|
+
readonly agent_id: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Relay.AgentId"> & {
|
|
225
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
|
|
226
|
+
}>;
|
|
227
|
+
readonly metadata: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
228
|
+
readonly created_at: import("effect/Schema").Int;
|
|
229
|
+
readonly updated_at: import("effect/Schema").Int;
|
|
230
|
+
}>;
|
|
231
|
+
}, "Type"> | {
|
|
232
|
+
readonly _tag: "snapshot";
|
|
233
|
+
readonly records: readonly {
|
|
234
|
+
readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
235
|
+
readonly root_address_id: string & import("effect/Brand").Brand<"Relay.AddressId">;
|
|
236
|
+
readonly session_id?: string & import("effect/Brand").Brand<"Relay.SessionId">;
|
|
237
|
+
readonly status: "cancelled" | "completed" | "failed" | "queued" | "running" | "waiting";
|
|
238
|
+
readonly kind: "agent-agent" | "user-agent";
|
|
239
|
+
readonly agent_id?: string & import("effect/Brand").Brand<"Relay.AgentId">;
|
|
240
|
+
readonly metadata: {
|
|
241
|
+
readonly [x: string]: import("effect/Schema").Json;
|
|
242
|
+
};
|
|
243
|
+
readonly created_at: number;
|
|
244
|
+
readonly updated_at: number;
|
|
245
|
+
}[];
|
|
246
|
+
readonly next_cursor?: string;
|
|
247
|
+
}, ClientError, Service>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Address, Envelope, Inbox, Presence } from "../schema/index";
|
|
2
|
+
import { Effect, Stream } from "effect";
|
|
3
|
+
import { Service, type ClientError } from "./client-public";
|
|
4
|
+
import type { AwaitWaitInput, ListInboxMessagesInput, ListTopicSubscriptionsInput, PublishTopicInput, SubmitInboundEnvelopeInput, SubscribeTopicInput, UnsubscribeTopicInput, WakeInput } from "./operation";
|
|
5
|
+
export declare const registerAddressBookRoute: (input: Address.RegisterRoutePayload) => Effect.Effect<Address.RouteRegistered, ClientError | import("./client-public").ResidentNamespaceReserved, Service>;
|
|
6
|
+
export declare const getAddressBookRoute: (id: string & import("effect/Brand").Brand<"Relay.AddressId">) => Effect.Effect<Address.RouteRecord | undefined, ClientError, Service>;
|
|
7
|
+
export declare const listAddressBookRoutes: () => Effect.Effect<Address.RouteList, ClientError, Service>;
|
|
8
|
+
export declare const subscribeTopic: (input: SubscribeTopicInput) => Effect.Effect<import("./operation").TopicSubscription, ClientError, Service>;
|
|
9
|
+
export declare const unsubscribeTopic: (input: UnsubscribeTopicInput) => Effect.Effect<void, ClientError, Service>;
|
|
10
|
+
export declare const publishTopic: (input: PublishTopicInput) => Effect.Effect<import("./operation").TopicPublishAccepted, ClientError, Service>;
|
|
11
|
+
export declare const listTopicSubscriptions: (input: ListTopicSubscriptionsInput) => Effect.Effect<readonly import("./operation").TopicSubscription[], ClientError, Service>;
|
|
12
|
+
export declare const listInboxMessages: (input: ListInboxMessagesInput) => Effect.Effect<ReadonlyArray<Inbox.Message>, ClientError, Service>;
|
|
13
|
+
export declare const send: (input: Envelope.SendInput) => Effect.Effect<Envelope.EnvelopeAccepted, ClientError, Service>;
|
|
14
|
+
export declare const getPresence: (scope: Presence.Scope) => Effect.Effect<Presence.View, ClientError, Service>;
|
|
15
|
+
export declare const watchPresence: (scope: Presence.Scope) => Stream.Stream<Presence.View, ClientError, Service>;
|
|
16
|
+
export declare const wake: (input: WakeInput) => Effect.Effect<import("./operation").WakeAccepted, ClientError | import("./client-public").WaitKindMismatch, Service>;
|
|
17
|
+
export declare const submitInboundEnvelope: (input: SubmitInboundEnvelopeInput) => Effect.Effect<import("./operation").SubmitInboundEnvelopeAccepted, ClientError | import("./client-public").WaitKindMismatch, Service>;
|
|
18
|
+
export declare const awaitWait: (input: AwaitWaitInput) => Effect.Effect<import("./operation").WaitOutcome, ClientError, Service>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Resident } from "../schema/index";
|
|
2
|
+
import { Effect, Schema } from "effect";
|
|
3
|
+
import { Service, type AskResidentInput, type FlatInterface, type PublicOperation } from "./client-public";
|
|
4
|
+
import type { DestroyResidentInput, GetResidentInput, ListResidentsInput, SpawnResidentInput } from "./operation";
|
|
5
|
+
export declare const registerResidentKind: (input: Resident.KindDefinition) => Effect.Effect<Resident.KindDefinition, import("./client-public").ClientError, Service>;
|
|
6
|
+
export declare const spawnResident: (input: SpawnResidentInput) => Effect.Effect<Resident.Instance, import("./client-public").ClientError, Service>;
|
|
7
|
+
export declare const getResident: (input: GetResidentInput) => Effect.Effect<Resident.Instance | undefined, import("./client-public").ClientError, Service>;
|
|
8
|
+
export declare const destroyResident: (input: DestroyResidentInput) => Effect.Effect<Resident.Instance, import("./client-public").ClientError, Service>;
|
|
9
|
+
export declare const listResidents: (input: ListResidentsInput) => Effect.Effect<readonly Resident.Instance[], import("./client-public").ClientError, Service>;
|
|
10
|
+
export declare const askResident: <Name extends string, I extends Schema.Top, O extends Schema.Top>(input: AskResidentInput<Name, I, O>) => Effect.Effect<O["Type"], import("./client-public").ClientError | import("./command").CommandReplyInvalid | import("./command").CommandTimedOut | import("./command").ResidentNotFound, Service | I["EncodingServices"] | O["DecodingServices"]>;
|
|
11
|
+
export declare const getResidentState: PublicOperation<FlatInterface["getResidentState"]>;
|
|
12
|
+
export declare const putResidentState: PublicOperation<FlatInterface["putResidentState"]>;
|
|
13
|
+
export declare const deleteResidentState: PublicOperation<FlatInterface["deleteResidentState"]>;
|
|
14
|
+
export declare const listResidentState: PublicOperation<FlatInterface["listResidentState"]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { Service } from "./client-public";
|
|
3
|
+
import type { CancelScheduleInput, CreateScheduleInput, ListSchedulesInput } from "./operation";
|
|
4
|
+
export declare const createSchedule: (input: CreateScheduleInput) => Effect.Effect<import("./operation").CreateScheduleResult, import("./client-public").ClientError, Service>;
|
|
5
|
+
export declare const cancelSchedule: (input: CancelScheduleInput) => Effect.Effect<import("./operation").CancelScheduleResult, import("./client-public").ClientError, Service>;
|
|
6
|
+
export declare const listSchedules: (input: ListSchedulesInput) => Effect.Effect<import("./operation").ListSchedulesResult, import("./client-public").ClientError, Service>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { Service } from "./client-public";
|
|
3
|
+
import type { ClaimToolWorkInput, CompleteToolWorkInput, FulfillToolCallInput, ListPendingApprovalsInput, ListPendingToolCallsInput, ListToolAttemptsInput, ReleaseToolWorkInput, ResolvePermissionInput, ResolveToolApprovalInput } from "./operation";
|
|
4
|
+
export declare const listPendingApprovals: (input: ListPendingApprovalsInput) => Effect.Effect<import("./operation").PendingToolApprovalList, import("./client-public").ClientError, Service>;
|
|
5
|
+
export declare const resolveToolApproval: (input: ResolveToolApprovalInput) => Effect.Effect<import("./operation").WakeAccepted, import("./client-public").ClientError | import("./client-public").WaitKindMismatch, Service>;
|
|
6
|
+
export declare const resolvePermission: (input: ResolvePermissionInput) => Effect.Effect<import("./operation").WakeAccepted, import("./client-public").ClientError | import("./client-public").WaitKindMismatch, Service>;
|
|
7
|
+
export declare const listPendingToolCalls: (input: ListPendingToolCallsInput) => Effect.Effect<import("./operation").PendingToolCallList, import("./client-public").ClientError, Service>;
|
|
8
|
+
export declare const fulfillToolCall: (input: FulfillToolCallInput) => Effect.Effect<import("./operation").ToolOutcomeAccepted, import("./client-public").ClientError, Service>;
|
|
9
|
+
export declare const claimToolWork: (input: ClaimToolWorkInput) => Effect.Effect<import("./operation").ToolWorkLease | null, import("./client-public").ClientError, Service>;
|
|
10
|
+
export declare const completeToolWork: (input: CompleteToolWorkInput) => Effect.Effect<import("./operation").ToolOutcomeAccepted, import("./client-public").ClientError, Service>;
|
|
11
|
+
export declare const releaseToolWork: (input: ReleaseToolWorkInput) => Effect.Effect<import("./operation").ToolWorkReleased, import("./client-public").ClientError, Service>;
|
|
12
|
+
export declare const listToolAttempts: (input: ListToolAttemptsInput) => Effect.Effect<import("./operation").ToolAttemptList, import("./client-public").ClientError, Service>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Workflow } from "../schema/index";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import { Service } from "./client-public";
|
|
4
|
+
export declare const registerWorkflowDefinition: (input: Workflow.RegisterDefinitionPayload) => Effect.Effect<Workflow.DefinitionRegistered, import("./client-public").ClientError, Service>;
|
|
5
|
+
export declare const getWorkflowDefinitionRevision: (id: string & import("effect/Brand").Brand<"Relay.WorkflowDefinitionId">, revision?: number | undefined) => Effect.Effect<Workflow.DefinitionRevisionRecord | undefined, import("./client-public").ClientError, Service>;
|
|
6
|
+
export declare const listWorkflowDefinitionRevisions: (id: string & import("effect/Brand").Brand<"Relay.WorkflowDefinitionId">) => Effect.Effect<Workflow.DefinitionRevisionList, import("./client-public").ClientError, Service>;
|
|
7
|
+
export declare const startWorkflowRun: (input: Workflow.StartRunPayload) => Effect.Effect<Workflow.RunRecord, import("./client-public").ClientError | import("./runtime-capability-policy").RuntimeCapabilityUnavailable, Service>;
|
|
8
|
+
export declare const cancelWorkflowRun: (id: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<Workflow.RunRecord | undefined, import("./client-public").ClientError, Service>;
|
|
9
|
+
export declare const replayWorkflowRun: (id: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<readonly Workflow.LifecycleEvent[], import("./client-public").ClientError, Service>;
|
|
10
|
+
export declare const inspectWorkflowRun: (id: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<Workflow.RunRecord | undefined, import("./client-public").ClientError, Service>;
|