@yielded/agent-platform-cloudflare 0.1.0-beta.178 → 0.1.0-beta.181

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.
@@ -738,13 +738,13 @@ declare const encodeUnknownResolutionCommand: (input: UnknownResolutionCommand,
738
738
  readonly author: string;
739
739
  readonly reason: string;
740
740
  readonly resolution: {
741
+ readonly _tag: "SafeToRetry";
742
+ } | {
741
743
  readonly _tag: "CompletedWithResult";
742
744
  readonly result: Schema.Json;
743
745
  readonly isFailure: boolean;
744
746
  } | {
745
747
  readonly _tag: "NeverHappened";
746
- } | {
747
- readonly _tag: "SafeToRetry";
748
748
  } | {
749
749
  readonly _tag: "AbortSubmission";
750
750
  };
@@ -994,21 +994,6 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
994
994
  readonly createdAt: string;
995
995
  readonly deploymentId: string;
996
996
  readonly payload: {
997
- readonly _tag: "ThreadCreated";
998
- readonly agentId: string;
999
- readonly definitions: {
1000
- readonly agent: string;
1001
- readonly model: string;
1002
- readonly tools: string;
1003
- readonly replay?: {
1004
- readonly agent: string;
1005
- readonly agentBehavior?: string | undefined;
1006
- readonly tools: {
1007
- readonly [x: string]: string;
1008
- };
1009
- } | undefined;
1010
- };
1011
- } | {
1012
997
  readonly _tag: "UserInputRecorded";
1013
998
  readonly submissionId?: string | undefined;
1014
999
  readonly kind: "follow-up" | "steering" | "user";
@@ -1103,25 +1088,6 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
1103
1088
  readonly value: Schema.Json;
1104
1089
  };
1105
1090
  } | undefined;
1106
- } | {
1107
- readonly _tag: "RunStarted";
1108
- readonly runId: string;
1109
- readonly policyAccountingVersion: 1;
1110
- readonly maxDurationMillis: number;
1111
- } | {
1112
- readonly _tag: "RunDurationExhausted";
1113
- readonly runId: string;
1114
- } | {
1115
- readonly _tag: "RunPolicyUsageReserved";
1116
- readonly runId: string;
1117
- readonly programmaticToolCalls: number;
1118
- readonly finalizationUsed: boolean;
1119
- } | {
1120
- readonly _tag: "ModelCompleted";
1121
- readonly runId: string;
1122
- readonly output: Schema.Json;
1123
- readonly messages?: Schema.Json | undefined;
1124
- readonly history?: Schema.Json | undefined;
1125
1091
  } | {
1126
1092
  readonly _tag: "ModelResponseRecorded";
1127
1093
  readonly toolResultMaxBytes: number;
@@ -1188,6 +1154,48 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
1188
1154
  readonly inputTokens?: number | undefined;
1189
1155
  readonly outputTokens?: number | undefined;
1190
1156
  readonly costMicrousd?: number | undefined;
1157
+ } | {
1158
+ readonly _tag: "CompactionCreated";
1159
+ readonly runId: string;
1160
+ readonly turn: number;
1161
+ readonly kind: "clear-tool-results" | "rollover" | "summarize";
1162
+ readonly coversThrough: number;
1163
+ readonly summary?: string | undefined;
1164
+ readonly handoff?: string | undefined;
1165
+ } | {
1166
+ readonly _tag: "ThreadCreated";
1167
+ readonly agentId: string;
1168
+ readonly definitions: {
1169
+ readonly agent: string;
1170
+ readonly model: string;
1171
+ readonly tools: string;
1172
+ readonly replay?: {
1173
+ readonly agent: string;
1174
+ readonly agentBehavior?: string | undefined;
1175
+ readonly tools: {
1176
+ readonly [x: string]: string;
1177
+ };
1178
+ } | undefined;
1179
+ };
1180
+ } | {
1181
+ readonly _tag: "RunStarted";
1182
+ readonly runId: string;
1183
+ readonly policyAccountingVersion: 1;
1184
+ readonly maxDurationMillis: number;
1185
+ } | {
1186
+ readonly _tag: "RunDurationExhausted";
1187
+ readonly runId: string;
1188
+ } | {
1189
+ readonly _tag: "RunPolicyUsageReserved";
1190
+ readonly runId: string;
1191
+ readonly programmaticToolCalls: number;
1192
+ readonly finalizationUsed: boolean;
1193
+ } | {
1194
+ readonly _tag: "ModelCompleted";
1195
+ readonly runId: string;
1196
+ readonly output: Schema.Json;
1197
+ readonly messages?: Schema.Json | undefined;
1198
+ readonly history?: Schema.Json | undefined;
1191
1199
  } | {
1192
1200
  readonly _tag: "ToolCallSettled";
1193
1201
  readonly toolSelection?: {
@@ -1274,14 +1282,6 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
1274
1282
  readonly costMicrousd: number;
1275
1283
  }[];
1276
1284
  readonly unobservedModelCalls: number;
1277
- } | {
1278
- readonly _tag: "CompactionCreated";
1279
- readonly runId: string;
1280
- readonly turn: number;
1281
- readonly kind: "clear-tool-results" | "rollover" | "summarize";
1282
- readonly coversThrough: number;
1283
- readonly summary?: string | undefined;
1284
- readonly handoff?: string | undefined;
1285
1285
  } | {
1286
1286
  readonly _tag: "RunFailed";
1287
1287
  readonly runId: string;
@@ -2005,13 +2005,13 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
2005
2005
  readonly author: string;
2006
2006
  readonly reason: string;
2007
2007
  readonly resolution: {
2008
+ readonly _tag: "SafeToRetry";
2009
+ } | {
2008
2010
  readonly _tag: "CompletedWithResult";
2009
2011
  readonly result: Schema.Json;
2010
2012
  readonly isFailure: boolean;
2011
2013
  } | {
2012
2014
  readonly _tag: "NeverHappened";
2013
- } | {
2014
- readonly _tag: "SafeToRetry";
2015
2015
  } | {
2016
2016
  readonly _tag: "AbortSubmission";
2017
2017
  };
@@ -2021,37 +2021,16 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
2021
2021
  } | {
2022
2022
  readonly _tag: "HostFailed";
2023
2023
  readonly failure: {
2024
- readonly _tag: "OwnershipLost";
2025
- readonly submissionId: string;
2024
+ readonly _tag: "DurableAlarmError";
2025
+ readonly operation: string;
2026
+ readonly message: string;
2027
+ readonly cause?: Schema.Json | undefined;
2026
2028
  } | {
2027
- readonly _tag: "DurableRuntimeFailpointError";
2028
- readonly location: "abort:after-intent" | "approval:after-request-append" | "approval:after-suspend" | "claim:after-claim" | "compaction:after-canonical-append" | "compaction:before-canonical-append" | "input:after-canonical-append" | "join:after-canonical-append" | "join:after-claim" | "policy:after-reservation-append" | "policy:before-reservation-append" | "resolve:after-intent" | "run:after-duration-append" | "run:after-start-append" | "run:before-duration-append" | "run:before-start-append" | "step:after-step-append" | "subagent:after-admit" | "subagent:after-child-abort-intent" | "subagent:after-child-ready" | "subagent:after-join-append" | "subagent:after-release" | "subagent:after-release-pending" | "subagent:after-request-append" | "subagent:after-reserve" | "subagent:after-sibling-settle" | "subagent:after-start-append" | "subagent:after-suspend" | "subagent:before-join-append" | "submit:after-admit" | "submit:after-materialize" | "terminalize:after-canonical-append" | "terminalize:before-publication" | "tools:after-dispatch-fence" | "tools:after-unavailable-append" | "tools:before-dispatch-fence" | "tools:before-unavailable-append" | "turn:after-canonical-append" | "turn:after-response-append" | "turn:after-results-append" | "update:after-canonical-append" | "update:after-delivery-insert" | "update:before-canonical-append" | "update:before-delivery-insert" | "worker:after-completion-append" | "worker:after-origin-append" | "worker:after-report-append" | "worker:after-report-delivery" | "worker:after-source-append" | "worker:after-stop-append" | "worker:after-stop-seal" | "worker:after-subtree-append" | "worker:before-completion-append" | "worker:before-origin-append" | "worker:before-report-append" | "worker:before-report-delivery" | "worker:before-source-append" | "worker:before-stop-append" | "worker:before-stop-seal" | "worker:before-subtree-append";
2029
+ readonly _tag: "HostProtocolError";
2030
+ readonly message: string;
2029
2031
  } | {
2030
- readonly _tag: "AdmissionConflict";
2032
+ readonly _tag: "ThreadNotMaterialized";
2031
2033
  readonly threadId: string;
2032
- readonly principal: string;
2033
- readonly idempotencyKey: string;
2034
- readonly existingInputDigest: string;
2035
- readonly attemptedInputDigest: string;
2036
- } | {
2037
- readonly _tag: "AdmissionPolicyError";
2038
- readonly reason: "occupied" | "refused" | "unavailable";
2039
- readonly code: string;
2040
- readonly cause?: import("@yielded/agent/failure-diagnostic").Diagnostic | undefined;
2041
- readonly stack?: string | undefined;
2042
- } | {
2043
- readonly _tag: "SettlementConflict";
2044
- readonly submissionId: string;
2045
- readonly existingOutcome: "aborted" | "completed" | "failed";
2046
- } | {
2047
- readonly _tag: "JoinedToHost";
2048
- readonly submissionId: string;
2049
- readonly hostSubmissionId: string;
2050
- } | {
2051
- readonly _tag: "LedgerError";
2052
- readonly operation: string;
2053
- readonly message: string;
2054
- readonly cause?: import("@yielded/agent/failure-diagnostic").Diagnostic | undefined;
2055
2034
  } | {
2056
2035
  readonly _tag: "ThreadStoreError";
2057
2036
  readonly operation: string;
@@ -2065,8 +2044,10 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
2065
2044
  readonly sequence?: number | undefined;
2066
2045
  } | undefined;
2067
2046
  } | {
2068
- readonly _tag: "ThreadNotMaterialized";
2069
- readonly threadId: string;
2047
+ readonly _tag: "LedgerError";
2048
+ readonly operation: string;
2049
+ readonly message: string;
2050
+ readonly cause?: import("@yielded/agent/failure-diagnostic").Diagnostic | undefined;
2070
2051
  } | {
2071
2052
  readonly _tag: "AppendConflict";
2072
2053
  readonly threadId: string;
@@ -2074,40 +2055,59 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
2074
2055
  readonly reason: "batch-content" | "record-identity" | "stale-command" | "tail";
2075
2056
  readonly actualTailSequence?: number | undefined;
2076
2057
  } | {
2077
- readonly _tag: "HostProtocolError";
2078
- readonly message: string;
2058
+ readonly _tag: "OwnershipLost";
2059
+ readonly submissionId: string;
2079
2060
  } | {
2080
- readonly _tag: "AgentInputError";
2081
- readonly message: string;
2061
+ readonly _tag: "OperationDenied";
2062
+ readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
2063
+ readonly reason: string;
2064
+ readonly threadId?: string | undefined;
2065
+ readonly submissionId?: string | undefined;
2066
+ } | {
2067
+ readonly _tag: "SettlementConflict";
2068
+ readonly submissionId: string;
2069
+ readonly existingOutcome: "aborted" | "completed" | "failed";
2070
+ } | {
2071
+ readonly _tag: "AdmissionPolicyError";
2072
+ readonly reason: "occupied" | "refused" | "unavailable";
2073
+ readonly code: string;
2074
+ readonly cause?: import("@yielded/agent/failure-diagnostic").Diagnostic | undefined;
2075
+ readonly stack?: string | undefined;
2082
2076
  } | {
2083
2077
  readonly _tag: "DigestError";
2084
2078
  readonly message: string;
2085
2079
  readonly cause?: Schema.Json | undefined;
2086
2080
  } | {
2087
- readonly _tag: "ApprovalConflict";
2088
- readonly submissionId: string;
2089
- readonly toolCallId: string;
2090
- readonly existingDecision: "approved" | "denied";
2081
+ readonly _tag: "DurableRuntimeFailpointError";
2082
+ readonly location: "abort:after-intent" | "approval:after-request-append" | "approval:after-suspend" | "claim:after-claim" | "compaction:after-canonical-append" | "compaction:before-canonical-append" | "input:after-canonical-append" | "join:after-canonical-append" | "join:after-claim" | "policy:after-reservation-append" | "policy:before-reservation-append" | "resolve:after-intent" | "run:after-duration-append" | "run:after-start-append" | "run:before-duration-append" | "run:before-start-append" | "step:after-step-append" | "subagent:after-admit" | "subagent:after-child-abort-intent" | "subagent:after-child-ready" | "subagent:after-join-append" | "subagent:after-release" | "subagent:after-release-pending" | "subagent:after-request-append" | "subagent:after-reserve" | "subagent:after-sibling-settle" | "subagent:after-start-append" | "subagent:after-suspend" | "subagent:before-join-append" | "submit:after-admit" | "submit:after-materialize" | "terminalize:after-canonical-append" | "terminalize:before-publication" | "tools:after-dispatch-fence" | "tools:after-unavailable-append" | "tools:before-dispatch-fence" | "tools:before-unavailable-append" | "turn:after-canonical-append" | "turn:after-response-append" | "turn:after-results-append" | "update:after-canonical-append" | "update:after-delivery-insert" | "update:before-canonical-append" | "update:before-delivery-insert" | "worker:after-completion-append" | "worker:after-origin-append" | "worker:after-report-append" | "worker:after-report-delivery" | "worker:after-source-append" | "worker:after-stop-append" | "worker:after-stop-seal" | "worker:after-subtree-append" | "worker:before-completion-append" | "worker:before-origin-append" | "worker:before-report-append" | "worker:before-report-delivery" | "worker:before-source-append" | "worker:before-stop-append" | "worker:before-stop-seal" | "worker:before-subtree-append";
2091
2083
  } | {
2092
- readonly _tag: "UnknownResolutionConflict";
2093
- readonly submissionId: string;
2094
- readonly toolCallId: string;
2084
+ readonly _tag: "AdmissionConflict";
2085
+ readonly threadId: string;
2086
+ readonly principal: string;
2087
+ readonly idempotencyKey: string;
2088
+ readonly existingInputDigest: string;
2089
+ readonly attemptedInputDigest: string;
2090
+ } | {
2091
+ readonly _tag: "AgentInputError";
2092
+ readonly message: string;
2095
2093
  } | {
2096
2094
  readonly _tag: "AdmissionLimitExceeded";
2097
2095
  readonly limit: "database-bytes" | "input-bytes" | "queue-depth";
2098
2096
  readonly actual: number;
2099
2097
  readonly maximum: number;
2100
2098
  } | {
2101
- readonly _tag: "DurableAlarmError";
2102
- readonly operation: string;
2103
- readonly message: string;
2104
- readonly cause?: Schema.Json | undefined;
2099
+ readonly _tag: "JoinedToHost";
2100
+ readonly submissionId: string;
2101
+ readonly hostSubmissionId: string;
2105
2102
  } | {
2106
- readonly _tag: "OperationDenied";
2107
- readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
2108
- readonly reason: string;
2109
- readonly threadId?: string | undefined;
2110
- readonly submissionId?: string | undefined;
2103
+ readonly _tag: "ApprovalConflict";
2104
+ readonly submissionId: string;
2105
+ readonly toolCallId: string;
2106
+ readonly existingDecision: "approved" | "denied";
2107
+ } | {
2108
+ readonly _tag: "UnknownResolutionConflict";
2109
+ readonly submissionId: string;
2110
+ readonly toolCallId: string;
2111
2111
  };
2112
2112
  }, Schema.SchemaError, never>;
2113
2113
  declare const decodeHostResponse: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AbortRecorded | ApprovalRecorded | HostFailed | ObservedPage | ProgressCancelled | ProgressObserved | SettlementReached | SettlementRecordReached | SubmissionStatusResponse | SubmitSucceeded | UnknownResolutionRecorded, Schema.SchemaError, never>;
@@ -2202,4 +2202,4 @@ declare class CloudflareThreadClient extends CloudflareThreadClient_base {
2202
2202
  }
2203
2203
  //#endregion
2204
2204
  export { boundHostDiagnostic as A, decodeSubmitRequest as B, SettlementReached as C, SubmitSucceeded as D, SubmitRequest as E, decodeCancelProgressRequest as F, encodeAwaitSettlementRequest as G, encodeAbortCommand as H, decodeHostResponse as I, encodeObservePageRequest as J, encodeCancelProgressRequest as K, decodeLiveText as L, decodeApprovalDecisionCommand as M, decodeAwaitProgressRequest as N, ThreadClientError as O, decodeAwaitSettlementRequest as P, Frame as Q, decodeObservePageRequest as R, ProgressObserved as S, SubmissionStatusResponse as T, encodeApprovalDecisionCommand as U, decodeUnknownResolutionCommand as V, encodeAwaitProgressRequest as W, encodeSubmitRequest as X, encodeReceipt as Y, encodeUnknownResolutionCommand as Z, HostProtocolError as _, CancelProgressRequest as a, ObservedPage as b, ClientAwaitFailure as c, ClientSubmitFailure as d, ClientUnknownFailure as f, HostFailure as g, HostFailed as h, AwaitSettlementRequest as i, decodeAbortCommand as j, UnknownResolutionRecorded as k, ClientObserveFailure as l, CloudflareThreadClient_d_exports as m, ApprovalRecorded as n, ClientAbortFailure as o, CloudflareThreadClient as p, encodeHostResponse as q, AwaitProgressRequest as r, ClientApprovalFailure as s, AbortRecorded as t, ClientProgressFailure as u, HostResponse as v, SettlementRecordReached as w, ProgressCancelled as x, ObservePageRequest as y, decodeReceipt as z };
2205
- //# sourceMappingURL=CloudflareThreadClient-Bo0cBJe9.d.mts.map
2205
+ //# sourceMappingURL=CloudflareThreadClient-Atp-Clb4.d.mts.map
@@ -1,2 +1,2 @@
1
- import { A as boundHostDiagnostic, B as decodeSubmitRequest, C as SettlementReached, D as SubmitSucceeded, E as SubmitRequest, F as decodeCancelProgressRequest, G as encodeAwaitSettlementRequest, H as encodeAbortCommand, I as decodeHostResponse, J as encodeObservePageRequest, K as encodeCancelProgressRequest, L as decodeLiveText, M as decodeApprovalDecisionCommand, N as decodeAwaitProgressRequest, O as ThreadClientError, P as decodeAwaitSettlementRequest, Q as Frame, R as decodeObservePageRequest, S as ProgressObserved, T as SubmissionStatusResponse, U as encodeApprovalDecisionCommand, V as decodeUnknownResolutionCommand, W as encodeAwaitProgressRequest, X as encodeSubmitRequest, Y as encodeReceipt, Z as encodeUnknownResolutionCommand, _ as HostProtocolError, a as CancelProgressRequest, b as ObservedPage, c as ClientAwaitFailure, d as ClientSubmitFailure, f as ClientUnknownFailure, g as HostFailure, h as HostFailed, i as AwaitSettlementRequest, j as decodeAbortCommand, k as UnknownResolutionRecorded, l as ClientObserveFailure, n as ApprovalRecorded, o as ClientAbortFailure, p as CloudflareThreadClient, q as encodeHostResponse, r as AwaitProgressRequest, s as ClientApprovalFailure, t as AbortRecorded, u as ClientProgressFailure, v as HostResponse, w as SettlementRecordReached, x as ProgressCancelled, y as ObservePageRequest, z as decodeReceipt } from "./CloudflareThreadClient-Bo0cBJe9.mjs";
1
+ import { A as boundHostDiagnostic, B as decodeSubmitRequest, C as SettlementReached, D as SubmitSucceeded, E as SubmitRequest, F as decodeCancelProgressRequest, G as encodeAwaitSettlementRequest, H as encodeAbortCommand, I as decodeHostResponse, J as encodeObservePageRequest, K as encodeCancelProgressRequest, L as decodeLiveText, M as decodeApprovalDecisionCommand, N as decodeAwaitProgressRequest, O as ThreadClientError, P as decodeAwaitSettlementRequest, Q as Frame, R as decodeObservePageRequest, S as ProgressObserved, T as SubmissionStatusResponse, U as encodeApprovalDecisionCommand, V as decodeUnknownResolutionCommand, W as encodeAwaitProgressRequest, X as encodeSubmitRequest, Y as encodeReceipt, Z as encodeUnknownResolutionCommand, _ as HostProtocolError, a as CancelProgressRequest, b as ObservedPage, c as ClientAwaitFailure, d as ClientSubmitFailure, f as ClientUnknownFailure, g as HostFailure, h as HostFailed, i as AwaitSettlementRequest, j as decodeAbortCommand, k as UnknownResolutionRecorded, l as ClientObserveFailure, n as ApprovalRecorded, o as ClientAbortFailure, p as CloudflareThreadClient, q as encodeHostResponse, r as AwaitProgressRequest, s as ClientApprovalFailure, t as AbortRecorded, u as ClientProgressFailure, v as HostResponse, w as SettlementRecordReached, x as ProgressCancelled, y as ObservePageRequest, z as decodeReceipt } from "./CloudflareThreadClient-Atp-Clb4.mjs";
2
2
  export { AbortRecorded, ApprovalRecorded, AwaitProgressRequest, AwaitSettlementRequest, CancelProgressRequest, ClientAbortFailure, ClientApprovalFailure, ClientAwaitFailure, ClientObserveFailure, ClientProgressFailure, ClientSubmitFailure, ClientUnknownFailure, CloudflareThreadClient, HostFailed, HostFailure, HostProtocolError, HostResponse, Frame as LiveTextFrame, ObservePageRequest, ObservedPage, ProgressCancelled, ProgressObserved, SettlementReached, SettlementRecordReached, SubmissionStatusResponse, SubmitRequest, SubmitSucceeded, ThreadClientError, UnknownResolutionRecorded, boundHostDiagnostic, decodeAbortCommand, decodeApprovalDecisionCommand, decodeAwaitProgressRequest, decodeAwaitSettlementRequest, decodeCancelProgressRequest, decodeHostResponse, decodeLiveText, decodeObservePageRequest, decodeReceipt, decodeSubmitRequest, decodeUnknownResolutionCommand, encodeAbortCommand, encodeApprovalDecisionCommand, encodeAwaitProgressRequest, encodeAwaitSettlementRequest, encodeCancelProgressRequest, encodeHostResponse, encodeObservePageRequest, encodeReceipt, encodeSubmitRequest, encodeUnknownResolutionCommand };