effect-durable-agent 0.1.0-alpha.17 → 0.1.0-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{context-projection-n6Rdup0N.d.ts → context-projection-Dr_kA41k.d.ts} +4 -4
- package/dist/domain/command-queues.d.ts +82 -2
- package/dist/domain/context-projection.d.ts +1 -1
- package/dist/domain/message-transcript.d.ts +1 -1
- package/dist/domain/reduced-state-schema.d.ts +2 -991
- package/dist/domain/reduced-state-schema.js +114 -2
- package/dist/domain/reduced-state-schema.js.map +1 -1
- package/dist/domain/reduced-state.d.ts +1 -1
- package/dist/domain/run-scheduling.d.ts +1 -1
- package/dist/{durable-Ceu9SC2D.d.ts → durable-DeQBR5wA.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/reduced-state-DFIYylAq.js.map +1 -1
- package/dist/reduced-state-schema-CgW0mzpS.d.ts +2167 -0
- package/dist/{index-DWC70Fsi.d.ts → reduced-state-xY-tYuGo.d.ts} +4155 -1279
- package/dist/{reducer-registry-nO4biZlg.d.ts → reducer-registry-bRbc4COf.d.ts} +3 -3
- package/dist/{run-scheduling-wakeup-CXT5_CkI.d.ts → run-scheduling-wakeup-CY5hfgMR.d.ts} +2 -2
- package/dist/services/compaction.d.ts +1 -1
- package/dist/services/prompt-projector.d.ts +1 -1
- package/dist/services/reducer-registry.d.ts +1 -1
- package/dist/services/run-scheduler.d.ts +1 -2
- package/dist/services/run-scheduling-wakeup.d.ts +1 -1
- package/dist/services/runtime-layer.d.ts +6 -10
- package/dist/services/runtime.d.ts +1 -1
- package/dist/services/runtime.js +11 -2
- package/dist/services/runtime.js.map +1 -1
- package/dist/services/session-query.d.ts +2 -2
- package/dist/services/session-query.js +19 -1
- package/dist/services/session-query.js.map +1 -1
- package/dist/services/session-state.d.ts +1 -1
- package/dist/services/session-store.d.ts +1 -1
- package/dist/services/sink-checkpoint-store.d.ts +1 -1
- package/dist/services/sink-registry.d.ts +1 -1
- package/dist/services/tool-registry.d.ts +1 -1
- package/dist/services/tracing.d.ts +1 -1
- package/dist/{session-store-DBa-TOVH.d.ts → session-store-CERvTeaV.d.ts} +4 -4
- package/dist/{sink-checkpoint-store-BZGfJLve.d.ts → sink-checkpoint-store-DTiswoqy.d.ts} +2 -2
- package/dist/testkit/layers.d.ts +7 -12
- package/dist/{tool-registry-NOP9aTHT.d.ts → tool-registry-D4ALie3K.d.ts} +2 -2
- package/dist/types/events/durable.d.ts +1 -1
- package/dist/types/events.d.ts +2 -2
- package/dist/websocket.d.ts +1 -1
- package/package.json +1 -1
- package/dist/command-queues-w9WUKTpM.d.ts +0 -556
- package/dist/compaction-DhIJ-sAH.d.ts +0 -165
- package/dist/event-factory-CHP1-DAF.d.ts +0 -91
- package/dist/message-transcript-BfuGCZhP.d.ts +0 -32
- package/dist/prompt-projector-DvNHsoEN.d.ts +0 -39
- package/dist/run-scheduler-DFBqIRzF.d.ts +0 -43
- package/dist/sink-registry-tpmJ-Dhf.d.ts +0 -148
|
@@ -86,12 +86,12 @@ type ContextProjection = typeof ContextProjection.Type;
|
|
|
86
86
|
declare const emptyContextProjection: {
|
|
87
87
|
readonly contextVersion: number & import("effect/Brand").Brand<"ContextVersion">;
|
|
88
88
|
readonly currentSummary?: {
|
|
89
|
-
readonly
|
|
89
|
+
readonly text: string;
|
|
90
90
|
readonly summaryId: string & import("effect/Brand").Brand<"SummaryId">;
|
|
91
91
|
readonly sourceFromSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
|
|
92
92
|
readonly sourceToSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
|
|
93
|
+
readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
|
|
93
94
|
readonly retainedFromContextSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
|
|
94
|
-
readonly text: string;
|
|
95
95
|
readonly promptMessage: {
|
|
96
96
|
readonly role: "user";
|
|
97
97
|
readonly content: readonly [{
|
|
@@ -116,11 +116,11 @@ declare const emptyContextProjection: {
|
|
|
116
116
|
readonly [x: string]: Schema.Json;
|
|
117
117
|
};
|
|
118
118
|
} | {
|
|
119
|
+
readonly type: "file";
|
|
119
120
|
readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
|
|
120
121
|
readonly options: {
|
|
121
122
|
readonly [x: string]: Schema.Json;
|
|
122
123
|
};
|
|
123
|
-
readonly type: "file";
|
|
124
124
|
readonly mediaType: string;
|
|
125
125
|
readonly data: string | Uint8Array<ArrayBufferLike> | URL;
|
|
126
126
|
readonly fileName?: string | undefined;
|
|
@@ -137,4 +137,4 @@ declare const emptyContextProjection: {
|
|
|
137
137
|
};
|
|
138
138
|
//#endregion
|
|
139
139
|
export { emptyContextProjection as a, ContextProjection as i, CompactionPolicyId as n, CompactionSummaryArtifact as r, CompactionExecutorId as t };
|
|
140
|
-
//# sourceMappingURL=context-projection-
|
|
140
|
+
//# sourceMappingURL=context-projection-Dr_kA41k.d.ts.map
|
|
@@ -1,2 +1,82 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { d as UserMessageContent } from "../commands-p8venTWs.js";
|
|
2
|
+
import { b as TurnId, h as SequenceNumber, p as RunId, u as MessageId } from "../core-C-6xHzRx.js";
|
|
3
|
+
import { C as RunRecord, f as MessageRecord, p as PendingCommand, r as CommandRecord, t as ActiveCommandEvidence } from "../reduced-state-xY-tYuGo.js";
|
|
4
|
+
|
|
5
|
+
//#region src/domain/command-queues.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* A steering message admitted for an active run but not necessarily consumed
|
|
8
|
+
* by a later turn yet.
|
|
9
|
+
*/
|
|
10
|
+
interface PendingSteeringMessage {
|
|
11
|
+
/** Durable message identity used by `TurnStarted.inputMessageIds` when consumed. */
|
|
12
|
+
readonly messageId: MessageId;
|
|
13
|
+
/** Command that admitted this steering message. */
|
|
14
|
+
readonly commandId: PendingCommand["commandId"];
|
|
15
|
+
/** Active run this steering message may continue. */
|
|
16
|
+
readonly runId: RunId;
|
|
17
|
+
/** User content to append to the next continuation prompt when selected. */
|
|
18
|
+
readonly content: UserMessageContent;
|
|
19
|
+
/** Sequence where `SteeringMessageQueued` committed; used for one-by-one ordering. */
|
|
20
|
+
readonly queuedSeq: SequenceNumber;
|
|
21
|
+
/** Sequence where a later `TurnStarted` consumed this steering message. */
|
|
22
|
+
readonly consumedSeq?: SequenceNumber;
|
|
23
|
+
/** Turn that consumed this steering message. */
|
|
24
|
+
readonly consumedTurnId?: TurnId;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Materialized command scheduler view derived from durable `ReducedState`.
|
|
28
|
+
*
|
|
29
|
+
* `pendingCommands` means admitted commands with no `CommandStarted` yet.
|
|
30
|
+
* `queuedCommands` is the FIFO subset that should wait for idle session work
|
|
31
|
+
* (`SubmitMessage{disposition:"queue"}`). `activeControlCommands` is the
|
|
32
|
+
* subset that may affect an active run (`StopTurn`, `steer`, `interrupt`).
|
|
33
|
+
* `steeringByRun` is not a command queue; it is queued steering content already
|
|
34
|
+
* admitted/completed as commands but not yet consumed by a turn.
|
|
35
|
+
*/
|
|
36
|
+
interface CommandQueues {
|
|
37
|
+
/** Started command without terminal command evidence, plus active run when known. */
|
|
38
|
+
readonly active?: ActiveCommandEvidence;
|
|
39
|
+
/** All admitted commands that have not yet crossed `CommandStarted`. */
|
|
40
|
+
readonly pendingCommands: ReadonlyArray<PendingCommand>;
|
|
41
|
+
/** FIFO user-message work that waits until no command/run is active. */
|
|
42
|
+
readonly queuedCommands: ReadonlyArray<PendingCommand>;
|
|
43
|
+
/** Stop/steer/interrupt work that can be interpreted while a run is active. */
|
|
44
|
+
readonly activeControlCommands: ReadonlyArray<PendingCommand>;
|
|
45
|
+
/** Unconsumed steering messages grouped by target run and sorted by queued seq. */
|
|
46
|
+
readonly steeringByRun: ReadonlyMap<RunId, ReadonlyArray<PendingSteeringMessage>>;
|
|
47
|
+
/** Admission-time queue messages eligible for separate work. */
|
|
48
|
+
readonly pendingQueue: ReadonlyArray<PendingUserMessage>;
|
|
49
|
+
/** Admission-time steer messages eligible at the next boundary. */
|
|
50
|
+
readonly pendingSteers: ReadonlyArray<PendingUserMessage>;
|
|
51
|
+
/** Queue messages held by an explicit interruption pause. */
|
|
52
|
+
readonly pausedQueue: ReadonlyArray<PendingUserMessage>;
|
|
53
|
+
}
|
|
54
|
+
interface PendingUserMessage {
|
|
55
|
+
readonly messageId: MessageId;
|
|
56
|
+
readonly commandId: PendingCommand["commandId"];
|
|
57
|
+
readonly content: UserMessageContent;
|
|
58
|
+
readonly submittedSeq: SequenceNumber;
|
|
59
|
+
readonly effectiveSeq: SequenceNumber;
|
|
60
|
+
readonly disposition: "queue" | "steer";
|
|
61
|
+
readonly targetRunId?: RunId;
|
|
62
|
+
readonly pausedByCommandId?: PendingCommand["commandId"];
|
|
63
|
+
}
|
|
64
|
+
/** Durable records needed to derive `CommandQueues` without services or refs. */
|
|
65
|
+
interface CommandQueueSource {
|
|
66
|
+
readonly commands: ReadonlyMap<PendingCommand["commandId"], CommandRecord>;
|
|
67
|
+
readonly runs: ReadonlyMap<RunId, RunRecord>;
|
|
68
|
+
readonly messages: ReadonlyMap<MessageId, MessageRecord>;
|
|
69
|
+
}
|
|
70
|
+
/** Empty queue view for `initialReducedState` before any durable events exist. */
|
|
71
|
+
declare const emptyCommandQueues: CommandQueues;
|
|
72
|
+
/**
|
|
73
|
+
* Derive scheduler queues from durable replay state.
|
|
74
|
+
*
|
|
75
|
+
* These queues are cached inside `ReducedState` for clarity and fast scheduler
|
|
76
|
+
* reads, but durable command/message/run records remain the source of truth.
|
|
77
|
+
* Never mutate a queue directly; fold durable events and derive again.
|
|
78
|
+
*/
|
|
79
|
+
declare const deriveCommandQueues: (state: CommandQueueSource) => CommandQueues;
|
|
80
|
+
//#endregion
|
|
81
|
+
export { CommandQueueSource, CommandQueues, PendingSteeringMessage, PendingUserMessage, deriveCommandQueues, emptyCommandQueues };
|
|
82
|
+
//# sourceMappingURL=command-queues.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as emptyContextProjection, i as ContextProjection, n as CompactionPolicyId, r as CompactionSummaryArtifact, t as CompactionExecutorId } from "../context-projection-
|
|
1
|
+
import { a as emptyContextProjection, i as ContextProjection, n as CompactionPolicyId, r as CompactionSummaryArtifact, t as CompactionExecutorId } from "../context-projection-Dr_kA41k.js";
|
|
2
2
|
export { CompactionExecutorId, CompactionPolicyId, CompactionSummaryArtifact, ContextProjection, emptyContextProjection };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { at as contextProjectionPromptWithUserContents, ct as durableTranscriptPromptWithUserContent, it as contextProjectionPromptWithUserContent, nt as DurableTranscriptMessage, ot as durableMessageTranscript, rt as contextProjectionPrompt, st as durableTranscriptPrompt } from "../reduced-state-xY-tYuGo.js";
|
|
2
2
|
export { DurableTranscriptMessage, contextProjectionPrompt, contextProjectionPromptWithUserContent, contextProjectionPromptWithUserContents, durableMessageTranscript, durableTranscriptPrompt, durableTranscriptPromptWithUserContent };
|