@codeworksh/harness 0.4.0 → 0.5.0-canary.56.1.gf92d684a
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/effect.d.mts +1201 -142
- package/effect.mjs +301 -30
- package/effect.mjs.map +1 -1
- package/package.json +3 -3
package/effect.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./index-BlvIgEtU.mjs";
|
|
2
2
|
import "./index-BEZ8eL--.mjs";
|
|
3
|
-
import { Cause, Config, Context, Duration, Effect, JsonSchema, Layer, Option, Ref, Schema, Stream } from "effect";
|
|
3
|
+
import { Cause, Config, Context, DateTime, Duration, Effect, JsonSchema, Layer, Option, Ref, Schema, Stream } from "effect";
|
|
4
4
|
import { Event, Message, Model, Protocol } from "@codeworksh/aikit";
|
|
5
5
|
import { MessageID as ID, SessionID as ID$1 } from "@codeworksh/plugin/ids";
|
|
6
6
|
import { SqlClient, SqlClient as SqlClient$1, SqlSchema as SqlSchema$1 } from "effect/sql";
|
|
@@ -8,7 +8,7 @@ import { SqliteClient } from "@effect/sql-sqlite-node";
|
|
|
8
8
|
import { Model as Model$1 } from "effect/schema";
|
|
9
9
|
import { SqliteProvider, create } from "@platformatic/vfs";
|
|
10
10
|
import { ChildProcessSpawner } from "effect/process";
|
|
11
|
-
import { DirectoryNotFoundError, Error, Error as Error$1, Info as Info$5, Interface as Interface$
|
|
11
|
+
import { DirectoryNotFoundError, Error, Error as Error$1, Info as Info$5, Interface as Interface$10, NotDirectoryError, Service, Service as Service$10 } from "@codeworksh/plugin/location";
|
|
12
12
|
import * as Section from "@codeworksh/plugin/plugin/section";
|
|
13
13
|
import { Config as Config$1, Events, PluginOptions, PluginRef, PluginRegistry, PromptResolver, SharedPluginContext } from "@codeworksh/plugin/plugin";
|
|
14
14
|
import * as AikitFailure from "@codeworksh/aikit/failure";
|
|
@@ -284,6 +284,8 @@ declare const SessionRow_base: import("effect/schema/VariantSchema").Class<Sessi
|
|
|
284
284
|
readonly tokensOutput: Model$1.GeneratedByDb<Schema.Int>;
|
|
285
285
|
readonly tokensCacheRead: Model$1.GeneratedByDb<Schema.Int>;
|
|
286
286
|
readonly tokensCacheWrite: Model$1.GeneratedByDb<Schema.Int>;
|
|
287
|
+
readonly execution: Model$1.FieldOption<Schema.Literals<readonly ["running", "closed"]>>;
|
|
288
|
+
readonly restarts: Model$1.GeneratedByDb<Schema.Int>;
|
|
287
289
|
}, Schema.Struct<import("effect/schema/VariantSchema").ExtractFields<"select", {
|
|
288
290
|
readonly createdAt: Model$1.DateTimeInsertFromNumber;
|
|
289
291
|
readonly updatedAt: Model$1.DateTimeUpdateFromNumber;
|
|
@@ -371,6 +373,8 @@ declare const SessionRow_base: import("effect/schema/VariantSchema").Class<Sessi
|
|
|
371
373
|
readonly tokensOutput: Model$1.GeneratedByDb<Schema.Int>;
|
|
372
374
|
readonly tokensCacheRead: Model$1.GeneratedByDb<Schema.Int>;
|
|
373
375
|
readonly tokensCacheWrite: Model$1.GeneratedByDb<Schema.Int>;
|
|
376
|
+
readonly execution: Model$1.FieldOption<Schema.Literals<readonly ["running", "closed"]>>;
|
|
377
|
+
readonly restarts: Model$1.GeneratedByDb<Schema.Int>;
|
|
374
378
|
}, true>>> & {
|
|
375
379
|
readonly insert: Schema.Struct<{
|
|
376
380
|
readonly createdAt: import("effect/schema/VariantSchema").Overrideable<Schema.DateTimeUtcFromMillis>;
|
|
@@ -395,6 +399,7 @@ declare const SessionRow_base: import("effect/schema/VariantSchema").Class<Sessi
|
|
|
395
399
|
readonly tag: Schema.OptionFromNullOr<Schema.String>;
|
|
396
400
|
readonly metadata: Schema.OptionFromNullOr<Schema.fromJsonString<Schema.$Record<Schema.String, Schema.String>>>;
|
|
397
401
|
readonly leafEntryId: Schema.OptionFromNullOr<Schema.String>;
|
|
402
|
+
readonly execution: Schema.OptionFromNullOr<Schema.Literals<readonly ["running", "closed"]>>;
|
|
398
403
|
}>;
|
|
399
404
|
readonly json: Schema.Struct<{
|
|
400
405
|
readonly createdAt: Schema.DateTimeUtcFromMillis;
|
|
@@ -424,6 +429,8 @@ declare const SessionRow_base: import("effect/schema/VariantSchema").Class<Sessi
|
|
|
424
429
|
readonly tokensOutput: Schema.Int;
|
|
425
430
|
readonly tokensCacheRead: Schema.Int;
|
|
426
431
|
readonly tokensCacheWrite: Schema.Int;
|
|
432
|
+
readonly execution: Model$1.optionalOption<Schema.Literals<readonly ["running", "closed"]>>;
|
|
433
|
+
readonly restarts: Schema.Int;
|
|
427
434
|
}>;
|
|
428
435
|
readonly jsonCreate: Schema.Struct<{
|
|
429
436
|
readonly id: Schema.brand<Schema.String, "Session.ID">;
|
|
@@ -446,6 +453,7 @@ declare const SessionRow_base: import("effect/schema/VariantSchema").Class<Sessi
|
|
|
446
453
|
readonly tag: Model$1.optionalOption<Schema.String>;
|
|
447
454
|
readonly metadata: Model$1.optionalOption<Schema.$Record<Schema.String, Schema.String>>;
|
|
448
455
|
readonly leafEntryId: Model$1.optionalOption<Schema.String>;
|
|
456
|
+
readonly execution: Model$1.optionalOption<Schema.Literals<readonly ["running", "closed"]>>;
|
|
449
457
|
}>;
|
|
450
458
|
readonly jsonUpdate: Schema.Struct<{
|
|
451
459
|
readonly id: Schema.brand<Schema.String, "Session.ID">;
|
|
@@ -468,6 +476,7 @@ declare const SessionRow_base: import("effect/schema/VariantSchema").Class<Sessi
|
|
|
468
476
|
readonly tag: Model$1.optionalOption<Schema.String>;
|
|
469
477
|
readonly metadata: Model$1.optionalOption<Schema.$Record<Schema.String, Schema.String>>;
|
|
470
478
|
readonly leafEntryId: Model$1.optionalOption<Schema.String>;
|
|
479
|
+
readonly execution: Model$1.optionalOption<Schema.Literals<readonly ["running", "closed"]>>;
|
|
471
480
|
}>;
|
|
472
481
|
readonly select: Schema.Struct<{
|
|
473
482
|
readonly createdAt: Schema.DateTimeUtcFromMillis;
|
|
@@ -497,6 +506,8 @@ declare const SessionRow_base: import("effect/schema/VariantSchema").Class<Sessi
|
|
|
497
506
|
readonly tokensOutput: Schema.Int;
|
|
498
507
|
readonly tokensCacheRead: Schema.Int;
|
|
499
508
|
readonly tokensCacheWrite: Schema.Int;
|
|
509
|
+
readonly execution: Schema.OptionFromNullOr<Schema.Literals<readonly ["running", "closed"]>>;
|
|
510
|
+
readonly restarts: Schema.Int;
|
|
500
511
|
}>;
|
|
501
512
|
readonly update: Schema.Struct<{
|
|
502
513
|
readonly updatedAt: import("effect/schema/VariantSchema").Overrideable<Schema.DateTimeUtcFromMillis>;
|
|
@@ -520,6 +531,7 @@ declare const SessionRow_base: import("effect/schema/VariantSchema").Class<Sessi
|
|
|
520
531
|
readonly tag: Schema.OptionFromNullOr<Schema.String>;
|
|
521
532
|
readonly metadata: Schema.OptionFromNullOr<Schema.fromJsonString<Schema.$Record<Schema.String, Schema.String>>>;
|
|
522
533
|
readonly leafEntryId: Schema.OptionFromNullOr<Schema.String>;
|
|
534
|
+
readonly execution: Schema.OptionFromNullOr<Schema.Literals<readonly ["running", "closed"]>>;
|
|
523
535
|
}>;
|
|
524
536
|
};
|
|
525
537
|
declare class SessionRow extends SessionRow_base {}
|
|
@@ -739,7 +751,7 @@ declare const SessionEntryPartRow_base: import("effect/schema/VariantSchema").Cl
|
|
|
739
751
|
declare class SessionEntryPartRow extends SessionEntryPartRow_base {}
|
|
740
752
|
import * as import__codeworksh_plugin_event from "@codeworksh/plugin/event";
|
|
741
753
|
declare namespace event_d_exports {
|
|
742
|
-
export { event_d_exports as Event, Interface$
|
|
754
|
+
export { event_d_exports as Event, Interface$18 as Interface, InvalidDurableEventError, LogInput, LogItem, Manifest, PublishOptions, ReadAggregateInput, ReadAggregateResult, SerializedEvent, Service$17 as Service, Subscribe, SubscribeOptions, Subscriber, SubscriptionOverflowError, Synced, Unsubscribe, isSynced, layer$19 as layer };
|
|
743
755
|
}
|
|
744
756
|
type SerializedEvent = {
|
|
745
757
|
readonly id: schema_d_exports$10.ID;
|
|
@@ -835,7 +847,7 @@ interface Subscribe {
|
|
|
835
847
|
(options?: SubscribeOptions): Stream.Stream<schema_d_exports$10.Payload, SubscriptionOverflowError>;
|
|
836
848
|
<D extends schema_d_exports$10.Definition>(definition: D, options?: SubscribeOptions): Stream.Stream<schema_d_exports$10.Payload<D>, SubscriptionOverflowError>;
|
|
837
849
|
}
|
|
838
|
-
interface Interface$
|
|
850
|
+
interface Interface$18 {
|
|
839
851
|
/** Current sequence head, or -1 if absent. A version position, not a row count. */
|
|
840
852
|
readonly latestSequence: (aggregateId: string) => Effect.Effect<number>;
|
|
841
853
|
/**
|
|
@@ -893,14 +905,14 @@ interface Interface$17 {
|
|
|
893
905
|
*/
|
|
894
906
|
readonly advance: (aggregateId: string, seq: number) => Effect.Effect<void>;
|
|
895
907
|
}
|
|
896
|
-
declare const Service_base$15: Context.ServiceClass<Service$17, "@codeworksh/harness/event/event/Service", Interface$
|
|
908
|
+
declare const Service_base$15: Context.ServiceClass<Service$17, "@codeworksh/harness/event/event/Service", Interface$18>;
|
|
897
909
|
declare class Service$17 extends Service_base$15 {}
|
|
898
910
|
declare const layer$19: Layer.Layer<Service$17, never, SqlClient.SqlClient>;
|
|
899
911
|
import * as import__codeworksh_plugin_project from "@codeworksh/plugin/project";
|
|
900
912
|
import * as import__codeworksh_plugin_schema from "@codeworksh/plugin/schema";
|
|
901
913
|
import * as import__codeworksh_plugin_space from "@codeworksh/plugin/space";
|
|
902
914
|
declare namespace schema_d_exports$6 {
|
|
903
|
-
export { AssistantEnvelopeUsage, CompactionData, Config$2 as Config, DEFAULT_TITLE, ID$1 as ID, IDFromDb, InterruptReason, JsonObject, MessageEnvelopeIdentity, schema_d_exports$6 as SessionSchema, TITLE_MAX_LENGTH, ThinkingLevel, Usage, titleFrom };
|
|
915
|
+
export { AssistantEnvelopeUsage, CompactionData, Config$2 as Config, DEFAULT_TITLE, Execution, ID$1 as ID, IDFromDb, InterruptReason, JsonObject, MessageEnvelopeIdentity, schema_d_exports$6 as SessionSchema, TITLE_MAX_LENGTH, ThinkingLevel, Usage, titleFrom };
|
|
904
916
|
}
|
|
905
917
|
declare const IDFromDb: Schema.brand<Schema.String, "Session.ID">;
|
|
906
918
|
/** The title of a session created without one; its first prompt replaces it. */
|
|
@@ -935,6 +947,13 @@ type Config$2 = typeof Config$2.Type;
|
|
|
935
947
|
*/
|
|
936
948
|
declare const InterruptReason: Schema.Literals<readonly ["user", "shutdown"]>;
|
|
937
949
|
type InterruptReason = typeof InterruptReason.Type;
|
|
950
|
+
/**
|
|
951
|
+
* A run left unfinished: `running` while one is in flight, and still after the process died during
|
|
952
|
+
* it; `closed` once a shutdown stopped it. Either resumes when the server starts again; a run that
|
|
953
|
+
* ended any other way leaves none.
|
|
954
|
+
*/
|
|
955
|
+
declare const Execution: Schema.Literals<readonly ["running", "closed"]>;
|
|
956
|
+
type Execution = typeof Execution.Type;
|
|
938
957
|
declare const JsonObject: Schema.fromJsonString<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
939
958
|
declare const MessageEnvelopeIdentity: Schema.fromJsonString<Schema.Struct<{
|
|
940
959
|
readonly messageId: Schema.String;
|
|
@@ -977,7 +996,7 @@ declare const AssistantEnvelopeUsage: Schema.fromJsonString<Schema.Struct<{
|
|
|
977
996
|
}>;
|
|
978
997
|
}>>;
|
|
979
998
|
declare namespace session_d_exports$1 {
|
|
980
|
-
export { AbortAssistant, AppendEntry, AppendPart, CreateSession, EntryNotFoundError, EntryState, EntryType, ForkInput, HydratedEntry, Interface$
|
|
999
|
+
export { AbortAssistant, AppendEntry, AppendPart, CreateSession, EntryNotFoundError, EntryState, EntryType, ForkInput, HydratedEntry, Interface$17 as Interface, InvalidEntryDataError, ListInput$1 as ListInput, MessageEntryType, PartType, RelinkError, RelinkInput$1 as RelinkInput, RelinkReason, ReplaceAssistant, Service$16 as Service, session_d_exports$1 as Session, SessionEntryPartRow, SessionEntryRow, SessionLinkedSpaceNotFoundError, SessionNotFoundError, SessionNotLinkedError, SessionRow, SetEntryState, SettleToolCall, ToolCallNotFoundError, ToolStatus, defaultLayer$6 as defaultLayer, entryStates, entryTypes, layer$18 as layer, messageEntryTypes, partTypes, rebaseDirectory, toolStatuses };
|
|
981
1000
|
}
|
|
982
1001
|
declare const SessionNotFoundError_base: Schema.Class<SessionNotFoundError, Schema.TaggedStruct<"SessionNotFoundError", {
|
|
983
1002
|
readonly sessionId: Schema.String;
|
|
@@ -1129,7 +1148,7 @@ interface HydratedEntry {
|
|
|
1129
1148
|
readonly entry: SessionEntryRow;
|
|
1130
1149
|
readonly parts: ReadonlyArray<SessionEntryPartRow>;
|
|
1131
1150
|
}
|
|
1132
|
-
interface Interface$
|
|
1151
|
+
interface Interface$17 {
|
|
1133
1152
|
readonly create: (input: CreateSession) => Effect.Effect<SessionRow>;
|
|
1134
1153
|
/**
|
|
1135
1154
|
* Point an existing session at a host directory, or clear it with `null`.
|
|
@@ -1153,6 +1172,26 @@ interface Interface$16 {
|
|
|
1153
1172
|
* value. The projection of `session.config.changed`, so it runs inside that event's commit.
|
|
1154
1173
|
*/
|
|
1155
1174
|
readonly configure: (sessionId: ID$1, config: Config$2) => Effect.Effect<void>;
|
|
1175
|
+
/** Records that the session has a run to do: one starting, or one a prompt just woke. */
|
|
1176
|
+
readonly markRunning: (sessionId: ID$1) => Effect.Effect<void>;
|
|
1177
|
+
/**
|
|
1178
|
+
* Records how a run ended. `closed` (a shutdown) leaves it to resume. `stopped` (the user) and
|
|
1179
|
+
* `finished` clear it and the restart count, except that a finished run with prompts still
|
|
1180
|
+
* pending stays marked: they are accepted work a successor, or the next server start, runs.
|
|
1181
|
+
*/
|
|
1182
|
+
readonly endExecution: (sessionId: ID$1, end: "finished" | "stopped" | "closed",
|
|
1183
|
+
/** For a stop: the log position it was asked at. A prompt admitted after it keeps the mark. */
|
|
1184
|
+
stoppedAt?: number) => Effect.Effect<void>;
|
|
1185
|
+
/**
|
|
1186
|
+
* Claims a session's unfinished run for recovery: marks it running again, counting a restart when
|
|
1187
|
+
* a dying process left it running (a shutdown's closed run is not counted). The new count, or none
|
|
1188
|
+
* when nothing is unfinished any more, say because the user stopped it since.
|
|
1189
|
+
*/
|
|
1190
|
+
readonly claimRestart: (sessionId: ID$1) => Effect.Effect<Option.Option<number>>;
|
|
1191
|
+
/** A committed turn is progress: the restart count starts over. Runs inside `TurnEnded`'s commit. */
|
|
1192
|
+
readonly resetRestarts: (sessionId: ID$1) => Effect.Effect<void>;
|
|
1193
|
+
/** Sessions with a run left unfinished, oldest first. */
|
|
1194
|
+
readonly unfinished: Effect.Effect<ReadonlyArray<SessionRow>>;
|
|
1156
1195
|
readonly get: (sessionId: ID$1) => Effect.Effect<Option.Option<SessionRow>>;
|
|
1157
1196
|
/** The space a session attaches to — its env and absolute location. None when the session is unknown. */
|
|
1158
1197
|
readonly space: (sessionId: ID$1) => Effect.Effect<Option.Option<schema_d_exports$7.SpaceSchema.Info>>;
|
|
@@ -1200,7 +1239,7 @@ interface Interface$16 {
|
|
|
1200
1239
|
label: string | null;
|
|
1201
1240
|
}) => Effect.Effect<void, EntryNotFoundError>;
|
|
1202
1241
|
}
|
|
1203
|
-
declare const Service_base$14: Context.ServiceClass<Service$16, "@codeworksh/harness/session/session/Service", Interface$
|
|
1242
|
+
declare const Service_base$14: Context.ServiceClass<Service$16, "@codeworksh/harness/session/session/Service", Interface$17>;
|
|
1204
1243
|
declare class Service$16 extends Service_base$14 {}
|
|
1205
1244
|
declare const layer$18: Layer.Layer<Service$16, never, Service$17 | SqlClient.SqlClient>;
|
|
1206
1245
|
declare const defaultLayer$6: Layer.Layer<Service$16, import("effect/Config").ConfigError, Service$17>;
|
|
@@ -1228,7 +1267,7 @@ import * as import__codeworksh_plugin_sandbox_io from "@codeworksh/plugin/sandbo
|
|
|
1228
1267
|
import * as import__codeworksh_plugin_sandbox_driver from "@codeworksh/plugin/sandbox/driver";
|
|
1229
1268
|
import * as import__codeworksh_plugin_sandbox_errors from "@codeworksh/plugin/sandbox/errors";
|
|
1230
1269
|
declare namespace registry_d_exports$1 {
|
|
1231
|
-
export { DriverInfo, Registry, RegistryService, registry_d_exports$1 as SandboxDriverRegistry, layer$17 as layer, make$
|
|
1270
|
+
export { DriverInfo, Registry, RegistryService, registry_d_exports$1 as SandboxDriverRegistry, layer$17 as layer, make$6 as make };
|
|
1232
1271
|
}
|
|
1233
1272
|
interface DriverInfo {
|
|
1234
1273
|
readonly name: driver_d_exports.SandboxDriver.Name;
|
|
@@ -1249,10 +1288,10 @@ interface RegistryService {
|
|
|
1249
1288
|
}
|
|
1250
1289
|
declare const Registry_base: Context.ServiceClass<Registry, "@codeworksh/harness/sandbox/registry", RegistryService>;
|
|
1251
1290
|
declare class Registry extends Registry_base {}
|
|
1252
|
-
declare const make$
|
|
1291
|
+
declare const make$6: (drivers: ReadonlyArray<driver_d_exports.SandboxDriver.Registration>) => Effect.Effect<RegistryService, errors_d_exports.SandboxDriverRegistrationError>;
|
|
1253
1292
|
declare const layer$17: (...drivers: ReadonlyArray<driver_d_exports.SandboxDriver.Registration>) => Layer.Layer<Registry, errors_d_exports.SandboxDriverRegistrationError, never>;
|
|
1254
1293
|
declare namespace control_d_exports$1 {
|
|
1255
|
-
export { Controller, CreateInput$2 as CreateInput, DestroyOptions, Interface$
|
|
1294
|
+
export { Controller, CreateInput$2 as CreateInput, DestroyOptions, Interface$16 as Interface, ListInput, MountOptions, Options$5 as Options, RegisterInput$1 as RegisterInput, control_d_exports$1 as SandboxController, layer$16 as layer, make$5 as make };
|
|
1256
1295
|
}
|
|
1257
1296
|
interface CreateInput$2<CreateConfig, RuntimeConfig extends driver_d_exports.SandboxDriver.RuntimeConfigBase> {
|
|
1258
1297
|
readonly driver: driver_d_exports.SandboxDriver.Definition<CreateConfig, RuntimeConfig>;
|
|
@@ -1280,7 +1319,7 @@ interface ListInput {
|
|
|
1280
1319
|
readonly status?: instance_d_exports.SandboxInstance.Status;
|
|
1281
1320
|
readonly usage?: instance_d_exports.SandboxInstance.Usage;
|
|
1282
1321
|
}
|
|
1283
|
-
interface Interface$
|
|
1322
|
+
interface Interface$16 {
|
|
1284
1323
|
readonly create: <CreateConfig, RuntimeConfig extends driver_d_exports.SandboxDriver.RuntimeConfigBase>(input: CreateInput$2<CreateConfig, RuntimeConfig>) => Effect.Effect<instance_d_exports.SandboxInstance.Info, errors_d_exports.SandboxCreateError>;
|
|
1285
1324
|
readonly createAndMount: <CreateConfig, RuntimeConfig extends driver_d_exports.SandboxDriver.RuntimeConfigBase>(input: CreateInput$2<CreateConfig, RuntimeConfig>, options?: MountOptions) => io_d_exports.SandboxIO.Layer<errors_d_exports.SandboxCreateError | errors_d_exports.SandboxMountError>;
|
|
1286
1325
|
readonly register: <CreateConfig, RuntimeConfig extends driver_d_exports.SandboxDriver.RuntimeConfigBase>(input: RegisterInput$1<CreateConfig, RuntimeConfig>) => Effect.Effect<instance_d_exports.SandboxInstance.Info, errors_d_exports.SandboxRegisterError>;
|
|
@@ -1295,7 +1334,7 @@ interface Interface$15 {
|
|
|
1295
1334
|
readonly stop: (id: instance_d_exports.SandboxInstance.ID) => Effect.Effect<instance_d_exports.SandboxInstance.Info, errors_d_exports.SandboxStopError>;
|
|
1296
1335
|
readonly destroy: (id: instance_d_exports.SandboxInstance.ID, options?: DestroyOptions) => Effect.Effect<void, errors_d_exports.SandboxDestroyError>;
|
|
1297
1336
|
}
|
|
1298
|
-
declare const Controller_base: Context.ServiceClass<Controller, "@codeworksh/harness/sandbox/control/Controller", Interface$
|
|
1337
|
+
declare const Controller_base: Context.ServiceClass<Controller, "@codeworksh/harness/sandbox/control/Controller", Interface$16>;
|
|
1299
1338
|
declare class Controller extends Controller_base {}
|
|
1300
1339
|
interface Options$5 {
|
|
1301
1340
|
/** Absolute host cwd used by the local instance. Never inferred from ambient process state. */
|
|
@@ -1303,7 +1342,7 @@ interface Options$5 {
|
|
|
1303
1342
|
readonly transportIdleTimeToLive?: Duration.Input;
|
|
1304
1343
|
readonly provisioningTimeoutMs?: number;
|
|
1305
1344
|
}
|
|
1306
|
-
declare const make$
|
|
1345
|
+
declare const make$5: (options: Options$5) => Effect.Effect<Interface$16, errors_d_exports.SandboxDriverRegistrationError, Registry | import("effect/Scope").Scope | SqlClient.SqlClient>;
|
|
1307
1346
|
declare const layer$16: (options: Options$5) => Layer.Layer<Controller, errors_d_exports.SandboxDriverRegistrationError, Registry | SqlClient.SqlClient>;
|
|
1308
1347
|
//#endregion
|
|
1309
1348
|
//#region src/sandbox/sandbox.d.ts
|
|
@@ -1321,7 +1360,7 @@ type Provides = io_d_exports.SandboxIO.Provides;
|
|
|
1321
1360
|
/** A sandbox is any Layer providing the runtime services above. */
|
|
1322
1361
|
type Sandbox<E = never, RIn = never> = Layer.Layer<Provides, E, RIn>;
|
|
1323
1362
|
declare namespace git_d_exports {
|
|
1324
|
-
export { AppProcessError, git_d_exports as Git, Interface$
|
|
1363
|
+
export { AppProcessError, git_d_exports as Git, Interface$15 as Interface, Result$1 as Result, RevParse, Service$15 as Service, defaultLayer$5 as defaultLayer, layer$15 as layer, layerWith$5 as layerWith, resolvePath };
|
|
1325
1364
|
}
|
|
1326
1365
|
declare const AppProcessError_base: Schema.Class<AppProcessError, Schema.TaggedStruct<"AppProcessError", {
|
|
1327
1366
|
readonly command: Schema.String;
|
|
@@ -1336,7 +1375,7 @@ interface Result$1 {
|
|
|
1336
1375
|
readonly stderr: string;
|
|
1337
1376
|
}
|
|
1338
1377
|
type RevParse = "--show-toplevel" | "--git-dir" | "--git-common-dir";
|
|
1339
|
-
interface Interface$
|
|
1378
|
+
interface Interface$15 {
|
|
1340
1379
|
/** Run `git <args>` in `directory`; fails only when the process cannot be spawned. */
|
|
1341
1380
|
readonly exec: (directory: string, args: ReadonlyArray<string>) => Effect.Effect<Result$1, AppProcessError>;
|
|
1342
1381
|
readonly revParse: (directory: string, arg: RevParse) => Effect.Effect<string | undefined>;
|
|
@@ -1364,7 +1403,7 @@ interface Interface$14 {
|
|
|
1364
1403
|
readonly env?: Record<string, string>;
|
|
1365
1404
|
}) => Effect.Effect<Result$1, AppProcessError>;
|
|
1366
1405
|
}
|
|
1367
|
-
declare const Service_base$13: Context.ServiceClass<Service$15, "@codeworksh/harness/git/git/Service", Interface$
|
|
1406
|
+
declare const Service_base$13: Context.ServiceClass<Service$15, "@codeworksh/harness/git/git/Service", Interface$15>;
|
|
1368
1407
|
declare class Service$15 extends Service_base$13 {}
|
|
1369
1408
|
declare const layer$15: Layer.Layer<Service$15, never, import("@codeworksh/plugin/sandbox/shell").Shell>;
|
|
1370
1409
|
/**
|
|
@@ -1382,7 +1421,7 @@ declare const defaultLayer$5: (rootPath: string) => Layer.Layer<Service$15, neve
|
|
|
1382
1421
|
declare function resolvePath(cwd: string, value: string): string;
|
|
1383
1422
|
import * as import__codeworksh_plugin_repo from "@codeworksh/plugin/repo";
|
|
1384
1423
|
declare namespace repo_d_exports {
|
|
1385
|
-
export { Identity, Interface$
|
|
1424
|
+
export { Identity, Interface$14 as Interface, MARKER, repo_d_exports as Repo, Service$14 as Service, defaultLayer$4 as defaultLayer, layer$14 as layer, layerWith$4 as layerWith, normalize };
|
|
1386
1425
|
}
|
|
1387
1426
|
/** Per-clone file under the store that pins the project id (see PROJECT.md §1 "marker"). */
|
|
1388
1427
|
declare const MARKER = "codework";
|
|
@@ -1393,13 +1432,13 @@ interface Identity {
|
|
|
1393
1432
|
/** True when a portable id was computed and written to the marker this call. */
|
|
1394
1433
|
readonly stamp: boolean;
|
|
1395
1434
|
}
|
|
1396
|
-
interface Interface$
|
|
1435
|
+
interface Interface$14 {
|
|
1397
1436
|
/** Locate the checkout containing `input`, or undefined when there is none git can read. */
|
|
1398
1437
|
readonly find: (input: schema_d_exports$8.AbsolutePath) => Effect.Effect<schema_d_exports$5.RepoSchema.Info | undefined>;
|
|
1399
1438
|
/** PROJECT.md §5.1 PHASE 2. Stamps the marker when a portable id is found for the first time. */
|
|
1400
1439
|
readonly identity: (repo: schema_d_exports$5.RepoSchema.Info) => Effect.Effect<Identity>;
|
|
1401
1440
|
}
|
|
1402
|
-
declare const Service_base$12: Context.ServiceClass<Service$14, "@codeworksh/harness/repo/repo/Service", Interface$
|
|
1441
|
+
declare const Service_base$12: Context.ServiceClass<Service$14, "@codeworksh/harness/repo/repo/Service", Interface$14>;
|
|
1403
1442
|
declare class Service$14 extends Service_base$12 {}
|
|
1404
1443
|
/**
|
|
1405
1444
|
* Canonical `host/path` for a remote url (D-URL): host and path lowercased,
|
|
@@ -1411,7 +1450,7 @@ declare const layer$14: Layer.Layer<Service$14, never, import("@codeworksh/plugi
|
|
|
1411
1450
|
declare const layerWith$4: <E, RIn>(sandbox: Sandbox.Sandbox<E, RIn>) => Layer.Layer<Service$14, E, RIn>;
|
|
1412
1451
|
declare const defaultLayer$4: (rootPath: string) => Layer.Layer<Service$14, never, never>;
|
|
1413
1452
|
declare namespace space_d_exports {
|
|
1414
|
-
export { AbsorbInput, Interface$
|
|
1453
|
+
export { AbsorbInput, Interface$13 as Interface, RehomeInput, Service$13 as Service, space_d_exports as Space, archiveEnv, fromRow, id, layer$13 as layer, layerWith$3 as layerWith };
|
|
1415
1454
|
}
|
|
1416
1455
|
/** `hash(env, location)` — no project component (D-SPACEID). */
|
|
1417
1456
|
declare const id: (env: instance_d_exports.SandboxInstance.ID, location: string) => schema_d_exports$7.SpaceSchema.ID;
|
|
@@ -1426,7 +1465,7 @@ interface AbsorbInput {
|
|
|
1426
1465
|
readonly strayId: schema_d_exports$7.SpaceSchema.ID;
|
|
1427
1466
|
readonly into: schema_d_exports$7.SpaceSchema.ID;
|
|
1428
1467
|
}
|
|
1429
|
-
interface Interface$
|
|
1468
|
+
interface Interface$13 {
|
|
1430
1469
|
readonly get: (id: schema_d_exports$7.SpaceSchema.ID) => Effect.Effect<Option.Option<schema_d_exports$7.SpaceSchema.Info>>;
|
|
1431
1470
|
/** Active spaces of the project in this env, sorted by location. */
|
|
1432
1471
|
readonly list: (projectId: schema_d_exports$9.ProjectSchema.ID) => Effect.Effect<schema_d_exports$7.SpaceSchema.Info[]>;
|
|
@@ -1439,7 +1478,7 @@ interface Interface$12 {
|
|
|
1439
1478
|
/** Re-point a stray subdirectory space's sessions at its parent, then delete it (§5.3). `session.directory` is absolute and stays put. */
|
|
1440
1479
|
readonly absorb: (input: AbsorbInput) => Effect.Effect<void>;
|
|
1441
1480
|
}
|
|
1442
|
-
declare const Service_base$11: Context.ServiceClass<Service$13, "@codeworksh/harness/space/space/Service", Interface$
|
|
1481
|
+
declare const Service_base$11: Context.ServiceClass<Service$13, "@codeworksh/harness/space/space/Service", Interface$13>;
|
|
1443
1482
|
declare class Service$13 extends Service_base$11 {}
|
|
1444
1483
|
/** Row → public shape. Shared with `Session.space`, which reads the same row through a join. */
|
|
1445
1484
|
declare const fromRow: (row: SpaceRow) => schema_d_exports$7.SpaceSchema.Info;
|
|
@@ -1453,7 +1492,7 @@ declare const archiveEnv: (env: string & import("effect/Brand").Brand<"SandboxIn
|
|
|
1453
1492
|
declare const layer$13: Layer.Layer<Service$13, never, io_d_exports.SandboxIO.Current | import("@codeworksh/plugin/sandbox/filesystem").Service | SqlClient.SqlClient>;
|
|
1454
1493
|
declare const layerWith$3: <E, RIn>(sandbox: Sandbox.Sandbox<E, RIn>) => Layer.Layer<Service$13, E, RIn | SqlClient.SqlClient>;
|
|
1455
1494
|
declare namespace worktree_d_exports {
|
|
1456
|
-
export { Entry$2 as Entry, Input$1 as Input, Interface$
|
|
1495
|
+
export { Entry$2 as Entry, Input$1 as Input, Interface$12 as Interface, Service$12 as Service, worktree_d_exports as Worktree, WorktreeError, defaultLayer$3 as defaultLayer, layer$12 as layer, layerWith$2 as layerWith };
|
|
1457
1496
|
}
|
|
1458
1497
|
declare const WorktreeError_base: Schema.Class<WorktreeError, Schema.TaggedStruct<"Worktree.WorktreeError", {
|
|
1459
1498
|
readonly operation: Schema.Literals<readonly ["add", "remove", "list"]>;
|
|
@@ -1472,7 +1511,7 @@ interface Input$1 {
|
|
|
1472
1511
|
readonly repo: schema_d_exports$5.RepoSchema.Info;
|
|
1473
1512
|
readonly directory: schema_d_exports$8.AbsolutePath;
|
|
1474
1513
|
}
|
|
1475
|
-
interface Interface$
|
|
1514
|
+
interface Interface$12 {
|
|
1476
1515
|
/** `git worktree list`, main checkout first. Never prunes (D-PRUNE). */
|
|
1477
1516
|
readonly list: (repo: schema_d_exports$5.RepoSchema.Info) => Effect.Effect<ReadonlyArray<Entry$2>, WorktreeError>;
|
|
1478
1517
|
/** Detached worktree at `directory` checked out at the repo's HEAD. */
|
|
@@ -1480,13 +1519,13 @@ interface Interface$11 {
|
|
|
1480
1519
|
/** Force-remove the worktree, then prune stale administrative entries. */
|
|
1481
1520
|
readonly remove: (input: Input$1) => Effect.Effect<void, WorktreeError>;
|
|
1482
1521
|
}
|
|
1483
|
-
declare const Service_base$10: Context.ServiceClass<Service$12, "@codeworksh/harness/worktree/worktree/Service", Interface$
|
|
1522
|
+
declare const Service_base$10: Context.ServiceClass<Service$12, "@codeworksh/harness/worktree/worktree/Service", Interface$12>;
|
|
1484
1523
|
declare class Service$12 extends Service_base$10 {}
|
|
1485
1524
|
declare const layer$12: Layer.Layer<Service$12, never, import("@codeworksh/plugin/sandbox/filesystem").Service | Service$15>;
|
|
1486
1525
|
declare const layerWith$2: <E, RIn>(sandbox: Sandbox.Sandbox<E, RIn>) => Layer.Layer<Service$12, E, RIn>;
|
|
1487
1526
|
declare const defaultLayer$3: (rootPath: string) => Layer.Layer<Service$12, never, never>;
|
|
1488
1527
|
declare namespace project_d_exports {
|
|
1489
|
-
export { Interface$
|
|
1528
|
+
export { Interface$11 as Interface, project_d_exports as Project, ProjectNotFoundError, ResolveOptions, Resolved$2 as Resolved, Service$11 as Service, defaultLayer$2 as defaultLayer, layer$11 as layer, layerWith$1 as layerWith, provisional, rename };
|
|
1490
1529
|
}
|
|
1491
1530
|
/** Deterministic, env-local id for a directory without a portable identity. Never written to a marker. */
|
|
1492
1531
|
declare const provisional: (env: instance_d_exports.SandboxInstance.ID, location: string) => schema_d_exports$9.ProjectSchema.ID;
|
|
@@ -1505,12 +1544,12 @@ interface ResolveOptions {
|
|
|
1505
1544
|
*/
|
|
1506
1545
|
readonly name?: string;
|
|
1507
1546
|
}
|
|
1508
|
-
interface Interface$
|
|
1547
|
+
interface Interface$11 {
|
|
1509
1548
|
readonly resolveOrCreate: (cwd: schema_d_exports$8.AbsolutePath, options?: ResolveOptions) => Effect.Effect<Resolved$2, Error$1>;
|
|
1510
1549
|
readonly get: (id: schema_d_exports$9.ProjectSchema.ID) => Effect.Effect<Option.Option<schema_d_exports$9.ProjectSchema.Info>>;
|
|
1511
1550
|
readonly list: () => Effect.Effect<schema_d_exports$9.ProjectSchema.Info[]>;
|
|
1512
1551
|
}
|
|
1513
|
-
declare const Service_base$9: Context.ServiceClass<Service$11, "@codeworksh/harness/project/project/Service", Interface$
|
|
1552
|
+
declare const Service_base$9: Context.ServiceClass<Service$11, "@codeworksh/harness/project/project/Service", Interface$11>;
|
|
1514
1553
|
declare class Service$11 extends Service_base$9 {}
|
|
1515
1554
|
declare const layer$11: Layer.Layer<Service$11, never, io_d_exports.SandboxIO.Current | import("@codeworksh/plugin/sandbox/filesystem").Service | Service$13 | Service$14 | Service$12 | SqlClient.SqlClient>;
|
|
1516
1555
|
declare const ProjectNotFoundError_base: Schema.Class<ProjectNotFoundError, Schema.TaggedStruct<"ProjectNotFoundError", {
|
|
@@ -1526,7 +1565,7 @@ declare const rename: (input: {
|
|
|
1526
1565
|
declare const layerWith$1: <E, RIn>(sandbox: Sandbox.Sandbox<E, RIn>) => Layer.Layer<Service$11, E | import("effect/Config").ConfigError, Exclude<RIn, SqlClient.SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient>>;
|
|
1527
1566
|
declare const defaultLayer$2: (path: string) => Layer.Layer<Service$11, import("effect/Config").ConfigError, never>;
|
|
1528
1567
|
declare namespace location_d_exports {
|
|
1529
|
-
export { DirectoryNotFoundError, Error, Info$5 as Info, Interface$
|
|
1568
|
+
export { DirectoryNotFoundError, Error, Info$5 as Info, Interface$10 as Interface, location_d_exports as Location, NotDirectoryError, Service$10 as Service, layer$10 as layer, layerMounted };
|
|
1530
1569
|
}
|
|
1531
1570
|
declare const layer$10: (options?: ResolveOptions) => Layer.Layer<Service, import("@codeworksh/plugin/location").Error, io_d_exports.SandboxIO.Current | Service$11>;
|
|
1532
1571
|
/**
|
|
@@ -1536,21 +1575,21 @@ declare const layer$10: (options?: ResolveOptions) => Layer.Layer<Service, impor
|
|
|
1536
1575
|
*/
|
|
1537
1576
|
declare const layerMounted: (options?: ResolveOptions) => Layer.Layer<Service, import("@codeworksh/plugin/location").Error, io_d_exports.SandboxIO.Current | import("@codeworksh/plugin/sandbox/filesystem").Service | import("@codeworksh/plugin/sandbox/shell").Shell | import("effect/sql/SqlClient").SqlClient>;
|
|
1538
1577
|
declare namespace global_d_exports {
|
|
1539
|
-
export { global_d_exports as Global, Interface$
|
|
1578
|
+
export { global_d_exports as Global, Interface$9 as Interface, Service$9 as Service, app, appConfigDir, authFile, defaultLayer$1 as defaultLayer, homeConfig, layer$9 as layer, layerWith, make$4 as make, resolve$3 as resolve };
|
|
1540
1579
|
}
|
|
1541
1580
|
declare const appConfigDir = ".codework";
|
|
1542
1581
|
declare const app = "codework";
|
|
1543
1582
|
declare const homeConfig: Config.Config<string>;
|
|
1544
|
-
declare const Service_base$8: Context.ServiceClass<Service$9, "@codeworksh/harness/global/Service", Interface$
|
|
1583
|
+
declare const Service_base$8: Context.ServiceClass<Service$9, "@codeworksh/harness/global/Service", Interface$9>;
|
|
1545
1584
|
declare class Service$9 extends Service_base$8 {}
|
|
1546
|
-
interface Interface$
|
|
1585
|
+
interface Interface$9 {
|
|
1547
1586
|
readonly home: string;
|
|
1548
1587
|
readonly cache: string;
|
|
1549
1588
|
readonly data: string;
|
|
1550
1589
|
readonly log: string;
|
|
1551
1590
|
readonly bin: string;
|
|
1552
1591
|
}
|
|
1553
|
-
declare function make$
|
|
1592
|
+
declare function make$4(input?: Partial<Interface$9>): Interface$9;
|
|
1554
1593
|
/**
|
|
1555
1594
|
* Where a Codework home keeps its OAuth credentials, or undefined to let aikit
|
|
1556
1595
|
* resolve them (`CODEWORK_CREDENTIALS`, then the default home).
|
|
@@ -1561,13 +1600,13 @@ declare function make$3(input?: Partial<Interface$8>): Interface$8;
|
|
|
1561
1600
|
* would be invisible to the other.
|
|
1562
1601
|
*/
|
|
1563
1602
|
declare const authFile: (home: string | undefined) => string | undefined;
|
|
1564
|
-
declare const resolve$3: (input?: Partial<Interface$
|
|
1603
|
+
declare const resolve$3: (input?: Partial<Interface$9> | undefined) => Effect.Effect<Interface$9, Config.ConfigError, never>;
|
|
1565
1604
|
declare const layer$9: Layer.Layer<Service$9, Config.ConfigError, never>;
|
|
1566
1605
|
declare const defaultLayer$1: Layer.Layer<Service$9, Config.ConfigError, never>;
|
|
1567
|
-
declare const layerWith: (input: Partial<Interface$
|
|
1606
|
+
declare const layerWith: (input: Partial<Interface$9>) => Layer.Layer<Service$9, Config.ConfigError, never>;
|
|
1568
1607
|
import * as import__codeworksh_plugin_settings from "@codeworksh/plugin/settings";
|
|
1569
1608
|
declare namespace settings_d_exports {
|
|
1570
|
-
export { Interface$
|
|
1609
|
+
export { Interface$8 as Interface, Options$4 as Options, Service$8 as Service, settings_d_exports as Settings, SettingsError, schema_d_exports$4.defaults as defaults, layer$8 as layer, load$1 as load, modules, parse$1 as parse, paths, projectRoot, userConfigDir };
|
|
1571
1610
|
}
|
|
1572
1611
|
interface Options$4 {
|
|
1573
1612
|
/**
|
|
@@ -1827,7 +1866,7 @@ declare const parse$1: (path: string, source: string) => Effect.Effect<{
|
|
|
1827
1866
|
readonly maxDelayMs?: number | undefined;
|
|
1828
1867
|
} | undefined;
|
|
1829
1868
|
}, SettingsError, never>;
|
|
1830
|
-
interface Interface$
|
|
1869
|
+
interface Interface$8 {
|
|
1831
1870
|
/**
|
|
1832
1871
|
* Await fresh host files at each exchange. No cache, mutation, or reload API. Fails when a
|
|
1833
1872
|
* file exists and cannot be used, including on an edit made mid-session.
|
|
@@ -1839,7 +1878,7 @@ interface Interface$7 {
|
|
|
1839
1878
|
*/
|
|
1840
1879
|
readonly load: (hostDir: string | undefined) => Effect.Effect<schema_d_exports$4.Info, SettingsError>;
|
|
1841
1880
|
}
|
|
1842
|
-
declare const Service_base$7: Context.ServiceClass<Service$8, "@codeworksh/harness/settings/settings/Service", Interface$
|
|
1881
|
+
declare const Service_base$7: Context.ServiceClass<Service$8, "@codeworksh/harness/settings/settings/Service", Interface$8>;
|
|
1843
1882
|
declare class Service$8 extends Service_base$7 {}
|
|
1844
1883
|
/**
|
|
1845
1884
|
* One read of every layer. Exported for the harness constructor, which needs the plugin
|
|
@@ -1967,21 +2006,21 @@ declare const modules: (declared: ReadonlyArray<schema_d_exports$4.Declared>) =>
|
|
|
1967
2006
|
declare const layer$8: (options?: Omit<Options$4, "hostDir">) => Layer.Layer<Service$8, never, Service$9>;
|
|
1968
2007
|
import * as import__codeworksh_plugin_plugin from "@codeworksh/plugin/plugin";
|
|
1969
2008
|
declare namespace registry_d_exports {
|
|
1970
|
-
export { EventRegistrationError, registry_d_exports as EventRegistry, Interface$
|
|
2009
|
+
export { EventRegistrationError, registry_d_exports as EventRegistry, Interface$7 as Interface, Service$7 as Service, flatten, layer$7 as layer };
|
|
1971
2010
|
}
|
|
1972
2011
|
/**
|
|
1973
2012
|
* Every event definition this harness knows: the kernel's, plus whatever the
|
|
1974
2013
|
* configured plugins registered. A validated replacement lands with each new
|
|
1975
2014
|
* plugin generation; published events retain the schema they were encoded with.
|
|
1976
2015
|
*/
|
|
1977
|
-
interface Interface$
|
|
2016
|
+
interface Interface$7 {
|
|
1978
2017
|
readonly definitions: ReadonlyArray<schema_d_exports$10.EventSchema.Definition>;
|
|
1979
2018
|
/** The latest definition for a type, or `undefined` when nothing declares it. */
|
|
1980
2019
|
readonly get: (type: string) => schema_d_exports$10.EventSchema.Definition | undefined;
|
|
1981
2020
|
/** Validate and atomically replace the definitions for a newly loaded plugin pool. */
|
|
1982
2021
|
readonly replace: (plugins: ReadonlyArray<plugin_d_exports.Plugin>) => Effect.Effect<void, EventRegistrationError>;
|
|
1983
2022
|
}
|
|
1984
|
-
declare const Service_base$6: Context.ServiceClass<Service$7, "@codeworksh/harness/event/registry/Service", Interface$
|
|
2023
|
+
declare const Service_base$6: Context.ServiceClass<Service$7, "@codeworksh/harness/event/registry/Service", Interface$7>;
|
|
1985
2024
|
declare class Service$7 extends Service_base$6 {}
|
|
1986
2025
|
declare const EventRegistrationError_base: Schema.Class<EventRegistrationError, Schema.TaggedStruct<"EventRegistrationError", {
|
|
1987
2026
|
readonly pluginId: Schema.String;
|
|
@@ -2211,7 +2250,7 @@ interface Origin {
|
|
|
2211
2250
|
readonly file?: string;
|
|
2212
2251
|
}
|
|
2213
2252
|
declare namespace runtime_d_exports {
|
|
2214
|
-
export { Bindings, Interface$
|
|
2253
|
+
export { Bindings, Interface$6 as Interface, Service$6 as Service, runtime_d_exports as SessionRuntime, layer$6 as layer };
|
|
2215
2254
|
}
|
|
2216
2255
|
/**
|
|
2217
2256
|
* Per-session configuration, held in process.
|
|
@@ -2221,20 +2260,20 @@ declare namespace runtime_d_exports {
|
|
|
2221
2260
|
* thinking level are not held here: they are the session's durable `SessionSchema.Config`.
|
|
2222
2261
|
*/
|
|
2223
2262
|
type Bindings = Options$2;
|
|
2224
|
-
interface Interface$
|
|
2263
|
+
interface Interface$6 {
|
|
2225
2264
|
readonly get: (sessionId: ID$1) => Effect.Effect<Option.Option<Bindings>>;
|
|
2226
2265
|
readonly set: (sessionId: ID$1, bindings: Bindings) => Effect.Effect<void>;
|
|
2227
2266
|
readonly update: (sessionId: ID$1, patch: Bindings) => Effect.Effect<void>;
|
|
2228
2267
|
readonly remove: (sessionId: ID$1) => Effect.Effect<void>;
|
|
2229
2268
|
}
|
|
2230
|
-
declare const Service_base$5: Context.ServiceClass<Service$6, "@codeworksh/harness/session/runtime/Service", Interface$
|
|
2269
|
+
declare const Service_base$5: Context.ServiceClass<Service$6, "@codeworksh/harness/session/runtime/Service", Interface$6>;
|
|
2231
2270
|
declare class Service$6 extends Service_base$5 {}
|
|
2232
2271
|
declare const layer$6: Layer.Layer<Service$6, never, never>;
|
|
2233
2272
|
import * as import__codeworksh_plugin_plugin_tool from "@codeworksh/plugin/plugin/tool";
|
|
2234
2273
|
import * as import__codeworksh_plugin_tool_progress from "@codeworksh/plugin/tool/progress";
|
|
2235
2274
|
import * as import__codeworksh_plugin_tool from "@codeworksh/plugin/tool";
|
|
2236
2275
|
declare namespace executor_d_exports {
|
|
2237
|
-
export { Executor, HandleOptions, ProgressEvent, ToolOutcome, make$
|
|
2276
|
+
export { Executor, HandleOptions, ProgressEvent, ToolOutcome, make$3 as make };
|
|
2238
2277
|
}
|
|
2239
2278
|
/**
|
|
2240
2279
|
* `ToolExecutor` — the uniform pipeline run for every tool call:
|
|
@@ -2298,7 +2337,7 @@ interface Executor {
|
|
|
2298
2337
|
* already discharged at registration (`Tool.provide`). The executor therefore needs no tool
|
|
2299
2338
|
* `R`; only a progress sink's `RProgress` (if any) surfaces from `handle`.
|
|
2300
2339
|
*/
|
|
2301
|
-
declare const make$
|
|
2340
|
+
declare const make$3: (tools: ReadonlyArray<tool_d_exports.RegisteredTool | schema_d_exports$3.ToolRegistration>) => Executor;
|
|
2302
2341
|
//#endregion
|
|
2303
2342
|
//#region src/tool/registry.d.ts
|
|
2304
2343
|
/**
|
|
@@ -2331,7 +2370,7 @@ interface Resolved$1 {
|
|
|
2331
2370
|
readonly handle: Executor["handle"];
|
|
2332
2371
|
}
|
|
2333
2372
|
declare namespace state_d_exports {
|
|
2334
|
-
export { Configuration, Interface$
|
|
2373
|
+
export { Configuration, Interface$5 as Interface, Options$2 as Options, Reloaded, RequestOptions, Service$5 as Service, Snapshot$1 as Snapshot, SnapshotError, state_d_exports as State, ToolExecutionMode, layer$5 as layer };
|
|
2335
2374
|
}
|
|
2336
2375
|
/**
|
|
2337
2376
|
* How a turn's tool calls are scheduled once the array has been re-read.
|
|
@@ -2428,7 +2467,7 @@ interface Reloaded {
|
|
|
2428
2467
|
/** Why the swap did not happen. The previous set is still the one in use. */
|
|
2429
2468
|
readonly failure?: string;
|
|
2430
2469
|
}
|
|
2431
|
-
interface Interface$
|
|
2470
|
+
interface Interface$5 {
|
|
2432
2471
|
/**
|
|
2433
2472
|
* Re-import every configured plugin, and swap the loaded set if it works.
|
|
2434
2473
|
*
|
|
@@ -2461,7 +2500,7 @@ interface Interface$4 {
|
|
|
2461
2500
|
*/
|
|
2462
2501
|
readonly snapshot: (sessionId: ID$1) => Effect.Effect<Snapshot$1, SnapshotError | SettingsError | ModelCatalogError | ModelNotFoundError | ProviderError, io_d_exports.SandboxIO.Provides | Service$10>;
|
|
2463
2502
|
}
|
|
2464
|
-
declare const Service_base$4: Context.ServiceClass<Service$5, "@codeworksh/harness/state/state/Service", Interface$
|
|
2503
|
+
declare const Service_base$4: Context.ServiceClass<Service$5, "@codeworksh/harness/state/state/Service", Interface$5>;
|
|
2465
2504
|
declare class Service$5 extends Service_base$4 {}
|
|
2466
2505
|
/**
|
|
2467
2506
|
* `pool` is the loaded module set, behind a `Ref` rather than a frozen array.
|
|
@@ -2510,7 +2549,7 @@ rebuild: (root: string | undefined, current: Pool) => Effect.Effect<Pool, {
|
|
|
2510
2549
|
/** The view a session in `hostDir` runs from: its project root, or the process view. */
|
|
2511
2550
|
viewOf?: (hostDir: string | undefined) => Effect.Effect<string | undefined>) => Layer.Layer<Service$5, never, Service$9 | Service$8 | Service$17 | Service$16 | Service$7 | Service$6>;
|
|
2512
2551
|
declare namespace run_d_exports {
|
|
2513
|
-
export { Interface$
|
|
2552
|
+
export { Interface$4 as Interface, LLMStreamError, ModelCatalogError, ModelNotFoundError, ProviderAuthenticationError, ProviderAuthorizationError, ProviderConfigurationError, ProviderContentPolicyError, ProviderError, ProviderFailureReason, ProviderInvalidRequestError, ProviderInvalidResponseError, ProviderModelUnavailableError, ProviderQuotaError, ProviderRateLimitError, ProviderTimeoutError, ProviderTransportError, ProviderUnavailableError, ProviderUnknownError, RunError, run_d_exports as Runner, SandboxDirectoryNotFoundError, Service$4 as Service };
|
|
2514
2553
|
}
|
|
2515
2554
|
declare const SandboxDirectoryNotFoundError_base: Schema.Class<SandboxDirectoryNotFoundError, Schema.TaggedStruct<"Runner.SandboxDirectoryNotFoundError", {
|
|
2516
2555
|
readonly sessionId: Schema.String;
|
|
@@ -2677,23 +2716,31 @@ declare class LLMStreamError extends LLMStreamError_base {
|
|
|
2677
2716
|
get message(): string;
|
|
2678
2717
|
}
|
|
2679
2718
|
type RunError = ModelCatalogError | ModelNotFoundError | ProviderError | LLMStreamError | ContextDecodeError | ContextEncodeError | SessionNotFoundError | SessionLinkedSpaceNotFoundError | SettingsError | SnapshotError | SandboxDirectoryNotFoundError | errors_d_exports.SandboxMountError | filesystem_d_exports.SandboxFileSystem.FileSystemError;
|
|
2680
|
-
interface Interface$
|
|
2719
|
+
interface Interface$4 {
|
|
2681
2720
|
/** Drains eligible durable work. Explicit runs perform one provider attempt even when no work is eligible. */
|
|
2682
2721
|
readonly run: (input: {
|
|
2683
2722
|
readonly sessionId: ID$1;
|
|
2684
2723
|
readonly force: boolean;
|
|
2724
|
+
/** Resuming a run a previous process left unfinished: its cut-off reply is answered first. */
|
|
2725
|
+
readonly recovered?: boolean;
|
|
2685
2726
|
}) => Effect.Effect<void, RunError, io_d_exports.SandboxIO.Provides | Service$10>;
|
|
2686
2727
|
}
|
|
2687
|
-
declare const Service_base$3: Context.ServiceClass<Service$4, "@codeworksh/harness/runner/run/Service", Interface$
|
|
2728
|
+
declare const Service_base$3: Context.ServiceClass<Service$4, "@codeworksh/harness/runner/run/Service", Interface$4>;
|
|
2688
2729
|
declare class Service$4 extends Service_base$3 {}
|
|
2689
2730
|
declare namespace execution_d_exports {
|
|
2690
|
-
export { Interface$
|
|
2731
|
+
export { Interface$3 as Interface, execution_d_exports as RunnerExecution, Service$3 as Service, noopLayer };
|
|
2691
2732
|
}
|
|
2692
|
-
interface Interface$
|
|
2733
|
+
interface Interface$3 {
|
|
2693
2734
|
/** Snapshots active execution owned by this process. */
|
|
2694
2735
|
readonly active: Effect.Effect<ReadonlySet<ID$1>>;
|
|
2695
2736
|
/** Starts execution while idle or joins the active execution. */
|
|
2696
2737
|
readonly resume: (sessionId: ID$1) => Effect.Effect<void, RunError>;
|
|
2738
|
+
/**
|
|
2739
|
+
* Resumes a run the last process left unfinished. Like `resume`, except that it marks nothing,
|
|
2740
|
+
* and runs nothing when the session is no longer marked as it begins: a stop that landed since
|
|
2741
|
+
* recovery chose the session stands.
|
|
2742
|
+
*/
|
|
2743
|
+
readonly recover: (sessionId: ID$1) => Effect.Effect<void, RunError>;
|
|
2697
2744
|
/** Registers newly recorded work. Repeated wakeups may coalesce. */
|
|
2698
2745
|
readonly wake: (sessionId: ID$1) => Effect.Effect<void>;
|
|
2699
2746
|
/**
|
|
@@ -2706,7 +2753,7 @@ interface Interface$2 {
|
|
|
2706
2753
|
/** Waits until this process owns no execution for the session. */
|
|
2707
2754
|
readonly awaitIdle: (sessionId: ID$1) => Effect.Effect<void>;
|
|
2708
2755
|
}
|
|
2709
|
-
declare const Service_base$2: Context.ServiceClass<Service$3, "@codeworksh/harness/runner/execution/Service", Interface$
|
|
2756
|
+
declare const Service_base$2: Context.ServiceClass<Service$3, "@codeworksh/harness/runner/execution/Service", Interface$3>;
|
|
2710
2757
|
declare class Service$3 extends Service_base$2 {}
|
|
2711
2758
|
declare const noopLayer: Layer.Layer<Service$3, never, never>;
|
|
2712
2759
|
declare namespace assemble_d_exports {
|
|
@@ -3386,15 +3433,18 @@ declare const decodeMessage: (hydrated: HydratedEntry) => Effect.Effect<{
|
|
|
3386
3433
|
messageId: string;
|
|
3387
3434
|
}, ContextDecodeError, never>;
|
|
3388
3435
|
declare namespace context_d_exports {
|
|
3389
|
-
export { context_d_exports as Context, assemble_d_exports as ContextAssembly, codec_d_exports as ContextCodec, ContextDecodeError, ContextEncodeError, ContextInvariantError, ContextReadError, EncodedMessage, Interface$
|
|
3436
|
+
export { context_d_exports as Context, assemble_d_exports as ContextAssembly, codec_d_exports as ContextCodec, ContextDecodeError, ContextEncodeError, ContextInvariantError, ContextReadError, EncodedMessage, Interface$2 as Interface, Service$2 as Service, Snapshot, assemblePath, decodeMessage, decodeSyntheticMessage, encodeMessage, encodePart, layer$4 as layer, validateUserMessage };
|
|
3390
3437
|
}
|
|
3391
3438
|
type ContextReadError = SessionNotFoundError | ContextDecodeError;
|
|
3392
|
-
interface Interface$
|
|
3439
|
+
interface Interface$2 {
|
|
3393
3440
|
readonly assemble: (sessionId: ID$1) => Effect.Effect<Snapshot, ContextReadError>;
|
|
3394
3441
|
}
|
|
3395
|
-
declare const Service_base$1: Context.ServiceClass<Service$2, "@codeworksh/harness/context/context/Service", Interface$
|
|
3442
|
+
declare const Service_base$1: Context.ServiceClass<Service$2, "@codeworksh/harness/context/context/Service", Interface$2>;
|
|
3396
3443
|
declare class Service$2 extends Service_base$1 {}
|
|
3397
3444
|
declare const layer$4: Layer.Layer<Service$2, never, Service$16>;
|
|
3445
|
+
declare namespace schema_d_exports$2 {
|
|
3446
|
+
export { ID, schema_d_exports$2 as SessionMessageSchema };
|
|
3447
|
+
}
|
|
3398
3448
|
//#endregion
|
|
3399
3449
|
//#region src/session/input/schema.d.ts
|
|
3400
3450
|
declare const Admitted: Schema.Struct<{
|
|
@@ -3442,13 +3492,128 @@ declare const Admitted: Schema.Struct<{
|
|
|
3442
3492
|
readonly delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
3443
3493
|
readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
3444
3494
|
readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
3495
|
+
readonly cancelledSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
3445
3496
|
}>;
|
|
3446
3497
|
interface Admitted extends Schema.Schema.Type<typeof Admitted> {}
|
|
3447
|
-
declare namespace
|
|
3448
|
-
export {
|
|
3498
|
+
declare namespace input_d_exports {
|
|
3499
|
+
export { AdmitInput, Interface$1 as Interface, LifecycleConflict, ProjectAdmittedInput, ProjectCancelledInput, ProjectPromptedInput, ProjectUpdatedInput, input_d_exports as SessionInput, UpdatePatch, equivalent, make$2 as make };
|
|
3500
|
+
}
|
|
3501
|
+
declare const LifecycleConflict_base: Schema.Class<LifecycleConflict, Schema.TaggedStruct<"SessionInput.LifecycleConflict", {
|
|
3502
|
+
readonly id: Schema.brand<Schema.String, "Message.ID"> & {
|
|
3503
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
3504
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
3505
|
+
};
|
|
3506
|
+
}>, import("effect/Cause").YieldableError>;
|
|
3507
|
+
/**
|
|
3508
|
+
* Raised when a durable input is already past the lifecycle point being
|
|
3509
|
+
* projected -- a second admission of the same id, or a second promotion.
|
|
3510
|
+
*
|
|
3511
|
+
* It is a defect, not an error: projectors run inside the event commit, so
|
|
3512
|
+
* raising it rolls the event back and leaves the store untouched. `admit` and
|
|
3513
|
+
* `promote*` then recover by reading the row that won.
|
|
3514
|
+
*/
|
|
3515
|
+
declare class LifecycleConflict extends LifecycleConflict_base {}
|
|
3516
|
+
/**
|
|
3517
|
+
* Whether a stored input carries the prompt the caller believes it admitted.
|
|
3518
|
+
* A retry that reuses an id with different content is a conflict, not an
|
|
3519
|
+
* idempotent replay.
|
|
3520
|
+
*/
|
|
3521
|
+
declare const equivalent: (input: Admitted, expected: {
|
|
3522
|
+
readonly sessionId: ID$1;
|
|
3523
|
+
readonly prompt: Prompt;
|
|
3524
|
+
readonly delivery: Delivery;
|
|
3525
|
+
}) => boolean;
|
|
3526
|
+
interface AdmitInput {
|
|
3527
|
+
readonly id: ID;
|
|
3528
|
+
readonly sessionId: ID$1;
|
|
3529
|
+
readonly prompt: Prompt;
|
|
3530
|
+
readonly delivery: Delivery;
|
|
3531
|
+
}
|
|
3532
|
+
interface ProjectAdmittedInput extends AdmitInput {
|
|
3533
|
+
readonly admittedSeq: number;
|
|
3534
|
+
readonly timeCreated: DateTime.Utc;
|
|
3535
|
+
}
|
|
3536
|
+
interface ProjectCancelledInput {
|
|
3537
|
+
readonly id: ID;
|
|
3538
|
+
readonly sessionId: ID$1;
|
|
3539
|
+
readonly cancelledSeq: number;
|
|
3540
|
+
}
|
|
3541
|
+
interface ProjectUpdatedInput {
|
|
3542
|
+
readonly id: ID;
|
|
3543
|
+
readonly sessionId: ID$1;
|
|
3544
|
+
readonly prompt?: Prompt | undefined;
|
|
3545
|
+
readonly delivery?: Delivery | undefined;
|
|
3546
|
+
}
|
|
3547
|
+
/** What `update` changes; an absent field stays as it is. */
|
|
3548
|
+
interface UpdatePatch {
|
|
3549
|
+
readonly prompt?: Prompt;
|
|
3550
|
+
readonly delivery?: Delivery;
|
|
3449
3551
|
}
|
|
3552
|
+
interface ProjectPromptedInput extends AdmitInput {
|
|
3553
|
+
readonly promotedSeq: number;
|
|
3554
|
+
readonly timeCreated: DateTime.Utc;
|
|
3555
|
+
}
|
|
3556
|
+
interface Interface$1 {
|
|
3557
|
+
readonly find: (id: ID) => Effect.Effect<Option.Option<Admitted>>;
|
|
3558
|
+
/** Records a prompt durably. Re-admitting the same id returns the stored row. */
|
|
3559
|
+
readonly admit: (input: AdmitInput) => Effect.Effect<Admitted>;
|
|
3560
|
+
/** Projector for `PromptAdmitted`. Runs inside the event commit. */
|
|
3561
|
+
readonly projectAdmitted: (input: ProjectAdmittedInput) => Effect.Effect<void>;
|
|
3562
|
+
/** Projector for `Prompted`. Runs inside the event commit. */
|
|
3563
|
+
readonly projectPrompted: (input: ProjectPromptedInput) => Effect.Effect<void>;
|
|
3564
|
+
/** Projector for `PromptCancelled`. Runs inside the event commit. */
|
|
3565
|
+
readonly projectCancelled: (input: ProjectCancelledInput) => Effect.Effect<void>;
|
|
3566
|
+
/** Projector for `PromptUpdated`. Runs inside the event commit. */
|
|
3567
|
+
readonly projectUpdated: (input: ProjectUpdatedInput) => Effect.Effect<void>;
|
|
3568
|
+
/**
|
|
3569
|
+
* Moves a pending input to the other lane, or rewrites it, keeping its place in admission
|
|
3570
|
+
* order. The stored input after the change, or none when it was promoted, cancelled, or unknown.
|
|
3571
|
+
*/
|
|
3572
|
+
readonly update: (sessionId: ID$1, id: ID, patch: UpdatePatch) => Effect.Effect<Option.Option<Admitted>>;
|
|
3573
|
+
/**
|
|
3574
|
+
* Withdraws a pending input of the session. False when there is none by that id, or it was
|
|
3575
|
+
* promoted or cancelled first: a cancel that loses to promotion leaves the prompt in the
|
|
3576
|
+
* conversation.
|
|
3577
|
+
*/
|
|
3578
|
+
readonly cancel: (sessionId: ID$1, id: ID) => Effect.Effect<boolean>;
|
|
3579
|
+
/** Inputs not promoted yet, both lanes, in admission order. */
|
|
3580
|
+
readonly pending: (sessionId: ID$1) => Effect.Effect<ReadonlyArray<Admitted>>;
|
|
3581
|
+
/** Whether the lane holds an input that has not been promoted yet. */
|
|
3582
|
+
readonly hasPending: (sessionId: ID$1, delivery: Delivery) => Effect.Effect<boolean>;
|
|
3583
|
+
/**
|
|
3584
|
+
* Promotes every pending steer admitted at or before `cutoff`, in admission
|
|
3585
|
+
* order. The cutoff keeps a steer that lands mid-promotion out of a request
|
|
3586
|
+
* that is already being assembled.
|
|
3587
|
+
*
|
|
3588
|
+
* Counts promotions *this* caller won. A row another drainer promoted first
|
|
3589
|
+
* is not counted: callers treat a positive count as new work to answer, and
|
|
3590
|
+
* counting a promotion someone else committed would have two workers answer
|
|
3591
|
+
* one prompt.
|
|
3592
|
+
*/
|
|
3593
|
+
readonly promoteSteers: (sessionId: ID$1, cutoff: number) => Effect.Effect<number>;
|
|
3594
|
+
/**
|
|
3595
|
+
* Promotes the single oldest pending follow-up, if any. One per run, unlike
|
|
3596
|
+
* steers, which is what makes the follow-up lane strictly turn-at-a-time.
|
|
3597
|
+
* False when there was none, or when another caller promoted it first.
|
|
3598
|
+
*/
|
|
3599
|
+
readonly promoteFollowUp: (sessionId: ID$1) => Effect.Effect<boolean>;
|
|
3600
|
+
}
|
|
3601
|
+
declare const make$2: Effect.Effect<{
|
|
3602
|
+
find: (id: string & import("effect/Brand").Brand<"Message.ID">) => Effect.Effect<Option.Option<Admitted>, never, never>;
|
|
3603
|
+
admit: (input: AdmitInput) => Effect.Effect<Admitted, never, never>;
|
|
3604
|
+
projectAdmitted: (input: ProjectAdmittedInput) => Effect.Effect<undefined, never, never>;
|
|
3605
|
+
projectPrompted: (input: ProjectPromptedInput) => Effect.Effect<undefined, never, never>;
|
|
3606
|
+
projectCancelled: (input: ProjectCancelledInput) => Effect.Effect<undefined, never, never>;
|
|
3607
|
+
projectUpdated: (input: ProjectUpdatedInput) => Effect.Effect<undefined, never, never>;
|
|
3608
|
+
update: (sessionId: string & import("effect/Brand").Brand<"Session.ID">, id: string & import("effect/Brand").Brand<"Message.ID">, patch: UpdatePatch) => Effect.Effect<Option.Option<Admitted>, never, never>;
|
|
3609
|
+
cancel: (sessionId: string & import("effect/Brand").Brand<"Session.ID">, id: string & import("effect/Brand").Brand<"Message.ID">) => Effect.Effect<boolean, never, never>;
|
|
3610
|
+
pending: (sessionId: string & import("effect/Brand").Brand<"Session.ID">) => Effect.Effect<Admitted[], never, never>;
|
|
3611
|
+
hasPending: (sessionId: string & import("effect/Brand").Brand<"Session.ID">, delivery: "followUp" | "steer") => Effect.Effect<boolean, never, never>;
|
|
3612
|
+
promoteSteers: (sessionId: string & import("effect/Brand").Brand<"Session.ID">, cutoff: number) => Effect.Effect<number, never, never>;
|
|
3613
|
+
promoteFollowUp: (sessionId: string & import("effect/Brand").Brand<"Session.ID">) => Effect.Effect<boolean, never, never>;
|
|
3614
|
+
}, never, Service$17 | SqlClient.SqlClient>;
|
|
3450
3615
|
declare namespace control_d_exports {
|
|
3451
|
-
export { control_d_exports as Control, Interface, PromptConflictError, PromptInput$1 as PromptInput, Service$1 as Service, layer$3 as layer };
|
|
3616
|
+
export { control_d_exports as Control, Interface, PromptConflictError, PromptInput$1 as PromptInput, RESTART_LIMIT, Service$1 as Service, layer$3 as layer };
|
|
3452
3617
|
}
|
|
3453
3618
|
declare const PromptConflictError_base: Schema.Class<PromptConflictError, Schema.TaggedStruct<"PromptConflictError", {
|
|
3454
3619
|
readonly sessionId: Schema.String;
|
|
@@ -3468,6 +3633,11 @@ interface PromptInput$1 {
|
|
|
3468
3633
|
/** Defaults to "steer": join the running turn rather than waiting for the next. */
|
|
3469
3634
|
readonly delivery?: Delivery;
|
|
3470
3635
|
}
|
|
3636
|
+
/**
|
|
3637
|
+
* Times a run may be cut off by a dying process before the session is parked instead of resumed.
|
|
3638
|
+
* A committed turn starts the count over.
|
|
3639
|
+
*/
|
|
3640
|
+
declare const RESTART_LIMIT = 5;
|
|
3471
3641
|
interface Interface {
|
|
3472
3642
|
/**
|
|
3473
3643
|
* Records a prompt in the session's durable inbox, then wakes its drain.
|
|
@@ -3497,6 +3667,22 @@ interface Interface {
|
|
|
3497
3667
|
}) => Effect.Effect<boolean>;
|
|
3498
3668
|
/** Sessions this process is currently draining. */
|
|
3499
3669
|
readonly active: Effect.Effect<ReadonlySet<ID$1>>;
|
|
3670
|
+
/**
|
|
3671
|
+
* Resumes the runs the last process left unfinished, as the server starts. One a crash cut off
|
|
3672
|
+
* counts a restart, one a shutdown closed does not; at {@link RESTART_LIMIT} the session is parked
|
|
3673
|
+
* and waits for its next prompt. Resolves once every resumed run has settled.
|
|
3674
|
+
*/
|
|
3675
|
+
readonly resumeUnfinished: Effect.Effect<void>;
|
|
3676
|
+
/** Prompts admitted but not yet in the conversation, steers and follow-ups, in admission order. */
|
|
3677
|
+
readonly pending: (sessionId: ID$1) => Effect.Effect<ReadonlyArray<Admitted>>;
|
|
3678
|
+
/**
|
|
3679
|
+
* Moves a pending prompt to the other lane or rewrites it, keeping its place; false when it was
|
|
3680
|
+
* already promoted, cancelled, or is unknown. Asking for the steer lane also wakes the session, so
|
|
3681
|
+
* a prompt left waiting by a stop or a failure runs now.
|
|
3682
|
+
*/
|
|
3683
|
+
readonly update: (sessionId: ID$1, id: ID, patch: UpdatePatch) => Effect.Effect<boolean>;
|
|
3684
|
+
/** Withdraws a pending prompt; false when it was already promoted, cancelled, or is unknown. */
|
|
3685
|
+
readonly cancel: (sessionId: ID$1, id: ID) => Effect.Effect<boolean>;
|
|
3500
3686
|
}
|
|
3501
3687
|
declare const Service_base: Context.ServiceClass<Service$1, "@codeworksh/harness/control/Service", Interface>;
|
|
3502
3688
|
declare class Service$1 extends Service_base {}
|
|
@@ -4068,6 +4254,11 @@ interface Info$1 {
|
|
|
4068
4254
|
};
|
|
4069
4255
|
/** The thinking level chosen for this session over settings; absent when settings decide. */
|
|
4070
4256
|
readonly thinkingLevel?: Model.ThinkingLevel;
|
|
4257
|
+
/**
|
|
4258
|
+
* Its unfinished run was cut off {@link Control.RESTART_LIMIT} times, so the server no longer
|
|
4259
|
+
* resumes it; the next prompt runs it again.
|
|
4260
|
+
*/
|
|
4261
|
+
readonly parked: boolean;
|
|
4071
4262
|
}
|
|
4072
4263
|
interface Handle {
|
|
4073
4264
|
readonly id: ID$1;
|
|
@@ -4103,6 +4294,7 @@ declare const create$1: (input?: CreateInput | undefined) => Effect.Effect<{
|
|
|
4103
4294
|
readonly id: string;
|
|
4104
4295
|
};
|
|
4105
4296
|
thinkingLevel?: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh";
|
|
4297
|
+
parked: boolean;
|
|
4106
4298
|
}, SessionNotFoundError, never>;
|
|
4107
4299
|
prompt: (input: PromptInput) => Effect.Effect<Admitted, InvalidPromptError | PromptConflictError | SessionNotFoundError, never>;
|
|
4108
4300
|
run: (input: PromptInput) => Effect.Effect<Admitted, InvalidPromptError | PromptConflictError | SessionNotFoundError, never>;
|
|
@@ -4141,6 +4333,7 @@ declare const link: (input: {
|
|
|
4141
4333
|
readonly id: string;
|
|
4142
4334
|
};
|
|
4143
4335
|
thinkingLevel?: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh";
|
|
4336
|
+
parked: boolean;
|
|
4144
4337
|
}, SessionNotFoundError, never>;
|
|
4145
4338
|
prompt: (input: PromptInput) => Effect.Effect<Admitted, InvalidPromptError | PromptConflictError | SessionNotFoundError, never>;
|
|
4146
4339
|
run: (input: PromptInput) => Effect.Effect<Admitted, InvalidPromptError | PromptConflictError | SessionNotFoundError, never>;
|
|
@@ -4177,6 +4370,7 @@ declare const relink: (input: RelinkInput) => Effect.Effect<{
|
|
|
4177
4370
|
readonly id: string;
|
|
4178
4371
|
};
|
|
4179
4372
|
thinkingLevel?: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh";
|
|
4373
|
+
parked: boolean;
|
|
4180
4374
|
}, SessionNotFoundError, never>;
|
|
4181
4375
|
prompt: (input: PromptInput) => Effect.Effect<Admitted, InvalidPromptError | PromptConflictError | SessionNotFoundError, never>;
|
|
4182
4376
|
run: (input: PromptInput) => Effect.Effect<Admitted, InvalidPromptError | PromptConflictError | SessionNotFoundError, never>;
|
|
@@ -4195,7 +4389,7 @@ declare const attach: (input: AttachInput) => Effect.Effect<Handle, SessionNotFo
|
|
|
4195
4389
|
*/
|
|
4196
4390
|
declare const configuration: (sessionId: string & import("effect/Brand").Brand<"Session.ID">) => Effect.Effect<Configuration, ModelCatalogError | ModelNotFoundError | ProviderError | SessionNotFoundError | SettingsError, Service$16 | Service$5>;
|
|
4197
4391
|
declare namespace list_d_exports {
|
|
4198
|
-
export { ConfigChanged, Definitions, DurableDefinitions, list_d_exports as EventList, ExecutionFailed, ExecutionInterrupted, ExecutionStarted, ExecutionSucceeded, LLMEnded, LLMFailed, LLMStarted, LLMTextDelta, LLMTextEnd, LLMTextStart, LLMThinkingDelta, LLMThinkingEnd, LLMThinkingStart, PluginUpdated, PromptAdmitted, Prompted, PublicDefinitions, RetryFinished, RetryScheduled, SessionForked, ToolProgress, ToolSettled, ToolStarted, TurnAbortCause, TurnAborted, TurnEnded, TurnStarted };
|
|
4392
|
+
export { ConfigChanged, Definitions, DurableDefinitions, list_d_exports as EventList, ExecutionFailed, ExecutionInterrupted, ExecutionStarted, ExecutionSucceeded, LLMEnded, LLMFailed, LLMStarted, LLMTextDelta, LLMTextEnd, LLMTextStart, LLMThinkingDelta, LLMThinkingEnd, LLMThinkingStart, PluginUpdated, PromptAdmitted, PromptCancelled, PromptUpdated, Prompted, PublicDefinitions, RetryFinished, RetryScheduled, SessionForked, ToolProgress, ToolSettled, ToolStarted, TurnAbortCause, TurnAborted, TurnEnded, TurnStarted };
|
|
4199
4393
|
}
|
|
4200
4394
|
declare const PromptAdmitted: Schema.Struct<{
|
|
4201
4395
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
@@ -4419,6 +4613,229 @@ declare const Prompted: Schema.Struct<{
|
|
|
4419
4613
|
}>;
|
|
4420
4614
|
};
|
|
4421
4615
|
type Prompted = typeof Prompted.Type;
|
|
4616
|
+
/** A pending prompt withdrawn before promotion; it never enters the conversation. */
|
|
4617
|
+
declare const PromptCancelled: Schema.Struct<{
|
|
4618
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
4619
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
4620
|
+
};
|
|
4621
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
4622
|
+
readonly type: Schema.Literal<"session.prompt.cancelled">;
|
|
4623
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
4624
|
+
readonly aggregateId: Schema.String;
|
|
4625
|
+
readonly seq: Schema.Int;
|
|
4626
|
+
readonly version: Schema.Int;
|
|
4627
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
4628
|
+
readonly aggregateId: Schema.String;
|
|
4629
|
+
readonly seq: Schema.Int;
|
|
4630
|
+
readonly version: Schema.Int;
|
|
4631
|
+
}>>, never, never>;
|
|
4632
|
+
readonly data: Schema.Struct<{
|
|
4633
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
4634
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
4635
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
4636
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
4637
|
+
};
|
|
4638
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
4639
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
4640
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
4641
|
+
};
|
|
4642
|
+
}>;
|
|
4643
|
+
}> & {
|
|
4644
|
+
type: "session.prompt.cancelled";
|
|
4645
|
+
durable?: {
|
|
4646
|
+
readonly version: number;
|
|
4647
|
+
readonly aggregate: string;
|
|
4648
|
+
};
|
|
4649
|
+
data: Schema.Struct<{
|
|
4650
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
4651
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
4652
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
4653
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
4654
|
+
};
|
|
4655
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
4656
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
4657
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
4658
|
+
};
|
|
4659
|
+
}>;
|
|
4660
|
+
};
|
|
4661
|
+
type PromptCancelled = typeof PromptCancelled.Type;
|
|
4662
|
+
/**
|
|
4663
|
+
* A pending prompt moved to the other lane or rewritten before promotion; it keeps its place. Only
|
|
4664
|
+
* what changed is carried, so two updates of different fields both stand.
|
|
4665
|
+
*/
|
|
4666
|
+
declare const PromptUpdated: Schema.Struct<{
|
|
4667
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
4668
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
4669
|
+
};
|
|
4670
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
4671
|
+
readonly type: Schema.Literal<"session.prompt.updated">;
|
|
4672
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
4673
|
+
readonly aggregateId: Schema.String;
|
|
4674
|
+
readonly seq: Schema.Int;
|
|
4675
|
+
readonly version: Schema.Int;
|
|
4676
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
4677
|
+
readonly aggregateId: Schema.String;
|
|
4678
|
+
readonly seq: Schema.Int;
|
|
4679
|
+
readonly version: Schema.Int;
|
|
4680
|
+
}>>, never, never>;
|
|
4681
|
+
readonly data: Schema.Struct<{
|
|
4682
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
4683
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
4684
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
4685
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
4686
|
+
};
|
|
4687
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
4688
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
4689
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
4690
|
+
};
|
|
4691
|
+
readonly prompt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
4692
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
4693
|
+
readonly type: Schema.Literal<"text">;
|
|
4694
|
+
readonly text: Schema.String;
|
|
4695
|
+
}>, Schema.Struct<{
|
|
4696
|
+
readonly type: Schema.Literal<"image">;
|
|
4697
|
+
readonly data: Schema.String;
|
|
4698
|
+
readonly mimeType: Schema.String;
|
|
4699
|
+
}>]>>;
|
|
4700
|
+
}> & {
|
|
4701
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
4702
|
+
readonly parts: readonly ({
|
|
4703
|
+
readonly type: "text";
|
|
4704
|
+
readonly text: string;
|
|
4705
|
+
} | {
|
|
4706
|
+
readonly type: "image";
|
|
4707
|
+
readonly data: string;
|
|
4708
|
+
readonly mimeType: string;
|
|
4709
|
+
})[];
|
|
4710
|
+
}>;
|
|
4711
|
+
fromText: (text: string) => {
|
|
4712
|
+
readonly parts: readonly ({
|
|
4713
|
+
readonly type: "text";
|
|
4714
|
+
readonly text: string;
|
|
4715
|
+
} | {
|
|
4716
|
+
readonly type: "image";
|
|
4717
|
+
readonly data: string;
|
|
4718
|
+
readonly mimeType: string;
|
|
4719
|
+
})[];
|
|
4720
|
+
};
|
|
4721
|
+
text: (prompt: Prompt) => string;
|
|
4722
|
+
}>>, Schema.optionalKey<Schema.Struct<{
|
|
4723
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
4724
|
+
readonly type: Schema.Literal<"text">;
|
|
4725
|
+
readonly text: Schema.String;
|
|
4726
|
+
}>, Schema.Struct<{
|
|
4727
|
+
readonly type: Schema.Literal<"image">;
|
|
4728
|
+
readonly data: Schema.String;
|
|
4729
|
+
readonly mimeType: Schema.String;
|
|
4730
|
+
}>]>>;
|
|
4731
|
+
}> & {
|
|
4732
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
4733
|
+
readonly parts: readonly ({
|
|
4734
|
+
readonly type: "text";
|
|
4735
|
+
readonly text: string;
|
|
4736
|
+
} | {
|
|
4737
|
+
readonly type: "image";
|
|
4738
|
+
readonly data: string;
|
|
4739
|
+
readonly mimeType: string;
|
|
4740
|
+
})[];
|
|
4741
|
+
}>;
|
|
4742
|
+
fromText: (text: string) => {
|
|
4743
|
+
readonly parts: readonly ({
|
|
4744
|
+
readonly type: "text";
|
|
4745
|
+
readonly text: string;
|
|
4746
|
+
} | {
|
|
4747
|
+
readonly type: "image";
|
|
4748
|
+
readonly data: string;
|
|
4749
|
+
readonly mimeType: string;
|
|
4750
|
+
})[];
|
|
4751
|
+
};
|
|
4752
|
+
text: (prompt: Prompt) => string;
|
|
4753
|
+
}>, never, never>;
|
|
4754
|
+
readonly delivery: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["steer", "followUp"]>>>, Schema.optionalKey<Schema.Literals<readonly ["steer", "followUp"]>>, never, never>;
|
|
4755
|
+
}>;
|
|
4756
|
+
}> & {
|
|
4757
|
+
type: "session.prompt.updated";
|
|
4758
|
+
durable?: {
|
|
4759
|
+
readonly version: number;
|
|
4760
|
+
readonly aggregate: string;
|
|
4761
|
+
};
|
|
4762
|
+
data: Schema.Struct<{
|
|
4763
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
4764
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
4765
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
4766
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
4767
|
+
};
|
|
4768
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
4769
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
4770
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
4771
|
+
};
|
|
4772
|
+
readonly prompt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
4773
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
4774
|
+
readonly type: Schema.Literal<"text">;
|
|
4775
|
+
readonly text: Schema.String;
|
|
4776
|
+
}>, Schema.Struct<{
|
|
4777
|
+
readonly type: Schema.Literal<"image">;
|
|
4778
|
+
readonly data: Schema.String;
|
|
4779
|
+
readonly mimeType: Schema.String;
|
|
4780
|
+
}>]>>;
|
|
4781
|
+
}> & {
|
|
4782
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
4783
|
+
readonly parts: readonly ({
|
|
4784
|
+
readonly type: "text";
|
|
4785
|
+
readonly text: string;
|
|
4786
|
+
} | {
|
|
4787
|
+
readonly type: "image";
|
|
4788
|
+
readonly data: string;
|
|
4789
|
+
readonly mimeType: string;
|
|
4790
|
+
})[];
|
|
4791
|
+
}>;
|
|
4792
|
+
fromText: (text: string) => {
|
|
4793
|
+
readonly parts: readonly ({
|
|
4794
|
+
readonly type: "text";
|
|
4795
|
+
readonly text: string;
|
|
4796
|
+
} | {
|
|
4797
|
+
readonly type: "image";
|
|
4798
|
+
readonly data: string;
|
|
4799
|
+
readonly mimeType: string;
|
|
4800
|
+
})[];
|
|
4801
|
+
};
|
|
4802
|
+
text: (prompt: Prompt) => string;
|
|
4803
|
+
}>>, Schema.optionalKey<Schema.Struct<{
|
|
4804
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
4805
|
+
readonly type: Schema.Literal<"text">;
|
|
4806
|
+
readonly text: Schema.String;
|
|
4807
|
+
}>, Schema.Struct<{
|
|
4808
|
+
readonly type: Schema.Literal<"image">;
|
|
4809
|
+
readonly data: Schema.String;
|
|
4810
|
+
readonly mimeType: Schema.String;
|
|
4811
|
+
}>]>>;
|
|
4812
|
+
}> & {
|
|
4813
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
4814
|
+
readonly parts: readonly ({
|
|
4815
|
+
readonly type: "text";
|
|
4816
|
+
readonly text: string;
|
|
4817
|
+
} | {
|
|
4818
|
+
readonly type: "image";
|
|
4819
|
+
readonly data: string;
|
|
4820
|
+
readonly mimeType: string;
|
|
4821
|
+
})[];
|
|
4822
|
+
}>;
|
|
4823
|
+
fromText: (text: string) => {
|
|
4824
|
+
readonly parts: readonly ({
|
|
4825
|
+
readonly type: "text";
|
|
4826
|
+
readonly text: string;
|
|
4827
|
+
} | {
|
|
4828
|
+
readonly type: "image";
|
|
4829
|
+
readonly data: string;
|
|
4830
|
+
readonly mimeType: string;
|
|
4831
|
+
})[];
|
|
4832
|
+
};
|
|
4833
|
+
text: (prompt: Prompt) => string;
|
|
4834
|
+
}>, never, never>;
|
|
4835
|
+
readonly delivery: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["steer", "followUp"]>>>, Schema.optionalKey<Schema.Literals<readonly ["steer", "followUp"]>>, never, never>;
|
|
4836
|
+
}>;
|
|
4837
|
+
};
|
|
4838
|
+
type PromptUpdated = typeof PromptUpdated.Type;
|
|
4422
4839
|
declare const ConfigChanged: Schema.Struct<{
|
|
4423
4840
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
4424
4841
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -9777,14 +10194,275 @@ declare const Definitions: readonly [Schema.Struct<{
|
|
|
9777
10194
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
9778
10195
|
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
9779
10196
|
};
|
|
9780
|
-
readonly reason: Schema.Literals<readonly ["user", "shutdown"]>;
|
|
10197
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown"]>;
|
|
10198
|
+
}>;
|
|
10199
|
+
}, Schema.Struct<{
|
|
10200
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
10201
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
10202
|
+
};
|
|
10203
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
10204
|
+
readonly type: Schema.Literal<"session.prompt.admitted">;
|
|
10205
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
10206
|
+
readonly aggregateId: Schema.String;
|
|
10207
|
+
readonly seq: Schema.Int;
|
|
10208
|
+
readonly version: Schema.Int;
|
|
10209
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
10210
|
+
readonly aggregateId: Schema.String;
|
|
10211
|
+
readonly seq: Schema.Int;
|
|
10212
|
+
readonly version: Schema.Int;
|
|
10213
|
+
}>>, never, never>;
|
|
10214
|
+
readonly data: Schema.Struct<{
|
|
10215
|
+
timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10216
|
+
sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
10217
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10218
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10219
|
+
};
|
|
10220
|
+
messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
10221
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10222
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10223
|
+
};
|
|
10224
|
+
prompt: Schema.Struct<{
|
|
10225
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
10226
|
+
readonly type: Schema.Literal<"text">;
|
|
10227
|
+
readonly text: Schema.String;
|
|
10228
|
+
}>, Schema.Struct<{
|
|
10229
|
+
readonly type: Schema.Literal<"image">;
|
|
10230
|
+
readonly data: Schema.String;
|
|
10231
|
+
readonly mimeType: Schema.String;
|
|
10232
|
+
}>]>>;
|
|
10233
|
+
}> & {
|
|
10234
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
10235
|
+
readonly parts: readonly ({
|
|
10236
|
+
readonly type: "text";
|
|
10237
|
+
readonly text: string;
|
|
10238
|
+
} | {
|
|
10239
|
+
readonly type: "image";
|
|
10240
|
+
readonly data: string;
|
|
10241
|
+
readonly mimeType: string;
|
|
10242
|
+
})[];
|
|
10243
|
+
}>;
|
|
10244
|
+
fromText: (text: string) => {
|
|
10245
|
+
readonly parts: readonly ({
|
|
10246
|
+
readonly type: "text";
|
|
10247
|
+
readonly text: string;
|
|
10248
|
+
} | {
|
|
10249
|
+
readonly type: "image";
|
|
10250
|
+
readonly data: string;
|
|
10251
|
+
readonly mimeType: string;
|
|
10252
|
+
})[];
|
|
10253
|
+
};
|
|
10254
|
+
text: (prompt: Prompt) => string;
|
|
10255
|
+
};
|
|
10256
|
+
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
10257
|
+
}>;
|
|
10258
|
+
}> & {
|
|
10259
|
+
type: "session.prompt.admitted";
|
|
10260
|
+
durable?: {
|
|
10261
|
+
readonly version: number;
|
|
10262
|
+
readonly aggregate: string;
|
|
10263
|
+
};
|
|
10264
|
+
data: Schema.Struct<{
|
|
10265
|
+
timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10266
|
+
sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
10267
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10268
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10269
|
+
};
|
|
10270
|
+
messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
10271
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10272
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10273
|
+
};
|
|
10274
|
+
prompt: Schema.Struct<{
|
|
10275
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
10276
|
+
readonly type: Schema.Literal<"text">;
|
|
10277
|
+
readonly text: Schema.String;
|
|
10278
|
+
}>, Schema.Struct<{
|
|
10279
|
+
readonly type: Schema.Literal<"image">;
|
|
10280
|
+
readonly data: Schema.String;
|
|
10281
|
+
readonly mimeType: Schema.String;
|
|
10282
|
+
}>]>>;
|
|
10283
|
+
}> & {
|
|
10284
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
10285
|
+
readonly parts: readonly ({
|
|
10286
|
+
readonly type: "text";
|
|
10287
|
+
readonly text: string;
|
|
10288
|
+
} | {
|
|
10289
|
+
readonly type: "image";
|
|
10290
|
+
readonly data: string;
|
|
10291
|
+
readonly mimeType: string;
|
|
10292
|
+
})[];
|
|
10293
|
+
}>;
|
|
10294
|
+
fromText: (text: string) => {
|
|
10295
|
+
readonly parts: readonly ({
|
|
10296
|
+
readonly type: "text";
|
|
10297
|
+
readonly text: string;
|
|
10298
|
+
} | {
|
|
10299
|
+
readonly type: "image";
|
|
10300
|
+
readonly data: string;
|
|
10301
|
+
readonly mimeType: string;
|
|
10302
|
+
})[];
|
|
10303
|
+
};
|
|
10304
|
+
text: (prompt: Prompt) => string;
|
|
10305
|
+
};
|
|
10306
|
+
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
10307
|
+
}>;
|
|
10308
|
+
}, Schema.Struct<{
|
|
10309
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
10310
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
10311
|
+
};
|
|
10312
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
10313
|
+
readonly type: Schema.Literal<"session.prompt.promoted">;
|
|
10314
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
10315
|
+
readonly aggregateId: Schema.String;
|
|
10316
|
+
readonly seq: Schema.Int;
|
|
10317
|
+
readonly version: Schema.Int;
|
|
10318
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
10319
|
+
readonly aggregateId: Schema.String;
|
|
10320
|
+
readonly seq: Schema.Int;
|
|
10321
|
+
readonly version: Schema.Int;
|
|
10322
|
+
}>>, never, never>;
|
|
10323
|
+
readonly data: Schema.Struct<{
|
|
10324
|
+
timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10325
|
+
sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
10326
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10327
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10328
|
+
};
|
|
10329
|
+
messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
10330
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10331
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10332
|
+
};
|
|
10333
|
+
prompt: Schema.Struct<{
|
|
10334
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
10335
|
+
readonly type: Schema.Literal<"text">;
|
|
10336
|
+
readonly text: Schema.String;
|
|
10337
|
+
}>, Schema.Struct<{
|
|
10338
|
+
readonly type: Schema.Literal<"image">;
|
|
10339
|
+
readonly data: Schema.String;
|
|
10340
|
+
readonly mimeType: Schema.String;
|
|
10341
|
+
}>]>>;
|
|
10342
|
+
}> & {
|
|
10343
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
10344
|
+
readonly parts: readonly ({
|
|
10345
|
+
readonly type: "text";
|
|
10346
|
+
readonly text: string;
|
|
10347
|
+
} | {
|
|
10348
|
+
readonly type: "image";
|
|
10349
|
+
readonly data: string;
|
|
10350
|
+
readonly mimeType: string;
|
|
10351
|
+
})[];
|
|
10352
|
+
}>;
|
|
10353
|
+
fromText: (text: string) => {
|
|
10354
|
+
readonly parts: readonly ({
|
|
10355
|
+
readonly type: "text";
|
|
10356
|
+
readonly text: string;
|
|
10357
|
+
} | {
|
|
10358
|
+
readonly type: "image";
|
|
10359
|
+
readonly data: string;
|
|
10360
|
+
readonly mimeType: string;
|
|
10361
|
+
})[];
|
|
10362
|
+
};
|
|
10363
|
+
text: (prompt: Prompt) => string;
|
|
10364
|
+
};
|
|
10365
|
+
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
10366
|
+
}>;
|
|
10367
|
+
}> & {
|
|
10368
|
+
type: "session.prompt.promoted";
|
|
10369
|
+
durable?: {
|
|
10370
|
+
readonly version: number;
|
|
10371
|
+
readonly aggregate: string;
|
|
10372
|
+
};
|
|
10373
|
+
data: Schema.Struct<{
|
|
10374
|
+
timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10375
|
+
sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
10376
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10377
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10378
|
+
};
|
|
10379
|
+
messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
10380
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10381
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10382
|
+
};
|
|
10383
|
+
prompt: Schema.Struct<{
|
|
10384
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
10385
|
+
readonly type: Schema.Literal<"text">;
|
|
10386
|
+
readonly text: Schema.String;
|
|
10387
|
+
}>, Schema.Struct<{
|
|
10388
|
+
readonly type: Schema.Literal<"image">;
|
|
10389
|
+
readonly data: Schema.String;
|
|
10390
|
+
readonly mimeType: Schema.String;
|
|
10391
|
+
}>]>>;
|
|
10392
|
+
}> & {
|
|
10393
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
10394
|
+
readonly parts: readonly ({
|
|
10395
|
+
readonly type: "text";
|
|
10396
|
+
readonly text: string;
|
|
10397
|
+
} | {
|
|
10398
|
+
readonly type: "image";
|
|
10399
|
+
readonly data: string;
|
|
10400
|
+
readonly mimeType: string;
|
|
10401
|
+
})[];
|
|
10402
|
+
}>;
|
|
10403
|
+
fromText: (text: string) => {
|
|
10404
|
+
readonly parts: readonly ({
|
|
10405
|
+
readonly type: "text";
|
|
10406
|
+
readonly text: string;
|
|
10407
|
+
} | {
|
|
10408
|
+
readonly type: "image";
|
|
10409
|
+
readonly data: string;
|
|
10410
|
+
readonly mimeType: string;
|
|
10411
|
+
})[];
|
|
10412
|
+
};
|
|
10413
|
+
text: (prompt: Prompt) => string;
|
|
10414
|
+
};
|
|
10415
|
+
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
10416
|
+
}>;
|
|
10417
|
+
}, Schema.Struct<{
|
|
10418
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
10419
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
10420
|
+
};
|
|
10421
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
10422
|
+
readonly type: Schema.Literal<"session.prompt.cancelled">;
|
|
10423
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
10424
|
+
readonly aggregateId: Schema.String;
|
|
10425
|
+
readonly seq: Schema.Int;
|
|
10426
|
+
readonly version: Schema.Int;
|
|
10427
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
10428
|
+
readonly aggregateId: Schema.String;
|
|
10429
|
+
readonly seq: Schema.Int;
|
|
10430
|
+
readonly version: Schema.Int;
|
|
10431
|
+
}>>, never, never>;
|
|
10432
|
+
readonly data: Schema.Struct<{
|
|
10433
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10434
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
10435
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10436
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10437
|
+
};
|
|
10438
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
10439
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10440
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10441
|
+
};
|
|
10442
|
+
}>;
|
|
10443
|
+
}> & {
|
|
10444
|
+
type: "session.prompt.cancelled";
|
|
10445
|
+
durable?: {
|
|
10446
|
+
readonly version: number;
|
|
10447
|
+
readonly aggregate: string;
|
|
10448
|
+
};
|
|
10449
|
+
data: Schema.Struct<{
|
|
10450
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10451
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
10452
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10453
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
10454
|
+
};
|
|
10455
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
10456
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10457
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
10458
|
+
};
|
|
9781
10459
|
}>;
|
|
9782
10460
|
}, Schema.Struct<{
|
|
9783
10461
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
9784
10462
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
9785
10463
|
};
|
|
9786
10464
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
9787
|
-
readonly type: Schema.Literal<"session.prompt.
|
|
10465
|
+
readonly type: Schema.Literal<"session.prompt.updated">;
|
|
9788
10466
|
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
9789
10467
|
readonly aggregateId: Schema.String;
|
|
9790
10468
|
readonly seq: Schema.Int;
|
|
@@ -9795,16 +10473,16 @@ declare const Definitions: readonly [Schema.Struct<{
|
|
|
9795
10473
|
readonly version: Schema.Int;
|
|
9796
10474
|
}>>, never, never>;
|
|
9797
10475
|
readonly data: Schema.Struct<{
|
|
9798
|
-
timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
9799
|
-
sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
10476
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10477
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
9800
10478
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
9801
10479
|
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
9802
10480
|
};
|
|
9803
|
-
messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
10481
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
9804
10482
|
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
9805
10483
|
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
9806
10484
|
};
|
|
9807
|
-
prompt: Schema.Struct<{
|
|
10485
|
+
readonly prompt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
9808
10486
|
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
9809
10487
|
readonly type: Schema.Literal<"text">;
|
|
9810
10488
|
readonly text: Schema.String;
|
|
@@ -9835,26 +10513,7 @@ declare const Definitions: readonly [Schema.Struct<{
|
|
|
9835
10513
|
})[];
|
|
9836
10514
|
};
|
|
9837
10515
|
text: (prompt: Prompt) => string;
|
|
9838
|
-
}
|
|
9839
|
-
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
9840
|
-
}>;
|
|
9841
|
-
}> & {
|
|
9842
|
-
type: "session.prompt.admitted";
|
|
9843
|
-
durable?: {
|
|
9844
|
-
readonly version: number;
|
|
9845
|
-
readonly aggregate: string;
|
|
9846
|
-
};
|
|
9847
|
-
data: Schema.Struct<{
|
|
9848
|
-
timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
9849
|
-
sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
9850
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
9851
|
-
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
9852
|
-
};
|
|
9853
|
-
messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
9854
|
-
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
9855
|
-
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
9856
|
-
};
|
|
9857
|
-
prompt: Schema.Struct<{
|
|
10516
|
+
}>>, Schema.optionalKey<Schema.Struct<{
|
|
9858
10517
|
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
9859
10518
|
readonly type: Schema.Literal<"text">;
|
|
9860
10519
|
readonly text: Schema.String;
|
|
@@ -9885,35 +10544,26 @@ declare const Definitions: readonly [Schema.Struct<{
|
|
|
9885
10544
|
})[];
|
|
9886
10545
|
};
|
|
9887
10546
|
text: (prompt: Prompt) => string;
|
|
9888
|
-
}
|
|
9889
|
-
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
10547
|
+
}>, never, never>;
|
|
10548
|
+
readonly delivery: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["steer", "followUp"]>>>, Schema.optionalKey<Schema.Literals<readonly ["steer", "followUp"]>>, never, never>;
|
|
9890
10549
|
}>;
|
|
9891
|
-
}
|
|
9892
|
-
|
|
9893
|
-
|
|
10550
|
+
}> & {
|
|
10551
|
+
type: "session.prompt.updated";
|
|
10552
|
+
durable?: {
|
|
10553
|
+
readonly version: number;
|
|
10554
|
+
readonly aggregate: string;
|
|
9894
10555
|
};
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
readonly aggregateId: Schema.String;
|
|
9899
|
-
readonly seq: Schema.Int;
|
|
9900
|
-
readonly version: Schema.Int;
|
|
9901
|
-
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
9902
|
-
readonly aggregateId: Schema.String;
|
|
9903
|
-
readonly seq: Schema.Int;
|
|
9904
|
-
readonly version: Schema.Int;
|
|
9905
|
-
}>>, never, never>;
|
|
9906
|
-
readonly data: Schema.Struct<{
|
|
9907
|
-
timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
9908
|
-
sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
10556
|
+
data: Schema.Struct<{
|
|
10557
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10558
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
9909
10559
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
9910
10560
|
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
9911
10561
|
};
|
|
9912
|
-
messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
10562
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
9913
10563
|
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
9914
10564
|
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
9915
10565
|
};
|
|
9916
|
-
prompt: Schema.Struct<{
|
|
10566
|
+
readonly prompt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
9917
10567
|
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
9918
10568
|
readonly type: Schema.Literal<"text">;
|
|
9919
10569
|
readonly text: Schema.String;
|
|
@@ -9944,26 +10594,7 @@ declare const Definitions: readonly [Schema.Struct<{
|
|
|
9944
10594
|
})[];
|
|
9945
10595
|
};
|
|
9946
10596
|
text: (prompt: Prompt) => string;
|
|
9947
|
-
}
|
|
9948
|
-
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
9949
|
-
}>;
|
|
9950
|
-
}> & {
|
|
9951
|
-
type: "session.prompt.promoted";
|
|
9952
|
-
durable?: {
|
|
9953
|
-
readonly version: number;
|
|
9954
|
-
readonly aggregate: string;
|
|
9955
|
-
};
|
|
9956
|
-
data: Schema.Struct<{
|
|
9957
|
-
timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
9958
|
-
sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
9959
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
9960
|
-
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
9961
|
-
};
|
|
9962
|
-
messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
9963
|
-
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
9964
|
-
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
9965
|
-
};
|
|
9966
|
-
prompt: Schema.Struct<{
|
|
10597
|
+
}>>, Schema.optionalKey<Schema.Struct<{
|
|
9967
10598
|
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
9968
10599
|
readonly type: Schema.Literal<"text">;
|
|
9969
10600
|
readonly text: Schema.String;
|
|
@@ -9994,8 +10625,8 @@ declare const Definitions: readonly [Schema.Struct<{
|
|
|
9994
10625
|
})[];
|
|
9995
10626
|
};
|
|
9996
10627
|
text: (prompt: Prompt) => string;
|
|
9997
|
-
}
|
|
9998
|
-
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
10628
|
+
}>, never, never>;
|
|
10629
|
+
readonly delivery: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["steer", "followUp"]>>>, Schema.optionalKey<Schema.Literals<readonly ["steer", "followUp"]>>, never, never>;
|
|
9999
10630
|
}>;
|
|
10000
10631
|
}, Schema.Struct<{
|
|
10001
10632
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
@@ -15292,26 +15923,209 @@ declare const PublicDefinitions: readonly [Schema.Struct<{
|
|
|
15292
15923
|
})[];
|
|
15293
15924
|
};
|
|
15294
15925
|
text: (prompt: Prompt) => string;
|
|
15295
|
-
};
|
|
15296
|
-
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
15926
|
+
};
|
|
15927
|
+
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
15928
|
+
}>;
|
|
15929
|
+
}> & {
|
|
15930
|
+
type: "session.prompt.promoted";
|
|
15931
|
+
durable?: {
|
|
15932
|
+
readonly version: number;
|
|
15933
|
+
readonly aggregate: string;
|
|
15934
|
+
};
|
|
15935
|
+
data: Schema.Struct<{
|
|
15936
|
+
timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
15937
|
+
sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
15938
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
15939
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
15940
|
+
};
|
|
15941
|
+
messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
15942
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
15943
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
15944
|
+
};
|
|
15945
|
+
prompt: Schema.Struct<{
|
|
15946
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
15947
|
+
readonly type: Schema.Literal<"text">;
|
|
15948
|
+
readonly text: Schema.String;
|
|
15949
|
+
}>, Schema.Struct<{
|
|
15950
|
+
readonly type: Schema.Literal<"image">;
|
|
15951
|
+
readonly data: Schema.String;
|
|
15952
|
+
readonly mimeType: Schema.String;
|
|
15953
|
+
}>]>>;
|
|
15954
|
+
}> & {
|
|
15955
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
15956
|
+
readonly parts: readonly ({
|
|
15957
|
+
readonly type: "text";
|
|
15958
|
+
readonly text: string;
|
|
15959
|
+
} | {
|
|
15960
|
+
readonly type: "image";
|
|
15961
|
+
readonly data: string;
|
|
15962
|
+
readonly mimeType: string;
|
|
15963
|
+
})[];
|
|
15964
|
+
}>;
|
|
15965
|
+
fromText: (text: string) => {
|
|
15966
|
+
readonly parts: readonly ({
|
|
15967
|
+
readonly type: "text";
|
|
15968
|
+
readonly text: string;
|
|
15969
|
+
} | {
|
|
15970
|
+
readonly type: "image";
|
|
15971
|
+
readonly data: string;
|
|
15972
|
+
readonly mimeType: string;
|
|
15973
|
+
})[];
|
|
15974
|
+
};
|
|
15975
|
+
text: (prompt: Prompt) => string;
|
|
15976
|
+
};
|
|
15977
|
+
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
15978
|
+
}>;
|
|
15979
|
+
}, Schema.Struct<{
|
|
15980
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
15981
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
15982
|
+
};
|
|
15983
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
15984
|
+
readonly type: Schema.Literal<"session.prompt.cancelled">;
|
|
15985
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
15986
|
+
readonly aggregateId: Schema.String;
|
|
15987
|
+
readonly seq: Schema.Int;
|
|
15988
|
+
readonly version: Schema.Int;
|
|
15989
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
15990
|
+
readonly aggregateId: Schema.String;
|
|
15991
|
+
readonly seq: Schema.Int;
|
|
15992
|
+
readonly version: Schema.Int;
|
|
15993
|
+
}>>, never, never>;
|
|
15994
|
+
readonly data: Schema.Struct<{
|
|
15995
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
15996
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
15997
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
15998
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
15999
|
+
};
|
|
16000
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
16001
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
16002
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
16003
|
+
};
|
|
16004
|
+
}>;
|
|
16005
|
+
}> & {
|
|
16006
|
+
type: "session.prompt.cancelled";
|
|
16007
|
+
durable?: {
|
|
16008
|
+
readonly version: number;
|
|
16009
|
+
readonly aggregate: string;
|
|
16010
|
+
};
|
|
16011
|
+
data: Schema.Struct<{
|
|
16012
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
16013
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
16014
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
16015
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
16016
|
+
};
|
|
16017
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
16018
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
16019
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
16020
|
+
};
|
|
16021
|
+
}>;
|
|
16022
|
+
}, Schema.Struct<{
|
|
16023
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
16024
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
16025
|
+
};
|
|
16026
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
16027
|
+
readonly type: Schema.Literal<"session.prompt.updated">;
|
|
16028
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
16029
|
+
readonly aggregateId: Schema.String;
|
|
16030
|
+
readonly seq: Schema.Int;
|
|
16031
|
+
readonly version: Schema.Int;
|
|
16032
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
16033
|
+
readonly aggregateId: Schema.String;
|
|
16034
|
+
readonly seq: Schema.Int;
|
|
16035
|
+
readonly version: Schema.Int;
|
|
16036
|
+
}>>, never, never>;
|
|
16037
|
+
readonly data: Schema.Struct<{
|
|
16038
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
16039
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
16040
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
16041
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
16042
|
+
};
|
|
16043
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
16044
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
16045
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
16046
|
+
};
|
|
16047
|
+
readonly prompt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
16048
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
16049
|
+
readonly type: Schema.Literal<"text">;
|
|
16050
|
+
readonly text: Schema.String;
|
|
16051
|
+
}>, Schema.Struct<{
|
|
16052
|
+
readonly type: Schema.Literal<"image">;
|
|
16053
|
+
readonly data: Schema.String;
|
|
16054
|
+
readonly mimeType: Schema.String;
|
|
16055
|
+
}>]>>;
|
|
16056
|
+
}> & {
|
|
16057
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
16058
|
+
readonly parts: readonly ({
|
|
16059
|
+
readonly type: "text";
|
|
16060
|
+
readonly text: string;
|
|
16061
|
+
} | {
|
|
16062
|
+
readonly type: "image";
|
|
16063
|
+
readonly data: string;
|
|
16064
|
+
readonly mimeType: string;
|
|
16065
|
+
})[];
|
|
16066
|
+
}>;
|
|
16067
|
+
fromText: (text: string) => {
|
|
16068
|
+
readonly parts: readonly ({
|
|
16069
|
+
readonly type: "text";
|
|
16070
|
+
readonly text: string;
|
|
16071
|
+
} | {
|
|
16072
|
+
readonly type: "image";
|
|
16073
|
+
readonly data: string;
|
|
16074
|
+
readonly mimeType: string;
|
|
16075
|
+
})[];
|
|
16076
|
+
};
|
|
16077
|
+
text: (prompt: Prompt) => string;
|
|
16078
|
+
}>>, Schema.optionalKey<Schema.Struct<{
|
|
16079
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
16080
|
+
readonly type: Schema.Literal<"text">;
|
|
16081
|
+
readonly text: Schema.String;
|
|
16082
|
+
}>, Schema.Struct<{
|
|
16083
|
+
readonly type: Schema.Literal<"image">;
|
|
16084
|
+
readonly data: Schema.String;
|
|
16085
|
+
readonly mimeType: Schema.String;
|
|
16086
|
+
}>]>>;
|
|
16087
|
+
}> & {
|
|
16088
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
16089
|
+
readonly parts: readonly ({
|
|
16090
|
+
readonly type: "text";
|
|
16091
|
+
readonly text: string;
|
|
16092
|
+
} | {
|
|
16093
|
+
readonly type: "image";
|
|
16094
|
+
readonly data: string;
|
|
16095
|
+
readonly mimeType: string;
|
|
16096
|
+
})[];
|
|
16097
|
+
}>;
|
|
16098
|
+
fromText: (text: string) => {
|
|
16099
|
+
readonly parts: readonly ({
|
|
16100
|
+
readonly type: "text";
|
|
16101
|
+
readonly text: string;
|
|
16102
|
+
} | {
|
|
16103
|
+
readonly type: "image";
|
|
16104
|
+
readonly data: string;
|
|
16105
|
+
readonly mimeType: string;
|
|
16106
|
+
})[];
|
|
16107
|
+
};
|
|
16108
|
+
text: (prompt: Prompt) => string;
|
|
16109
|
+
}>, never, never>;
|
|
16110
|
+
readonly delivery: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["steer", "followUp"]>>>, Schema.optionalKey<Schema.Literals<readonly ["steer", "followUp"]>>, never, never>;
|
|
15297
16111
|
}>;
|
|
15298
16112
|
}> & {
|
|
15299
|
-
type: "session.prompt.
|
|
16113
|
+
type: "session.prompt.updated";
|
|
15300
16114
|
durable?: {
|
|
15301
16115
|
readonly version: number;
|
|
15302
16116
|
readonly aggregate: string;
|
|
15303
16117
|
};
|
|
15304
16118
|
data: Schema.Struct<{
|
|
15305
|
-
timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
15306
|
-
sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
16119
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
16120
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
15307
16121
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
15308
16122
|
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
15309
16123
|
};
|
|
15310
|
-
messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
16124
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
15311
16125
|
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
15312
16126
|
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
15313
16127
|
};
|
|
15314
|
-
prompt: Schema.Struct<{
|
|
16128
|
+
readonly prompt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
15315
16129
|
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
15316
16130
|
readonly type: Schema.Literal<"text">;
|
|
15317
16131
|
readonly text: Schema.String;
|
|
@@ -15342,8 +16156,39 @@ declare const PublicDefinitions: readonly [Schema.Struct<{
|
|
|
15342
16156
|
})[];
|
|
15343
16157
|
};
|
|
15344
16158
|
text: (prompt: Prompt) => string;
|
|
15345
|
-
}
|
|
15346
|
-
|
|
16159
|
+
}>>, Schema.optionalKey<Schema.Struct<{
|
|
16160
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
16161
|
+
readonly type: Schema.Literal<"text">;
|
|
16162
|
+
readonly text: Schema.String;
|
|
16163
|
+
}>, Schema.Struct<{
|
|
16164
|
+
readonly type: Schema.Literal<"image">;
|
|
16165
|
+
readonly data: Schema.String;
|
|
16166
|
+
readonly mimeType: Schema.String;
|
|
16167
|
+
}>]>>;
|
|
16168
|
+
}> & {
|
|
16169
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
16170
|
+
readonly parts: readonly ({
|
|
16171
|
+
readonly type: "text";
|
|
16172
|
+
readonly text: string;
|
|
16173
|
+
} | {
|
|
16174
|
+
readonly type: "image";
|
|
16175
|
+
readonly data: string;
|
|
16176
|
+
readonly mimeType: string;
|
|
16177
|
+
})[];
|
|
16178
|
+
}>;
|
|
16179
|
+
fromText: (text: string) => {
|
|
16180
|
+
readonly parts: readonly ({
|
|
16181
|
+
readonly type: "text";
|
|
16182
|
+
readonly text: string;
|
|
16183
|
+
} | {
|
|
16184
|
+
readonly type: "image";
|
|
16185
|
+
readonly data: string;
|
|
16186
|
+
readonly mimeType: string;
|
|
16187
|
+
})[];
|
|
16188
|
+
};
|
|
16189
|
+
text: (prompt: Prompt) => string;
|
|
16190
|
+
}>, never, never>;
|
|
16191
|
+
readonly delivery: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["steer", "followUp"]>>>, Schema.optionalKey<Schema.Literals<readonly ["steer", "followUp"]>>, never, never>;
|
|
15347
16192
|
}>;
|
|
15348
16193
|
}, Schema.Struct<{
|
|
15349
16194
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
@@ -20536,6 +21381,220 @@ declare const DurableDefinitions: readonly [Schema.Struct<{
|
|
|
20536
21381
|
};
|
|
20537
21382
|
delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
20538
21383
|
}>;
|
|
21384
|
+
}, Schema.Struct<{
|
|
21385
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
21386
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
21387
|
+
};
|
|
21388
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
21389
|
+
readonly type: Schema.Literal<"session.prompt.cancelled">;
|
|
21390
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
21391
|
+
readonly aggregateId: Schema.String;
|
|
21392
|
+
readonly seq: Schema.Int;
|
|
21393
|
+
readonly version: Schema.Int;
|
|
21394
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
21395
|
+
readonly aggregateId: Schema.String;
|
|
21396
|
+
readonly seq: Schema.Int;
|
|
21397
|
+
readonly version: Schema.Int;
|
|
21398
|
+
}>>, never, never>;
|
|
21399
|
+
readonly data: Schema.Struct<{
|
|
21400
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
21401
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
21402
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
21403
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
21404
|
+
};
|
|
21405
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
21406
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
21407
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
21408
|
+
};
|
|
21409
|
+
}>;
|
|
21410
|
+
}> & {
|
|
21411
|
+
type: "session.prompt.cancelled";
|
|
21412
|
+
durable?: {
|
|
21413
|
+
readonly version: number;
|
|
21414
|
+
readonly aggregate: string;
|
|
21415
|
+
};
|
|
21416
|
+
data: Schema.Struct<{
|
|
21417
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
21418
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
21419
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
21420
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
21421
|
+
};
|
|
21422
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
21423
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
21424
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
21425
|
+
};
|
|
21426
|
+
}>;
|
|
21427
|
+
}, Schema.Struct<{
|
|
21428
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
21429
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
21430
|
+
};
|
|
21431
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
21432
|
+
readonly type: Schema.Literal<"session.prompt.updated">;
|
|
21433
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
21434
|
+
readonly aggregateId: Schema.String;
|
|
21435
|
+
readonly seq: Schema.Int;
|
|
21436
|
+
readonly version: Schema.Int;
|
|
21437
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
21438
|
+
readonly aggregateId: Schema.String;
|
|
21439
|
+
readonly seq: Schema.Int;
|
|
21440
|
+
readonly version: Schema.Int;
|
|
21441
|
+
}>>, never, never>;
|
|
21442
|
+
readonly data: Schema.Struct<{
|
|
21443
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
21444
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
21445
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
21446
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
21447
|
+
};
|
|
21448
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
21449
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
21450
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
21451
|
+
};
|
|
21452
|
+
readonly prompt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
21453
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
21454
|
+
readonly type: Schema.Literal<"text">;
|
|
21455
|
+
readonly text: Schema.String;
|
|
21456
|
+
}>, Schema.Struct<{
|
|
21457
|
+
readonly type: Schema.Literal<"image">;
|
|
21458
|
+
readonly data: Schema.String;
|
|
21459
|
+
readonly mimeType: Schema.String;
|
|
21460
|
+
}>]>>;
|
|
21461
|
+
}> & {
|
|
21462
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
21463
|
+
readonly parts: readonly ({
|
|
21464
|
+
readonly type: "text";
|
|
21465
|
+
readonly text: string;
|
|
21466
|
+
} | {
|
|
21467
|
+
readonly type: "image";
|
|
21468
|
+
readonly data: string;
|
|
21469
|
+
readonly mimeType: string;
|
|
21470
|
+
})[];
|
|
21471
|
+
}>;
|
|
21472
|
+
fromText: (text: string) => {
|
|
21473
|
+
readonly parts: readonly ({
|
|
21474
|
+
readonly type: "text";
|
|
21475
|
+
readonly text: string;
|
|
21476
|
+
} | {
|
|
21477
|
+
readonly type: "image";
|
|
21478
|
+
readonly data: string;
|
|
21479
|
+
readonly mimeType: string;
|
|
21480
|
+
})[];
|
|
21481
|
+
};
|
|
21482
|
+
text: (prompt: Prompt) => string;
|
|
21483
|
+
}>>, Schema.optionalKey<Schema.Struct<{
|
|
21484
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
21485
|
+
readonly type: Schema.Literal<"text">;
|
|
21486
|
+
readonly text: Schema.String;
|
|
21487
|
+
}>, Schema.Struct<{
|
|
21488
|
+
readonly type: Schema.Literal<"image">;
|
|
21489
|
+
readonly data: Schema.String;
|
|
21490
|
+
readonly mimeType: Schema.String;
|
|
21491
|
+
}>]>>;
|
|
21492
|
+
}> & {
|
|
21493
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
21494
|
+
readonly parts: readonly ({
|
|
21495
|
+
readonly type: "text";
|
|
21496
|
+
readonly text: string;
|
|
21497
|
+
} | {
|
|
21498
|
+
readonly type: "image";
|
|
21499
|
+
readonly data: string;
|
|
21500
|
+
readonly mimeType: string;
|
|
21501
|
+
})[];
|
|
21502
|
+
}>;
|
|
21503
|
+
fromText: (text: string) => {
|
|
21504
|
+
readonly parts: readonly ({
|
|
21505
|
+
readonly type: "text";
|
|
21506
|
+
readonly text: string;
|
|
21507
|
+
} | {
|
|
21508
|
+
readonly type: "image";
|
|
21509
|
+
readonly data: string;
|
|
21510
|
+
readonly mimeType: string;
|
|
21511
|
+
})[];
|
|
21512
|
+
};
|
|
21513
|
+
text: (prompt: Prompt) => string;
|
|
21514
|
+
}>, never, never>;
|
|
21515
|
+
readonly delivery: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["steer", "followUp"]>>>, Schema.optionalKey<Schema.Literals<readonly ["steer", "followUp"]>>, never, never>;
|
|
21516
|
+
}>;
|
|
21517
|
+
}> & {
|
|
21518
|
+
type: "session.prompt.updated";
|
|
21519
|
+
durable?: {
|
|
21520
|
+
readonly version: number;
|
|
21521
|
+
readonly aggregate: string;
|
|
21522
|
+
};
|
|
21523
|
+
data: Schema.Struct<{
|
|
21524
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
21525
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
21526
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
21527
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
21528
|
+
};
|
|
21529
|
+
readonly messageId: Schema.brand<Schema.String, "Message.ID"> & {
|
|
21530
|
+
create: () => string & import("effect/Brand").Brand<"Message.ID">;
|
|
21531
|
+
from: (id: string) => string & import("effect/Brand").Brand<"Message.ID">;
|
|
21532
|
+
};
|
|
21533
|
+
readonly prompt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
21534
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
21535
|
+
readonly type: Schema.Literal<"text">;
|
|
21536
|
+
readonly text: Schema.String;
|
|
21537
|
+
}>, Schema.Struct<{
|
|
21538
|
+
readonly type: Schema.Literal<"image">;
|
|
21539
|
+
readonly data: Schema.String;
|
|
21540
|
+
readonly mimeType: Schema.String;
|
|
21541
|
+
}>]>>;
|
|
21542
|
+
}> & {
|
|
21543
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
21544
|
+
readonly parts: readonly ({
|
|
21545
|
+
readonly type: "text";
|
|
21546
|
+
readonly text: string;
|
|
21547
|
+
} | {
|
|
21548
|
+
readonly type: "image";
|
|
21549
|
+
readonly data: string;
|
|
21550
|
+
readonly mimeType: string;
|
|
21551
|
+
})[];
|
|
21552
|
+
}>;
|
|
21553
|
+
fromText: (text: string) => {
|
|
21554
|
+
readonly parts: readonly ({
|
|
21555
|
+
readonly type: "text";
|
|
21556
|
+
readonly text: string;
|
|
21557
|
+
} | {
|
|
21558
|
+
readonly type: "image";
|
|
21559
|
+
readonly data: string;
|
|
21560
|
+
readonly mimeType: string;
|
|
21561
|
+
})[];
|
|
21562
|
+
};
|
|
21563
|
+
text: (prompt: Prompt) => string;
|
|
21564
|
+
}>>, Schema.optionalKey<Schema.Struct<{
|
|
21565
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
21566
|
+
readonly type: Schema.Literal<"text">;
|
|
21567
|
+
readonly text: Schema.String;
|
|
21568
|
+
}>, Schema.Struct<{
|
|
21569
|
+
readonly type: Schema.Literal<"image">;
|
|
21570
|
+
readonly data: Schema.String;
|
|
21571
|
+
readonly mimeType: Schema.String;
|
|
21572
|
+
}>]>>;
|
|
21573
|
+
}> & {
|
|
21574
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
21575
|
+
readonly parts: readonly ({
|
|
21576
|
+
readonly type: "text";
|
|
21577
|
+
readonly text: string;
|
|
21578
|
+
} | {
|
|
21579
|
+
readonly type: "image";
|
|
21580
|
+
readonly data: string;
|
|
21581
|
+
readonly mimeType: string;
|
|
21582
|
+
})[];
|
|
21583
|
+
}>;
|
|
21584
|
+
fromText: (text: string) => {
|
|
21585
|
+
readonly parts: readonly ({
|
|
21586
|
+
readonly type: "text";
|
|
21587
|
+
readonly text: string;
|
|
21588
|
+
} | {
|
|
21589
|
+
readonly type: "image";
|
|
21590
|
+
readonly data: string;
|
|
21591
|
+
readonly mimeType: string;
|
|
21592
|
+
})[];
|
|
21593
|
+
};
|
|
21594
|
+
text: (prompt: Prompt) => string;
|
|
21595
|
+
}>, never, never>;
|
|
21596
|
+
readonly delivery: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["steer", "followUp"]>>>, Schema.optionalKey<Schema.Literals<readonly ["steer", "followUp"]>>, never, never>;
|
|
21597
|
+
}>;
|
|
20539
21598
|
}, Schema.Struct<{
|
|
20540
21599
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
20541
21600
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|