@effect-agent/storage-cloudflare 0.1.0-beta.96 → 0.1.0-beta.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/PortProtocol.d.mts
CHANGED
|
@@ -186,6 +186,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
186
186
|
readonly tools: string;
|
|
187
187
|
readonly replay?: {
|
|
188
188
|
readonly agent: string;
|
|
189
|
+
readonly agentBehavior?: string | undefined;
|
|
189
190
|
readonly tools: {
|
|
190
191
|
readonly [x: string]: string;
|
|
191
192
|
};
|
|
@@ -224,6 +225,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
224
225
|
readonly tools: string;
|
|
225
226
|
readonly replay?: {
|
|
226
227
|
readonly agent: string;
|
|
228
|
+
readonly agentBehavior?: string | undefined;
|
|
227
229
|
readonly tools: {
|
|
228
230
|
readonly [x: string]: string;
|
|
229
231
|
};
|
|
@@ -271,6 +273,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
271
273
|
readonly tools: string;
|
|
272
274
|
readonly replay?: {
|
|
273
275
|
readonly agent: string;
|
|
276
|
+
readonly agentBehavior?: string | undefined;
|
|
274
277
|
readonly tools: {
|
|
275
278
|
readonly [x: string]: string;
|
|
276
279
|
};
|
|
@@ -452,6 +455,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
452
455
|
readonly tools: string;
|
|
453
456
|
readonly replay?: {
|
|
454
457
|
readonly agent: string;
|
|
458
|
+
readonly agentBehavior?: string | undefined;
|
|
455
459
|
readonly tools: {
|
|
456
460
|
readonly [x: string]: string;
|
|
457
461
|
};
|
|
@@ -572,6 +576,13 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
572
576
|
readonly messages?: Schema.Json | undefined;
|
|
573
577
|
} | {
|
|
574
578
|
readonly _tag: "ModelResponseRecorded";
|
|
579
|
+
readonly toolOperations?: readonly {
|
|
580
|
+
readonly toolCallId: string;
|
|
581
|
+
readonly toolName: string;
|
|
582
|
+
readonly executionClass: "idempotent" | "readonly" | "uncertain";
|
|
583
|
+
readonly executionKind: "delegation" | "orchestration" | "ordinary";
|
|
584
|
+
readonly replay: string;
|
|
585
|
+
}[] | undefined;
|
|
575
586
|
readonly toolParameterRejections?: readonly {
|
|
576
587
|
readonly toolCallId: string;
|
|
577
588
|
readonly parameters: Schema.Json;
|
|
@@ -637,6 +648,8 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
637
648
|
readonly parameters: Schema.Json;
|
|
638
649
|
readonly parametersDigest: string;
|
|
639
650
|
readonly executionKind?: "delegation" | "orchestration" | "ordinary" | undefined;
|
|
651
|
+
readonly executionClass?: "idempotent" | "readonly" | "uncertain" | undefined;
|
|
652
|
+
readonly replay?: string | undefined;
|
|
640
653
|
} | {
|
|
641
654
|
readonly _tag: "ToolCallSettled";
|
|
642
655
|
readonly toolSelection?: {
|
|
@@ -707,6 +720,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
707
720
|
readonly _tag: "RunCompleted";
|
|
708
721
|
readonly runId: string;
|
|
709
722
|
readonly output: Schema.Json;
|
|
723
|
+
readonly resultDigest?: string | undefined;
|
|
710
724
|
readonly runDisposition?: Schema.Json | undefined;
|
|
711
725
|
readonly finishReason?: "budget-exhausted" | undefined;
|
|
712
726
|
readonly exhausted?: "tokens" | "tool-calls" | "turns" | undefined;
|
|
@@ -799,6 +813,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
799
813
|
readonly tools: string;
|
|
800
814
|
readonly replay?: {
|
|
801
815
|
readonly agent: string;
|
|
816
|
+
readonly agentBehavior?: string | undefined;
|
|
802
817
|
readonly tools: {
|
|
803
818
|
readonly [x: string]: string;
|
|
804
819
|
};
|
|
@@ -898,6 +913,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
898
913
|
readonly tools: string;
|
|
899
914
|
readonly replay?: {
|
|
900
915
|
readonly agent: string;
|
|
916
|
+
readonly agentBehavior?: string | undefined;
|
|
901
917
|
readonly tools: {
|
|
902
918
|
readonly [x: string]: string;
|
|
903
919
|
};
|
|
@@ -963,6 +979,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
963
979
|
readonly tools: string;
|
|
964
980
|
readonly replay?: {
|
|
965
981
|
readonly agent: string;
|
|
982
|
+
readonly agentBehavior?: string | undefined;
|
|
966
983
|
readonly tools: {
|
|
967
984
|
readonly [x: string]: string;
|
|
968
985
|
};
|
|
@@ -1010,6 +1027,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1010
1027
|
readonly tools: string;
|
|
1011
1028
|
readonly replay?: {
|
|
1012
1029
|
readonly agent: string;
|
|
1030
|
+
readonly agentBehavior?: string | undefined;
|
|
1013
1031
|
readonly tools: {
|
|
1014
1032
|
readonly [x: string]: string;
|
|
1015
1033
|
};
|
|
@@ -1053,6 +1071,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1053
1071
|
readonly tools: string;
|
|
1054
1072
|
readonly replay?: {
|
|
1055
1073
|
readonly agent: string;
|
|
1074
|
+
readonly agentBehavior?: string | undefined;
|
|
1056
1075
|
readonly tools: {
|
|
1057
1076
|
readonly [x: string]: string;
|
|
1058
1077
|
};
|
|
@@ -1100,6 +1119,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1100
1119
|
readonly tools: string;
|
|
1101
1120
|
readonly replay?: {
|
|
1102
1121
|
readonly agent: string;
|
|
1122
|
+
readonly agentBehavior?: string | undefined;
|
|
1103
1123
|
readonly tools: {
|
|
1104
1124
|
readonly [x: string]: string;
|
|
1105
1125
|
};
|
|
@@ -1141,6 +1161,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1141
1161
|
readonly tools: string;
|
|
1142
1162
|
readonly replay?: {
|
|
1143
1163
|
readonly agent: string;
|
|
1164
|
+
readonly agentBehavior?: string | undefined;
|
|
1144
1165
|
readonly tools: {
|
|
1145
1166
|
readonly [x: string]: string;
|
|
1146
1167
|
};
|
|
@@ -1226,6 +1247,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1226
1247
|
readonly tools: string;
|
|
1227
1248
|
readonly replay?: {
|
|
1228
1249
|
readonly agent: string;
|
|
1250
|
+
readonly agentBehavior?: string | undefined;
|
|
1229
1251
|
readonly tools: {
|
|
1230
1252
|
readonly [x: string]: string;
|
|
1231
1253
|
};
|
|
@@ -1346,6 +1368,13 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1346
1368
|
readonly messages?: Schema.Json | undefined;
|
|
1347
1369
|
} | {
|
|
1348
1370
|
readonly _tag: "ModelResponseRecorded";
|
|
1371
|
+
readonly toolOperations?: readonly {
|
|
1372
|
+
readonly toolCallId: string;
|
|
1373
|
+
readonly toolName: string;
|
|
1374
|
+
readonly executionClass: "idempotent" | "readonly" | "uncertain";
|
|
1375
|
+
readonly executionKind: "delegation" | "orchestration" | "ordinary";
|
|
1376
|
+
readonly replay: string;
|
|
1377
|
+
}[] | undefined;
|
|
1349
1378
|
readonly toolParameterRejections?: readonly {
|
|
1350
1379
|
readonly toolCallId: string;
|
|
1351
1380
|
readonly parameters: Schema.Json;
|
|
@@ -1411,6 +1440,8 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1411
1440
|
readonly parameters: Schema.Json;
|
|
1412
1441
|
readonly parametersDigest: string;
|
|
1413
1442
|
readonly executionKind?: "delegation" | "orchestration" | "ordinary" | undefined;
|
|
1443
|
+
readonly executionClass?: "idempotent" | "readonly" | "uncertain" | undefined;
|
|
1444
|
+
readonly replay?: string | undefined;
|
|
1414
1445
|
} | {
|
|
1415
1446
|
readonly _tag: "ToolCallSettled";
|
|
1416
1447
|
readonly toolSelection?: {
|
|
@@ -1481,6 +1512,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1481
1512
|
readonly _tag: "RunCompleted";
|
|
1482
1513
|
readonly runId: string;
|
|
1483
1514
|
readonly output: Schema.Json;
|
|
1515
|
+
readonly resultDigest?: string | undefined;
|
|
1484
1516
|
readonly runDisposition?: Schema.Json | undefined;
|
|
1485
1517
|
readonly finishReason?: "budget-exhausted" | undefined;
|
|
1486
1518
|
readonly exhausted?: "tokens" | "tool-calls" | "turns" | undefined;
|
|
@@ -1573,6 +1605,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1573
1605
|
readonly tools: string;
|
|
1574
1606
|
readonly replay?: {
|
|
1575
1607
|
readonly agent: string;
|
|
1608
|
+
readonly agentBehavior?: string | undefined;
|
|
1576
1609
|
readonly tools: {
|
|
1577
1610
|
readonly [x: string]: string;
|
|
1578
1611
|
};
|
|
@@ -1672,6 +1705,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1672
1705
|
readonly tools: string;
|
|
1673
1706
|
readonly replay?: {
|
|
1674
1707
|
readonly agent: string;
|
|
1708
|
+
readonly agentBehavior?: string | undefined;
|
|
1675
1709
|
readonly tools: {
|
|
1676
1710
|
readonly [x: string]: string;
|
|
1677
1711
|
};
|
|
@@ -1737,6 +1771,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1737
1771
|
readonly tools: string;
|
|
1738
1772
|
readonly replay?: {
|
|
1739
1773
|
readonly agent: string;
|
|
1774
|
+
readonly agentBehavior?: string | undefined;
|
|
1740
1775
|
readonly tools: {
|
|
1741
1776
|
readonly [x: string]: string;
|
|
1742
1777
|
};
|
|
@@ -1784,6 +1819,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1784
1819
|
readonly tools: string;
|
|
1785
1820
|
readonly replay?: {
|
|
1786
1821
|
readonly agent: string;
|
|
1822
|
+
readonly agentBehavior?: string | undefined;
|
|
1787
1823
|
readonly tools: {
|
|
1788
1824
|
readonly [x: string]: string;
|
|
1789
1825
|
};
|
|
@@ -1827,6 +1863,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1827
1863
|
readonly tools: string;
|
|
1828
1864
|
readonly replay?: {
|
|
1829
1865
|
readonly agent: string;
|
|
1866
|
+
readonly agentBehavior?: string | undefined;
|
|
1830
1867
|
readonly tools: {
|
|
1831
1868
|
readonly [x: string]: string;
|
|
1832
1869
|
};
|
|
@@ -1874,6 +1911,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1874
1911
|
readonly tools: string;
|
|
1875
1912
|
readonly replay?: {
|
|
1876
1913
|
readonly agent: string;
|
|
1914
|
+
readonly agentBehavior?: string | undefined;
|
|
1877
1915
|
readonly tools: {
|
|
1878
1916
|
readonly [x: string]: string;
|
|
1879
1917
|
};
|
|
@@ -1915,6 +1953,7 @@ declare const encodePortRequest: (input: LedgerAdmitCall | LedgerLookupCall | Le
|
|
|
1915
1953
|
readonly tools: string;
|
|
1916
1954
|
readonly replay?: {
|
|
1917
1955
|
readonly agent: string;
|
|
1956
|
+
readonly agentBehavior?: string | undefined;
|
|
1918
1957
|
readonly tools: {
|
|
1919
1958
|
readonly [x: string]: string;
|
|
1920
1959
|
};
|
|
@@ -2033,6 +2072,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2033
2072
|
readonly tools: string;
|
|
2034
2073
|
readonly replay?: {
|
|
2035
2074
|
readonly agent: string;
|
|
2075
|
+
readonly agentBehavior?: string | undefined;
|
|
2036
2076
|
readonly tools: {
|
|
2037
2077
|
readonly [x: string]: string;
|
|
2038
2078
|
};
|
|
@@ -2082,6 +2122,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2082
2122
|
readonly tools: string;
|
|
2083
2123
|
readonly replay?: {
|
|
2084
2124
|
readonly agent: string;
|
|
2125
|
+
readonly agentBehavior?: string | undefined;
|
|
2085
2126
|
readonly tools: {
|
|
2086
2127
|
readonly [x: string]: string;
|
|
2087
2128
|
};
|
|
@@ -2129,6 +2170,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2129
2170
|
readonly tools: string;
|
|
2130
2171
|
readonly replay?: {
|
|
2131
2172
|
readonly agent: string;
|
|
2173
|
+
readonly agentBehavior?: string | undefined;
|
|
2132
2174
|
readonly tools: {
|
|
2133
2175
|
readonly [x: string]: string;
|
|
2134
2176
|
};
|
|
@@ -2253,6 +2295,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2253
2295
|
readonly tools: string;
|
|
2254
2296
|
readonly replay?: {
|
|
2255
2297
|
readonly agent: string;
|
|
2298
|
+
readonly agentBehavior?: string | undefined;
|
|
2256
2299
|
readonly tools: {
|
|
2257
2300
|
readonly [x: string]: string;
|
|
2258
2301
|
};
|
|
@@ -2302,6 +2345,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2302
2345
|
readonly tools: string;
|
|
2303
2346
|
readonly replay?: {
|
|
2304
2347
|
readonly agent: string;
|
|
2348
|
+
readonly agentBehavior?: string | undefined;
|
|
2305
2349
|
readonly tools: {
|
|
2306
2350
|
readonly [x: string]: string;
|
|
2307
2351
|
};
|
|
@@ -2349,6 +2393,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2349
2393
|
readonly tools: string;
|
|
2350
2394
|
readonly replay?: {
|
|
2351
2395
|
readonly agent: string;
|
|
2396
|
+
readonly agentBehavior?: string | undefined;
|
|
2352
2397
|
readonly tools: {
|
|
2353
2398
|
readonly [x: string]: string;
|
|
2354
2399
|
};
|
|
@@ -2507,6 +2552,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2507
2552
|
readonly tools: string;
|
|
2508
2553
|
readonly replay?: {
|
|
2509
2554
|
readonly agent: string;
|
|
2555
|
+
readonly agentBehavior?: string | undefined;
|
|
2510
2556
|
readonly tools: {
|
|
2511
2557
|
readonly [x: string]: string;
|
|
2512
2558
|
};
|
|
@@ -2627,6 +2673,13 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2627
2673
|
readonly messages?: Schema.Json | undefined;
|
|
2628
2674
|
} | {
|
|
2629
2675
|
readonly _tag: "ModelResponseRecorded";
|
|
2676
|
+
readonly toolOperations?: readonly {
|
|
2677
|
+
readonly toolCallId: string;
|
|
2678
|
+
readonly toolName: string;
|
|
2679
|
+
readonly executionClass: "idempotent" | "readonly" | "uncertain";
|
|
2680
|
+
readonly executionKind: "delegation" | "orchestration" | "ordinary";
|
|
2681
|
+
readonly replay: string;
|
|
2682
|
+
}[] | undefined;
|
|
2630
2683
|
readonly toolParameterRejections?: readonly {
|
|
2631
2684
|
readonly toolCallId: string;
|
|
2632
2685
|
readonly parameters: Schema.Json;
|
|
@@ -2692,6 +2745,8 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2692
2745
|
readonly parameters: Schema.Json;
|
|
2693
2746
|
readonly parametersDigest: string;
|
|
2694
2747
|
readonly executionKind?: "delegation" | "orchestration" | "ordinary" | undefined;
|
|
2748
|
+
readonly executionClass?: "idempotent" | "readonly" | "uncertain" | undefined;
|
|
2749
|
+
readonly replay?: string | undefined;
|
|
2695
2750
|
} | {
|
|
2696
2751
|
readonly _tag: "ToolCallSettled";
|
|
2697
2752
|
readonly toolSelection?: {
|
|
@@ -2762,6 +2817,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2762
2817
|
readonly _tag: "RunCompleted";
|
|
2763
2818
|
readonly runId: string;
|
|
2764
2819
|
readonly output: Schema.Json;
|
|
2820
|
+
readonly resultDigest?: string | undefined;
|
|
2765
2821
|
readonly runDisposition?: Schema.Json | undefined;
|
|
2766
2822
|
readonly finishReason?: "budget-exhausted" | undefined;
|
|
2767
2823
|
readonly exhausted?: "tokens" | "tool-calls" | "turns" | undefined;
|
|
@@ -2854,6 +2910,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2854
2910
|
readonly tools: string;
|
|
2855
2911
|
readonly replay?: {
|
|
2856
2912
|
readonly agent: string;
|
|
2913
|
+
readonly agentBehavior?: string | undefined;
|
|
2857
2914
|
readonly tools: {
|
|
2858
2915
|
readonly [x: string]: string;
|
|
2859
2916
|
};
|
|
@@ -2953,6 +3010,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
2953
3010
|
readonly tools: string;
|
|
2954
3011
|
readonly replay?: {
|
|
2955
3012
|
readonly agent: string;
|
|
3013
|
+
readonly agentBehavior?: string | undefined;
|
|
2956
3014
|
readonly tools: {
|
|
2957
3015
|
readonly [x: string]: string;
|
|
2958
3016
|
};
|
|
@@ -3018,6 +3076,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3018
3076
|
readonly tools: string;
|
|
3019
3077
|
readonly replay?: {
|
|
3020
3078
|
readonly agent: string;
|
|
3079
|
+
readonly agentBehavior?: string | undefined;
|
|
3021
3080
|
readonly tools: {
|
|
3022
3081
|
readonly [x: string]: string;
|
|
3023
3082
|
};
|
|
@@ -3065,6 +3124,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3065
3124
|
readonly tools: string;
|
|
3066
3125
|
readonly replay?: {
|
|
3067
3126
|
readonly agent: string;
|
|
3127
|
+
readonly agentBehavior?: string | undefined;
|
|
3068
3128
|
readonly tools: {
|
|
3069
3129
|
readonly [x: string]: string;
|
|
3070
3130
|
};
|
|
@@ -3108,6 +3168,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3108
3168
|
readonly tools: string;
|
|
3109
3169
|
readonly replay?: {
|
|
3110
3170
|
readonly agent: string;
|
|
3171
|
+
readonly agentBehavior?: string | undefined;
|
|
3111
3172
|
readonly tools: {
|
|
3112
3173
|
readonly [x: string]: string;
|
|
3113
3174
|
};
|
|
@@ -3155,6 +3216,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3155
3216
|
readonly tools: string;
|
|
3156
3217
|
readonly replay?: {
|
|
3157
3218
|
readonly agent: string;
|
|
3219
|
+
readonly agentBehavior?: string | undefined;
|
|
3158
3220
|
readonly tools: {
|
|
3159
3221
|
readonly [x: string]: string;
|
|
3160
3222
|
};
|
|
@@ -3196,6 +3258,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3196
3258
|
readonly tools: string;
|
|
3197
3259
|
readonly replay?: {
|
|
3198
3260
|
readonly agent: string;
|
|
3261
|
+
readonly agentBehavior?: string | undefined;
|
|
3199
3262
|
readonly tools: {
|
|
3200
3263
|
readonly [x: string]: string;
|
|
3201
3264
|
};
|
|
@@ -3303,6 +3366,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3303
3366
|
readonly tools: string;
|
|
3304
3367
|
readonly replay?: {
|
|
3305
3368
|
readonly agent: string;
|
|
3369
|
+
readonly agentBehavior?: string | undefined;
|
|
3306
3370
|
readonly tools: {
|
|
3307
3371
|
readonly [x: string]: string;
|
|
3308
3372
|
};
|
|
@@ -3423,6 +3487,13 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3423
3487
|
readonly messages?: Schema.Json | undefined;
|
|
3424
3488
|
} | {
|
|
3425
3489
|
readonly _tag: "ModelResponseRecorded";
|
|
3490
|
+
readonly toolOperations?: readonly {
|
|
3491
|
+
readonly toolCallId: string;
|
|
3492
|
+
readonly toolName: string;
|
|
3493
|
+
readonly executionClass: "idempotent" | "readonly" | "uncertain";
|
|
3494
|
+
readonly executionKind: "delegation" | "orchestration" | "ordinary";
|
|
3495
|
+
readonly replay: string;
|
|
3496
|
+
}[] | undefined;
|
|
3426
3497
|
readonly toolParameterRejections?: readonly {
|
|
3427
3498
|
readonly toolCallId: string;
|
|
3428
3499
|
readonly parameters: Schema.Json;
|
|
@@ -3488,6 +3559,8 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3488
3559
|
readonly parameters: Schema.Json;
|
|
3489
3560
|
readonly parametersDigest: string;
|
|
3490
3561
|
readonly executionKind?: "delegation" | "orchestration" | "ordinary" | undefined;
|
|
3562
|
+
readonly executionClass?: "idempotent" | "readonly" | "uncertain" | undefined;
|
|
3563
|
+
readonly replay?: string | undefined;
|
|
3491
3564
|
} | {
|
|
3492
3565
|
readonly _tag: "ToolCallSettled";
|
|
3493
3566
|
readonly toolSelection?: {
|
|
@@ -3558,6 +3631,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3558
3631
|
readonly _tag: "RunCompleted";
|
|
3559
3632
|
readonly runId: string;
|
|
3560
3633
|
readonly output: Schema.Json;
|
|
3634
|
+
readonly resultDigest?: string | undefined;
|
|
3561
3635
|
readonly runDisposition?: Schema.Json | undefined;
|
|
3562
3636
|
readonly finishReason?: "budget-exhausted" | undefined;
|
|
3563
3637
|
readonly exhausted?: "tokens" | "tool-calls" | "turns" | undefined;
|
|
@@ -3650,6 +3724,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3650
3724
|
readonly tools: string;
|
|
3651
3725
|
readonly replay?: {
|
|
3652
3726
|
readonly agent: string;
|
|
3727
|
+
readonly agentBehavior?: string | undefined;
|
|
3653
3728
|
readonly tools: {
|
|
3654
3729
|
readonly [x: string]: string;
|
|
3655
3730
|
};
|
|
@@ -3749,6 +3824,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3749
3824
|
readonly tools: string;
|
|
3750
3825
|
readonly replay?: {
|
|
3751
3826
|
readonly agent: string;
|
|
3827
|
+
readonly agentBehavior?: string | undefined;
|
|
3752
3828
|
readonly tools: {
|
|
3753
3829
|
readonly [x: string]: string;
|
|
3754
3830
|
};
|
|
@@ -3814,6 +3890,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3814
3890
|
readonly tools: string;
|
|
3815
3891
|
readonly replay?: {
|
|
3816
3892
|
readonly agent: string;
|
|
3893
|
+
readonly agentBehavior?: string | undefined;
|
|
3817
3894
|
readonly tools: {
|
|
3818
3895
|
readonly [x: string]: string;
|
|
3819
3896
|
};
|
|
@@ -3861,6 +3938,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3861
3938
|
readonly tools: string;
|
|
3862
3939
|
readonly replay?: {
|
|
3863
3940
|
readonly agent: string;
|
|
3941
|
+
readonly agentBehavior?: string | undefined;
|
|
3864
3942
|
readonly tools: {
|
|
3865
3943
|
readonly [x: string]: string;
|
|
3866
3944
|
};
|
|
@@ -3904,6 +3982,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3904
3982
|
readonly tools: string;
|
|
3905
3983
|
readonly replay?: {
|
|
3906
3984
|
readonly agent: string;
|
|
3985
|
+
readonly agentBehavior?: string | undefined;
|
|
3907
3986
|
readonly tools: {
|
|
3908
3987
|
readonly [x: string]: string;
|
|
3909
3988
|
};
|
|
@@ -3951,6 +4030,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3951
4030
|
readonly tools: string;
|
|
3952
4031
|
readonly replay?: {
|
|
3953
4032
|
readonly agent: string;
|
|
4033
|
+
readonly agentBehavior?: string | undefined;
|
|
3954
4034
|
readonly tools: {
|
|
3955
4035
|
readonly [x: string]: string;
|
|
3956
4036
|
};
|
|
@@ -3992,6 +4072,7 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
3992
4072
|
readonly tools: string;
|
|
3993
4073
|
readonly replay?: {
|
|
3994
4074
|
readonly agent: string;
|
|
4075
|
+
readonly agentBehavior?: string | undefined;
|
|
3995
4076
|
readonly tools: {
|
|
3996
4077
|
readonly [x: string]: string;
|
|
3997
4078
|
};
|
|
@@ -4064,14 +4145,6 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
4064
4145
|
} | {
|
|
4065
4146
|
readonly _tag: "PortFailed";
|
|
4066
4147
|
readonly failure: {
|
|
4067
|
-
readonly _tag: "ThreadNotMaterialized";
|
|
4068
|
-
readonly threadId: string;
|
|
4069
|
-
} | {
|
|
4070
|
-
readonly _tag: "FenceRejected";
|
|
4071
|
-
readonly threadId: string;
|
|
4072
|
-
readonly actualEpoch: number;
|
|
4073
|
-
readonly attemptedEpoch: number;
|
|
4074
|
-
} | {
|
|
4075
4148
|
readonly _tag: "PortProtocolError";
|
|
4076
4149
|
readonly message: string;
|
|
4077
4150
|
} | {
|
|
@@ -4103,6 +4176,9 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
4103
4176
|
readonly operation: string;
|
|
4104
4177
|
readonly message: string;
|
|
4105
4178
|
readonly cause?: Schema.Json | undefined;
|
|
4179
|
+
} | {
|
|
4180
|
+
readonly _tag: "ThreadNotMaterialized";
|
|
4181
|
+
readonly threadId: string;
|
|
4106
4182
|
} | {
|
|
4107
4183
|
readonly _tag: "AppendConflict";
|
|
4108
4184
|
readonly threadId: string;
|
|
@@ -4110,6 +4186,11 @@ declare const encodePortResponse: (input: PortFailed | PortSucceeded, options?:
|
|
|
4110
4186
|
readonly reason: "batch-digest" | "record-identity" | "tail";
|
|
4111
4187
|
readonly actualTailSequence?: number | undefined;
|
|
4112
4188
|
readonly actualTailDigest?: string | undefined;
|
|
4189
|
+
} | {
|
|
4190
|
+
readonly _tag: "FenceRejected";
|
|
4191
|
+
readonly threadId: string;
|
|
4192
|
+
readonly actualEpoch: number;
|
|
4193
|
+
readonly attemptedEpoch: number;
|
|
4113
4194
|
};
|
|
4114
4195
|
}, Schema.SchemaError, never>;
|
|
4115
4196
|
declare const decodePortResponse: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<PortFailed | PortSucceeded, Schema.SchemaError, never>;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@effect-agent/storage-cloudflare","version":"0.1.0-beta.
|
|
1
|
+
{"name":"@effect-agent/storage-cloudflare","version":"0.1.0-beta.98","dependencies":{"@effect/platform-browser":"4.0.0-rc.115","@effect/sql-sqlite-do":"4.0.0-rc.115","effect-agent":"0.1.0-beta.98"},"devDependencies":{"@cloudflare/vitest-pool-workers":"0.21.3","@cloudflare/workers-types":"5.20260825.1","@effect-agent/testing":"0.1.0-beta.98","@effect/vitest":"4.0.0-rc.115","effect":"4.0.0-rc.115","typescript":"7.0.2","vite-plus":"0.3.0","vitest":"4.1.11"},"peerDependencies":{"effect":"^4.0.0-rc.115"},"exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"./do-memory-store":{"types":"./dist/DoMemoryStore.d.mts","default":"./dist/DoMemoryStore.mjs"},"./do-schedule-store":{"types":"./dist/DoScheduleStore.d.mts","default":"./dist/DoScheduleStore.mjs"},"./do-storage-config":{"types":"./dist/DoStorageConfig.d.mts","default":"./dist/DoStorageConfig.mjs"},"./do-storage-error":{"types":"./dist/DoStorageError.d.mts","default":"./dist/DoStorageError.mjs"},"./do-storage-failpoint":{"types":"./dist/DoStorageFailpoint.d.mts","default":"./dist/DoStorageFailpoint.mjs"},"./do-storage-version":{"types":"./dist/DoStorageVersion.d.mts","default":"./dist/DoStorageVersion.mjs"},"./do-submission-ledger":{"types":"./dist/DoSubmissionLedger.d.mts","default":"./dist/DoSubmissionLedger.mjs"},"./do-subscription-store":{"types":"./dist/DoSubscriptionStore.d.mts","default":"./dist/DoSubscriptionStore.mjs"},"./do-thread-store":{"types":"./dist/DoThreadStore.d.mts","default":"./dist/DoThreadStore.mjs"},"./memory-protocol":{"types":"./dist/MemoryProtocol.d.mts","default":"./dist/MemoryProtocol.mjs"},"./port-protocol":{"types":"./dist/PortProtocol.d.mts","default":"./dist/PortProtocol.mjs"},"./port-routing":{"types":"./dist/PortRouting.d.mts","default":"./dist/PortRouting.mjs"},"./testing/do-storage-failpoint-testing":{"types":"./dist/DoStorageFailpointTesting.d.mts","default":"./dist/DoStorageFailpointTesting.mjs"},"./do-message-delivery-store":{"types":"./dist/DoMessageDeliveryStore.d.mts","default":"./dist/DoMessageDeliveryStore.mjs"}},"description":"Durable Object SQLite storage adapters and the routed port protocol for Effect Agent on Cloudflare.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/danieljvdm/effect-agent.git","directory":"packages/storage-cloudflare"},"files":["dist","src"],"type":"module","sideEffects":[],"publishConfig":{"access":"public"},"scripts":{"build":"vp pack","check":"tsc --noEmit -p tsconfig.json"}}
|
|
@@ -512,10 +512,13 @@ const makeServices = Effect.fn("DoSubmissionLedger.makeServices")(function* () {
|
|
|
512
512
|
ownershipToken: string,
|
|
513
513
|
): Effect.fn.Return<OwnershipRow, OwnershipLost | LedgerError> {
|
|
514
514
|
const ownership = yield* readOwnership(operation, submission.submission_id);
|
|
515
|
+
const actualEpoch = yield* threadEpoch(operation, submission.thread_id);
|
|
515
516
|
|
|
516
|
-
if (
|
|
517
|
-
|
|
518
|
-
|
|
517
|
+
if (
|
|
518
|
+
Option.isNone(ownership) ||
|
|
519
|
+
ownership.value.ownership_token !== ownershipToken ||
|
|
520
|
+
ownership.value.producer_epoch !== actualEpoch
|
|
521
|
+
) {
|
|
519
522
|
const submissionId = yield* Schema.decodeEffect(SubmissionSnapshot.fields.submissionId)(
|
|
520
523
|
submission.submission_id,
|
|
521
524
|
).pipe(Effect.mapError(internalFailure(operation)));
|
|
@@ -1465,11 +1468,48 @@ const makeServices = Effect.fn("DoSubmissionLedger.makeServices")(function* () {
|
|
|
1465
1468
|
const claimed = yield* inWriteTransaction(
|
|
1466
1469
|
operation,
|
|
1467
1470
|
Effect.gen(function* () {
|
|
1471
|
+
const now = yield* currentInstant;
|
|
1472
|
+
|
|
1473
|
+
// Ownership belongs to the whole Thread, including unknown work skipped below.
|
|
1474
|
+
// Stored lease instants are normalized UTC strings, so the latest expiry covers
|
|
1475
|
+
// every live lease. This check and the epoch grant share one write transaction.
|
|
1476
|
+
const ownershipRows = yield* sql<Record<string, unknown>>`
|
|
1477
|
+
SELECT ownership.*
|
|
1478
|
+
FROM effect_agent_submission_ownership AS ownership
|
|
1479
|
+
JOIN effect_agent_submissions AS submission
|
|
1480
|
+
ON submission.submission_id = ownership.submission_id
|
|
1481
|
+
WHERE submission.thread_id = ${validated.threadId}
|
|
1482
|
+
ORDER BY ownership.lease_expires_at DESC
|
|
1483
|
+
LIMIT 1
|
|
1484
|
+
`.pipe(Effect.mapError(sqlFailure(operation)));
|
|
1485
|
+
|
|
1486
|
+
const ownership = yield* decodeRows(
|
|
1487
|
+
Schema.Array(OwnershipRow),
|
|
1488
|
+
"effect_agent_submission_ownership",
|
|
1489
|
+
validated.threadId,
|
|
1490
|
+
ownershipRows,
|
|
1491
|
+
).pipe(Effect.mapError(internalFailure(operation)));
|
|
1492
|
+
|
|
1493
|
+
if (ownership.length > 0) {
|
|
1494
|
+
const expiresAt = yield* timestampMillis(
|
|
1495
|
+
operation,
|
|
1496
|
+
ownership[0].submission_id,
|
|
1497
|
+
)(ownership[0].lease_expires_at);
|
|
1498
|
+
|
|
1499
|
+
if (expiresAt > now.millis) return Option.none<Claim>();
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1468
1502
|
const headRows = yield* sql<Record<string, unknown>>`
|
|
1469
1503
|
SELECT ${sql.literal(SUBMISSION_COLUMNS)}
|
|
1470
1504
|
FROM effect_agent_submissions
|
|
1471
1505
|
WHERE thread_id = ${validated.threadId}
|
|
1472
1506
|
AND state <> 'settled'
|
|
1507
|
+
AND (
|
|
1508
|
+
state <> 'unknown' OR EXISTS (
|
|
1509
|
+
SELECT 1 FROM effect_agent_abort_intents
|
|
1510
|
+
WHERE submission_id = effect_agent_submissions.submission_id
|
|
1511
|
+
)
|
|
1512
|
+
)
|
|
1473
1513
|
ORDER BY queue_sequence ASC
|
|
1474
1514
|
LIMIT 1
|
|
1475
1515
|
`.pipe(Effect.mapError(sqlFailure(operation)));
|
|
@@ -1479,9 +1519,8 @@ const makeServices = Effect.fn("DoSubmissionLedger.makeServices")(function* () {
|
|
|
1479
1519
|
if (heads.length === 0) return Option.none<Claim>();
|
|
1480
1520
|
const head = heads[0];
|
|
1481
1521
|
|
|
1482
|
-
//
|
|
1483
|
-
//
|
|
1484
|
-
// in this claim transaction; retain uncertainty evidence and all ownership fencing.
|
|
1522
|
+
// Approval/delegation suspension and joined work retain their queue barrier.
|
|
1523
|
+
// Unknown work with an abort intent is selected for cleanup without Tool replay.
|
|
1485
1524
|
if (
|
|
1486
1525
|
head.state === "joining" ||
|
|
1487
1526
|
head.state === "joined" ||
|
|
@@ -1492,21 +1531,6 @@ const makeServices = Effect.fn("DoSubmissionLedger.makeServices")(function* () {
|
|
|
1492
1531
|
return Option.none<Claim>();
|
|
1493
1532
|
}
|
|
1494
1533
|
|
|
1495
|
-
const now = yield* currentInstant;
|
|
1496
|
-
const ownership = yield* readOwnership(operation, head.submission_id);
|
|
1497
|
-
|
|
1498
|
-
if (Option.isSome(ownership)) {
|
|
1499
|
-
const expiresAt = yield* timestampMillis(
|
|
1500
|
-
operation,
|
|
1501
|
-
head.submission_id,
|
|
1502
|
-
)(ownership.value.lease_expires_at);
|
|
1503
|
-
|
|
1504
|
-
// A live lease blocks every new claim; expiry alone only revokes the liveness
|
|
1505
|
-
// assumption — correctness stays with producer-epoch fencing (D5). In DC a live
|
|
1506
|
-
// lease under another token can only come from an evicted incarnation.
|
|
1507
|
-
if (expiresAt > now.millis) return Option.none<Claim>();
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
1534
|
// Bump the Thread's producer epoch atomically with the claim so every stale
|
|
1511
1535
|
// Attempt is fenced out of canonical appends (DUR-006). A Thread that was
|
|
1512
1536
|
// never materialized (eviction between admission and materialization) is created
|