@dp-bohrium/widget-cli 0.5.0 → 0.6.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.
@@ -119,6 +119,28 @@
119
119
  },
120
120
  "hostUserServiceRequest": {
121
121
  "$ref": "#/$defs/HostUserServiceRequest"
122
+ },
123
+ "widgetDevelopmentDiagnostic": {
124
+ "$ref": "#/$defs/WidgetDevelopmentDiagnostic"
125
+ },
126
+ "widgetRecoveryContext": { "$ref": "#/$defs/WidgetRecoveryContext" },
127
+ "widgetRecoveryPlan": {
128
+ "$ref": "#/$defs/WidgetRecoveryPlan"
129
+ },
130
+ "widgetRecoveryRule": {
131
+ "$ref": "#/$defs/WidgetRecoveryRule"
132
+ },
133
+ "widgetDevelopmentOffer": {
134
+ "$ref": "#/$defs/WidgetDevelopmentOffer"
135
+ },
136
+ "widgetDevelopmentConnect": {
137
+ "$ref": "#/$defs/WidgetDevelopmentConnect"
138
+ },
139
+ "widgetRenderResult": {
140
+ "$ref": "#/$defs/WidgetRenderResult"
141
+ },
142
+ "widgetDevelopmentMessage": {
143
+ "$ref": "#/$defs/WidgetDevelopmentMessage"
122
144
  }
123
145
  },
124
146
  "$defs": {
@@ -2869,6 +2891,890 @@
2869
2891
  ]
2870
2892
  }
2871
2893
  }
2894
+ },
2895
+ "WidgetDiagnosticDetail": {
2896
+ "title": "WidgetDiagnosticDetail",
2897
+ "description": "受控字段诊断或工程相对源码位置;不携带原始对象。",
2898
+ "oneOf": [
2899
+ {
2900
+ "type": "object",
2901
+ "additionalProperties": false,
2902
+ "required": [
2903
+ "field"
2904
+ ],
2905
+ "properties": {
2906
+ "field": {
2907
+ "type": "string",
2908
+ "minLength": 1,
2909
+ "maxLength": 128
2910
+ },
2911
+ "expected": {
2912
+ "type": "string",
2913
+ "maxLength": 256
2914
+ },
2915
+ "observed": {
2916
+ "type": "string",
2917
+ "maxLength": 256
2918
+ }
2919
+ }
2920
+ },
2921
+ {
2922
+ "type": "object",
2923
+ "additionalProperties": false,
2924
+ "required": [
2925
+ "file",
2926
+ "line",
2927
+ "column"
2928
+ ],
2929
+ "properties": {
2930
+ "file": {
2931
+ "type": "string",
2932
+ "minLength": 1,
2933
+ "maxLength": 256,
2934
+ "pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!.*(?:^|/)\\.{1,2}(?:/|$))[^\\u0000-\\u001f]+$"
2935
+ },
2936
+ "line": {
2937
+ "type": "integer",
2938
+ "minimum": 1
2939
+ },
2940
+ "column": {
2941
+ "type": "integer",
2942
+ "minimum": 1
2943
+ },
2944
+ "excerpt": {
2945
+ "type": "string",
2946
+ "minLength": 1,
2947
+ "maxLength": 1024
2948
+ }
2949
+ }
2950
+ }
2951
+ ]
2952
+ },
2953
+ "WidgetDiagnosticIO": {
2954
+ "title": "WidgetDiagnosticIO",
2955
+ "description": "保留 transport、HTTP 与非法响应事实;不包含 URL 或原始响应。",
2956
+ "oneOf": [
2957
+ {
2958
+ "type": "object",
2959
+ "additionalProperties": false,
2960
+ "required": [
2961
+ "kind"
2962
+ ],
2963
+ "properties": {
2964
+ "kind": {
2965
+ "enum": [
2966
+ "transport",
2967
+ "invalid-response"
2968
+ ]
2969
+ },
2970
+ "sourceCode": {
2971
+ "type": "string",
2972
+ "minLength": 1,
2973
+ "maxLength": 96,
2974
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
2975
+ }
2976
+ }
2977
+ },
2978
+ {
2979
+ "type": "object",
2980
+ "additionalProperties": false,
2981
+ "required": [
2982
+ "kind",
2983
+ "status"
2984
+ ],
2985
+ "properties": {
2986
+ "kind": {
2987
+ "enum": [
2988
+ "http"
2989
+ ]
2990
+ },
2991
+ "status": {
2992
+ "type": "integer",
2993
+ "minimum": 100,
2994
+ "maximum": 599,
2995
+ "not": { "minimum": 200, "maximum": 299 }
2996
+ },
2997
+ "sourceCode": {
2998
+ "type": "string",
2999
+ "minLength": 1,
3000
+ "maxLength": 96,
3001
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
3002
+ }
3003
+ }
3004
+ }
3005
+ ]
3006
+ },
3007
+ "WidgetDevelopmentDiagnostic": {
3008
+ "title": "WidgetDevelopmentDiagnostic",
3009
+ "description": "可信出口的标准诊断;恢复指令和 scope 由宿主另行生成。",
3010
+ "type": "object",
3011
+ "additionalProperties": false,
3012
+ "required": [
3013
+ "schemaVersion",
3014
+ "source",
3015
+ "code",
3016
+ "phase",
3017
+ "operation",
3018
+ "severity",
3019
+ "message"
3020
+ ],
3021
+ "properties": {
3022
+ "schemaVersion": {
3023
+ "const": 1
3024
+ },
3025
+ "source": {
3026
+ "enum": [
3027
+ "sdk",
3028
+ "host",
3029
+ "toolchain"
3030
+ ]
3031
+ },
3032
+ "code": {
3033
+ "type": "string",
3034
+ "minLength": 1,
3035
+ "maxLength": 96,
3036
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
3037
+ },
3038
+ "sourceCode": {
3039
+ "type": "string",
3040
+ "minLength": 1,
3041
+ "maxLength": 96,
3042
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
3043
+ },
3044
+ "phase": {
3045
+ "enum": [
3046
+ "discovery",
3047
+ "build",
3048
+ "config",
3049
+ "load",
3050
+ "handshake",
3051
+ "render",
3052
+ "update",
3053
+ "capability",
3054
+ "dispose"
3055
+ ]
3056
+ },
3057
+ "sourcePhase": {
3058
+ "type": "string",
3059
+ "minLength": 1,
3060
+ "maxLength": 96,
3061
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
3062
+ },
3063
+ "operation": {
3064
+ "type": "string",
3065
+ "minLength": 1,
3066
+ "maxLength": 96,
3067
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
3068
+ },
3069
+ "severity": {
3070
+ "enum": [
3071
+ "warning",
3072
+ "request-error",
3073
+ "instance-failure"
3074
+ ]
3075
+ },
3076
+ "message": {
3077
+ "type": "string",
3078
+ "minLength": 1,
3079
+ "maxLength": 1024
3080
+ },
3081
+ "retryable": {
3082
+ "type": "boolean"
3083
+ },
3084
+ "correlationId": { "$ref": "#/$defs/WidgetError/properties/correlationId" },
3085
+ "diagnostics": {
3086
+ "type": "array",
3087
+ "maxItems": 8,
3088
+ "items": {
3089
+ "$ref": "#/$defs/WidgetDiagnosticDetail"
3090
+ }
3091
+ },
3092
+ "io": {
3093
+ "$ref": "#/$defs/WidgetDiagnosticIO"
3094
+ }
3095
+ }
3096
+ },
3097
+ "WidgetRecoveryAction": {
3098
+ "title": "WidgetRecoveryAction",
3099
+ "description": "恢复动作的语义及类型化参数;可信宿主绑定已有工具,不包含任意命令。",
3100
+ "oneOf": [
3101
+ {
3102
+ "type": "object",
3103
+ "additionalProperties": false,
3104
+ "required": [
3105
+ "id",
3106
+ "params"
3107
+ ],
3108
+ "properties": {
3109
+ "id": {
3110
+ "const": "inspect"
3111
+ },
3112
+ "params": {
3113
+ "type": "object",
3114
+ "additionalProperties": false,
3115
+ "required": [
3116
+ "area"
3117
+ ],
3118
+ "properties": {
3119
+ "area": {
3120
+ "enum": [
3121
+ "toolchain",
3122
+ "host-bridge",
3123
+ "configuration",
3124
+ "bundle",
3125
+ "handshake",
3126
+ "render",
3127
+ "capability",
3128
+ "lease",
3129
+ "operation-outcome",
3130
+ "runtime"
3131
+ ]
3132
+ }
3133
+ }
3134
+ }
3135
+ }
3136
+ },
3137
+ {
3138
+ "type": "object",
3139
+ "additionalProperties": false,
3140
+ "required": [
3141
+ "id",
3142
+ "params"
3143
+ ],
3144
+ "properties": {
3145
+ "id": {
3146
+ "const": "wait"
3147
+ },
3148
+ "params": {
3149
+ "type": "object",
3150
+ "additionalProperties": false,
3151
+ "required": [
3152
+ "milestone"
3153
+ ],
3154
+ "properties": {
3155
+ "milestone": {
3156
+ "enum": [
3157
+ "budget-reset",
3158
+ "connection-restored"
3159
+ ]
3160
+ },
3161
+ "retryAfterMs": {
3162
+ "type": "integer",
3163
+ "minimum": 1
3164
+ }
3165
+ }
3166
+ }
3167
+ }
3168
+ },
3169
+ {
3170
+ "type": "object",
3171
+ "additionalProperties": false,
3172
+ "required": [
3173
+ "id",
3174
+ "params"
3175
+ ],
3176
+ "properties": {
3177
+ "id": {
3178
+ "const": "edit-project"
3179
+ },
3180
+ "params": {
3181
+ "type": "object",
3182
+ "additionalProperties": false,
3183
+ "required": [
3184
+ "evidence"
3185
+ ],
3186
+ "properties": {
3187
+ "evidence": {
3188
+ "const": "diagnostics"
3189
+ }
3190
+ }
3191
+ }
3192
+ }
3193
+ },
3194
+ {
3195
+ "type": "object",
3196
+ "additionalProperties": false,
3197
+ "required": [
3198
+ "id",
3199
+ "params"
3200
+ ],
3201
+ "properties": {
3202
+ "id": {
3203
+ "const": "build-project"
3204
+ },
3205
+ "params": {
3206
+ "type": "object",
3207
+ "additionalProperties": false,
3208
+ "required": [
3209
+ "target"
3210
+ ],
3211
+ "properties": {
3212
+ "target": {
3213
+ "const": "current-project"
3214
+ }
3215
+ }
3216
+ }
3217
+ }
3218
+ },
3219
+ {
3220
+ "type": "object",
3221
+ "additionalProperties": false,
3222
+ "required": [
3223
+ "id",
3224
+ "params"
3225
+ ],
3226
+ "properties": {
3227
+ "id": {
3228
+ "const": "refresh-preview"
3229
+ },
3230
+ "params": {
3231
+ "type": "object",
3232
+ "additionalProperties": false,
3233
+ "required": [
3234
+ "target"
3235
+ ],
3236
+ "properties": {
3237
+ "target": {
3238
+ "const": "current-project"
3239
+ }
3240
+ }
3241
+ }
3242
+ }
3243
+ },
3244
+ {
3245
+ "type": "object",
3246
+ "additionalProperties": false,
3247
+ "required": [
3248
+ "id",
3249
+ "params"
3250
+ ],
3251
+ "properties": {
3252
+ "id": {
3253
+ "const": "verify-scenario"
3254
+ },
3255
+ "params": {
3256
+ "type": "object",
3257
+ "additionalProperties": false,
3258
+ "required": [
3259
+ "target"
3260
+ ],
3261
+ "properties": {
3262
+ "target": {
3263
+ "enum": [
3264
+ "current-attempt",
3265
+ "next-built-generation"
3266
+ ]
3267
+ },
3268
+ "scenarioId": {
3269
+ "type": "string",
3270
+ "minLength": 1,
3271
+ "maxLength": 96,
3272
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
3273
+ }
3274
+ }
3275
+ }
3276
+ }
3277
+ },
3278
+ {
3279
+ "type": "object",
3280
+ "additionalProperties": false,
3281
+ "required": [
3282
+ "id",
3283
+ "params"
3284
+ ],
3285
+ "properties": {
3286
+ "id": {
3287
+ "const": "request-external-action"
3288
+ },
3289
+ "params": {
3290
+ "type": "object",
3291
+ "additionalProperties": false,
3292
+ "required": [
3293
+ "reason"
3294
+ ],
3295
+ "properties": {
3296
+ "reason": {
3297
+ "enum": [
3298
+ "authorization",
3299
+ "host-support",
3300
+ "host-start",
3301
+ "credentials"
3302
+ ]
3303
+ }
3304
+ }
3305
+ }
3306
+ }
3307
+ },
3308
+ {
3309
+ "type": "object",
3310
+ "additionalProperties": false,
3311
+ "required": [
3312
+ "id",
3313
+ "params"
3314
+ ],
3315
+ "properties": {
3316
+ "id": {
3317
+ "const": "stop-preview"
3318
+ },
3319
+ "params": {
3320
+ "type": "object",
3321
+ "additionalProperties": false,
3322
+ "required": [
3323
+ "target"
3324
+ ],
3325
+ "properties": {
3326
+ "target": {
3327
+ "const": "current-preview"
3328
+ }
3329
+ }
3330
+ }
3331
+ }
3332
+ }
3333
+ ]
3334
+ },
3335
+ "WidgetRecoveryVerification": {
3336
+ "title": "WidgetRecoveryVerification",
3337
+ "description": "恢复复验目标;下一成功构建须在取得回执后绑定实际产物。",
3338
+ "type": "object",
3339
+ "additionalProperties": false,
3340
+ "required": [
3341
+ "target",
3342
+ "milestone"
3343
+ ],
3344
+ "properties": {
3345
+ "target": {
3346
+ "enum": [
3347
+ "current-attempt",
3348
+ "next-built-generation",
3349
+ "original-operation"
3350
+ ]
3351
+ },
3352
+ "milestone": {
3353
+ "enum": [
3354
+ "diagnostics-updated",
3355
+ "render-handled",
3356
+ "scenario-passed",
3357
+ "operation-confirmed"
3358
+ ]
3359
+ },
3360
+ "scenarioId": {
3361
+ "type": "string",
3362
+ "minLength": 1,
3363
+ "maxLength": 96,
3364
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
3365
+ }
3366
+ }
3367
+ },
3368
+ "WidgetRecoveryPlan": {
3369
+ "title": "WidgetRecoveryPlan",
3370
+ "description": "可信宿主选择的恢复计划;不能由 Guest 的诊断 payload 指定。",
3371
+ "type": "object",
3372
+ "additionalProperties": false,
3373
+ "required": [
3374
+ "schemaVersion",
3375
+ "ruleId",
3376
+ "ruleVersion",
3377
+ "disposition",
3378
+ "nextAction",
3379
+ "verification",
3380
+ "guidance",
3381
+ "followUpActions"
3382
+ ],
3383
+ "properties": {
3384
+ "progress": { "$ref": "#/$defs/WidgetRecoveryProgress" },
3385
+ "schemaVersion": {
3386
+ "const": 1
3387
+ },
3388
+ "ruleId": {
3389
+ "type": "string",
3390
+ "minLength": 1,
3391
+ "maxLength": 96,
3392
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
3393
+ },
3394
+ "ruleVersion": {
3395
+ "type": "integer",
3396
+ "minimum": 1
3397
+ },
3398
+ "disposition": {
3399
+ "enum": [
3400
+ "retry",
3401
+ "repair",
3402
+ "inspect",
3403
+ "external-action",
3404
+ "stop"
3405
+ ]
3406
+ },
3407
+ "nextAction": {
3408
+ "$ref": "#/$defs/WidgetRecoveryAction"
3409
+ },
3410
+ "verification": {
3411
+ "$ref": "#/$defs/WidgetRecoveryVerification"
3412
+ },
3413
+ "guidance": {
3414
+ "type": "string",
3415
+ "minLength": 1,
3416
+ "maxLength": 4096
3417
+ },
3418
+ "followUpActions": {
3419
+ "description": "首项动作完成后的有限恢复步骤;宿主逐步验证前置条件,不原样盲目重放。",
3420
+ "type": "array",
3421
+ "maxItems": 8,
3422
+ "items": {
3423
+ "$ref": "#/$defs/WidgetRecoveryAction"
3424
+ }
3425
+ }
3426
+ }
3427
+ },
3428
+ "WidgetRecoveryRule": {
3429
+ "title": "WidgetRecoveryRule",
3430
+ "description": "公共恢复规则目录条目;空 codes 仅用于显式 unknown 回退。",
3431
+ "type": "object",
3432
+ "additionalProperties": false,
3433
+ "required": [
3434
+ "id",
3435
+ "version",
3436
+ "sources",
3437
+ "codes",
3438
+ "disposition",
3439
+ "nextAction",
3440
+ "verification",
3441
+ "guidance",
3442
+ "followUpActions"
3443
+ ],
3444
+ "properties": {
3445
+ "id": {
3446
+ "type": "string",
3447
+ "minLength": 1,
3448
+ "maxLength": 96,
3449
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
3450
+ },
3451
+ "version": {
3452
+ "type": "integer",
3453
+ "minimum": 1
3454
+ },
3455
+ "sources": {
3456
+ "type": "array",
3457
+ "minItems": 1,
3458
+ "maxItems": 3,
3459
+ "uniqueItems": true,
3460
+ "items": {
3461
+ "enum": [
3462
+ "sdk",
3463
+ "host",
3464
+ "toolchain"
3465
+ ]
3466
+ }
3467
+ },
3468
+ "codes": {
3469
+ "type": "array",
3470
+ "maxItems": 64,
3471
+ "uniqueItems": true,
3472
+ "items": {
3473
+ "type": "string",
3474
+ "minLength": 1,
3475
+ "maxLength": 96,
3476
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
3477
+ }
3478
+ },
3479
+ "disposition": {
3480
+ "enum": [
3481
+ "retry",
3482
+ "repair",
3483
+ "inspect",
3484
+ "external-action",
3485
+ "stop"
3486
+ ]
3487
+ },
3488
+ "nextAction": {
3489
+ "$ref": "#/$defs/WidgetRecoveryAction"
3490
+ },
3491
+ "verification": {
3492
+ "$ref": "#/$defs/WidgetRecoveryVerification"
3493
+ },
3494
+ "guidance": {
3495
+ "type": "string",
3496
+ "minLength": 1,
3497
+ "maxLength": 4096
3498
+ },
3499
+ "followUpActions": {
3500
+ "description": "首项动作完成后的有限恢复步骤;宿主逐步验证前置条件,不原样盲目重放。",
3501
+ "type": "array",
3502
+ "maxItems": 8,
3503
+ "items": {
3504
+ "$ref": "#/$defs/WidgetRecoveryAction"
3505
+ }
3506
+ }
3507
+ }
3508
+ },
3509
+ "WidgetDevelopmentExtension": {
3510
+ "title": "WidgetDevelopmentExtension",
3511
+ "description": "经 offer/connect 显式选择的开发扩展;不授予 capability。",
3512
+ "const": "development-diagnostics-v1"
3513
+ },
3514
+ "WidgetDevelopmentOffer": {
3515
+ "title": "WidgetDevelopmentOffer",
3516
+ "description": "独立于旧 bootstrap-ready 的支持声明,接收方仍须校验 frame 来源和挂载尝试。",
3517
+ "type": "object",
3518
+ "additionalProperties": false,
3519
+ "required": [
3520
+ "type",
3521
+ "protocolVersion",
3522
+ "extensions"
3523
+ ],
3524
+ "properties": {
3525
+ "type": {
3526
+ "const": "widget-bootstrap-offer"
3527
+ },
3528
+ "protocolVersion": {
3529
+ "const": 1
3530
+ },
3531
+ "extensions": {
3532
+ "type": "array",
3533
+ "minItems": 1,
3534
+ "maxItems": 1,
3535
+ "uniqueItems": true,
3536
+ "items": {
3537
+ "$ref": "#/$defs/WidgetDevelopmentExtension"
3538
+ }
3539
+ }
3540
+ }
3541
+ },
3542
+ "WidgetDevelopmentConnect": {
3543
+ "title": "WidgetDevelopmentConnect",
3544
+ "description": "仅在收到当前 iframe 合法 offer 后使用的扩展 connect;旧形状保持不变。",
3545
+ "type": "object",
3546
+ "additionalProperties": false,
3547
+ "required": [
3548
+ "type",
3549
+ "protocolVersion",
3550
+ "channelId",
3551
+ "initPayload",
3552
+ "extensions"
3553
+ ],
3554
+ "properties": {
3555
+ "type": {
3556
+ "const": "widget-host-connect"
3557
+ },
3558
+ "protocolVersion": {
3559
+ "const": 1
3560
+ },
3561
+ "channelId": {
3562
+ "type": "string",
3563
+ "minLength": 16
3564
+ },
3565
+ "initPayload": {
3566
+ "$ref": "#/$defs/InitPayload"
3567
+ },
3568
+ "extensions": {
3569
+ "type": "array",
3570
+ "minItems": 1,
3571
+ "maxItems": 1,
3572
+ "uniqueItems": true,
3573
+ "items": {
3574
+ "$ref": "#/$defs/WidgetDevelopmentExtension"
3575
+ }
3576
+ }
3577
+ }
3578
+ },
3579
+ "WidgetRenderResult": {
3580
+ "title": "WidgetRenderResult",
3581
+ "description": "仅表示受管渲染处理器的处理结果,不代表视觉或业务验收。",
3582
+ "oneOf": [
3583
+ {
3584
+ "type": "object",
3585
+ "additionalProperties": false,
3586
+ "required": [
3587
+ "requestId",
3588
+ "revision",
3589
+ "outcome"
3590
+ ],
3591
+ "properties": {
3592
+ "requestId": { "$ref": "#/$defs/RenderRequestBase/properties/requestId" },
3593
+ "revision": {
3594
+ "type": "integer",
3595
+ "minimum": 1
3596
+ },
3597
+ "outcome": {
3598
+ "enum": [
3599
+ "handled",
3600
+ "superseded"
3601
+ ]
3602
+ }
3603
+ }
3604
+ },
3605
+ {
3606
+ "type": "object",
3607
+ "additionalProperties": false,
3608
+ "required": [
3609
+ "requestId",
3610
+ "revision",
3611
+ "outcome",
3612
+ "diagnostic"
3613
+ ],
3614
+ "properties": {
3615
+ "requestId": { "$ref": "#/$defs/RenderRequestBase/properties/requestId" },
3616
+ "revision": {
3617
+ "type": "integer",
3618
+ "minimum": 1
3619
+ },
3620
+ "outcome": {
3621
+ "const": "failed"
3622
+ },
3623
+ "diagnostic": {
3624
+ "$ref": "#/$defs/WidgetRenderFailureDiagnostic"
3625
+ }
3626
+ }
3627
+ }
3628
+ ]
3629
+ },
3630
+ "WidgetDiagnosticMessage": {
3631
+ "title": "WidgetDiagnosticMessage",
3632
+ "description": "经协商的开发扩展 Bridge 消息;仍受现有通道与消息预算约束。",
3633
+ "type": "object",
3634
+ "allOf": [
3635
+ {
3636
+ "$ref": "#/$defs/BridgeEnvelopeBase"
3637
+ },
3638
+ {
3639
+ "type": "object",
3640
+ "required": [
3641
+ "type",
3642
+ "payload"
3643
+ ],
3644
+ "properties": {
3645
+ "type": {
3646
+ "const": "diagnostic"
3647
+ },
3648
+ "payload": {
3649
+ "$ref": "#/$defs/WidgetGuestDiagnostic"
3650
+ }
3651
+ }
3652
+ }
3653
+ ],
3654
+ "unevaluatedProperties": false
3655
+ },
3656
+ "WidgetRenderResultMessage": {
3657
+ "title": "WidgetRenderResultMessage",
3658
+ "description": "经协商的开发扩展 Bridge 消息;仍受现有通道与消息预算约束。",
3659
+ "type": "object",
3660
+ "allOf": [
3661
+ {
3662
+ "$ref": "#/$defs/BridgeEnvelopeBase"
3663
+ },
3664
+ {
3665
+ "type": "object",
3666
+ "required": [
3667
+ "type",
3668
+ "payload"
3669
+ ],
3670
+ "properties": {
3671
+ "type": {
3672
+ "const": "render-result"
3673
+ },
3674
+ "payload": {
3675
+ "$ref": "#/$defs/WidgetRenderResult"
3676
+ }
3677
+ }
3678
+ }
3679
+ ],
3680
+ "unevaluatedProperties": false
3681
+ },
3682
+ "WidgetDevelopmentMessage": {
3683
+ "title": "WidgetDevelopmentMessage",
3684
+ "description": "扩展 profile 下的 Widget → Host 消息;原 WidgetToHostMessage 不扩展。",
3685
+ "oneOf": [
3686
+ {
3687
+ "$ref": "#/$defs/WidgetToHostMessage"
3688
+ },
3689
+ {
3690
+ "$ref": "#/$defs/WidgetDiagnosticMessage"
3691
+ },
3692
+ {
3693
+ "$ref": "#/$defs/WidgetRenderResultMessage"
3694
+ }
3695
+ ]
3696
+ },
3697
+ "WidgetRecoveryContext": {
3698
+ "title": "WidgetRecoveryContext",
3699
+ "description": "复用工具执行结果语义的可信恢复上下文;缺失字段表示未知,不能授权重放。",
3700
+ "type": "object",
3701
+ "additionalProperties": false,
3702
+ "properties": {
3703
+ "progress": { "$ref": "#/$defs/WidgetRecoveryProgress" },
3704
+ "executionState": {
3705
+ "enum": [
3706
+ "not_started",
3707
+ "finished",
3708
+ "partial",
3709
+ "unknown"
3710
+ ]
3711
+ },
3712
+ "mayHaveExecuted": {
3713
+ "type": "boolean"
3714
+ }
3715
+ }
3716
+ },
3717
+ "WidgetGuestDiagnostic": {
3718
+ "title": "WidgetGuestDiagnostic",
3719
+ "description": "Guest 仅声明 SDK 诊断事实,不得冒充 Host 或工具链。",
3720
+ "allOf": [
3721
+ {
3722
+ "$ref": "#/$defs/WidgetDevelopmentDiagnostic"
3723
+ },
3724
+ {
3725
+ "type": "object",
3726
+ "required": [
3727
+ "source"
3728
+ ],
3729
+ "properties": {
3730
+ "source": {
3731
+ "const": "sdk"
3732
+ }
3733
+ }
3734
+ }
3735
+ ]
3736
+ },
3737
+ "WidgetRenderFailureDiagnostic": {
3738
+ "title": "WidgetRenderFailureDiagnostic",
3739
+ "description": "失败处理回执的 SDK 请求诊断;接收方还须匹配当前 requestId。",
3740
+ "allOf": [
3741
+ {
3742
+ "$ref": "#/$defs/WidgetGuestDiagnostic"
3743
+ },
3744
+ {
3745
+ "type": "object",
3746
+ "required": [
3747
+ "correlationId"
3748
+ ],
3749
+ "properties": {
3750
+ "correlationId": { "$ref": "#/$defs/WidgetDevelopmentDiagnostic/properties/correlationId" },
3751
+ "phase": {
3752
+ "enum": [
3753
+ "render",
3754
+ "update"
3755
+ ]
3756
+ }
3757
+ }
3758
+ }
3759
+ ]
3760
+ },
3761
+ "WidgetRecoveryProgress": {
3762
+ "title": "WidgetRecoveryProgress",
3763
+ "description": "可信宿主观察到的恢复进展;重复故障无新证据时不能重复同一修复。",
3764
+ "type": "object",
3765
+ "additionalProperties": false,
3766
+ "required": [
3767
+ "repeated",
3768
+ "hasNewEvidence"
3769
+ ],
3770
+ "properties": {
3771
+ "repeated": {
3772
+ "type": "boolean"
3773
+ },
3774
+ "hasNewEvidence": {
3775
+ "type": "boolean"
3776
+ }
3777
+ }
2872
3778
  }
2873
3779
  }
2874
3780
  }