@roll-agent/protocol 0.11.0 → 0.12.0

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/index.d.ts CHANGED
@@ -148,6 +148,8 @@ export declare const RUNTIME_METHODS: {
148
148
  readonly threadDelete: "thread.delete";
149
149
  readonly threadDetach: "thread.detach";
150
150
  readonly threadCapabilities: "thread.capabilities";
151
+ readonly modelConfigGet: "runtime.modelConfig.get";
152
+ readonly modelConfigReload: "runtime.modelConfig.reload";
151
153
  readonly turnStart: "turn.start";
152
154
  readonly turnCancel: "turn.cancel";
153
155
  readonly approvalRespond: "approval.respond";
@@ -3920,6 +3922,60 @@ export declare const threadSnapshotSchema: z.ZodUnion<readonly [z.ZodReadonly<z.
3920
3922
  requiredItemCount: z.ZodNumber;
3921
3923
  }, z.core.$strict>>>;
3922
3924
  }, z.core.$strict>>]>;
3925
+ declare const runtimeModelConfigIdentitySchema: z.ZodObject<{
3926
+ provider: z.ZodString;
3927
+ model: z.ZodString;
3928
+ }, z.core.$strict>;
3929
+ declare const runtimeModelConfigFailureSchema: z.ZodEnum<{
3930
+ "invalid-config": "invalid-config";
3931
+ "restart-required": "restart-required";
3932
+ "apply-failed": "apply-failed";
3933
+ }>;
3934
+ export declare const runtimeModelConfigStatusSchema: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
3935
+ status: z.ZodLiteral<"applied">;
3936
+ revision: z.ZodInt;
3937
+ active: z.ZodReadonly<z.ZodObject<{
3938
+ provider: z.ZodString;
3939
+ model: z.ZodString;
3940
+ revision: z.ZodInt;
3941
+ reasoning: z.ZodNullable<z.ZodEnum<{
3942
+ text: "text";
3943
+ summary: "summary";
3944
+ }>>;
3945
+ }, z.core.$strict>>;
3946
+ }, z.core.$strict>, z.ZodObject<{
3947
+ status: z.ZodLiteral<"pending">;
3948
+ revision: z.ZodInt;
3949
+ active: z.ZodReadonly<z.ZodObject<{
3950
+ provider: z.ZodString;
3951
+ model: z.ZodString;
3952
+ revision: z.ZodInt;
3953
+ reasoning: z.ZodNullable<z.ZodEnum<{
3954
+ text: "text";
3955
+ summary: "summary";
3956
+ }>>;
3957
+ }, z.core.$strict>>;
3958
+ }, z.core.$strict>, z.ZodObject<{
3959
+ status: z.ZodLiteral<"failed">;
3960
+ reason: z.ZodEnum<{
3961
+ "invalid-config": "invalid-config";
3962
+ "restart-required": "restart-required";
3963
+ "apply-failed": "apply-failed";
3964
+ }>;
3965
+ revision: z.ZodInt;
3966
+ active: z.ZodReadonly<z.ZodObject<{
3967
+ provider: z.ZodString;
3968
+ model: z.ZodString;
3969
+ revision: z.ZodInt;
3970
+ reasoning: z.ZodNullable<z.ZodEnum<{
3971
+ text: "text";
3972
+ summary: "summary";
3973
+ }>>;
3974
+ }, z.core.$strict>>;
3975
+ }, z.core.$strict>], "status">>;
3976
+ export type RuntimeModelConfigStatus = z.infer<typeof runtimeModelConfigStatusSchema>;
3977
+ export type RuntimeModelConfigIdentity = Readonly<z.infer<typeof runtimeModelConfigIdentitySchema>>;
3978
+ export type RuntimeModelConfigFailure = z.infer<typeof runtimeModelConfigFailureSchema>;
3923
3979
  export declare const threadListParamsSchema: z.ZodReadonly<z.ZodObject<{
3924
3980
  cursor: z.ZodOptional<z.ZodString>;
3925
3981
  limit: z.ZodDefault<z.ZodNumber>;
@@ -12855,6 +12911,98 @@ export declare const runtimeMethodSchemasV16: {
12855
12911
  }, z.core.$strict>>>;
12856
12912
  }, z.core.$strict>>]>;
12857
12913
  };
12914
+ readonly "runtime.modelConfig.get": {
12915
+ readonly params: z.ZodReadonly<z.ZodObject<{}, z.core.$strict>>;
12916
+ readonly result: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
12917
+ status: z.ZodLiteral<"applied">;
12918
+ revision: z.ZodInt;
12919
+ active: z.ZodReadonly<z.ZodObject<{
12920
+ provider: z.ZodString;
12921
+ model: z.ZodString;
12922
+ revision: z.ZodInt;
12923
+ reasoning: z.ZodNullable<z.ZodEnum<{
12924
+ text: "text";
12925
+ summary: "summary";
12926
+ }>>;
12927
+ }, z.core.$strict>>;
12928
+ }, z.core.$strict>, z.ZodObject<{
12929
+ status: z.ZodLiteral<"pending">;
12930
+ revision: z.ZodInt;
12931
+ active: z.ZodReadonly<z.ZodObject<{
12932
+ provider: z.ZodString;
12933
+ model: z.ZodString;
12934
+ revision: z.ZodInt;
12935
+ reasoning: z.ZodNullable<z.ZodEnum<{
12936
+ text: "text";
12937
+ summary: "summary";
12938
+ }>>;
12939
+ }, z.core.$strict>>;
12940
+ }, z.core.$strict>, z.ZodObject<{
12941
+ status: z.ZodLiteral<"failed">;
12942
+ reason: z.ZodEnum<{
12943
+ "invalid-config": "invalid-config";
12944
+ "restart-required": "restart-required";
12945
+ "apply-failed": "apply-failed";
12946
+ }>;
12947
+ revision: z.ZodInt;
12948
+ active: z.ZodReadonly<z.ZodObject<{
12949
+ provider: z.ZodString;
12950
+ model: z.ZodString;
12951
+ revision: z.ZodInt;
12952
+ reasoning: z.ZodNullable<z.ZodEnum<{
12953
+ text: "text";
12954
+ summary: "summary";
12955
+ }>>;
12956
+ }, z.core.$strict>>;
12957
+ }, z.core.$strict>], "status">>;
12958
+ };
12959
+ readonly "runtime.modelConfig.reload": {
12960
+ readonly params: z.ZodReadonly<z.ZodObject<{
12961
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
12962
+ }, z.core.$strict>>;
12963
+ readonly result: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
12964
+ status: z.ZodLiteral<"applied">;
12965
+ revision: z.ZodInt;
12966
+ active: z.ZodReadonly<z.ZodObject<{
12967
+ provider: z.ZodString;
12968
+ model: z.ZodString;
12969
+ revision: z.ZodInt;
12970
+ reasoning: z.ZodNullable<z.ZodEnum<{
12971
+ text: "text";
12972
+ summary: "summary";
12973
+ }>>;
12974
+ }, z.core.$strict>>;
12975
+ }, z.core.$strict>, z.ZodObject<{
12976
+ status: z.ZodLiteral<"pending">;
12977
+ revision: z.ZodInt;
12978
+ active: z.ZodReadonly<z.ZodObject<{
12979
+ provider: z.ZodString;
12980
+ model: z.ZodString;
12981
+ revision: z.ZodInt;
12982
+ reasoning: z.ZodNullable<z.ZodEnum<{
12983
+ text: "text";
12984
+ summary: "summary";
12985
+ }>>;
12986
+ }, z.core.$strict>>;
12987
+ }, z.core.$strict>, z.ZodObject<{
12988
+ status: z.ZodLiteral<"failed">;
12989
+ reason: z.ZodEnum<{
12990
+ "invalid-config": "invalid-config";
12991
+ "restart-required": "restart-required";
12992
+ "apply-failed": "apply-failed";
12993
+ }>;
12994
+ revision: z.ZodInt;
12995
+ active: z.ZodReadonly<z.ZodObject<{
12996
+ provider: z.ZodString;
12997
+ model: z.ZodString;
12998
+ revision: z.ZodInt;
12999
+ reasoning: z.ZodNullable<z.ZodEnum<{
13000
+ text: "text";
13001
+ summary: "summary";
13002
+ }>>;
13003
+ }, z.core.$strict>>;
13004
+ }, z.core.$strict>], "status">>;
13005
+ };
12858
13006
  readonly "operation.get": {
12859
13007
  readonly params: z.ZodReadonly<z.ZodObject<{
12860
13008
  operationId: z.core.$ZodBranded<z.ZodString, "OperationId", "out">;
@@ -13880,6 +14028,98 @@ export declare const runtimeMethodSchemas: {
13880
14028
  }, z.core.$strict>>>;
13881
14029
  }, z.core.$strict>>]>;
13882
14030
  };
14031
+ readonly "runtime.modelConfig.get": {
14032
+ readonly params: z.ZodReadonly<z.ZodObject<{}, z.core.$strict>>;
14033
+ readonly result: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
14034
+ status: z.ZodLiteral<"applied">;
14035
+ revision: z.ZodInt;
14036
+ active: z.ZodReadonly<z.ZodObject<{
14037
+ provider: z.ZodString;
14038
+ model: z.ZodString;
14039
+ revision: z.ZodInt;
14040
+ reasoning: z.ZodNullable<z.ZodEnum<{
14041
+ text: "text";
14042
+ summary: "summary";
14043
+ }>>;
14044
+ }, z.core.$strict>>;
14045
+ }, z.core.$strict>, z.ZodObject<{
14046
+ status: z.ZodLiteral<"pending">;
14047
+ revision: z.ZodInt;
14048
+ active: z.ZodReadonly<z.ZodObject<{
14049
+ provider: z.ZodString;
14050
+ model: z.ZodString;
14051
+ revision: z.ZodInt;
14052
+ reasoning: z.ZodNullable<z.ZodEnum<{
14053
+ text: "text";
14054
+ summary: "summary";
14055
+ }>>;
14056
+ }, z.core.$strict>>;
14057
+ }, z.core.$strict>, z.ZodObject<{
14058
+ status: z.ZodLiteral<"failed">;
14059
+ reason: z.ZodEnum<{
14060
+ "invalid-config": "invalid-config";
14061
+ "restart-required": "restart-required";
14062
+ "apply-failed": "apply-failed";
14063
+ }>;
14064
+ revision: z.ZodInt;
14065
+ active: z.ZodReadonly<z.ZodObject<{
14066
+ provider: z.ZodString;
14067
+ model: z.ZodString;
14068
+ revision: z.ZodInt;
14069
+ reasoning: z.ZodNullable<z.ZodEnum<{
14070
+ text: "text";
14071
+ summary: "summary";
14072
+ }>>;
14073
+ }, z.core.$strict>>;
14074
+ }, z.core.$strict>], "status">>;
14075
+ };
14076
+ readonly "runtime.modelConfig.reload": {
14077
+ readonly params: z.ZodReadonly<z.ZodObject<{
14078
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
14079
+ }, z.core.$strict>>;
14080
+ readonly result: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
14081
+ status: z.ZodLiteral<"applied">;
14082
+ revision: z.ZodInt;
14083
+ active: z.ZodReadonly<z.ZodObject<{
14084
+ provider: z.ZodString;
14085
+ model: z.ZodString;
14086
+ revision: z.ZodInt;
14087
+ reasoning: z.ZodNullable<z.ZodEnum<{
14088
+ text: "text";
14089
+ summary: "summary";
14090
+ }>>;
14091
+ }, z.core.$strict>>;
14092
+ }, z.core.$strict>, z.ZodObject<{
14093
+ status: z.ZodLiteral<"pending">;
14094
+ revision: z.ZodInt;
14095
+ active: z.ZodReadonly<z.ZodObject<{
14096
+ provider: z.ZodString;
14097
+ model: z.ZodString;
14098
+ revision: z.ZodInt;
14099
+ reasoning: z.ZodNullable<z.ZodEnum<{
14100
+ text: "text";
14101
+ summary: "summary";
14102
+ }>>;
14103
+ }, z.core.$strict>>;
14104
+ }, z.core.$strict>, z.ZodObject<{
14105
+ status: z.ZodLiteral<"failed">;
14106
+ reason: z.ZodEnum<{
14107
+ "invalid-config": "invalid-config";
14108
+ "restart-required": "restart-required";
14109
+ "apply-failed": "apply-failed";
14110
+ }>;
14111
+ revision: z.ZodInt;
14112
+ active: z.ZodReadonly<z.ZodObject<{
14113
+ provider: z.ZodString;
14114
+ model: z.ZodString;
14115
+ revision: z.ZodInt;
14116
+ reasoning: z.ZodNullable<z.ZodEnum<{
14117
+ text: "text";
14118
+ summary: "summary";
14119
+ }>>;
14120
+ }, z.core.$strict>>;
14121
+ }, z.core.$strict>], "status">>;
14122
+ };
13883
14123
  readonly "operation.get": {
13884
14124
  readonly params: z.ZodReadonly<z.ZodObject<{
13885
14125
  operationId: z.core.$ZodBranded<z.ZodString, "OperationId", "out">;
@@ -15153,6 +15393,98 @@ export declare const RUNTIME_PROTOCOL_REGISTRY: {
15153
15393
  }, z.core.$strict>>>;
15154
15394
  }, z.core.$strict>>]>;
15155
15395
  };
15396
+ readonly "runtime.modelConfig.get": {
15397
+ readonly params: z.ZodReadonly<z.ZodObject<{}, z.core.$strict>>;
15398
+ readonly result: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
15399
+ status: z.ZodLiteral<"applied">;
15400
+ revision: z.ZodInt;
15401
+ active: z.ZodReadonly<z.ZodObject<{
15402
+ provider: z.ZodString;
15403
+ model: z.ZodString;
15404
+ revision: z.ZodInt;
15405
+ reasoning: z.ZodNullable<z.ZodEnum<{
15406
+ text: "text";
15407
+ summary: "summary";
15408
+ }>>;
15409
+ }, z.core.$strict>>;
15410
+ }, z.core.$strict>, z.ZodObject<{
15411
+ status: z.ZodLiteral<"pending">;
15412
+ revision: z.ZodInt;
15413
+ active: z.ZodReadonly<z.ZodObject<{
15414
+ provider: z.ZodString;
15415
+ model: z.ZodString;
15416
+ revision: z.ZodInt;
15417
+ reasoning: z.ZodNullable<z.ZodEnum<{
15418
+ text: "text";
15419
+ summary: "summary";
15420
+ }>>;
15421
+ }, z.core.$strict>>;
15422
+ }, z.core.$strict>, z.ZodObject<{
15423
+ status: z.ZodLiteral<"failed">;
15424
+ reason: z.ZodEnum<{
15425
+ "invalid-config": "invalid-config";
15426
+ "restart-required": "restart-required";
15427
+ "apply-failed": "apply-failed";
15428
+ }>;
15429
+ revision: z.ZodInt;
15430
+ active: z.ZodReadonly<z.ZodObject<{
15431
+ provider: z.ZodString;
15432
+ model: z.ZodString;
15433
+ revision: z.ZodInt;
15434
+ reasoning: z.ZodNullable<z.ZodEnum<{
15435
+ text: "text";
15436
+ summary: "summary";
15437
+ }>>;
15438
+ }, z.core.$strict>>;
15439
+ }, z.core.$strict>], "status">>;
15440
+ };
15441
+ readonly "runtime.modelConfig.reload": {
15442
+ readonly params: z.ZodReadonly<z.ZodObject<{
15443
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
15444
+ }, z.core.$strict>>;
15445
+ readonly result: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
15446
+ status: z.ZodLiteral<"applied">;
15447
+ revision: z.ZodInt;
15448
+ active: z.ZodReadonly<z.ZodObject<{
15449
+ provider: z.ZodString;
15450
+ model: z.ZodString;
15451
+ revision: z.ZodInt;
15452
+ reasoning: z.ZodNullable<z.ZodEnum<{
15453
+ text: "text";
15454
+ summary: "summary";
15455
+ }>>;
15456
+ }, z.core.$strict>>;
15457
+ }, z.core.$strict>, z.ZodObject<{
15458
+ status: z.ZodLiteral<"pending">;
15459
+ revision: z.ZodInt;
15460
+ active: z.ZodReadonly<z.ZodObject<{
15461
+ provider: z.ZodString;
15462
+ model: z.ZodString;
15463
+ revision: z.ZodInt;
15464
+ reasoning: z.ZodNullable<z.ZodEnum<{
15465
+ text: "text";
15466
+ summary: "summary";
15467
+ }>>;
15468
+ }, z.core.$strict>>;
15469
+ }, z.core.$strict>, z.ZodObject<{
15470
+ status: z.ZodLiteral<"failed">;
15471
+ reason: z.ZodEnum<{
15472
+ "invalid-config": "invalid-config";
15473
+ "restart-required": "restart-required";
15474
+ "apply-failed": "apply-failed";
15475
+ }>;
15476
+ revision: z.ZodInt;
15477
+ active: z.ZodReadonly<z.ZodObject<{
15478
+ provider: z.ZodString;
15479
+ model: z.ZodString;
15480
+ revision: z.ZodInt;
15481
+ reasoning: z.ZodNullable<z.ZodEnum<{
15482
+ text: "text";
15483
+ summary: "summary";
15484
+ }>>;
15485
+ }, z.core.$strict>>;
15486
+ }, z.core.$strict>], "status">>;
15487
+ };
15156
15488
  readonly "operation.get": {
15157
15489
  readonly params: z.ZodReadonly<z.ZodObject<{
15158
15490
  operationId: z.core.$ZodBranded<z.ZodString, "OperationId", "out">;
package/dist/index.js CHANGED
@@ -185,6 +185,8 @@ export const RUNTIME_METHODS = {
185
185
  threadDelete: "thread.delete",
186
186
  threadDetach: "thread.detach",
187
187
  threadCapabilities: "thread.capabilities",
188
+ modelConfigGet: "runtime.modelConfig.get",
189
+ modelConfigReload: "runtime.modelConfig.reload",
188
190
  turnStart: "turn.start",
189
191
  turnCancel: "turn.cancel",
190
192
  approvalRespond: "approval.respond",
@@ -1039,6 +1041,37 @@ export const threadSnapshotV16Schema = z.union([
1039
1041
  export const threadSnapshotSchema = threadSnapshotV16Schema;
1040
1042
  const pageSizeSchema = z.number().int().min(1).max(500).default(100);
1041
1043
  const requestFields = { requestId: requestIdSchema };
1044
+ const modelConfigRevisionSchema = z.int().nonnegative();
1045
+ const runtimeModelConfigIdentitySchema = z
1046
+ .object({ provider: z.string().min(1), model: z.string().min(1) })
1047
+ .strict();
1048
+ const runtimeModelConfigFields = {
1049
+ revision: modelConfigRevisionSchema,
1050
+ active: runtimeModelConfigIdentitySchema
1051
+ .extend({
1052
+ revision: modelConfigRevisionSchema,
1053
+ reasoning: z.enum(["summary", "text"]).nullable(),
1054
+ })
1055
+ .readonly(),
1056
+ };
1057
+ const runtimeModelConfigFailureSchema = z.enum([
1058
+ "invalid-config",
1059
+ "restart-required",
1060
+ "apply-failed",
1061
+ ]);
1062
+ export const runtimeModelConfigStatusSchema = z
1063
+ .discriminatedUnion("status", [
1064
+ z.object({ ...runtimeModelConfigFields, status: z.literal("applied") }).strict(),
1065
+ z.object({ ...runtimeModelConfigFields, status: z.literal("pending") }).strict(),
1066
+ z
1067
+ .object({
1068
+ ...runtimeModelConfigFields,
1069
+ status: z.literal("failed"),
1070
+ reason: runtimeModelConfigFailureSchema,
1071
+ })
1072
+ .strict(),
1073
+ ])
1074
+ .readonly();
1042
1075
  const threadRequestFields = { threadId: threadIdSchema };
1043
1076
  export const threadListParamsSchema = z
1044
1077
  .object({
@@ -1982,6 +2015,15 @@ export const runtimeMethodSchemasV16 = {
1982
2015
  params: threadSnapshotParamsV13Schema,
1983
2016
  result: threadSnapshotV16Schema,
1984
2017
  },
2018
+ // Optional host extension. Discover support by calling get; the 1.6 handshake stays unchanged.
2019
+ [RUNTIME_METHODS.modelConfigGet]: {
2020
+ params: z.object({}).strict().readonly(),
2021
+ result: runtimeModelConfigStatusSchema,
2022
+ },
2023
+ [RUNTIME_METHODS.modelConfigReload]: {
2024
+ params: z.object(requestFields).strict().readonly(),
2025
+ result: runtimeModelConfigStatusSchema,
2026
+ },
1985
2027
  };
1986
2028
  export const runtimeMethodSchemas = runtimeMethodSchemasV16;
1987
2029
  export const runtimeServerRequestSchemasV10 = {};