@myagentroam/protocol 0.10.21 → 0.10.23

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
@@ -46,6 +46,7 @@ export declare const marAgentRuntimeCredentialCapabilitySchema: z.ZodObject<{
46
46
  namespacedTools: z.ZodOptional<z.ZodBoolean>;
47
47
  responsesOptionalParameters: z.ZodOptional<z.ZodBoolean>;
48
48
  responsesHttpContinuation: z.ZodOptional<z.ZodBoolean>;
49
+ conversationModels: z.ZodOptional<z.ZodBoolean>;
49
50
  httpVersions: z.ZodEffects<z.ZodArray<z.ZodEnum<["1.1", "2"]>, "many">, ("2" | "1.1")[], ("2" | "1.1")[]>;
50
51
  }, "strict", z.ZodTypeAny, {
51
52
  apiVersion: 1;
@@ -56,6 +57,7 @@ export declare const marAgentRuntimeCredentialCapabilitySchema: z.ZodObject<{
56
57
  namespacedTools?: boolean | undefined;
57
58
  responsesOptionalParameters?: boolean | undefined;
58
59
  responsesHttpContinuation?: boolean | undefined;
60
+ conversationModels?: boolean | undefined;
59
61
  }, {
60
62
  apiVersion: 1;
61
63
  websocket: boolean;
@@ -65,6 +67,7 @@ export declare const marAgentRuntimeCredentialCapabilitySchema: z.ZodObject<{
65
67
  namespacedTools?: boolean | undefined;
66
68
  responsesOptionalParameters?: boolean | undefined;
67
69
  responsesHttpContinuation?: boolean | undefined;
70
+ conversationModels?: boolean | undefined;
68
71
  }>;
69
72
  export type MarAgentRuntimeCredentialCapability = z.infer<typeof marAgentRuntimeCredentialCapabilitySchema>;
70
73
  export declare const conversationHostingCapabilitySchema: z.ZodEffects<z.ZodObject<{
@@ -1004,6 +1007,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1004
1007
  namespacedTools: z.ZodOptional<z.ZodBoolean>;
1005
1008
  responsesOptionalParameters: z.ZodOptional<z.ZodBoolean>;
1006
1009
  responsesHttpContinuation: z.ZodOptional<z.ZodBoolean>;
1010
+ conversationModels: z.ZodOptional<z.ZodBoolean>;
1007
1011
  httpVersions: z.ZodEffects<z.ZodArray<z.ZodEnum<["1.1", "2"]>, "many">, ("2" | "1.1")[], ("2" | "1.1")[]>;
1008
1012
  }, "strict", z.ZodTypeAny, {
1009
1013
  apiVersion: 1;
@@ -1014,6 +1018,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1014
1018
  namespacedTools?: boolean | undefined;
1015
1019
  responsesOptionalParameters?: boolean | undefined;
1016
1020
  responsesHttpContinuation?: boolean | undefined;
1021
+ conversationModels?: boolean | undefined;
1017
1022
  }, {
1018
1023
  apiVersion: 1;
1019
1024
  websocket: boolean;
@@ -1023,6 +1028,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1023
1028
  namespacedTools?: boolean | undefined;
1024
1029
  responsesOptionalParameters?: boolean | undefined;
1025
1030
  responsesHttpContinuation?: boolean | undefined;
1031
+ conversationModels?: boolean | undefined;
1026
1032
  }>>;
1027
1033
  promptCompletion: z.ZodOptional<z.ZodObject<{
1028
1034
  apiVersion: z.ZodLiteral<1>;
@@ -1174,6 +1180,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1174
1180
  namespacedTools?: boolean | undefined;
1175
1181
  responsesOptionalParameters?: boolean | undefined;
1176
1182
  responsesHttpContinuation?: boolean | undefined;
1183
+ conversationModels?: boolean | undefined;
1177
1184
  } | undefined;
1178
1185
  promptCompletion?: {
1179
1186
  apiVersion: 1;
@@ -1289,6 +1296,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1289
1296
  namespacedTools?: boolean | undefined;
1290
1297
  responsesOptionalParameters?: boolean | undefined;
1291
1298
  responsesHttpContinuation?: boolean | undefined;
1299
+ conversationModels?: boolean | undefined;
1292
1300
  } | undefined;
1293
1301
  promptCompletion?: {
1294
1302
  apiVersion: 1;
@@ -1404,6 +1412,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1404
1412
  namespacedTools?: boolean | undefined;
1405
1413
  responsesOptionalParameters?: boolean | undefined;
1406
1414
  responsesHttpContinuation?: boolean | undefined;
1415
+ conversationModels?: boolean | undefined;
1407
1416
  } | undefined;
1408
1417
  promptCompletion?: {
1409
1418
  apiVersion: 1;
@@ -1519,6 +1528,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1519
1528
  namespacedTools?: boolean | undefined;
1520
1529
  responsesOptionalParameters?: boolean | undefined;
1521
1530
  responsesHttpContinuation?: boolean | undefined;
1531
+ conversationModels?: boolean | undefined;
1522
1532
  } | undefined;
1523
1533
  promptCompletion?: {
1524
1534
  apiVersion: 1;
@@ -2791,6 +2801,7 @@ export declare const marAgentNodeModelSummarySchema: z.ZodEffects<z.ZodObject<{
2791
2801
  outputCapabilities: z.ZodTuple<[z.ZodLiteral<"TEXT">], null>;
2792
2802
  reasoningEfforts: z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>, "many">;
2793
2803
  defaultReasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2804
+ conversationModel: z.ZodDefault<z.ZodBoolean>;
2794
2805
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
2795
2806
  codeMode: z.ZodDefault<z.ZodBoolean>;
2796
2807
  fastMode: z.ZodOptional<z.ZodBoolean>;
@@ -2827,6 +2838,7 @@ export declare const marAgentNodeModelSummarySchema: z.ZodEffects<z.ZodObject<{
2827
2838
  inputCapabilities: ("TEXT" | "IMAGE")[];
2828
2839
  outputCapabilities: ["TEXT"];
2829
2840
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
2841
+ conversationModel: boolean;
2830
2842
  titleGeneration: boolean;
2831
2843
  codeMode: boolean;
2832
2844
  hostedWebSearch: boolean;
@@ -2876,6 +2888,7 @@ export declare const marAgentNodeModelSummarySchema: z.ZodEffects<z.ZodObject<{
2876
2888
  lastTestStatus?: "SUCCEEDED" | "FAILED" | "UNVERIFIED" | null | undefined;
2877
2889
  lastTestCode?: string | null | undefined;
2878
2890
  defaultReasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
2891
+ conversationModel?: boolean | undefined;
2879
2892
  titleGeneration?: boolean | undefined;
2880
2893
  codeMode?: boolean | undefined;
2881
2894
  serviceTier?: "auto" | "default" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
@@ -2930,6 +2943,7 @@ export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
2930
2943
  outputCapabilities: z.ZodTuple<[z.ZodLiteral<"TEXT">], null>;
2931
2944
  reasoningEfforts: z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>, "many">;
2932
2945
  defaultReasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2946
+ conversationModel: z.ZodDefault<z.ZodBoolean>;
2933
2947
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
2934
2948
  codeMode: z.ZodDefault<z.ZodBoolean>;
2935
2949
  fastMode: z.ZodOptional<z.ZodBoolean>;
@@ -2967,6 +2981,7 @@ export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
2967
2981
  inputCapabilities: ("TEXT" | "IMAGE")[];
2968
2982
  outputCapabilities: ["TEXT"];
2969
2983
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
2984
+ conversationModel: boolean;
2970
2985
  titleGeneration: boolean;
2971
2986
  codeMode: boolean;
2972
2987
  hostedWebSearch: boolean;
@@ -3023,6 +3038,7 @@ export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
3023
3038
  lastTestStatus?: "SUCCEEDED" | "FAILED" | "UNVERIFIED" | null | undefined;
3024
3039
  lastTestCode?: string | null | undefined;
3025
3040
  defaultReasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
3041
+ conversationModel?: boolean | undefined;
3026
3042
  titleGeneration?: boolean | undefined;
3027
3043
  codeMode?: boolean | undefined;
3028
3044
  serviceTier?: "auto" | "default" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
@@ -3050,6 +3066,7 @@ export interface MarAgentModelSummary {
3050
3066
  outputCapabilities: ['TEXT'];
3051
3067
  reasoningEfforts: MarAgentReasoningEffort[];
3052
3068
  defaultReasoningEffort?: MarAgentReasoningEffort;
3069
+ conversationModel?: boolean;
3053
3070
  titleGeneration: boolean;
3054
3071
  codeMode: boolean;
3055
3072
  fastMode?: boolean;
@@ -3461,6 +3478,7 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
3461
3478
  outputCapabilities: z.ZodTuple<[z.ZodLiteral<"TEXT">], null>;
3462
3479
  reasoningEfforts: z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>, "many">;
3463
3480
  defaultReasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>>;
3481
+ conversationModel: z.ZodDefault<z.ZodBoolean>;
3464
3482
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
3465
3483
  codeMode: z.ZodDefault<z.ZodBoolean>;
3466
3484
  fastMode: z.ZodOptional<z.ZodBoolean>;
@@ -3496,6 +3514,7 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
3496
3514
  inputCapabilities: ("TEXT" | "IMAGE")[];
3497
3515
  outputCapabilities: ["TEXT"];
3498
3516
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
3517
+ conversationModel: boolean;
3499
3518
  titleGeneration: boolean;
3500
3519
  codeMode: boolean;
3501
3520
  hostedWebSearch: boolean;
@@ -3642,6 +3661,7 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
3642
3661
  config?: Record<string, string> | undefined;
3643
3662
  } | undefined;
3644
3663
  defaultReasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
3664
+ conversationModel?: boolean | undefined;
3645
3665
  titleGeneration?: boolean | undefined;
3646
3666
  codeMode?: boolean | undefined;
3647
3667
  serviceTier?: "auto" | "default" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
@@ -4742,6 +4762,7 @@ export declare const promptCompletionRuntimeSchema: z.ZodObject<{
4742
4762
  outputCapabilities: z.ZodTuple<[z.ZodLiteral<"TEXT">], null>;
4743
4763
  reasoningEfforts: z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>, "many">;
4744
4764
  defaultReasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>>;
4765
+ conversationModel: z.ZodDefault<z.ZodBoolean>;
4745
4766
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
4746
4767
  codeMode: z.ZodDefault<z.ZodBoolean>;
4747
4768
  fastMode: z.ZodOptional<z.ZodBoolean>;
@@ -4777,6 +4798,7 @@ export declare const promptCompletionRuntimeSchema: z.ZodObject<{
4777
4798
  inputCapabilities: ("TEXT" | "IMAGE")[];
4778
4799
  outputCapabilities: ["TEXT"];
4779
4800
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
4801
+ conversationModel: boolean;
4780
4802
  titleGeneration: boolean;
4781
4803
  codeMode: boolean;
4782
4804
  hostedWebSearch: boolean;
@@ -4923,6 +4945,7 @@ export declare const promptCompletionRuntimeSchema: z.ZodObject<{
4923
4945
  config?: Record<string, string> | undefined;
4924
4946
  } | undefined;
4925
4947
  defaultReasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
4948
+ conversationModel?: boolean | undefined;
4926
4949
  titleGeneration?: boolean | undefined;
4927
4950
  codeMode?: boolean | undefined;
4928
4951
  serviceTier?: "auto" | "default" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
@@ -5362,6 +5385,7 @@ export declare const marAgentRuntimeCompactConfigurationSchema: z.ZodObject<{
5362
5385
  outputCapabilities: z.ZodTuple<[z.ZodLiteral<"TEXT">], null>;
5363
5386
  reasoningEfforts: z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>, "many">;
5364
5387
  defaultReasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>>;
5388
+ conversationModel: z.ZodDefault<z.ZodBoolean>;
5365
5389
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
5366
5390
  codeMode: z.ZodDefault<z.ZodBoolean>;
5367
5391
  fastMode: z.ZodOptional<z.ZodBoolean>;
@@ -5397,6 +5421,7 @@ export declare const marAgentRuntimeCompactConfigurationSchema: z.ZodObject<{
5397
5421
  inputCapabilities: ("TEXT" | "IMAGE")[];
5398
5422
  outputCapabilities: ["TEXT"];
5399
5423
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
5424
+ conversationModel: boolean;
5400
5425
  titleGeneration: boolean;
5401
5426
  codeMode: boolean;
5402
5427
  hostedWebSearch: boolean;
@@ -5543,6 +5568,7 @@ export declare const marAgentRuntimeCompactConfigurationSchema: z.ZodObject<{
5543
5568
  config?: Record<string, string> | undefined;
5544
5569
  } | undefined;
5545
5570
  defaultReasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
5571
+ conversationModel?: boolean | undefined;
5546
5572
  titleGeneration?: boolean | undefined;
5547
5573
  codeMode?: boolean | undefined;
5548
5574
  serviceTier?: "auto" | "default" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
@@ -5972,6 +5998,7 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
5972
5998
  outputCapabilities: z.ZodTuple<[z.ZodLiteral<"TEXT">], null>;
5973
5999
  reasoningEfforts: z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>, "many">;
5974
6000
  defaultReasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>>;
6001
+ conversationModel: z.ZodDefault<z.ZodBoolean>;
5975
6002
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
5976
6003
  codeMode: z.ZodDefault<z.ZodBoolean>;
5977
6004
  fastMode: z.ZodOptional<z.ZodBoolean>;
@@ -6007,6 +6034,7 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
6007
6034
  inputCapabilities: ("TEXT" | "IMAGE")[];
6008
6035
  outputCapabilities: ["TEXT"];
6009
6036
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
6037
+ conversationModel: boolean;
6010
6038
  titleGeneration: boolean;
6011
6039
  codeMode: boolean;
6012
6040
  hostedWebSearch: boolean;
@@ -6153,6 +6181,7 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
6153
6181
  config?: Record<string, string> | undefined;
6154
6182
  } | undefined;
6155
6183
  defaultReasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
6184
+ conversationModel?: boolean | undefined;
6156
6185
  titleGeneration?: boolean | undefined;
6157
6186
  codeMode?: boolean | undefined;
6158
6187
  serviceTier?: "auto" | "default" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
@@ -6290,6 +6319,7 @@ export declare const marAgentStoredModelConfigurationSchema: z.ZodEffects<z.ZodO
6290
6319
  outputCapabilities: z.ZodTuple<[z.ZodLiteral<"TEXT">], null>;
6291
6320
  reasoningEfforts: z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>, "many">;
6292
6321
  defaultReasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>>;
6322
+ conversationModel: z.ZodDefault<z.ZodBoolean>;
6293
6323
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
6294
6324
  codeMode: z.ZodDefault<z.ZodBoolean>;
6295
6325
  fastMode: z.ZodOptional<z.ZodBoolean>;
@@ -6332,6 +6362,7 @@ export declare const marAgentStoredModelConfigurationSchema: z.ZodEffects<z.ZodO
6332
6362
  inputCapabilities: ("TEXT" | "IMAGE")[];
6333
6363
  outputCapabilities: ["TEXT"];
6334
6364
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
6365
+ conversationModel: boolean;
6335
6366
  titleGeneration: boolean;
6336
6367
  codeMode: boolean;
6337
6368
  hostedWebSearch: boolean;
@@ -6367,6 +6398,7 @@ export declare const marAgentStoredModelConfigurationSchema: z.ZodEffects<z.ZodO
6367
6398
  hostedWebSearch: boolean;
6368
6399
  fastMode?: boolean | undefined;
6369
6400
  defaultReasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
6401
+ conversationModel?: boolean | undefined;
6370
6402
  titleGeneration?: boolean | undefined;
6371
6403
  codeMode?: boolean | undefined;
6372
6404
  serviceTier?: "auto" | "default" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
@@ -16958,6 +16990,7 @@ export declare const hostedConversationSnapshotSchema: z.ZodEffects<z.ZodObject<
16958
16990
  outputCapabilities: z.ZodTuple<[z.ZodLiteral<"TEXT">], null>;
16959
16991
  reasoningEfforts: z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>, "many">;
16960
16992
  defaultReasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max", "ultra"]>>;
16993
+ conversationModel: z.ZodDefault<z.ZodBoolean>;
16961
16994
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
16962
16995
  codeMode: z.ZodDefault<z.ZodBoolean>;
16963
16996
  fastMode: z.ZodOptional<z.ZodBoolean>;
@@ -16994,6 +17027,7 @@ export declare const hostedConversationSnapshotSchema: z.ZodEffects<z.ZodObject<
16994
17027
  inputCapabilities: ("TEXT" | "IMAGE")[];
16995
17028
  outputCapabilities: ["TEXT"];
16996
17029
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
17030
+ conversationModel: boolean;
16997
17031
  titleGeneration: boolean;
16998
17032
  codeMode: boolean;
16999
17033
  hostedWebSearch: boolean;
@@ -17043,6 +17077,7 @@ export declare const hostedConversationSnapshotSchema: z.ZodEffects<z.ZodObject<
17043
17077
  lastTestStatus?: "SUCCEEDED" | "FAILED" | "UNVERIFIED" | null | undefined;
17044
17078
  lastTestCode?: string | null | undefined;
17045
17079
  defaultReasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
17080
+ conversationModel?: boolean | undefined;
17046
17081
  titleGeneration?: boolean | undefined;
17047
17082
  codeMode?: boolean | undefined;
17048
17083
  serviceTier?: "auto" | "default" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
@@ -29943,6 +29978,8 @@ export declare const nodeEnvelopeSchema: z.ZodObject<{
29943
29978
  replyTo?: string | undefined;
29944
29979
  }>;
29945
29980
  export type NodeEnvelope = z.infer<typeof nodeEnvelopeSchema>;
29981
+ /** Accept bounded structured upstream codes without changing their case. */
29982
+ export declare function isPublicErrorCode(value: unknown): value is string;
29946
29983
  export declare const publicErrorSchema: z.ZodObject<{
29947
29984
  code: z.ZodString;
29948
29985
  message: z.ZodString;
package/dist/index.js CHANGED
@@ -52,6 +52,7 @@ export const marAgentRuntimeCredentialCapabilitySchema = z
52
52
  namespacedTools: z.boolean().optional(),
53
53
  responsesOptionalParameters: z.boolean().optional(),
54
54
  responsesHttpContinuation: z.boolean().optional(),
55
+ conversationModels: z.boolean().optional(),
55
56
  httpVersions: z
56
57
  .array(runtimeCredentialHttpVersionSchema)
57
58
  .min(1)
@@ -740,6 +741,7 @@ const marAgentModelShape = {
740
741
  outputCapabilities: z.tuple([marAgentOutputCapabilitySchema]),
741
742
  reasoningEfforts: z.array(marAgentReasoningEffortSchema).max(6),
742
743
  defaultReasoningEffort: marAgentReasoningEffortSchema.optional(),
744
+ conversationModel: z.boolean().default(true),
743
745
  titleGeneration: z.boolean().default(false),
744
746
  codeMode: z.boolean().default(false),
745
747
  fastMode: z.boolean().optional(),
@@ -3032,7 +3034,12 @@ export const nodeEnvelopeSchema = z.object({
3032
3034
  replyTo: z.string().min(1).max(128).optional(),
3033
3035
  payload: z.unknown()
3034
3036
  });
3035
- const PUBLIC_ERROR_CODE = /^[A-Z][A-Z0-9_]{0,127}$/u;
3037
+ const APPLICATION_ERROR_CODE = /^[A-Z][A-Z0-9_]{0,127}$/u;
3038
+ const PUBLIC_ERROR_CODE = /^[A-Za-z][A-Za-z0-9_]{0,127}$/u;
3039
+ /** Accept bounded structured upstream codes without changing their case. */
3040
+ export function isPublicErrorCode(value) {
3041
+ return typeof value === 'string' && PUBLIC_ERROR_CODE.test(value);
3042
+ }
3036
3043
  const publicErrorTextSchema = z.string().trim().min(1).max(1_000);
3037
3044
  const publicErrorParameterKeySchema = z.string().trim().min(1).max(128);
3038
3045
  const publicErrorParametersSchema = z
@@ -3134,7 +3141,7 @@ function publicErrorSubject(code) {
3134
3141
  }
3135
3142
  /** Generates a readable English fallback for every stable application error code. */
3136
3143
  export function publicErrorMessage(code) {
3137
- const safeCode = PUBLIC_ERROR_CODE.test(code) ? code : 'INTERNAL_ERROR';
3144
+ const safeCode = isPublicErrorCode(code) ? code.toUpperCase() : 'INTERNAL_ERROR';
3138
3145
  const fixed = FIXED_PUBLIC_ERROR_MESSAGES[safeCode];
3139
3146
  if (fixed !== undefined)
3140
3147
  return fixed;
@@ -3187,11 +3194,11 @@ export function publicErrorMessage(code) {
3187
3194
  /** Builds the bounded public error shape shared by Node and Server boundaries. */
3188
3195
  export function safePublicError(error, fallback = 'INTERNAL_ERROR') {
3189
3196
  const record = publicErrorRecord(error);
3190
- const code = error instanceof Error && PUBLIC_ERROR_CODE.test(error.message)
3197
+ const code = error instanceof Error && APPLICATION_ERROR_CODE.test(error.message)
3191
3198
  ? error.message
3192
- : typeof record?.['code'] === 'string' && PUBLIC_ERROR_CODE.test(record['code'])
3199
+ : isPublicErrorCode(record?.['code'])
3193
3200
  ? record['code']
3194
- : PUBLIC_ERROR_CODE.test(fallback)
3201
+ : isPublicErrorCode(fallback)
3195
3202
  ? fallback
3196
3203
  : 'INTERNAL_ERROR';
3197
3204
  const fallbackMessage = publicErrorMessage(code);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.10.21",
3
+ "version": "0.10.23",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",