@systemfsoftware/agent-storage-cloudflare 0.0.0-stage → 0.1.0-beta.192
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/LICENSE +21 -0
- package/dist/DoMemoryStore-AaGtt8CZ.d.mts +29 -0
- package/dist/DoMemoryStore-DVun329p.mjs +67 -0
- package/dist/DoMemoryStore-DVun329p.mjs.map +1 -0
- package/dist/DoMemoryStore.d.mts +2 -0
- package/dist/DoMemoryStore.mjs +1 -0
- package/dist/DoMessageDeliveryStore-BvB6OPI1.mjs +34 -0
- package/dist/DoMessageDeliveryStore-BvB6OPI1.mjs.map +1 -0
- package/dist/DoMessageDeliveryStore-Cb-DNN5s.d.mts +16 -0
- package/dist/DoMessageDeliveryStore.d.mts +2 -0
- package/dist/DoMessageDeliveryStore.mjs +1 -0
- package/dist/DoScheduleStore-BiTgDvX1.d.mts +36 -0
- package/dist/DoScheduleStore-C7GkSReF.mjs +167 -0
- package/dist/DoScheduleStore-C7GkSReF.mjs.map +1 -0
- package/dist/DoScheduleStore.d.mts +2 -0
- package/dist/DoScheduleStore.mjs +1 -0
- package/dist/DoStorageConfig-BqezsbD6.mjs +43 -0
- package/dist/DoStorageConfig-BqezsbD6.mjs.map +1 -0
- package/dist/DoStorageConfig-CuB6ZOtX.d.mts +36 -0
- package/dist/DoStorageConfig.d.mts +2 -0
- package/dist/DoStorageConfig.mjs +1 -0
- package/dist/DoStorageError-C-F5Z_FZ.d.mts +82 -0
- package/dist/DoStorageError-DSQzuCb0.mjs +138 -0
- package/dist/DoStorageError-DSQzuCb0.mjs.map +1 -0
- package/dist/DoStorageError.d.mts +2 -0
- package/dist/DoStorageError.mjs +1 -0
- package/dist/DoStorageFailpoint-C7zLUULu.d.mts +19 -0
- package/dist/DoStorageFailpoint-WO3B_DQl.mjs +20 -0
- package/dist/DoStorageFailpoint-WO3B_DQl.mjs.map +1 -0
- package/dist/DoStorageFailpoint.d.mts +2 -0
- package/dist/DoStorageFailpoint.mjs +1 -0
- package/dist/DoStorageFailpointTesting.d.mts +21 -0
- package/dist/DoStorageFailpointTesting.mjs +18 -0
- package/dist/DoStorageFailpointTesting.mjs.map +1 -0
- package/dist/DoStorageVersion-BrolfBDS.mjs +7 -0
- package/dist/DoStorageVersion-BrolfBDS.mjs.map +1 -0
- package/dist/DoStorageVersion-D7CIxFc_.d.mts +8 -0
- package/dist/DoStorageVersion.d.mts +3 -0
- package/dist/DoStorageVersion.mjs +2 -0
- package/dist/DoSubmissionLedger-Oq5OstxL.mjs +1878 -0
- package/dist/DoSubmissionLedger-Oq5OstxL.mjs.map +1 -0
- package/dist/DoSubmissionLedger-tLjwidUn.d.mts +25 -0
- package/dist/DoSubmissionLedger.d.mts +2 -0
- package/dist/DoSubmissionLedger.mjs +1 -0
- package/dist/DoSubscriptionStore-BMJiFxt3.mjs +185 -0
- package/dist/DoSubscriptionStore-BMJiFxt3.mjs.map +1 -0
- package/dist/DoSubscriptionStore-zx6nfbbh.d.mts +25 -0
- package/dist/DoSubscriptionStore.d.mts +2 -0
- package/dist/DoSubscriptionStore.mjs +1 -0
- package/dist/DoThreadStore-2zTSfui-.d.mts +81 -0
- package/dist/DoThreadStore-CeYHcRR9.mjs +411 -0
- package/dist/DoThreadStore-CeYHcRR9.mjs.map +1 -0
- package/dist/DoThreadStore.d.mts +2 -0
- package/dist/DoThreadStore.mjs +5 -0
- package/dist/MemoryProtocol-CtCFYe4s.mjs +221 -0
- package/dist/MemoryProtocol-CtCFYe4s.mjs.map +1 -0
- package/dist/MemoryProtocol-DXV77CcJ.d.mts +38160 -0
- package/dist/MemoryProtocol.d.mts +2 -0
- package/dist/MemoryProtocol.mjs +1 -0
- package/dist/PortProtocol-4xvMyCgP.mjs +322 -0
- package/dist/PortProtocol-4xvMyCgP.mjs.map +1 -0
- package/dist/PortProtocol-DXuguAgD.d.mts +966 -0
- package/dist/PortProtocol.d.mts +2 -0
- package/dist/PortProtocol.mjs +1 -0
- package/dist/PortRouting-B9302ouX.mjs +683 -0
- package/dist/PortRouting-B9302ouX.mjs.map +1 -0
- package/dist/PortRouting-DsoI6soW.d.mts +105 -0
- package/dist/PortRouting.d.mts +2 -0
- package/dist/PortRouting.mjs +1 -0
- package/dist/do-journal-nPNEAjV5.mjs +769 -0
- package/dist/do-journal-nPNEAjV5.mjs.map +1 -0
- package/dist/index.d.mts +14 -0
- package/dist/index.mjs +14 -0
- package/dist/migrations-BRTvj8Ue.mjs +233 -0
- package/dist/migrations-BRTvj8Ue.mjs.map +1 -0
- package/dist/owned-state-DrOD9s0c.mjs +157 -0
- package/dist/owned-state-DrOD9s0c.mjs.map +1 -0
- package/dist/rolldown-runtime-D3KUYPsf.mjs +12 -0
- package/package.json +106 -3
- package/src/DoMemoryStore.ts +71 -0
- package/src/DoMessageDeliveryStore.ts +46 -0
- package/src/DoScheduleStore.ts +276 -0
- package/src/DoStorageConfig.ts +45 -0
- package/src/DoStorageError.ts +146 -0
- package/src/DoStorageFailpoint.ts +25 -0
- package/src/DoStorageFailpointTesting.ts +42 -0
- package/src/DoStorageVersion.ts +2 -0
- package/src/DoSubmissionLedger.ts +3980 -0
- package/src/DoSubscriptionStore.ts +331 -0
- package/src/DoThreadStore.ts +602 -0
- package/src/MemoryProtocol.ts +357 -0
- package/src/PortProtocol.ts +626 -0
- package/src/PortRouting.ts +1888 -0
- package/src/index.ts +13 -0
- package/src/internal/canonical-append.ts +15 -0
- package/src/internal/do-journal.ts +1449 -0
- package/src/internal/migrations.ts +395 -0
- package/src/internal/owned-state.ts +300 -0
- package/src/internal/prompt-checkpoint.ts +170 -0
- package/src/internal/storage-span.ts +54 -0
- package/README.md +0 -3
|
@@ -0,0 +1,966 @@
|
|
|
1
|
+
import { IntegrityReport } from "@systemfsoftware/agent/admin";
|
|
2
|
+
import { DurableRuntimeFailpointError } from "@systemfsoftware/agent/durable-failpoint";
|
|
3
|
+
import { MessageDeliveryError, MessageDeliveryFailpointError } from "@systemfsoftware/agent/message-delivery";
|
|
4
|
+
import { SettlementPublication, SettlementPublicationResult } from "@systemfsoftware/agent/settlement-publisher";
|
|
5
|
+
import { AbortCommand, AbortIntent, AdmissionConflict, AdmissionPolicyError, AdmissionRequest, AdmissionResult, ChildSettledNotification, JoinedToHost, LedgerError, MarkReadyRequest, OwnershipLost, SettlementConflict, SubmissionLookupByKey, SubmissionSnapshot } from "@systemfsoftware/agent/submission-ledger";
|
|
6
|
+
import { ThreadArchiveRange } from "@systemfsoftware/agent/thread-archive-range";
|
|
7
|
+
import { AppendConflict, AppendRequest, AppendResult, ExecutionCheckpoint, ExecutionRead, ThreadExport, ThreadExportRejected, ThreadExportRequest, ThreadIdentity, ThreadIdentityRequest, ThreadMaterialization, ThreadNotMaterialized, ThreadStoreError, ThreadTail, ThreadTailRequest } from "@systemfsoftware/agent/thread-store";
|
|
8
|
+
import { WorkDiscoveryUnavailable } from "@systemfsoftware/agent/thread-work";
|
|
9
|
+
import { WorkerAdmissionRequest } from "@systemfsoftware/agent/worker-admission";
|
|
10
|
+
import * as Schema from "effect/Schema";
|
|
11
|
+
declare namespace PortProtocol_d_exports {
|
|
12
|
+
export { LedgerAdmitCall, LedgerAdmitResult, LedgerFundingOwnerCall, LedgerFundingOwnerResult, LedgerInspectWorkerCall, LedgerInspectWorkerResult, LedgerLookupCall, LedgerLookupResult, LedgerMarkReadyCall, LedgerMarkReadyResult, LedgerRecordChildSettledCall, LedgerRecordChildSettledResult, LedgerRequestAbortCall, LedgerRequestAbortResult, LedgerResolveAdmissionCall, LedgerResolveAdmissionResult, LedgerStopWorkerCall, LedgerStopWorkerResult, MAX_PORT_DIAGNOSTIC_LENGTH, MessageDeliveryCompleteCall, MessageDeliveryCompleteResult, MessageDeliveryListCall, MessageDeliveryListResult, PortFailed, PortFailure, PortProtocolError, PortRequest, PortRequestEnvelope, PortResponse, PortResponseEnvelope, PortResult, PortSucceeded, SettlementPublishCall, SettlementPublishResult, StoreAppendCall, StoreAppendResult, StoreCountPeerMessagesCall, StoreCountPeerMessagesResult, StoreExportCall, StoreExportResult, StoreInspectTailCall, StoreInspectTailResult, StoreMaterializeCall, StoreMaterializeResult, StoreRangeArchiveCall, StoreRangeArchiveResult, StoreRangePageCall, StoreRangePageResult, StoreRangeSealCall, StoreRangeSealResult, StoreRangeVerifyCall, StoreRangeVerifyResult, StoreReadExecutionCall, StoreReadExecutionResult, StoreReadIdentityCall, StoreReadIdentityResult, StoreReadPageCall, StoreReadPageResult, StoreReadPromptCall, StoreReadPromptResult, StoreVerificationCall, StoreVerificationResult, StoreWorkPageCall, StoreWorkPageResult, StoreWorkRebuildCall, StoreWorkRebuildResult, StoreWorkerCapacityCall, StoreWorkerCapacityResult, WorkerAdmitCall, WorkerAdmitResult, boundPortDiagnostic, decodePortRequest, decodePortResponse, encodePortRequest, encodePortResponse };
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The cross-Durable-Object port protocol (plan §1.3, D-P6-3): Schema request/response/error
|
|
16
|
+
* envelopes for the CLOSED route-capable subset of the thread ports. One Thread's
|
|
17
|
+
* Durable Object executes another Thread's request against its OWN local facets; the
|
|
18
|
+
* envelopes here are the only values that cross the Object boundary, and they are
|
|
19
|
+
* transport-agnostic — native Durable Object JS RPC is the shipped carrier, fetch-with-JSON
|
|
20
|
+
* the documented fallback, and both move the same Schema-encoded JSON.
|
|
21
|
+
*
|
|
22
|
+
* The closed subset is exactly the set of operations the durable coordinator performs against
|
|
23
|
+
* a FOREIGN Thread (parent/child establishment, status checks, abort propagation,
|
|
24
|
+
* child-settlement notification, and the child-thread store operations used by
|
|
25
|
+
* establishment, `verifySettledChild`, and result projection):
|
|
26
|
+
*
|
|
27
|
+
* - worker: `admitWorker` (ledger admission, materialization, creation, origin, readiness);
|
|
28
|
+
* - ledger: `admit`, `markReady`, `lookup`, `resolveAdmission`, `requestAbort`,
|
|
29
|
+
* `recordChildSettled`;
|
|
30
|
+
* - publisher: `publish`;
|
|
31
|
+
* - store: `materialize`, `append`, `read` and `readPrompt` (one page), `readIdentity`,
|
|
32
|
+
* `inspectTail`, `export`, `countPeerMessages`, `work.page`, `work.rebuild`.
|
|
33
|
+
*
|
|
34
|
+
* Every other port operation is lane-local and has no envelope. Foreign operations
|
|
35
|
+
* fail fast and typed instead of widening the distributed surface.
|
|
36
|
+
*
|
|
37
|
+
* Failures cross the boundary as the `PortFailure` union and re-decode on the caller side to
|
|
38
|
+
* the SAME tagged error types the local facet would have produced, so routed calls keep
|
|
39
|
+
* error-tag fidelity. `cause` chains inside `LedgerError`/`ThreadStoreError` travel as
|
|
40
|
+
* Schema defects and do not claim instance fidelity across Objects (plan §2.8).
|
|
41
|
+
*/
|
|
42
|
+
/** Ceiling for protocol diagnostic strings; matches `AdmissionIndeterminate.reason`. */
|
|
43
|
+
declare const MAX_PORT_DIAGNOSTIC_LENGTH = 4096;
|
|
44
|
+
/** Truncate a diagnostic string to the protocol's bounded diagnostic length. */
|
|
45
|
+
declare const boundPortDiagnostic: (value: string) => string;
|
|
46
|
+
declare const PortProtocolError_base: Schema.Class<PortProtocolError, Schema.TaggedStruct<"PortProtocolError", {
|
|
47
|
+
readonly message: Schema.String;
|
|
48
|
+
}>, import("effect/Cause").YieldableError>;
|
|
49
|
+
/**
|
|
50
|
+
* The envelope itself could not be honored: the receiving Object could not decode the
|
|
51
|
+
* request, or a response could not be encoded/decoded. It never carries port semantics —
|
|
52
|
+
* callers fold it into the operation's base error (`LedgerError`/`ThreadStoreError`),
|
|
53
|
+
* except `resolveAdmission`, which folds it into `AdmissionIndeterminate` because a
|
|
54
|
+
* non-answer is never proof of absence (SUB-031).
|
|
55
|
+
*/
|
|
56
|
+
declare class PortProtocolError extends PortProtocolError_base {}
|
|
57
|
+
declare const WorkerAdmitCall_base: Schema.Class<WorkerAdmitCall, Schema.TaggedStruct<"WorkerAdmit", {
|
|
58
|
+
readonly request: typeof WorkerAdmissionRequest;
|
|
59
|
+
}>, {}>;
|
|
60
|
+
/** One destination-owned worker admission, including canonical initialization and readiness. */
|
|
61
|
+
declare class WorkerAdmitCall extends WorkerAdmitCall_base {}
|
|
62
|
+
declare const LedgerAdmitCall_base: Schema.Class<LedgerAdmitCall, Schema.TaggedStruct<"LedgerAdmit", {
|
|
63
|
+
readonly request: typeof AdmissionRequest;
|
|
64
|
+
}>, {}>;
|
|
65
|
+
/** Routed `SubmissionLedger.admit` — child establishment admits INTO the owning Object. */
|
|
66
|
+
declare class LedgerAdmitCall extends LedgerAdmitCall_base {}
|
|
67
|
+
declare const LedgerMarkReadyCall_base: Schema.Class<LedgerMarkReadyCall, Schema.TaggedStruct<"LedgerMarkReady", {
|
|
68
|
+
readonly request: typeof MarkReadyRequest;
|
|
69
|
+
}>, {}>;
|
|
70
|
+
/** Routed `SubmissionLedger.markReady` for a Submission owned by another Object. */
|
|
71
|
+
declare class LedgerMarkReadyCall extends LedgerMarkReadyCall_base {}
|
|
72
|
+
declare const LedgerLookupCall_base: Schema.Class<LedgerLookupCall, Schema.TaggedStruct<"LedgerLookup", {
|
|
73
|
+
readonly request: Schema.Union<readonly [typeof import("@systemfsoftware/agent/submission-ledger").SubmissionLookupById, typeof SubmissionLookupByKey]>;
|
|
74
|
+
}>, {}>;
|
|
75
|
+
/** Routed `SubmissionLedger.lookup` (by identity or scoped idempotency key). */
|
|
76
|
+
declare class LedgerLookupCall extends LedgerLookupCall_base {}
|
|
77
|
+
declare const LedgerFundingOwnerCall_base: Schema.Class<LedgerFundingOwnerCall, Schema.TaggedStruct<"LedgerFundingOwner", {
|
|
78
|
+
readonly request: Schema.Struct<{
|
|
79
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
80
|
+
readonly submissionId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">;
|
|
81
|
+
}>;
|
|
82
|
+
}>, {}>;
|
|
83
|
+
declare class LedgerFundingOwnerCall extends LedgerFundingOwnerCall_base {}
|
|
84
|
+
declare const LedgerResolveAdmissionCall_base: Schema.Class<LedgerResolveAdmissionCall, Schema.TaggedStruct<"LedgerResolveAdmission", {
|
|
85
|
+
readonly request: typeof SubmissionLookupByKey;
|
|
86
|
+
}>, {}>;
|
|
87
|
+
/** Routed `SubmissionLedger.resolveAdmission` — the SUB-031 tri-state authority call. */
|
|
88
|
+
declare class LedgerResolveAdmissionCall extends LedgerResolveAdmissionCall_base {}
|
|
89
|
+
declare const LedgerInspectWorkerCall_base: Schema.Class<LedgerInspectWorkerCall, Schema.TaggedStruct<"LedgerInspectWorker", {
|
|
90
|
+
readonly request: Schema.Struct<{
|
|
91
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
92
|
+
}>;
|
|
93
|
+
}>, {}>;
|
|
94
|
+
declare class LedgerInspectWorkerCall extends LedgerInspectWorkerCall_base {}
|
|
95
|
+
declare const LedgerInspectWorkerResult_base: Schema.Class<LedgerInspectWorkerResult, Schema.TaggedStruct<"LedgerInspectWorkerResult", {
|
|
96
|
+
readonly state: Schema.Struct<{
|
|
97
|
+
readonly latest: Schema.NullOr<typeof SubmissionSnapshot>;
|
|
98
|
+
readonly active: Schema.NullOr<typeof SubmissionSnapshot>;
|
|
99
|
+
readonly stopped: Schema.Boolean;
|
|
100
|
+
readonly terminal: Schema.optionalKey<Schema.Literals<readonly ["completed", "failed", "cancelled"]>>;
|
|
101
|
+
}>;
|
|
102
|
+
}>, {}>;
|
|
103
|
+
declare class LedgerInspectWorkerResult extends LedgerInspectWorkerResult_base {}
|
|
104
|
+
declare const LedgerStopWorkerCall_base: Schema.Class<LedgerStopWorkerCall, Schema.TaggedStruct<"LedgerStopWorker", {
|
|
105
|
+
readonly request: Schema.Struct<{
|
|
106
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
107
|
+
readonly author: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/Principal">;
|
|
108
|
+
}>;
|
|
109
|
+
}>, {}>;
|
|
110
|
+
declare class LedgerStopWorkerCall extends LedgerStopWorkerCall_base {}
|
|
111
|
+
declare const LedgerStopWorkerResult_base: Schema.Class<LedgerStopWorkerResult, Schema.TaggedStruct<"LedgerStopWorkerResult", {
|
|
112
|
+
readonly owned: Schema.Natural;
|
|
113
|
+
}>, {}>;
|
|
114
|
+
declare class LedgerStopWorkerResult extends LedgerStopWorkerResult_base {}
|
|
115
|
+
declare const LedgerRequestAbortCall_base: Schema.Class<LedgerRequestAbortCall, Schema.TaggedStruct<"LedgerRequestAbort", {
|
|
116
|
+
readonly request: typeof AbortCommand;
|
|
117
|
+
}>, {}>;
|
|
118
|
+
/** Routed `SubmissionLedger.requestAbort` — abort propagation across Objects. */
|
|
119
|
+
declare class LedgerRequestAbortCall extends LedgerRequestAbortCall_base {}
|
|
120
|
+
declare const LedgerRecordChildSettledCall_base: Schema.Class<LedgerRecordChildSettledCall, Schema.TaggedStruct<"LedgerRecordChildSettled", {
|
|
121
|
+
readonly request: typeof ChildSettledNotification;
|
|
122
|
+
}>, {}>;
|
|
123
|
+
/** Routed `SubmissionLedger.recordChildSettled` — the child→parent durable notification. */
|
|
124
|
+
declare class LedgerRecordChildSettledCall extends LedgerRecordChildSettledCall_base {}
|
|
125
|
+
declare const SettlementPublishCall_base: Schema.Class<SettlementPublishCall, Schema.TaggedStruct<"SettlementPublish", {
|
|
126
|
+
readonly request: typeof SettlementPublication;
|
|
127
|
+
}>, {}>;
|
|
128
|
+
/** Publish canonical settlement intent at the owning Thread. */
|
|
129
|
+
declare class SettlementPublishCall extends SettlementPublishCall_base {}
|
|
130
|
+
declare const SettlementPublishResult_base: Schema.Class<SettlementPublishResult, Schema.TaggedStruct<"SettlementPublishResult", {
|
|
131
|
+
readonly result: typeof SettlementPublicationResult;
|
|
132
|
+
}>, {}>;
|
|
133
|
+
declare class SettlementPublishResult extends SettlementPublishResult_base {}
|
|
134
|
+
declare const StoreMaterializeCall_base: Schema.Class<StoreMaterializeCall, Schema.TaggedStruct<"StoreMaterialize", {
|
|
135
|
+
readonly request: typeof ThreadMaterialization;
|
|
136
|
+
}>, {}>;
|
|
137
|
+
/** Routed `ThreadStore.materialize` against the owning Object. */
|
|
138
|
+
declare class StoreMaterializeCall extends StoreMaterializeCall_base {}
|
|
139
|
+
declare const StoreAppendCall_base: Schema.Class<StoreAppendCall, Schema.TaggedStruct<"StoreAppend", {
|
|
140
|
+
readonly request: typeof AppendRequest;
|
|
141
|
+
}>, {}>;
|
|
142
|
+
/** Routed `ThreadStore.append` against the owning Object. */
|
|
143
|
+
declare class StoreAppendCall extends StoreAppendCall_base {}
|
|
144
|
+
declare const StoreReadPageCall_base: Schema.Class<StoreReadPageCall, Schema.TaggedStruct<"StoreReadPage", {
|
|
145
|
+
readonly request: Schema.Union<readonly [Schema.Struct<{
|
|
146
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
147
|
+
readonly selection: Schema.Union<readonly [Schema.TaggedStruct<"RecordId", {
|
|
148
|
+
readonly recordId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/RecordId">;
|
|
149
|
+
}>, Schema.TaggedStruct<"RunInput", {
|
|
150
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
151
|
+
}>, Schema.TaggedStruct<"ToolDeclaration", {
|
|
152
|
+
readonly settlementRecordId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/RecordId">;
|
|
153
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
154
|
+
}>, Schema.TaggedStruct<"RunEvidence", {
|
|
155
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
156
|
+
readonly submissionId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">;
|
|
157
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
158
|
+
}>, Schema.Struct<{
|
|
159
|
+
readonly _tag: Schema.tag<"OperationEvidence">;
|
|
160
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
161
|
+
readonly toolCallId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ToolCallId">;
|
|
162
|
+
readonly originRecordId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/RecordId">;
|
|
163
|
+
readonly approvalToolCallIds: Schema.$Array<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ToolCallId">>;
|
|
164
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
165
|
+
}>, Schema.TaggedStruct<"LastAgentUpdate", {
|
|
166
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
167
|
+
}>, Schema.TaggedStruct<"PromptEvidence", {
|
|
168
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
169
|
+
}>, Schema.TaggedStruct<"LatestModelCompleted", {
|
|
170
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
171
|
+
}>, Schema.TaggedStruct<"LatestApplicationInput", {
|
|
172
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
173
|
+
}>, Schema.TaggedStruct<"DurableHistoryOwner", {
|
|
174
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
175
|
+
}>, Schema.TaggedStruct<"ContextWindowBoundary", {
|
|
176
|
+
readonly atSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
177
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
178
|
+
}>, Schema.TaggedStruct<"DeliveryPredecessor", {
|
|
179
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
180
|
+
}>, Schema.TaggedStruct<"WorkHandoffs", {
|
|
181
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
182
|
+
}>, Schema.TaggedStruct<"LiveWorkerInputs", {
|
|
183
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
184
|
+
readonly workerThreadId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">>;
|
|
185
|
+
}>, Schema.TaggedStruct<"WorkerStop", {
|
|
186
|
+
readonly workerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
187
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
188
|
+
}>, Schema.TaggedStruct<"WorkerExecution", {
|
|
189
|
+
readonly expectedTailSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
190
|
+
}>, Schema.TaggedStruct<"WorkerState", {
|
|
191
|
+
readonly expectedTailSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
192
|
+
readonly sourceSubmissionId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">>;
|
|
193
|
+
}>]>;
|
|
194
|
+
readonly page: Schema.Struct<{
|
|
195
|
+
readonly afterSequence: Schema.optionalKey<Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">>;
|
|
196
|
+
readonly limit: Schema.Natural;
|
|
197
|
+
}>;
|
|
198
|
+
}>, typeof import("@systemfsoftware/agent/thread-store").ThreadRead]>;
|
|
199
|
+
}>, {}>;
|
|
200
|
+
/** Routed one-page `ThreadStore.read`; the page bound is the request's own `limit`. */
|
|
201
|
+
declare class StoreReadPageCall extends StoreReadPageCall_base {}
|
|
202
|
+
declare const StoreReadPromptCall_base: Schema.Class<StoreReadPromptCall, Schema.TaggedStruct<"StoreReadPrompt", {
|
|
203
|
+
readonly request: Schema.Struct<{
|
|
204
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
205
|
+
readonly afterSequence: Schema.optionalKey<Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">>;
|
|
206
|
+
readonly limit: Schema.Natural;
|
|
207
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
208
|
+
}>;
|
|
209
|
+
}>, {}>;
|
|
210
|
+
declare class StoreReadPromptCall extends StoreReadPromptCall_base {}
|
|
211
|
+
declare const StoreInspectTailCall_base: Schema.Class<StoreInspectTailCall, Schema.TaggedStruct<"StoreInspectTail", {
|
|
212
|
+
readonly request: typeof ThreadTailRequest;
|
|
213
|
+
}>, {}>;
|
|
214
|
+
/** Routed `ThreadStore.inspectTail` against the owning Object. */
|
|
215
|
+
declare class StoreInspectTailCall extends StoreInspectTailCall_base {}
|
|
216
|
+
declare const StoreReadIdentityCall_base: Schema.Class<StoreReadIdentityCall, Schema.TaggedStruct<"StoreReadIdentity", {
|
|
217
|
+
readonly request: typeof ThreadIdentityRequest;
|
|
218
|
+
}>, {}>;
|
|
219
|
+
/** Routed bounded `ThreadStore.readIdentity` against the owning Object. */
|
|
220
|
+
declare class StoreReadIdentityCall extends StoreReadIdentityCall_base {}
|
|
221
|
+
declare const StoreReadExecutionCall_base: Schema.Class<StoreReadExecutionCall, Schema.TaggedStruct<"StoreReadExecution", {
|
|
222
|
+
readonly request: typeof ExecutionRead;
|
|
223
|
+
}>, {}>;
|
|
224
|
+
declare class StoreReadExecutionCall extends StoreReadExecutionCall_base {}
|
|
225
|
+
declare const StoreWorkerCapacityCall_base: Schema.Class<StoreWorkerCapacityCall, Schema.TaggedStruct<"StoreWorkerCapacity", {
|
|
226
|
+
readonly request: Schema.Struct<{
|
|
227
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
228
|
+
readonly workerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
229
|
+
readonly expectedTailSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
230
|
+
readonly update: Schema.Boolean;
|
|
231
|
+
readonly activeLimit: Schema.Int;
|
|
232
|
+
readonly pendingLimit: Schema.Int;
|
|
233
|
+
}>;
|
|
234
|
+
}>, {}>;
|
|
235
|
+
declare class StoreWorkerCapacityCall extends StoreWorkerCapacityCall_base {}
|
|
236
|
+
declare const StoreVerificationCall_base: Schema.Class<StoreVerificationCall, Schema.TaggedStruct<"StoreVerification", {
|
|
237
|
+
readonly request: Schema.Struct<{
|
|
238
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
239
|
+
readonly requireAllSettled: Schema.optionalKey<Schema.Boolean>;
|
|
240
|
+
}>;
|
|
241
|
+
}>, {}>;
|
|
242
|
+
declare class StoreVerificationCall extends StoreVerificationCall_base {}
|
|
243
|
+
declare const StoreExportCall_base: Schema.Class<StoreExportCall, Schema.TaggedStruct<"StoreExport", {
|
|
244
|
+
readonly request: typeof ThreadExportRequest;
|
|
245
|
+
}>, {}>;
|
|
246
|
+
/** Routed `ThreadStore.export` against the owning Object. */
|
|
247
|
+
declare class StoreExportCall extends StoreExportCall_base {}
|
|
248
|
+
declare const StoreCountPeerMessagesCall_base: Schema.Class<StoreCountPeerMessagesCall, Schema.TaggedStruct<"StoreCountPeerMessages", {
|
|
249
|
+
readonly request: Schema.Struct<{
|
|
250
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
251
|
+
readonly nowMillis: Schema.Int;
|
|
252
|
+
readonly limit: Schema.Int;
|
|
253
|
+
}>;
|
|
254
|
+
}>, {}>;
|
|
255
|
+
declare class StoreCountPeerMessagesCall extends StoreCountPeerMessagesCall_base {}
|
|
256
|
+
declare const StoreWorkPageCall_base: Schema.Class<StoreWorkPageCall, Schema.TaggedStruct<"StoreWorkPage", {
|
|
257
|
+
readonly request: Schema.Struct<{
|
|
258
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
259
|
+
readonly cursor: Schema.optionalKey<Schema.NonEmptyString>;
|
|
260
|
+
readonly limit: Schema.Int;
|
|
261
|
+
}>;
|
|
262
|
+
}>, {}>;
|
|
263
|
+
/** Work maintenance is routed to the exact Thread's authoritative owner. */
|
|
264
|
+
declare class StoreWorkPageCall extends StoreWorkPageCall_base {}
|
|
265
|
+
declare const StoreWorkRebuildCall_base: Schema.Class<StoreWorkRebuildCall, Schema.TaggedStruct<"StoreWorkRebuild", {
|
|
266
|
+
readonly request: Schema.Struct<{
|
|
267
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
268
|
+
readonly restart: Schema.optionalKey<Schema.Boolean>;
|
|
269
|
+
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
270
|
+
}>;
|
|
271
|
+
}>, {}>;
|
|
272
|
+
declare class StoreWorkRebuildCall extends StoreWorkRebuildCall_base {}
|
|
273
|
+
declare const MessageDeliveryListCall_base: Schema.Class<MessageDeliveryListCall, Schema.TaggedStruct<"MessageDeliveryList", {
|
|
274
|
+
readonly request: Schema.Struct<{
|
|
275
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
276
|
+
readonly limit: Schema.Int;
|
|
277
|
+
readonly after: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">>;
|
|
278
|
+
readonly pendingOnly: Schema.optionalKey<Schema.Boolean>;
|
|
279
|
+
readonly workerStarts: Schema.optionalKey<Schema.Struct<{
|
|
280
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
281
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
282
|
+
}>>;
|
|
283
|
+
readonly pendingWorker: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">>;
|
|
284
|
+
}>;
|
|
285
|
+
}>, {}>;
|
|
286
|
+
declare class MessageDeliveryListCall extends MessageDeliveryListCall_base {}
|
|
287
|
+
declare const MessageDeliveryCompleteCall_base: Schema.Class<MessageDeliveryCompleteCall, Schema.TaggedStruct<"MessageDeliveryComplete", {
|
|
288
|
+
readonly key: Schema.Struct<{
|
|
289
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
290
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
291
|
+
}>;
|
|
292
|
+
readonly completion: Schema.Struct<{
|
|
293
|
+
readonly receipt: typeof import("@systemfsoftware/agent/receipt").Receipt;
|
|
294
|
+
readonly settlement: typeof import("@systemfsoftware/agent/submission-ledger").Settlement;
|
|
295
|
+
readonly admissionKey: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
296
|
+
readonly inputDigest: Schema.brand<Schema.String, "@effect-agent/thread/Digest">;
|
|
297
|
+
}>;
|
|
298
|
+
}>, {}>;
|
|
299
|
+
declare class MessageDeliveryCompleteCall extends MessageDeliveryCompleteCall_base {}
|
|
300
|
+
declare const StoreRangePageCall_base: Schema.Class<StoreRangePageCall, Schema.TaggedStruct<"StoreRangePage", {
|
|
301
|
+
readonly request: Schema.Struct<{
|
|
302
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
303
|
+
readonly afterSequence: Schema.optionalKey<Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">>;
|
|
304
|
+
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
305
|
+
}>;
|
|
306
|
+
}>, {}>;
|
|
307
|
+
declare class StoreRangePageCall extends StoreRangePageCall_base {}
|
|
308
|
+
declare const StoreRangeSealCall_base: Schema.Class<StoreRangeSealCall, Schema.TaggedStruct<"StoreRangeSeal", {
|
|
309
|
+
readonly request: Schema.Struct<{
|
|
310
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
311
|
+
}>;
|
|
312
|
+
}>, {}>;
|
|
313
|
+
declare class StoreRangeSealCall extends StoreRangeSealCall_base {}
|
|
314
|
+
declare const StoreRangeArchiveCall_base: Schema.Class<StoreRangeArchiveCall, Schema.TaggedStruct<"StoreRangeArchive", {
|
|
315
|
+
readonly request: Schema.Struct<{
|
|
316
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
317
|
+
readonly firstSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
318
|
+
}>;
|
|
319
|
+
}>, {}>;
|
|
320
|
+
declare class StoreRangeArchiveCall extends StoreRangeArchiveCall_base {}
|
|
321
|
+
declare const StoreRangeVerifyCall_base: Schema.Class<StoreRangeVerifyCall, Schema.TaggedStruct<"StoreRangeVerify", {
|
|
322
|
+
readonly request: Schema.Struct<{
|
|
323
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
324
|
+
readonly firstSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
325
|
+
}>;
|
|
326
|
+
}>, {}>;
|
|
327
|
+
declare class StoreRangeVerifyCall extends StoreRangeVerifyCall_base {}
|
|
328
|
+
/** Every request that may cross a Durable Object boundary — the CLOSED route-capable subset. */
|
|
329
|
+
declare const PortRequest: Schema.Union<readonly [typeof SettlementPublishCall, typeof WorkerAdmitCall, typeof MessageDeliveryListCall, typeof MessageDeliveryCompleteCall, typeof LedgerAdmitCall, typeof LedgerMarkReadyCall, typeof LedgerLookupCall, typeof LedgerFundingOwnerCall, typeof LedgerResolveAdmissionCall, typeof LedgerRequestAbortCall, typeof LedgerStopWorkerCall, typeof LedgerInspectWorkerCall, typeof LedgerRecordChildSettledCall, typeof StoreRangePageCall, typeof StoreRangeSealCall, typeof StoreRangeArchiveCall, typeof StoreRangeVerifyCall, typeof StoreMaterializeCall, typeof StoreAppendCall, typeof StoreReadPageCall, typeof StoreReadPromptCall, typeof StoreInspectTailCall, typeof StoreReadIdentityCall, typeof StoreReadExecutionCall, typeof StoreWorkerCapacityCall, typeof StoreVerificationCall, typeof StoreExportCall, typeof StoreCountPeerMessagesCall, typeof StoreWorkPageCall, typeof StoreWorkRebuildCall]>;
|
|
330
|
+
type PortRequest = typeof PortRequest.Type;
|
|
331
|
+
/** The wire form of one port request (what a transport actually carries). */
|
|
332
|
+
type PortRequestEnvelope = typeof PortRequest.Encoded;
|
|
333
|
+
declare const WorkerAdmitResult_base: Schema.Class<WorkerAdmitResult, Schema.TaggedStruct<"WorkerAdmitResult", {
|
|
334
|
+
readonly result: typeof AdmissionResult;
|
|
335
|
+
}>, {}>;
|
|
336
|
+
declare class WorkerAdmitResult extends WorkerAdmitResult_base {}
|
|
337
|
+
declare const LedgerAdmitResult_base: Schema.Class<LedgerAdmitResult, Schema.TaggedStruct<"LedgerAdmitResult", {
|
|
338
|
+
readonly result: typeof AdmissionResult;
|
|
339
|
+
}>, {}>;
|
|
340
|
+
declare class LedgerAdmitResult extends LedgerAdmitResult_base {}
|
|
341
|
+
declare const LedgerMarkReadyResult_base: Schema.Class<LedgerMarkReadyResult, Schema.TaggedStruct<"LedgerMarkReadyResult", {}>, {}>;
|
|
342
|
+
declare class LedgerMarkReadyResult extends LedgerMarkReadyResult_base {}
|
|
343
|
+
declare const LedgerLookupResult_base: Schema.Class<LedgerLookupResult, Schema.TaggedStruct<"LedgerLookupResult", {
|
|
344
|
+
readonly submission: Schema.optionalKey<typeof SubmissionSnapshot>;
|
|
345
|
+
}>, {}>;
|
|
346
|
+
/** `submission` is absent exactly when the lookup answered `Option.none`. */
|
|
347
|
+
declare class LedgerLookupResult extends LedgerLookupResult_base {}
|
|
348
|
+
declare const LedgerResolveAdmissionResult_base: Schema.Class<LedgerResolveAdmissionResult, Schema.TaggedStruct<"LedgerResolveAdmissionResult", {
|
|
349
|
+
readonly resolution: Schema.Union<readonly [typeof import("@systemfsoftware/agent/submission-ledger").AdmissionNotAdmitted, typeof import("@systemfsoftware/agent/submission-ledger").AdmissionAdmitted, typeof import("@systemfsoftware/agent/submission-ledger").AdmissionIndeterminate]>;
|
|
350
|
+
}>, {}>;
|
|
351
|
+
declare class LedgerResolveAdmissionResult extends LedgerResolveAdmissionResult_base {}
|
|
352
|
+
declare const LedgerRequestAbortResult_base: Schema.Class<LedgerRequestAbortResult, Schema.TaggedStruct<"LedgerRequestAbortResult", {
|
|
353
|
+
readonly intent: typeof AbortIntent;
|
|
354
|
+
}>, {}>;
|
|
355
|
+
declare class LedgerRequestAbortResult extends LedgerRequestAbortResult_base {}
|
|
356
|
+
declare const LedgerRecordChildSettledResult_base: Schema.Class<LedgerRecordChildSettledResult, Schema.TaggedStruct<"LedgerRecordChildSettledResult", {
|
|
357
|
+
readonly outcome: Schema.Literals<readonly ["woken", "still-waiting", "not-waiting"]>;
|
|
358
|
+
}>, {}>;
|
|
359
|
+
declare class LedgerRecordChildSettledResult extends LedgerRecordChildSettledResult_base {}
|
|
360
|
+
declare const StoreMaterializeResult_base: Schema.Class<StoreMaterializeResult, Schema.TaggedStruct<"StoreMaterializeResult", {}>, {}>;
|
|
361
|
+
declare class StoreMaterializeResult extends StoreMaterializeResult_base {}
|
|
362
|
+
declare const StoreAppendResult_base: Schema.Class<StoreAppendResult, Schema.TaggedStruct<"StoreAppendResult", {
|
|
363
|
+
readonly result: typeof AppendResult;
|
|
364
|
+
}>, {}>;
|
|
365
|
+
declare class StoreAppendResult extends StoreAppendResult_base {}
|
|
366
|
+
declare const StoreReadPageResult_base: Schema.Class<StoreReadPageResult, Schema.TaggedStruct<"StoreReadPageResult", {
|
|
367
|
+
readonly records: Schema.$Array<Schema.decodeTo<Schema.toType<typeof import("@systemfsoftware/agent/records").CanonicalRecordEnvelope>, Schema.Struct<{
|
|
368
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
369
|
+
readonly batchId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/BatchId">;
|
|
370
|
+
readonly sequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
371
|
+
readonly offset: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/ObservationOffset">;
|
|
372
|
+
readonly record: Schema.decodeTo<Schema.toType<typeof import("@systemfsoftware/agent/records").RecordEnvelope>, Schema.declare<Schema.Json, Schema.Json>, never, never>;
|
|
373
|
+
}>, never, never>>;
|
|
374
|
+
}>, {}>;
|
|
375
|
+
/** One page of canonical records, bounded by the request's `limit` (≤ 1,024). */
|
|
376
|
+
declare class StoreReadPageResult extends StoreReadPageResult_base {}
|
|
377
|
+
declare const StoreReadPromptResult_base: Schema.Class<StoreReadPromptResult, Schema.TaggedStruct<"StoreReadPromptResult", {
|
|
378
|
+
readonly records: Schema.$Array<Schema.Struct<{
|
|
379
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
380
|
+
readonly sequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
381
|
+
readonly record: Schema.Struct<{
|
|
382
|
+
readonly recordId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/RecordId">;
|
|
383
|
+
readonly payload: Schema.TaggedUnion<{
|
|
384
|
+
readonly CompactionCreated: Schema.TaggedStruct<"CompactionCreated", {
|
|
385
|
+
readonly _tag: Schema.tag<"CompactionCreated">;
|
|
386
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
387
|
+
readonly turn: Schema.Int;
|
|
388
|
+
readonly kind: Schema.Literals<readonly ["clear-tool-results", "summarize", "rollover"]>;
|
|
389
|
+
readonly coversThrough: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
390
|
+
readonly summary: Schema.optionalKey<Schema.String>;
|
|
391
|
+
readonly handoff: Schema.optionalKey<Schema.NonEmptyString>;
|
|
392
|
+
}>;
|
|
393
|
+
readonly ModelCompleted: Schema.TaggedStruct<"ModelCompleted", {
|
|
394
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
395
|
+
readonly history: Schema.optionalKey<Schema.decodeTo<Schema.toType<Schema.Codec<import("effect/ai/Prompt").Prompt, import("effect/ai/Prompt").PromptEncoded, never, never>>, Schema.Struct<{
|
|
396
|
+
readonly content: Schema.$Array<Schema.toEncoded<Schema.Codec<import("effect/ai/Prompt").Message, import("effect/ai/Prompt").MessageEncoded, never, never>>>;
|
|
397
|
+
}>, never, never>>;
|
|
398
|
+
}>;
|
|
399
|
+
readonly ModelResponseRecorded: Schema.TaggedStruct<"ModelResponseRecorded", {
|
|
400
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
401
|
+
readonly turn: Schema.Int;
|
|
402
|
+
readonly messages: Schema.decodeTo<Schema.toType<Schema.Codec<import("effect/ai/Prompt").Prompt, import("effect/ai/Prompt").PromptEncoded, never, never>>, Schema.Struct<{
|
|
403
|
+
readonly content: Schema.$Array<Schema.toEncoded<Schema.Codec<import("effect/ai/Prompt").Message, import("effect/ai/Prompt").MessageEncoded, never, never>>>;
|
|
404
|
+
}>, never, never>;
|
|
405
|
+
readonly runScopedPrefixLength: Schema.optionalKey<Schema.Int>;
|
|
406
|
+
}>;
|
|
407
|
+
readonly RunCompleted: Schema.TaggedStruct<"RunCompleted", {
|
|
408
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
409
|
+
}>;
|
|
410
|
+
readonly RunFailed: Schema.TaggedStruct<"RunFailed", {
|
|
411
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
412
|
+
}>;
|
|
413
|
+
readonly SubmissionSettled: Schema.TaggedStruct<"SubmissionSettled", {
|
|
414
|
+
readonly runId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">>;
|
|
415
|
+
readonly submissionId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">;
|
|
416
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
417
|
+
}>;
|
|
418
|
+
readonly ToolCallSettled: Schema.TaggedStruct<"ToolCallSettled", {
|
|
419
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
420
|
+
readonly toolCallId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ToolCallId">;
|
|
421
|
+
readonly toolName: Schema.NonEmptyString;
|
|
422
|
+
readonly result: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
423
|
+
readonly isFailure: Schema.Boolean;
|
|
424
|
+
}>;
|
|
425
|
+
readonly UserInputRecorded: Schema.TaggedStruct<"UserInputRecorded", {
|
|
426
|
+
readonly runId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">>;
|
|
427
|
+
readonly kind: Schema.Literals<readonly ["user", "steering", "follow-up"]>;
|
|
428
|
+
readonly submissionId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">>;
|
|
429
|
+
}>;
|
|
430
|
+
}>;
|
|
431
|
+
}>;
|
|
432
|
+
}>>;
|
|
433
|
+
}>, {}>;
|
|
434
|
+
declare class StoreReadPromptResult extends StoreReadPromptResult_base {}
|
|
435
|
+
declare const StoreInspectTailResult_base: Schema.Class<StoreInspectTailResult, Schema.TaggedStruct<"StoreInspectTailResult", {
|
|
436
|
+
readonly tail: typeof ThreadTail;
|
|
437
|
+
}>, {}>;
|
|
438
|
+
declare class StoreInspectTailResult extends StoreInspectTailResult_base {}
|
|
439
|
+
declare const StoreReadExecutionResult_base: Schema.Class<StoreReadExecutionResult, Schema.TaggedStruct<"StoreReadExecutionResult", {
|
|
440
|
+
readonly checkpoint: Schema.OptionFromNullOr<typeof ExecutionCheckpoint>;
|
|
441
|
+
}>, {}>;
|
|
442
|
+
declare class StoreReadExecutionResult extends StoreReadExecutionResult_base {}
|
|
443
|
+
declare const StoreReadIdentityResult_base: Schema.Class<StoreReadIdentityResult, Schema.TaggedStruct<"StoreReadIdentityResult", {
|
|
444
|
+
readonly identity: Schema.decodeTo<Schema.toType<typeof ThreadIdentity>, Schema.Struct<{
|
|
445
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
446
|
+
readonly tailSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
447
|
+
readonly hasAdmissions: Schema.Boolean;
|
|
448
|
+
readonly records: Schema.$Array<Schema.decodeTo<Schema.toType<typeof import("@systemfsoftware/agent/records").CanonicalRecordEnvelope>, Schema.Struct<{
|
|
449
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
450
|
+
readonly batchId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/BatchId">;
|
|
451
|
+
readonly sequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
452
|
+
readonly offset: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/ObservationOffset">;
|
|
453
|
+
readonly record: Schema.decodeTo<Schema.toType<typeof import("@systemfsoftware/agent/records").RecordEnvelope>, Schema.declare<Schema.Json, Schema.Json>, never, never>;
|
|
454
|
+
}>, never, never>>;
|
|
455
|
+
}>, never, never>;
|
|
456
|
+
}>, {}>;
|
|
457
|
+
declare class StoreReadIdentityResult extends StoreReadIdentityResult_base {}
|
|
458
|
+
declare const LedgerFundingOwnerResult_base: Schema.Class<LedgerFundingOwnerResult, Schema.TaggedStruct<"LedgerFundingOwnerResult", {
|
|
459
|
+
readonly funding: Schema.Struct<{
|
|
460
|
+
readonly selected: typeof SubmissionSnapshot;
|
|
461
|
+
readonly owner: typeof SubmissionSnapshot;
|
|
462
|
+
}>;
|
|
463
|
+
}>, {}>;
|
|
464
|
+
declare class LedgerFundingOwnerResult extends LedgerFundingOwnerResult_base {}
|
|
465
|
+
declare const StoreWorkerCapacityResult_base: Schema.Class<StoreWorkerCapacityResult, Schema.TaggedStruct<"StoreWorkerCapacityResult", {
|
|
466
|
+
readonly capacity: Schema.Struct<{
|
|
467
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
468
|
+
readonly tailSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
469
|
+
readonly activeWorkers: Schema.Natural;
|
|
470
|
+
readonly workerActive: Schema.Boolean;
|
|
471
|
+
readonly pendingInputs: Schema.Natural;
|
|
472
|
+
}>;
|
|
473
|
+
}>, {}>;
|
|
474
|
+
declare class StoreWorkerCapacityResult extends StoreWorkerCapacityResult_base {}
|
|
475
|
+
declare const StoreVerificationResult_base: Schema.Class<StoreVerificationResult, Schema.TaggedStruct<"StoreVerificationResult", {
|
|
476
|
+
readonly report: typeof IntegrityReport;
|
|
477
|
+
}>, {}>;
|
|
478
|
+
declare class StoreVerificationResult extends StoreVerificationResult_base {}
|
|
479
|
+
declare const StoreExportResult_base: Schema.Class<StoreExportResult, Schema.TaggedStruct<"StoreExportResult", {
|
|
480
|
+
readonly export: typeof ThreadExport;
|
|
481
|
+
}>, {}>;
|
|
482
|
+
declare class StoreExportResult extends StoreExportResult_base {}
|
|
483
|
+
declare const StoreCountPeerMessagesResult_base: Schema.Class<StoreCountPeerMessagesResult, Schema.TaggedStruct<"StoreCountPeerMessagesResult", {
|
|
484
|
+
readonly count: Schema.Int;
|
|
485
|
+
}>, {}>;
|
|
486
|
+
declare class StoreCountPeerMessagesResult extends StoreCountPeerMessagesResult_base {}
|
|
487
|
+
declare const StoreWorkPageResult_base: Schema.Class<StoreWorkPageResult, Schema.TaggedStruct<"StoreWorkPageResult", {
|
|
488
|
+
readonly page: Schema.Struct<{
|
|
489
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
490
|
+
readonly id: Schema.NonEmptyString;
|
|
491
|
+
readonly owner: Schema.Union<readonly [Schema.TaggedStruct<"Admission", {
|
|
492
|
+
readonly submissionId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">;
|
|
493
|
+
}>, Schema.TaggedStruct<"Operation", {
|
|
494
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
495
|
+
readonly toolCallId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ToolCallId">;
|
|
496
|
+
}>, Schema.TaggedStruct<"Child", {
|
|
497
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
498
|
+
readonly toolCallId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ToolCallId">;
|
|
499
|
+
readonly childThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
500
|
+
}>, Schema.TaggedStruct<"WorkerInput", {
|
|
501
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
502
|
+
readonly workerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
503
|
+
readonly update: Schema.Boolean;
|
|
504
|
+
}>, Schema.TaggedStruct<"Report", {
|
|
505
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
506
|
+
}>, Schema.TaggedStruct<"WorkerEffects", {
|
|
507
|
+
readonly submissionId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">;
|
|
508
|
+
}>, Schema.TaggedStruct<"Delivery", {
|
|
509
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
510
|
+
}>, Schema.TaggedStruct<"Handoff", {
|
|
511
|
+
readonly recordId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/RecordId">;
|
|
512
|
+
readonly kind: Schema.Literals<readonly ["worker-stop", "reservation", "child-accounting"]>;
|
|
513
|
+
readonly childThreadId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">>;
|
|
514
|
+
}>]>;
|
|
515
|
+
readonly stateReference: Schema.Union<readonly [Schema.TaggedStruct<"Submission", {
|
|
516
|
+
readonly submissionId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">;
|
|
517
|
+
}>, Schema.TaggedStruct<"Canonical", {
|
|
518
|
+
readonly recordId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/RecordId">;
|
|
519
|
+
}>, Schema.TaggedStruct<"Delivery", {
|
|
520
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
521
|
+
readonly version: Schema.Int;
|
|
522
|
+
}>]>;
|
|
523
|
+
readonly state: Schema.Literals<readonly ["ready", "waiting", "unknown", "handoff"]>;
|
|
524
|
+
readonly wait: Schema.optionalKey<Schema.Literals<readonly ["admission", "ownership", "approval", "input", "child", "worker", "effect-resolution", "destination", "parked", "capacity"]>>;
|
|
525
|
+
readonly notBeforeMillis: Schema.optionalKey<Schema.Natural>;
|
|
526
|
+
readonly receiptId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ReceiptId">>;
|
|
527
|
+
readonly queueSequence: Schema.optionalKey<Schema.brand<Schema.Natural, "@effect-agent/thread/QueueSequence">>;
|
|
528
|
+
readonly originRecordId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/RecordId">>;
|
|
529
|
+
readonly partition: Schema.optionalKey<Schema.Literals<readonly ["ordinary", "update"]>>;
|
|
530
|
+
}>>;
|
|
531
|
+
readonly cursor: Schema.optionalKey<Schema.NonEmptyString>;
|
|
532
|
+
}>;
|
|
533
|
+
}>, {}>;
|
|
534
|
+
declare class StoreWorkPageResult extends StoreWorkPageResult_base {}
|
|
535
|
+
declare const StoreWorkRebuildResult_base: Schema.Class<StoreWorkRebuildResult, Schema.TaggedStruct<"StoreWorkRebuildResult", {
|
|
536
|
+
readonly progress: Schema.Struct<{
|
|
537
|
+
readonly version: Schema.Literal<4>;
|
|
538
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
539
|
+
readonly state: Schema.Literals<readonly ["ready", "rebuilding"]>;
|
|
540
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
541
|
+
readonly tailSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
542
|
+
readonly processedRecords: Schema.Natural;
|
|
543
|
+
readonly processedBytes: Schema.Natural;
|
|
544
|
+
}>;
|
|
545
|
+
}>, {}>;
|
|
546
|
+
declare class StoreWorkRebuildResult extends StoreWorkRebuildResult_base {}
|
|
547
|
+
declare const MessageDeliveryListResult_base: Schema.Class<MessageDeliveryListResult, Schema.TaggedStruct<"MessageDeliveryListResult", {
|
|
548
|
+
readonly page: Schema.Struct<{
|
|
549
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
550
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
551
|
+
readonly key: Schema.Struct<{
|
|
552
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
553
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
554
|
+
}>;
|
|
555
|
+
readonly envelope: Schema.Struct<{
|
|
556
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
557
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
558
|
+
readonly deliveryPrincipal: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/Principal">;
|
|
559
|
+
readonly admissionGroup: Schema.optionalKey<Schema.NonEmptyString>;
|
|
560
|
+
readonly admissionFence: Schema.optionalKey<Schema.Struct<{
|
|
561
|
+
readonly policyId: Schema.NonEmptyString;
|
|
562
|
+
readonly key: Schema.NonEmptyString;
|
|
563
|
+
readonly revision: Schema.NonEmptyString;
|
|
564
|
+
}>>;
|
|
565
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
566
|
+
readonly definitions: typeof import("@systemfsoftware/agent/records").DefinitionDigests;
|
|
567
|
+
readonly input: Schema.declare<Schema.Json, Schema.Json>;
|
|
568
|
+
readonly inputDigest: Schema.brand<Schema.String, "@effect-agent/thread/Digest">;
|
|
569
|
+
readonly admissionKey: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
570
|
+
readonly authorization: Schema.Struct<{
|
|
571
|
+
readonly policyId: Schema.NonEmptyString;
|
|
572
|
+
readonly decisionId: Schema.NonEmptyString;
|
|
573
|
+
}>;
|
|
574
|
+
readonly workerAdmission: Schema.optionalKey<Schema.Struct<{
|
|
575
|
+
readonly origin: Schema.Struct<{
|
|
576
|
+
readonly worker: Schema.Struct<{
|
|
577
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
578
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
579
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
580
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
581
|
+
}>;
|
|
582
|
+
readonly source: Schema.Union<readonly [Schema.TaggedStruct<"tool", {
|
|
583
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
584
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
585
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
586
|
+
readonly toolCallId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ToolCallId">;
|
|
587
|
+
}>, Schema.TaggedStruct<"programmatic", {
|
|
588
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
589
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
590
|
+
}>]>;
|
|
591
|
+
readonly continuationOf: Schema.optionalKey<Schema.Struct<{
|
|
592
|
+
readonly worker: Schema.Struct<{
|
|
593
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
594
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
595
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
596
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
597
|
+
}>;
|
|
598
|
+
readonly receipt: typeof import("@systemfsoftware/agent/receipt").Receipt;
|
|
599
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
600
|
+
}>>;
|
|
601
|
+
readonly budgetScope: Schema.Literals<readonly ["source-subtree", "worker-run"]>;
|
|
602
|
+
readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
|
|
603
|
+
readonly targetDigests: typeof import("@systemfsoftware/agent/records").DefinitionDigests;
|
|
604
|
+
readonly policy: Schema.toCodecJson<typeof import("@systemfsoftware/agent/agent-policy").AgentPolicy>;
|
|
605
|
+
readonly budget: Schema.Struct<{
|
|
606
|
+
readonly caps: typeof import("@systemfsoftware/agent/subagent-contract").SubagentDelegationCaps;
|
|
607
|
+
readonly allocation: typeof import("@systemfsoftware/agent/subagent-contract").SubagentReservationAmounts;
|
|
608
|
+
readonly descendantInvocations: Schema.optionalKey<Schema.Natural>;
|
|
609
|
+
}>;
|
|
610
|
+
readonly grant: typeof import("@systemfsoftware/agent/subagent-contract").SubagentGrant;
|
|
611
|
+
readonly depth: Schema.Int;
|
|
612
|
+
readonly toolCallAllowance: Schema.optionalKey<Schema.Int>;
|
|
613
|
+
readonly firstMessageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
614
|
+
readonly createdAtMillis: Schema.Natural;
|
|
615
|
+
readonly expiresAtMillis: Schema.Natural;
|
|
616
|
+
readonly reporting: Schema.optionalKey<Schema.Struct<{
|
|
617
|
+
readonly mode: Schema.optionalKey<Schema.Literal<"standard">>;
|
|
618
|
+
readonly sourceDigests: typeof import("@systemfsoftware/agent/records").DefinitionDigests;
|
|
619
|
+
readonly destinationDelegationId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">>;
|
|
620
|
+
readonly returnAddress: Schema.optionalKey<Schema.Struct<{
|
|
621
|
+
readonly input: Schema.declare<Schema.Json, Schema.Json>;
|
|
622
|
+
readonly principal: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/Principal">;
|
|
623
|
+
readonly policy: Schema.toCodecJson<typeof import("@systemfsoftware/agent/agent-policy").AgentPolicy>;
|
|
624
|
+
readonly depth: Schema.Natural;
|
|
625
|
+
readonly grant: Schema.optionalKey<typeof import("@systemfsoftware/agent/subagent-contract").SubagentGrant>;
|
|
626
|
+
readonly workerAdmission: Schema.optionalKey<Schema.declare<Schema.Json, Schema.Json>>;
|
|
627
|
+
}>>;
|
|
628
|
+
}>>;
|
|
629
|
+
}>;
|
|
630
|
+
readonly executionRunId: Schema.NullOr<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">>;
|
|
631
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
632
|
+
readonly parameters: Schema.declare<Schema.Json, Schema.Json>;
|
|
633
|
+
readonly createdAtMillis: Schema.Natural;
|
|
634
|
+
readonly sourceSubmissionId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">>;
|
|
635
|
+
readonly deliveryPrincipal: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/Principal">>;
|
|
636
|
+
readonly reportKind: Schema.optionalKey<Schema.Literal<"update">>;
|
|
637
|
+
}>>;
|
|
638
|
+
readonly messageAdmission: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
639
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
640
|
+
readonly message: Schema.Struct<{
|
|
641
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
642
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
643
|
+
}>;
|
|
644
|
+
readonly peerName: Schema.NonEmptyString;
|
|
645
|
+
readonly sender: Schema.Struct<{
|
|
646
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
647
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
648
|
+
}>;
|
|
649
|
+
readonly returnAddress: Schema.Struct<{
|
|
650
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
651
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
652
|
+
}>;
|
|
653
|
+
readonly inReplyTo: Schema.optionalKey<Schema.Struct<{
|
|
654
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
655
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
656
|
+
}>>;
|
|
657
|
+
}>, Schema.Union<readonly [Schema.Struct<{
|
|
658
|
+
readonly _tag: Schema.tag<"WorkerCompletion">;
|
|
659
|
+
readonly budgetExhausted: Schema.Boolean;
|
|
660
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
661
|
+
readonly report: Schema.Union<readonly [Schema.Struct<{
|
|
662
|
+
readonly _tag: Schema.Literal<"Settled">;
|
|
663
|
+
readonly worker: Schema.Struct<{
|
|
664
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
665
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
666
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
667
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
668
|
+
}>;
|
|
669
|
+
readonly receipt: typeof import("@systemfsoftware/agent/receipt").Receipt;
|
|
670
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
671
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
672
|
+
readonly outcome: Schema.Literal<"completed">;
|
|
673
|
+
readonly result: Schema.Union<readonly [Schema.Codec<Schema.Json, Schema.Json, never, never>]>;
|
|
674
|
+
}>, Schema.Struct<{
|
|
675
|
+
readonly _tag: Schema.Literal<"Settled">;
|
|
676
|
+
readonly worker: Schema.Struct<{
|
|
677
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
678
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
679
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
680
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
681
|
+
}>;
|
|
682
|
+
readonly receipt: typeof import("@systemfsoftware/agent/receipt").Receipt;
|
|
683
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
684
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
685
|
+
readonly outcome: Schema.Literals<readonly ["failed", "aborted"]>;
|
|
686
|
+
readonly failure: typeof import("@systemfsoftware/agent/subagent-contract").SubagentExecutionFailure;
|
|
687
|
+
}>]>;
|
|
688
|
+
}>, Schema.Struct<{
|
|
689
|
+
readonly _tag: Schema.tag<"WorkerUpdate">;
|
|
690
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
691
|
+
readonly worker: Schema.Struct<{
|
|
692
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
693
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
694
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
695
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
696
|
+
}>;
|
|
697
|
+
readonly update: typeof import("@systemfsoftware/agent/agent-updates").Update;
|
|
698
|
+
}>]>]>>;
|
|
699
|
+
}>;
|
|
700
|
+
readonly envelopeDigest: Schema.brand<Schema.String, "@effect-agent/thread/Digest">;
|
|
701
|
+
readonly predecessor: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">>;
|
|
702
|
+
readonly createdAtMillis: Schema.Int;
|
|
703
|
+
readonly initialDeadlineAtMillis: Schema.Int;
|
|
704
|
+
readonly deadlineAtMillis: Schema.Int;
|
|
705
|
+
readonly policy: Schema.Struct<{
|
|
706
|
+
readonly maxAutomaticAttempts: Schema.Int;
|
|
707
|
+
readonly attemptTimeoutMillis: Schema.Int;
|
|
708
|
+
readonly retryBaseMillis: Schema.Int;
|
|
709
|
+
readonly retryMaxMillis: Schema.Int;
|
|
710
|
+
readonly settlementPollMillis: Schema.Int;
|
|
711
|
+
}>;
|
|
712
|
+
readonly version: Schema.Int;
|
|
713
|
+
readonly status: Schema.Literals<readonly ["pending", "accepted", "processed", "refused", "parked"]>;
|
|
714
|
+
readonly receipt: Schema.NullOr<typeof import("@systemfsoftware/agent/receipt").Receipt>;
|
|
715
|
+
readonly settlement: Schema.NullOr<typeof import("@systemfsoftware/agent/submission-ledger").Settlement>;
|
|
716
|
+
readonly refusal: Schema.NullOr<Schema.String>;
|
|
717
|
+
readonly parkReason: Schema.NullOr<Schema.Literals<readonly ["exhausted", "deadline", "status-unavailable", "awaiting-settlement"]>>;
|
|
718
|
+
readonly leaseUntilMillis: Schema.NullOr<Schema.Int>;
|
|
719
|
+
readonly retry: Schema.Struct<{
|
|
720
|
+
readonly attempts: Schema.Natural;
|
|
721
|
+
readonly generation: Schema.Natural;
|
|
722
|
+
readonly automaticAttempts: Schema.Natural;
|
|
723
|
+
readonly parked: Schema.Boolean;
|
|
724
|
+
readonly nextAttemptAtMillis: Schema.Int;
|
|
725
|
+
readonly lastAttemptAtMillis: Schema.NullOr<Schema.Int>;
|
|
726
|
+
readonly lastFailure: Schema.NullOr<Schema.Literals<readonly ["transport", "capacity", "storage", "host-closed", "timeout", "ambiguous"]>>;
|
|
727
|
+
}>;
|
|
728
|
+
readonly lastFailureDiagnostic: Schema.optionalKey<Schema.Codec<import("@systemfsoftware/agent/failure-diagnostic").Diagnostic, import("@systemfsoftware/agent/failure-diagnostic").Diagnostic, never, never>>;
|
|
729
|
+
}>>;
|
|
730
|
+
readonly next: Schema.NullOr<Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">>;
|
|
731
|
+
}>;
|
|
732
|
+
}>, {}>;
|
|
733
|
+
declare class MessageDeliveryListResult extends MessageDeliveryListResult_base {}
|
|
734
|
+
declare const MessageDeliveryCompleteResult_base: Schema.Class<MessageDeliveryCompleteResult, Schema.TaggedStruct<"MessageDeliveryCompleteResult", {
|
|
735
|
+
readonly record: Schema.Struct<{
|
|
736
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
737
|
+
readonly key: Schema.Struct<{
|
|
738
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
739
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
740
|
+
}>;
|
|
741
|
+
readonly envelope: Schema.Struct<{
|
|
742
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
743
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
744
|
+
readonly deliveryPrincipal: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/Principal">;
|
|
745
|
+
readonly admissionGroup: Schema.optionalKey<Schema.NonEmptyString>;
|
|
746
|
+
readonly admissionFence: Schema.optionalKey<Schema.Struct<{
|
|
747
|
+
readonly policyId: Schema.NonEmptyString;
|
|
748
|
+
readonly key: Schema.NonEmptyString;
|
|
749
|
+
readonly revision: Schema.NonEmptyString;
|
|
750
|
+
}>>;
|
|
751
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
752
|
+
readonly definitions: typeof import("@systemfsoftware/agent/records").DefinitionDigests;
|
|
753
|
+
readonly input: Schema.declare<Schema.Json, Schema.Json>;
|
|
754
|
+
readonly inputDigest: Schema.brand<Schema.String, "@effect-agent/thread/Digest">;
|
|
755
|
+
readonly admissionKey: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
756
|
+
readonly authorization: Schema.Struct<{
|
|
757
|
+
readonly policyId: Schema.NonEmptyString;
|
|
758
|
+
readonly decisionId: Schema.NonEmptyString;
|
|
759
|
+
}>;
|
|
760
|
+
readonly workerAdmission: Schema.optionalKey<Schema.Struct<{
|
|
761
|
+
readonly origin: Schema.Struct<{
|
|
762
|
+
readonly worker: Schema.Struct<{
|
|
763
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
764
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
765
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
766
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
767
|
+
}>;
|
|
768
|
+
readonly source: Schema.Union<readonly [Schema.TaggedStruct<"tool", {
|
|
769
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
770
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
771
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
772
|
+
readonly toolCallId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ToolCallId">;
|
|
773
|
+
}>, Schema.TaggedStruct<"programmatic", {
|
|
774
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
775
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
776
|
+
}>]>;
|
|
777
|
+
readonly continuationOf: Schema.optionalKey<Schema.Struct<{
|
|
778
|
+
readonly worker: Schema.Struct<{
|
|
779
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
780
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
781
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
782
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
783
|
+
}>;
|
|
784
|
+
readonly receipt: typeof import("@systemfsoftware/agent/receipt").Receipt;
|
|
785
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
786
|
+
}>>;
|
|
787
|
+
readonly budgetScope: Schema.Literals<readonly ["source-subtree", "worker-run"]>;
|
|
788
|
+
readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
|
|
789
|
+
readonly targetDigests: typeof import("@systemfsoftware/agent/records").DefinitionDigests;
|
|
790
|
+
readonly policy: Schema.toCodecJson<typeof import("@systemfsoftware/agent/agent-policy").AgentPolicy>;
|
|
791
|
+
readonly budget: Schema.Struct<{
|
|
792
|
+
readonly caps: typeof import("@systemfsoftware/agent/subagent-contract").SubagentDelegationCaps;
|
|
793
|
+
readonly allocation: typeof import("@systemfsoftware/agent/subagent-contract").SubagentReservationAmounts;
|
|
794
|
+
readonly descendantInvocations: Schema.optionalKey<Schema.Natural>;
|
|
795
|
+
}>;
|
|
796
|
+
readonly grant: typeof import("@systemfsoftware/agent/subagent-contract").SubagentGrant;
|
|
797
|
+
readonly depth: Schema.Int;
|
|
798
|
+
readonly toolCallAllowance: Schema.optionalKey<Schema.Int>;
|
|
799
|
+
readonly firstMessageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
800
|
+
readonly createdAtMillis: Schema.Natural;
|
|
801
|
+
readonly expiresAtMillis: Schema.Natural;
|
|
802
|
+
readonly reporting: Schema.optionalKey<Schema.Struct<{
|
|
803
|
+
readonly mode: Schema.optionalKey<Schema.Literal<"standard">>;
|
|
804
|
+
readonly sourceDigests: typeof import("@systemfsoftware/agent/records").DefinitionDigests;
|
|
805
|
+
readonly destinationDelegationId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">>;
|
|
806
|
+
readonly returnAddress: Schema.optionalKey<Schema.Struct<{
|
|
807
|
+
readonly input: Schema.declare<Schema.Json, Schema.Json>;
|
|
808
|
+
readonly principal: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/Principal">;
|
|
809
|
+
readonly policy: Schema.toCodecJson<typeof import("@systemfsoftware/agent/agent-policy").AgentPolicy>;
|
|
810
|
+
readonly depth: Schema.Natural;
|
|
811
|
+
readonly grant: Schema.optionalKey<typeof import("@systemfsoftware/agent/subagent-contract").SubagentGrant>;
|
|
812
|
+
readonly workerAdmission: Schema.optionalKey<Schema.declare<Schema.Json, Schema.Json>>;
|
|
813
|
+
}>>;
|
|
814
|
+
}>>;
|
|
815
|
+
}>;
|
|
816
|
+
readonly executionRunId: Schema.NullOr<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">>;
|
|
817
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
818
|
+
readonly parameters: Schema.declare<Schema.Json, Schema.Json>;
|
|
819
|
+
readonly createdAtMillis: Schema.Natural;
|
|
820
|
+
readonly sourceSubmissionId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">>;
|
|
821
|
+
readonly deliveryPrincipal: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/Principal">>;
|
|
822
|
+
readonly reportKind: Schema.optionalKey<Schema.Literal<"update">>;
|
|
823
|
+
}>>;
|
|
824
|
+
readonly messageAdmission: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
825
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
826
|
+
readonly message: Schema.Struct<{
|
|
827
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
828
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
829
|
+
}>;
|
|
830
|
+
readonly peerName: Schema.NonEmptyString;
|
|
831
|
+
readonly sender: Schema.Struct<{
|
|
832
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
833
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
834
|
+
}>;
|
|
835
|
+
readonly returnAddress: Schema.Struct<{
|
|
836
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
837
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
838
|
+
}>;
|
|
839
|
+
readonly inReplyTo: Schema.optionalKey<Schema.Struct<{
|
|
840
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
841
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
842
|
+
}>>;
|
|
843
|
+
}>, Schema.Union<readonly [Schema.Struct<{
|
|
844
|
+
readonly _tag: Schema.tag<"WorkerCompletion">;
|
|
845
|
+
readonly budgetExhausted: Schema.Boolean;
|
|
846
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
847
|
+
readonly report: Schema.Union<readonly [Schema.Struct<{
|
|
848
|
+
readonly _tag: Schema.Literal<"Settled">;
|
|
849
|
+
readonly worker: Schema.Struct<{
|
|
850
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
851
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
852
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
853
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
854
|
+
}>;
|
|
855
|
+
readonly receipt: typeof import("@systemfsoftware/agent/receipt").Receipt;
|
|
856
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
857
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
858
|
+
readonly outcome: Schema.Literal<"completed">;
|
|
859
|
+
readonly result: Schema.Union<readonly [Schema.Codec<Schema.Json, Schema.Json, never, never>]>;
|
|
860
|
+
}>, Schema.Struct<{
|
|
861
|
+
readonly _tag: Schema.Literal<"Settled">;
|
|
862
|
+
readonly worker: Schema.Struct<{
|
|
863
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
864
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
865
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
866
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
867
|
+
}>;
|
|
868
|
+
readonly receipt: typeof import("@systemfsoftware/agent/receipt").Receipt;
|
|
869
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
870
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
871
|
+
readonly outcome: Schema.Literals<readonly ["failed", "aborted"]>;
|
|
872
|
+
readonly failure: typeof import("@systemfsoftware/agent/subagent-contract").SubagentExecutionFailure;
|
|
873
|
+
}>]>;
|
|
874
|
+
}>, Schema.Struct<{
|
|
875
|
+
readonly _tag: Schema.tag<"WorkerUpdate">;
|
|
876
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
877
|
+
readonly worker: Schema.Struct<{
|
|
878
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
879
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
880
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
881
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
882
|
+
}>;
|
|
883
|
+
readonly update: typeof import("@systemfsoftware/agent/agent-updates").Update;
|
|
884
|
+
}>]>]>>;
|
|
885
|
+
}>;
|
|
886
|
+
readonly envelopeDigest: Schema.brand<Schema.String, "@effect-agent/thread/Digest">;
|
|
887
|
+
readonly predecessor: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">>;
|
|
888
|
+
readonly createdAtMillis: Schema.Int;
|
|
889
|
+
readonly initialDeadlineAtMillis: Schema.Int;
|
|
890
|
+
readonly deadlineAtMillis: Schema.Int;
|
|
891
|
+
readonly policy: Schema.Struct<{
|
|
892
|
+
readonly maxAutomaticAttempts: Schema.Int;
|
|
893
|
+
readonly attemptTimeoutMillis: Schema.Int;
|
|
894
|
+
readonly retryBaseMillis: Schema.Int;
|
|
895
|
+
readonly retryMaxMillis: Schema.Int;
|
|
896
|
+
readonly settlementPollMillis: Schema.Int;
|
|
897
|
+
}>;
|
|
898
|
+
readonly version: Schema.Int;
|
|
899
|
+
readonly status: Schema.Literals<readonly ["pending", "accepted", "processed", "refused", "parked"]>;
|
|
900
|
+
readonly receipt: Schema.NullOr<typeof import("@systemfsoftware/agent/receipt").Receipt>;
|
|
901
|
+
readonly settlement: Schema.NullOr<typeof import("@systemfsoftware/agent/submission-ledger").Settlement>;
|
|
902
|
+
readonly refusal: Schema.NullOr<Schema.String>;
|
|
903
|
+
readonly parkReason: Schema.NullOr<Schema.Literals<readonly ["exhausted", "deadline", "status-unavailable", "awaiting-settlement"]>>;
|
|
904
|
+
readonly leaseUntilMillis: Schema.NullOr<Schema.Int>;
|
|
905
|
+
readonly retry: Schema.Struct<{
|
|
906
|
+
readonly attempts: Schema.Natural;
|
|
907
|
+
readonly generation: Schema.Natural;
|
|
908
|
+
readonly automaticAttempts: Schema.Natural;
|
|
909
|
+
readonly parked: Schema.Boolean;
|
|
910
|
+
readonly nextAttemptAtMillis: Schema.Int;
|
|
911
|
+
readonly lastAttemptAtMillis: Schema.NullOr<Schema.Int>;
|
|
912
|
+
readonly lastFailure: Schema.NullOr<Schema.Literals<readonly ["transport", "capacity", "storage", "host-closed", "timeout", "ambiguous"]>>;
|
|
913
|
+
}>;
|
|
914
|
+
readonly lastFailureDiagnostic: Schema.optionalKey<Schema.Codec<import("@systemfsoftware/agent/failure-diagnostic").Diagnostic, import("@systemfsoftware/agent/failure-diagnostic").Diagnostic, never, never>>;
|
|
915
|
+
}>;
|
|
916
|
+
}>, {}>;
|
|
917
|
+
declare class MessageDeliveryCompleteResult extends MessageDeliveryCompleteResult_base {}
|
|
918
|
+
declare const StoreRangePageResult_base: Schema.Class<StoreRangePageResult, Schema.TaggedStruct<"StoreRangePageResult", {
|
|
919
|
+
readonly page: Schema.Struct<{
|
|
920
|
+
readonly ranges: Schema.$Array<typeof ThreadArchiveRange>;
|
|
921
|
+
readonly afterSequence: Schema.optionalKey<Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">>;
|
|
922
|
+
}>;
|
|
923
|
+
}>, {}>;
|
|
924
|
+
declare class StoreRangePageResult extends StoreRangePageResult_base {}
|
|
925
|
+
declare const StoreRangeSealResult_base: Schema.Class<StoreRangeSealResult, Schema.TaggedStruct<"StoreRangeSealResult", {
|
|
926
|
+
readonly range: Schema.Option<typeof ThreadArchiveRange>;
|
|
927
|
+
}>, {}>;
|
|
928
|
+
declare class StoreRangeSealResult extends StoreRangeSealResult_base {}
|
|
929
|
+
declare const StoreRangeArchiveResult_base: Schema.Class<StoreRangeArchiveResult, Schema.TaggedStruct<"StoreRangeArchiveResult", {
|
|
930
|
+
readonly range: typeof ThreadArchiveRange;
|
|
931
|
+
}>, {}>;
|
|
932
|
+
declare class StoreRangeArchiveResult extends StoreRangeArchiveResult_base {}
|
|
933
|
+
declare const StoreRangeVerifyResult_base: Schema.Class<StoreRangeVerifyResult, Schema.TaggedStruct<"StoreRangeVerifyResult", {
|
|
934
|
+
readonly range: typeof ThreadArchiveRange;
|
|
935
|
+
}>, {}>;
|
|
936
|
+
declare class StoreRangeVerifyResult extends StoreRangeVerifyResult_base {}
|
|
937
|
+
/** Every successful routed result. Callers narrow by the tag their request implies. */
|
|
938
|
+
declare const PortResult: Schema.Union<readonly [typeof SettlementPublishResult, typeof WorkerAdmitResult, typeof MessageDeliveryListResult, typeof MessageDeliveryCompleteResult, typeof LedgerAdmitResult, typeof LedgerMarkReadyResult, typeof LedgerLookupResult, typeof LedgerFundingOwnerResult, typeof LedgerResolveAdmissionResult, typeof LedgerRequestAbortResult, typeof LedgerStopWorkerResult, typeof LedgerInspectWorkerResult, typeof LedgerRecordChildSettledResult, typeof StoreRangePageResult, typeof StoreRangeSealResult, typeof StoreRangeArchiveResult, typeof StoreRangeVerifyResult, typeof StoreMaterializeResult, typeof StoreAppendResult, typeof StoreReadPageResult, typeof StoreReadPromptResult, typeof StoreInspectTailResult, typeof StoreReadIdentityResult, typeof StoreReadExecutionResult, typeof StoreWorkerCapacityResult, typeof StoreVerificationResult, typeof StoreExportResult, typeof StoreCountPeerMessagesResult, typeof StoreWorkPageResult, typeof StoreWorkRebuildResult]>;
|
|
939
|
+
type PortResult = typeof PortResult.Type;
|
|
940
|
+
/**
|
|
941
|
+
* Every typed failure a route-capable operation can produce on its owning Object, plus the
|
|
942
|
+
* protocol's own `PortProtocolError`. Members re-decode to the SAME tagged classes the
|
|
943
|
+
* thread ports declare, so a routed caller observes identical error tags and fields.
|
|
944
|
+
*/
|
|
945
|
+
declare const PortFailure: Schema.Union<readonly [typeof OwnershipLost, typeof DurableRuntimeFailpointError, typeof MessageDeliveryError, typeof MessageDeliveryFailpointError, typeof AdmissionConflict, typeof AdmissionPolicyError, typeof SettlementConflict, typeof JoinedToHost, typeof LedgerError, typeof ThreadStoreError, typeof WorkDiscoveryUnavailable, typeof ThreadNotMaterialized, typeof ThreadExportRejected, typeof AppendConflict, typeof PortProtocolError]>;
|
|
946
|
+
type PortFailure = typeof PortFailure.Type;
|
|
947
|
+
declare const PortSucceeded_base: Schema.Class<PortSucceeded, Schema.TaggedStruct<"PortSucceeded", {
|
|
948
|
+
readonly result: Schema.Union<readonly [typeof SettlementPublishResult, typeof WorkerAdmitResult, typeof MessageDeliveryListResult, typeof MessageDeliveryCompleteResult, typeof LedgerAdmitResult, typeof LedgerMarkReadyResult, typeof LedgerLookupResult, typeof LedgerFundingOwnerResult, typeof LedgerResolveAdmissionResult, typeof LedgerRequestAbortResult, typeof LedgerStopWorkerResult, typeof LedgerInspectWorkerResult, typeof LedgerRecordChildSettledResult, typeof StoreRangePageResult, typeof StoreRangeSealResult, typeof StoreRangeArchiveResult, typeof StoreRangeVerifyResult, typeof StoreMaterializeResult, typeof StoreAppendResult, typeof StoreReadPageResult, typeof StoreReadPromptResult, typeof StoreInspectTailResult, typeof StoreReadIdentityResult, typeof StoreReadExecutionResult, typeof StoreWorkerCapacityResult, typeof StoreVerificationResult, typeof StoreExportResult, typeof StoreCountPeerMessagesResult, typeof StoreWorkPageResult, typeof StoreWorkRebuildResult]>;
|
|
949
|
+
}>, {}>;
|
|
950
|
+
/** The routed operation succeeded on its owning Object. */
|
|
951
|
+
declare class PortSucceeded extends PortSucceeded_base {}
|
|
952
|
+
declare const PortFailed_base: Schema.Class<PortFailed, Schema.TaggedStruct<"PortFailed", {
|
|
953
|
+
readonly failure: Schema.Union<readonly [typeof OwnershipLost, typeof DurableRuntimeFailpointError, typeof MessageDeliveryError, typeof MessageDeliveryFailpointError, typeof AdmissionConflict, typeof AdmissionPolicyError, typeof SettlementConflict, typeof JoinedToHost, typeof LedgerError, typeof ThreadStoreError, typeof WorkDiscoveryUnavailable, typeof ThreadNotMaterialized, typeof ThreadExportRejected, typeof AppendConflict, typeof PortProtocolError]>;
|
|
954
|
+
}>, {}>;
|
|
955
|
+
/** The routed operation failed TYPED on its owning Object; the failure re-decodes verbatim. */
|
|
956
|
+
declare class PortFailed extends PortFailed_base {}
|
|
957
|
+
/** The uniform answer of one `portCall`: op-specific success or a re-decodable typed failure. */
|
|
958
|
+
declare const PortResponse: Schema.Union<readonly [typeof PortSucceeded, typeof PortFailed]>;
|
|
959
|
+
type PortResponse = typeof PortResponse.Type;
|
|
960
|
+
/** The wire form of one port response (what a transport actually carries). */
|
|
961
|
+
type PortResponseEnvelope = typeof PortResponse.Encoded;
|
|
962
|
+
declare const encodePortRequest: ReturnType<typeof Schema.encodeEffect<typeof PortRequest>>;
|
|
963
|
+
declare const decodePortRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<LedgerAdmitCall | LedgerFundingOwnerCall | LedgerInspectWorkerCall | LedgerLookupCall | LedgerMarkReadyCall | LedgerRecordChildSettledCall | LedgerRequestAbortCall | LedgerResolveAdmissionCall | LedgerStopWorkerCall | MessageDeliveryCompleteCall | MessageDeliveryListCall | SettlementPublishCall | StoreAppendCall | StoreCountPeerMessagesCall | StoreExportCall | StoreInspectTailCall | StoreMaterializeCall | StoreRangeArchiveCall | StoreRangePageCall | StoreRangeSealCall | StoreRangeVerifyCall | StoreReadExecutionCall | StoreReadIdentityCall | StoreReadPageCall | StoreReadPromptCall | StoreVerificationCall | StoreWorkPageCall | StoreWorkRebuildCall | StoreWorkerCapacityCall | WorkerAdmitCall, Schema.SchemaError, never>;
|
|
964
|
+
declare const encodePortResponse: ReturnType<typeof Schema.encodeEffect<typeof PortResponse>>;
|
|
965
|
+
declare const decodePortResponse: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<PortFailed | PortSucceeded, Schema.SchemaError, never>;
|
|
966
|
+
export { StoreRangeVerifyResult as $, PortResponse as A, StoreExportCall as B, MessageDeliveryListResult as C, PortProtocol_d_exports as D, PortProtocolError as E, SettlementPublishResult as F, StoreMaterializeResult as G, StoreInspectTailCall as H, StoreAppendCall as I, StoreRangePageCall as J, StoreRangeArchiveCall as K, StoreAppendResult as L, PortResult as M, PortSucceeded as N, PortRequest as O, SettlementPublishCall as P, StoreRangeVerifyCall as Q, StoreCountPeerMessagesCall as R, MessageDeliveryListCall as S, encodePortResponse as St, PortFailure as T, StoreInspectTailResult as U, StoreExportResult as V, StoreMaterializeCall as W, StoreRangeSealCall as X, StoreRangePageResult as Y, StoreRangeSealResult as Z, LedgerStopWorkerCall as _, WorkerAdmitResult as _t, LedgerInspectWorkerCall as a, StoreReadPageResult as at, MessageDeliveryCompleteCall as b, decodePortResponse as bt, LedgerLookupResult as c, StoreVerificationCall as ct, LedgerRecordChildSettledCall as d, StoreWorkPageResult as dt, StoreReadExecutionCall as et, LedgerRecordChildSettledResult as f, StoreWorkRebuildCall as ft, LedgerResolveAdmissionResult as g, WorkerAdmitCall as gt, LedgerResolveAdmissionCall as h, StoreWorkerCapacityResult as ht, LedgerFundingOwnerResult as i, StoreReadPageCall as it, PortResponseEnvelope as j, PortRequestEnvelope as k, LedgerMarkReadyCall as l, StoreVerificationResult as lt, LedgerRequestAbortResult as m, StoreWorkerCapacityCall as mt, LedgerAdmitResult as n, StoreReadIdentityCall as nt, LedgerInspectWorkerResult as o, StoreReadPromptCall as ot, LedgerRequestAbortCall as p, StoreWorkRebuildResult as pt, StoreRangeArchiveResult as q, LedgerFundingOwnerCall as r, StoreReadIdentityResult as rt, LedgerLookupCall as s, StoreReadPromptResult as st, LedgerAdmitCall as t, StoreReadExecutionResult as tt, LedgerMarkReadyResult as u, StoreWorkPageCall as ut, LedgerStopWorkerResult as v, boundPortDiagnostic as vt, PortFailed as w, MessageDeliveryCompleteResult as x, encodePortRequest as xt, MAX_PORT_DIAGNOSTIC_LENGTH as y, decodePortRequest as yt, StoreCountPeerMessagesResult as z };
|