@adea-ai/sdk 1.14.0 → 1.16.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.
@@ -14564,6 +14564,292 @@
14564
14564
  "security": [{ "serviceBearer": [] }]
14565
14565
  }
14566
14566
  },
14567
+ "/v1/pi-durable/lead-publication/current": {
14568
+ "post": {
14569
+ "operationId": "pi-durable.lead.publication.current",
14570
+ "requestBody": {
14571
+ "content": {
14572
+ "application/json": {
14573
+ "schema": {
14574
+ "additionalProperties": false,
14575
+ "properties": {
14576
+ "caller": {
14577
+ "additionalProperties": false,
14578
+ "properties": {
14579
+ "servicePrincipalId": {
14580
+ "maxLength": 64,
14581
+ "minLength": 5,
14582
+ "pattern": "^svc_[a-z][a-z0-9-]*$",
14583
+ "type": "string"
14584
+ }
14585
+ },
14586
+ "required": ["servicePrincipalId"],
14587
+ "type": "object"
14588
+ },
14589
+ "contractVersion": {
14590
+ "additionalProperties": false,
14591
+ "properties": {
14592
+ "major": {
14593
+ "exclusiveMinimum": 0,
14594
+ "maximum": 9007199254740991,
14595
+ "type": "integer"
14596
+ },
14597
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
14598
+ },
14599
+ "required": ["major", "minor"],
14600
+ "type": "object"
14601
+ },
14602
+ "correlation": {
14603
+ "properties": {
14604
+ "causationCommandId": {
14605
+ "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$",
14606
+ "type": "string"
14607
+ },
14608
+ "parentEventId": {
14609
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
14610
+ "type": "string"
14611
+ },
14612
+ "traceId": { "pattern": "^trc_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
14613
+ },
14614
+ "required": ["traceId"],
14615
+ "type": "object"
14616
+ },
14617
+ "operation": { "const": "pi-durable.lead.publication.current", "type": "string" },
14618
+ "parameters": {
14619
+ "additionalProperties": false,
14620
+ "properties": {
14621
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
14622
+ "preparationRef": { "pattern": "^prep_[a-f0-9]{32}$", "type": "string" }
14623
+ },
14624
+ "required": ["dispatchId", "preparationRef"],
14625
+ "type": "object"
14626
+ },
14627
+ "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
14628
+ "requestedAt": {
14629
+ "format": "date-time",
14630
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
14631
+ "type": "string"
14632
+ },
14633
+ "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
14634
+ },
14635
+ "required": [
14636
+ "caller",
14637
+ "contractVersion",
14638
+ "requestId",
14639
+ "workspaceId",
14640
+ "correlation",
14641
+ "operation",
14642
+ "requestedAt",
14643
+ "parameters"
14644
+ ],
14645
+ "type": "object"
14646
+ }
14647
+ }
14648
+ },
14649
+ "required": true
14650
+ },
14651
+ "responses": {
14652
+ "200": {
14653
+ "content": {
14654
+ "application/json": {
14655
+ "schema": {
14656
+ "additionalProperties": false,
14657
+ "properties": {
14658
+ "contractVersion": {
14659
+ "additionalProperties": false,
14660
+ "properties": {
14661
+ "major": {
14662
+ "exclusiveMinimum": 0,
14663
+ "maximum": 9007199254740991,
14664
+ "type": "integer"
14665
+ },
14666
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
14667
+ },
14668
+ "required": ["major", "minor"],
14669
+ "type": "object"
14670
+ },
14671
+ "correlation": {
14672
+ "additionalProperties": false,
14673
+ "properties": {
14674
+ "causationCommandId": {},
14675
+ "parentEventId": {},
14676
+ "traceId": {}
14677
+ },
14678
+ "required": ["traceId"],
14679
+ "type": "object"
14680
+ },
14681
+ "data": {
14682
+ "additionalProperties": false,
14683
+ "properties": {
14684
+ "publication": {
14685
+ "additionalProperties": false,
14686
+ "properties": {
14687
+ "attemptId": {},
14688
+ "authorityRevision": {
14689
+ "exclusiveMinimum": 0,
14690
+ "maximum": 9007199254740991,
14691
+ "type": "integer"
14692
+ },
14693
+ "canonicalActorPrincipalId": {
14694
+ "pattern": "^user:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
14695
+ "type": "string"
14696
+ },
14697
+ "dispatchId": {
14698
+ "pattern": "^dispatch_[a-f0-9]{32}$",
14699
+ "type": "string"
14700
+ },
14701
+ "executionId": {},
14702
+ "expiresAt": {
14703
+ "format": "date-time",
14704
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
14705
+ "type": "string"
14706
+ },
14707
+ "intentId": {
14708
+ "format": "uuid",
14709
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
14710
+ "type": "string"
14711
+ },
14712
+ "preparationRef": {
14713
+ "pattern": "^prep_[a-f0-9]{32}$",
14714
+ "type": "string"
14715
+ },
14716
+ "resultContentDigest": {
14717
+ "pattern": "^sha256:[a-f0-9]{64}$",
14718
+ "type": "string"
14719
+ },
14720
+ "runtimeSessionId": {},
14721
+ "schemaVersion": {
14722
+ "const": "pi-lead-publication/v1",
14723
+ "type": "string"
14724
+ },
14725
+ "selectionRef": { "pattern": "^msel_[a-f0-9]{32}$", "type": "string" },
14726
+ "selectionRevision": {
14727
+ "exclusiveMinimum": 0,
14728
+ "maximum": 9007199254740991,
14729
+ "type": "integer"
14730
+ },
14731
+ "workspaceId": {}
14732
+ },
14733
+ "required": [
14734
+ "schemaVersion",
14735
+ "workspaceId",
14736
+ "intentId",
14737
+ "dispatchId",
14738
+ "preparationRef",
14739
+ "executionId",
14740
+ "attemptId",
14741
+ "runtimeSessionId",
14742
+ "selectionRef",
14743
+ "selectionRevision",
14744
+ "canonicalActorPrincipalId",
14745
+ "authorityRevision",
14746
+ "resultContentDigest",
14747
+ "expiresAt"
14748
+ ],
14749
+ "type": "object"
14750
+ }
14751
+ },
14752
+ "required": ["publication"],
14753
+ "type": "object"
14754
+ },
14755
+ "requestId": {}
14756
+ },
14757
+ "required": ["contractVersion", "requestId", "correlation", "data"],
14758
+ "type": "object"
14759
+ }
14760
+ }
14761
+ },
14762
+ "description": "Successful response"
14763
+ },
14764
+ "default": {
14765
+ "content": {
14766
+ "application/json": {
14767
+ "schema": {
14768
+ "additionalProperties": false,
14769
+ "properties": {
14770
+ "contractVersion": {
14771
+ "additionalProperties": false,
14772
+ "properties": {
14773
+ "major": {
14774
+ "exclusiveMinimum": 0,
14775
+ "maximum": 9007199254740991,
14776
+ "type": "integer"
14777
+ },
14778
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
14779
+ },
14780
+ "required": ["major", "minor"],
14781
+ "type": "object"
14782
+ },
14783
+ "correlation": {
14784
+ "additionalProperties": false,
14785
+ "properties": {
14786
+ "causationCommandId": {},
14787
+ "parentEventId": {},
14788
+ "traceId": {}
14789
+ },
14790
+ "required": ["traceId"],
14791
+ "type": "object"
14792
+ },
14793
+ "error": {
14794
+ "additionalProperties": false,
14795
+ "properties": {
14796
+ "class": {
14797
+ "enum": [
14798
+ "validation",
14799
+ "authentication",
14800
+ "authorization",
14801
+ "conflict",
14802
+ "stale_reference",
14803
+ "capability_mismatch",
14804
+ "runtime_unavailable",
14805
+ "internal"
14806
+ ],
14807
+ "type": "string"
14808
+ },
14809
+ "code": {
14810
+ "maxLength": 96,
14811
+ "minLength": 1,
14812
+ "pattern": "^[A-Z][A-Z0-9_]*$",
14813
+ "type": "string"
14814
+ },
14815
+ "details": {
14816
+ "additionalProperties": {},
14817
+ "propertyNames": { "maxLength": 64, "type": "string" },
14818
+ "type": "object"
14819
+ },
14820
+ "message": { "maxLength": 512, "minLength": 1, "type": "string" },
14821
+ "remediation": { "maxLength": 256, "minLength": 1, "type": "string" },
14822
+ "retryable": { "type": "boolean" },
14823
+ "source": {
14824
+ "enum": [
14825
+ "client",
14826
+ "auth",
14827
+ "policy",
14828
+ "runtime",
14829
+ "provider",
14830
+ "persistence",
14831
+ "workflow",
14832
+ "system"
14833
+ ],
14834
+ "type": "string"
14835
+ }
14836
+ },
14837
+ "required": ["class", "code", "message", "retryable", "source"],
14838
+ "type": "object"
14839
+ },
14840
+ "requestId": {}
14841
+ },
14842
+ "required": ["contractVersion", "requestId", "correlation", "error"],
14843
+ "type": "object"
14844
+ }
14845
+ }
14846
+ },
14847
+ "description": "Normalized error response"
14848
+ }
14849
+ },
14850
+ "security": [{ "serviceBearer": [] }]
14851
+ }
14852
+ },
14567
14853
  "/v1/profiles/resolve": {
14568
14854
  "post": {
14569
14855
  "operationId": "profile.resolve",
@@ -16712,6 +16998,2304 @@
16712
16998
  },
16713
16999
  "security": [{ "serviceBearer": [] }]
16714
17000
  }
17001
+ },
17002
+ "/v3/pi-durable/lead-dispatches/cancel": {
17003
+ "post": {
17004
+ "operationId": "pi-durable.lead.cancel",
17005
+ "requestBody": {
17006
+ "content": {
17007
+ "application/json": {
17008
+ "schema": {
17009
+ "additionalProperties": false,
17010
+ "properties": {
17011
+ "caller": {
17012
+ "additionalProperties": false,
17013
+ "properties": {
17014
+ "servicePrincipalId": {
17015
+ "maxLength": 64,
17016
+ "minLength": 5,
17017
+ "pattern": "^svc_[a-z][a-z0-9-]*$",
17018
+ "type": "string"
17019
+ }
17020
+ },
17021
+ "required": ["servicePrincipalId"],
17022
+ "type": "object"
17023
+ },
17024
+ "commandId": { "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17025
+ "contractVersion": {
17026
+ "additionalProperties": false,
17027
+ "properties": {
17028
+ "major": {
17029
+ "exclusiveMinimum": 0,
17030
+ "maximum": 9007199254740991,
17031
+ "type": "integer"
17032
+ },
17033
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
17034
+ },
17035
+ "required": ["major", "minor"],
17036
+ "type": "object"
17037
+ },
17038
+ "correlation": {
17039
+ "additionalProperties": false,
17040
+ "properties": {
17041
+ "causationCommandId": {
17042
+ "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$",
17043
+ "type": "string"
17044
+ },
17045
+ "parentEventId": {
17046
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
17047
+ "type": "string"
17048
+ },
17049
+ "traceId": { "pattern": "^trc_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
17050
+ },
17051
+ "required": ["traceId"],
17052
+ "type": "object"
17053
+ },
17054
+ "idempotencyKey": {
17055
+ "maxLength": 128,
17056
+ "minLength": 16,
17057
+ "pattern": "^[A-Za-z0-9._:-]+$",
17058
+ "type": "string"
17059
+ },
17060
+ "issuedAt": {
17061
+ "format": "date-time",
17062
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
17063
+ "type": "string"
17064
+ },
17065
+ "operation": { "const": "pi-durable.lead.cancel", "type": "string" },
17066
+ "payload": {
17067
+ "additionalProperties": false,
17068
+ "properties": {
17069
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" }
17070
+ },
17071
+ "required": ["dispatchId"],
17072
+ "type": "object"
17073
+ },
17074
+ "payloadHash": { "pattern": "^[a-f0-9]{64}$", "type": "string" },
17075
+ "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17076
+ "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17077
+ "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
17078
+ },
17079
+ "required": [
17080
+ "caller",
17081
+ "contractVersion",
17082
+ "requestId",
17083
+ "workspaceId",
17084
+ "correlation",
17085
+ "commandId",
17086
+ "idempotencyKey",
17087
+ "payloadHash",
17088
+ "operation",
17089
+ "issuedAt",
17090
+ "payload"
17091
+ ],
17092
+ "type": "object"
17093
+ }
17094
+ }
17095
+ },
17096
+ "required": true
17097
+ },
17098
+ "responses": {
17099
+ "202": {
17100
+ "content": {
17101
+ "application/json": {
17102
+ "schema": {
17103
+ "$defs": {
17104
+ "__schema0": {
17105
+ "anyOf": [
17106
+ { "type": "string" },
17107
+ { "type": "number" },
17108
+ { "type": "boolean" },
17109
+ { "type": "null" },
17110
+ { "items": { "$ref": "#/$defs/__schema0" }, "type": "array" },
17111
+ {
17112
+ "additionalProperties": { "$ref": "#/$defs/__schema0" },
17113
+ "propertyNames": { "type": "string" },
17114
+ "type": "object"
17115
+ }
17116
+ ]
17117
+ },
17118
+ "__schema1": {
17119
+ "anyOf": [
17120
+ { "type": "string" },
17121
+ { "type": "number" },
17122
+ { "type": "boolean" },
17123
+ { "type": "null" },
17124
+ { "items": { "$ref": "#/$defs/__schema1" }, "type": "array" },
17125
+ {
17126
+ "additionalProperties": { "$ref": "#/$defs/__schema1" },
17127
+ "propertyNames": { "type": "string" },
17128
+ "type": "object"
17129
+ }
17130
+ ]
17131
+ }
17132
+ },
17133
+ "additionalProperties": false,
17134
+ "properties": {
17135
+ "contractVersion": {
17136
+ "additionalProperties": false,
17137
+ "properties": {
17138
+ "major": {
17139
+ "exclusiveMinimum": 0,
17140
+ "maximum": 9007199254740991,
17141
+ "type": "integer"
17142
+ },
17143
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
17144
+ },
17145
+ "required": ["major", "minor"],
17146
+ "type": "object"
17147
+ },
17148
+ "correlation": {
17149
+ "additionalProperties": false,
17150
+ "properties": {
17151
+ "causationCommandId": {},
17152
+ "parentEventId": {},
17153
+ "traceId": {}
17154
+ },
17155
+ "required": ["traceId"],
17156
+ "type": "object"
17157
+ },
17158
+ "data": {
17159
+ "additionalProperties": false,
17160
+ "properties": {
17161
+ "attemptId": {},
17162
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
17163
+ "executionId": {},
17164
+ "intentId": {
17165
+ "format": "uuid",
17166
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
17167
+ "type": "string"
17168
+ },
17169
+ "runtimeSessionId": {},
17170
+ "schemaVersion": { "const": "pi-lead-dispatch/v1", "type": "string" },
17171
+ "state": {
17172
+ "enum": [
17173
+ "starting",
17174
+ "running",
17175
+ "awaiting_input",
17176
+ "cancelling",
17177
+ "completed",
17178
+ "failed",
17179
+ "cancelled",
17180
+ "timed_out",
17181
+ "unknown"
17182
+ ],
17183
+ "type": "string"
17184
+ },
17185
+ "status": {
17186
+ "additionalProperties": false,
17187
+ "properties": {
17188
+ "error": {
17189
+ "additionalProperties": false,
17190
+ "properties": {
17191
+ "classification": {
17192
+ "enum": [
17193
+ "validation",
17194
+ "unsupported",
17195
+ "unavailable",
17196
+ "conflict",
17197
+ "timeout",
17198
+ "cancelled",
17199
+ "runtime",
17200
+ "infrastructure",
17201
+ "unknown"
17202
+ ],
17203
+ "type": "string"
17204
+ },
17205
+ "code": {
17206
+ "maxLength": 128,
17207
+ "minLength": 1,
17208
+ "pattern": "^[A-Z][A-Z0-9_]*$",
17209
+ "type": "string"
17210
+ },
17211
+ "details": {
17212
+ "additionalProperties": { "$ref": "#/$defs/__schema1" },
17213
+ "propertyNames": { "type": "string" },
17214
+ "type": "object"
17215
+ },
17216
+ "message": { "maxLength": 4096, "minLength": 1, "type": "string" },
17217
+ "retryable": { "type": "boolean" }
17218
+ },
17219
+ "required": ["code", "classification", "message", "retryable"],
17220
+ "type": "object"
17221
+ },
17222
+ "handle": {
17223
+ "additionalProperties": false,
17224
+ "properties": {
17225
+ "attemptId": {},
17226
+ "externalSessionId": {},
17227
+ "handleId": { "maxLength": 256, "minLength": 1, "type": "string" },
17228
+ "startedAt": {
17229
+ "format": "date-time",
17230
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
17231
+ "type": "string"
17232
+ }
17233
+ },
17234
+ "required": ["handleId", "attemptId", "startedAt"],
17235
+ "type": "object"
17236
+ },
17237
+ "observedAt": {
17238
+ "format": "date-time",
17239
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
17240
+ "type": "string"
17241
+ },
17242
+ "result": {
17243
+ "additionalProperties": false,
17244
+ "properties": {
17245
+ "artifacts": {
17246
+ "items": {
17247
+ "additionalProperties": false,
17248
+ "properties": {
17249
+ "artifactId": {},
17250
+ "digest": {
17251
+ "pattern": "^sha256:[a-f0-9]{64}$",
17252
+ "type": "string"
17253
+ },
17254
+ "locator": {
17255
+ "maxLength": 512,
17256
+ "minLength": 1,
17257
+ "type": "string"
17258
+ },
17259
+ "mediaType": {
17260
+ "maxLength": 128,
17261
+ "minLength": 1,
17262
+ "type": "string"
17263
+ },
17264
+ "sizeBytes": {
17265
+ "maximum": 9007199254740991,
17266
+ "minimum": 0,
17267
+ "type": "integer"
17268
+ },
17269
+ "version": {
17270
+ "exclusiveMinimum": 0,
17271
+ "maximum": 9007199254740991,
17272
+ "type": "integer"
17273
+ }
17274
+ },
17275
+ "required": [
17276
+ "artifactId",
17277
+ "version",
17278
+ "mediaType",
17279
+ "digest",
17280
+ "sizeBytes",
17281
+ "locator"
17282
+ ],
17283
+ "type": "object"
17284
+ },
17285
+ "maxItems": 1024,
17286
+ "type": "array"
17287
+ },
17288
+ "outcome": { "const": "completed", "type": "string" },
17289
+ "output": { "$ref": "#/$defs/__schema0" },
17290
+ "usage": {
17291
+ "additionalProperties": false,
17292
+ "properties": {
17293
+ "accounting": {
17294
+ "additionalProperties": false,
17295
+ "description": "Reported accounting metadata only; consumers must verify source authority before charging.",
17296
+ "properties": {
17297
+ "chargedMicrounits": {
17298
+ "maximum": 9007199254740991,
17299
+ "minimum": 0,
17300
+ "type": "integer"
17301
+ },
17302
+ "costExact": { "const": true, "type": "boolean" },
17303
+ "currency": { "const": "USD", "type": "string" },
17304
+ "fundingSource": {
17305
+ "enum": [
17306
+ "hq_managed",
17307
+ "byo_api",
17308
+ "external_subscription"
17309
+ ],
17310
+ "type": "string"
17311
+ },
17312
+ "schemaVersion": { "const": 1, "type": "number" },
17313
+ "sourceId": {
17314
+ "maxLength": 256,
17315
+ "minLength": 1,
17316
+ "type": "string"
17317
+ }
17318
+ },
17319
+ "required": [
17320
+ "schemaVersion",
17321
+ "sourceId",
17322
+ "fundingSource",
17323
+ "currency",
17324
+ "chargedMicrounits",
17325
+ "costExact"
17326
+ ],
17327
+ "type": "object"
17328
+ },
17329
+ "cost": {
17330
+ "additionalProperties": false,
17331
+ "properties": {
17332
+ "amount": {
17333
+ "pattern": "^\\d+(?:\\.\\d+)?$",
17334
+ "type": "string"
17335
+ },
17336
+ "currency": { "pattern": "^[A-Z]{3}$", "type": "string" }
17337
+ },
17338
+ "required": ["amount", "currency"],
17339
+ "type": "object"
17340
+ },
17341
+ "durationMs": {
17342
+ "maximum": 9007199254740991,
17343
+ "minimum": 0,
17344
+ "type": "integer"
17345
+ },
17346
+ "inputTokens": {
17347
+ "maximum": 9007199254740991,
17348
+ "minimum": 0,
17349
+ "type": "integer"
17350
+ },
17351
+ "outputTokens": {
17352
+ "maximum": 9007199254740991,
17353
+ "minimum": 0,
17354
+ "type": "integer"
17355
+ }
17356
+ },
17357
+ "required": ["inputTokens", "outputTokens", "durationMs"],
17358
+ "type": "object"
17359
+ }
17360
+ },
17361
+ "required": ["outcome", "usage", "artifacts"],
17362
+ "type": "object"
17363
+ },
17364
+ "state": {
17365
+ "enum": [
17366
+ "starting",
17367
+ "running",
17368
+ "awaiting_input",
17369
+ "cancelling",
17370
+ "completed",
17371
+ "failed",
17372
+ "cancelled",
17373
+ "timed_out",
17374
+ "unknown"
17375
+ ],
17376
+ "type": "string"
17377
+ },
17378
+ "terminalUsage": {
17379
+ "additionalProperties": false,
17380
+ "properties": {
17381
+ "accounting": {
17382
+ "additionalProperties": false,
17383
+ "description": "Reported accounting metadata only; consumers must verify source authority before charging.",
17384
+ "properties": {
17385
+ "chargedMicrounits": {
17386
+ "maximum": 9007199254740991,
17387
+ "minimum": 0,
17388
+ "type": "integer"
17389
+ },
17390
+ "costExact": { "const": true, "type": "boolean" },
17391
+ "currency": { "const": "USD", "type": "string" },
17392
+ "fundingSource": {
17393
+ "enum": ["hq_managed", "byo_api", "external_subscription"],
17394
+ "type": "string"
17395
+ },
17396
+ "schemaVersion": { "const": 1, "type": "number" },
17397
+ "sourceId": {
17398
+ "maxLength": 256,
17399
+ "minLength": 1,
17400
+ "type": "string"
17401
+ }
17402
+ },
17403
+ "required": [
17404
+ "schemaVersion",
17405
+ "sourceId",
17406
+ "fundingSource",
17407
+ "currency",
17408
+ "chargedMicrounits",
17409
+ "costExact"
17410
+ ],
17411
+ "type": "object"
17412
+ },
17413
+ "cost": {
17414
+ "additionalProperties": false,
17415
+ "properties": {
17416
+ "amount": { "pattern": "^\\d+(?:\\.\\d+)?$", "type": "string" },
17417
+ "currency": { "pattern": "^[A-Z]{3}$", "type": "string" }
17418
+ },
17419
+ "required": ["amount", "currency"],
17420
+ "type": "object"
17421
+ },
17422
+ "durationMs": {
17423
+ "maximum": 9007199254740991,
17424
+ "minimum": 0,
17425
+ "type": "integer"
17426
+ },
17427
+ "inputTokens": {
17428
+ "maximum": 9007199254740991,
17429
+ "minimum": 0,
17430
+ "type": "integer"
17431
+ },
17432
+ "outputTokens": {
17433
+ "maximum": 9007199254740991,
17434
+ "minimum": 0,
17435
+ "type": "integer"
17436
+ }
17437
+ },
17438
+ "required": ["inputTokens", "outputTokens", "durationMs"],
17439
+ "type": "object"
17440
+ }
17441
+ },
17442
+ "required": ["handle", "state", "observedAt"],
17443
+ "type": "object"
17444
+ }
17445
+ },
17446
+ "required": [
17447
+ "schemaVersion",
17448
+ "dispatchId",
17449
+ "intentId",
17450
+ "executionId",
17451
+ "attemptId",
17452
+ "runtimeSessionId",
17453
+ "state",
17454
+ "status"
17455
+ ],
17456
+ "type": "object"
17457
+ },
17458
+ "requestId": {}
17459
+ },
17460
+ "required": ["contractVersion", "requestId", "correlation", "data"],
17461
+ "type": "object"
17462
+ }
17463
+ }
17464
+ },
17465
+ "description": "Successful response"
17466
+ },
17467
+ "default": {
17468
+ "content": {
17469
+ "application/json": {
17470
+ "schema": {
17471
+ "additionalProperties": false,
17472
+ "properties": {
17473
+ "contractVersion": {
17474
+ "additionalProperties": false,
17475
+ "properties": {
17476
+ "major": {
17477
+ "exclusiveMinimum": 0,
17478
+ "maximum": 9007199254740991,
17479
+ "type": "integer"
17480
+ },
17481
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
17482
+ },
17483
+ "required": ["major", "minor"],
17484
+ "type": "object"
17485
+ },
17486
+ "correlation": {
17487
+ "additionalProperties": false,
17488
+ "properties": {
17489
+ "causationCommandId": {},
17490
+ "parentEventId": {},
17491
+ "traceId": {}
17492
+ },
17493
+ "required": ["traceId"],
17494
+ "type": "object"
17495
+ },
17496
+ "error": {
17497
+ "additionalProperties": false,
17498
+ "properties": {
17499
+ "class": {
17500
+ "enum": [
17501
+ "validation",
17502
+ "authentication",
17503
+ "authorization",
17504
+ "conflict",
17505
+ "stale_reference",
17506
+ "capability_mismatch",
17507
+ "runtime_unavailable",
17508
+ "internal"
17509
+ ],
17510
+ "type": "string"
17511
+ },
17512
+ "code": {
17513
+ "maxLength": 96,
17514
+ "minLength": 1,
17515
+ "pattern": "^[A-Z][A-Z0-9_]*$",
17516
+ "type": "string"
17517
+ },
17518
+ "details": {
17519
+ "additionalProperties": {},
17520
+ "propertyNames": { "maxLength": 64, "type": "string" },
17521
+ "type": "object"
17522
+ },
17523
+ "message": { "maxLength": 512, "minLength": 1, "type": "string" },
17524
+ "remediation": { "maxLength": 256, "minLength": 1, "type": "string" },
17525
+ "retryable": { "type": "boolean" },
17526
+ "source": {
17527
+ "enum": [
17528
+ "client",
17529
+ "auth",
17530
+ "policy",
17531
+ "runtime",
17532
+ "provider",
17533
+ "persistence",
17534
+ "workflow",
17535
+ "system"
17536
+ ],
17537
+ "type": "string"
17538
+ }
17539
+ },
17540
+ "required": ["class", "code", "message", "retryable", "source"],
17541
+ "type": "object"
17542
+ },
17543
+ "requestId": {}
17544
+ },
17545
+ "required": ["contractVersion", "requestId", "correlation", "error"],
17546
+ "type": "object"
17547
+ }
17548
+ }
17549
+ },
17550
+ "description": "Normalized error response"
17551
+ }
17552
+ },
17553
+ "security": [{ "serviceBearer": [] }]
17554
+ }
17555
+ },
17556
+ "/v3/pi-durable/lead-dispatches/dispatch": {
17557
+ "post": {
17558
+ "operationId": "pi-durable.lead.dispatch",
17559
+ "requestBody": {
17560
+ "content": {
17561
+ "application/json": {
17562
+ "schema": {
17563
+ "additionalProperties": false,
17564
+ "properties": {
17565
+ "caller": {
17566
+ "additionalProperties": false,
17567
+ "properties": {
17568
+ "servicePrincipalId": {
17569
+ "maxLength": 64,
17570
+ "minLength": 5,
17571
+ "pattern": "^svc_[a-z][a-z0-9-]*$",
17572
+ "type": "string"
17573
+ }
17574
+ },
17575
+ "required": ["servicePrincipalId"],
17576
+ "type": "object"
17577
+ },
17578
+ "commandId": { "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17579
+ "contractVersion": {
17580
+ "additionalProperties": false,
17581
+ "properties": {
17582
+ "major": {
17583
+ "exclusiveMinimum": 0,
17584
+ "maximum": 9007199254740991,
17585
+ "type": "integer"
17586
+ },
17587
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
17588
+ },
17589
+ "required": ["major", "minor"],
17590
+ "type": "object"
17591
+ },
17592
+ "correlation": {
17593
+ "additionalProperties": false,
17594
+ "properties": {
17595
+ "causationCommandId": {
17596
+ "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$",
17597
+ "type": "string"
17598
+ },
17599
+ "parentEventId": {
17600
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
17601
+ "type": "string"
17602
+ },
17603
+ "traceId": { "pattern": "^trc_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
17604
+ },
17605
+ "required": ["traceId"],
17606
+ "type": "object"
17607
+ },
17608
+ "idempotencyKey": {
17609
+ "maxLength": 128,
17610
+ "minLength": 16,
17611
+ "pattern": "^[A-Za-z0-9._:-]+$",
17612
+ "type": "string"
17613
+ },
17614
+ "issuedAt": {
17615
+ "format": "date-time",
17616
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
17617
+ "type": "string"
17618
+ },
17619
+ "operation": { "const": "pi-durable.lead.dispatch", "type": "string" },
17620
+ "payload": {
17621
+ "additionalProperties": false,
17622
+ "properties": {
17623
+ "intentId": {
17624
+ "format": "uuid",
17625
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
17626
+ "type": "string"
17627
+ },
17628
+ "preparationRef": { "pattern": "^prep_[a-f0-9]{32}$", "type": "string" }
17629
+ },
17630
+ "required": ["intentId"],
17631
+ "type": "object"
17632
+ },
17633
+ "payloadHash": { "pattern": "^[a-f0-9]{64}$", "type": "string" },
17634
+ "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17635
+ "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17636
+ "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
17637
+ },
17638
+ "required": [
17639
+ "caller",
17640
+ "contractVersion",
17641
+ "requestId",
17642
+ "workspaceId",
17643
+ "correlation",
17644
+ "commandId",
17645
+ "idempotencyKey",
17646
+ "payloadHash",
17647
+ "operation",
17648
+ "issuedAt",
17649
+ "payload"
17650
+ ],
17651
+ "type": "object"
17652
+ }
17653
+ }
17654
+ },
17655
+ "required": true
17656
+ },
17657
+ "responses": {
17658
+ "202": {
17659
+ "content": {
17660
+ "application/json": {
17661
+ "schema": {
17662
+ "additionalProperties": false,
17663
+ "properties": {
17664
+ "contractVersion": {
17665
+ "additionalProperties": false,
17666
+ "properties": {
17667
+ "major": {
17668
+ "exclusiveMinimum": 0,
17669
+ "maximum": 9007199254740991,
17670
+ "type": "integer"
17671
+ },
17672
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
17673
+ },
17674
+ "required": ["major", "minor"],
17675
+ "type": "object"
17676
+ },
17677
+ "correlation": {
17678
+ "additionalProperties": false,
17679
+ "properties": {
17680
+ "causationCommandId": {},
17681
+ "parentEventId": {},
17682
+ "traceId": {}
17683
+ },
17684
+ "required": ["traceId"],
17685
+ "type": "object"
17686
+ },
17687
+ "data": {
17688
+ "additionalProperties": false,
17689
+ "properties": {
17690
+ "attemptId": {},
17691
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
17692
+ "executionId": {},
17693
+ "intentId": {
17694
+ "format": "uuid",
17695
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
17696
+ "type": "string"
17697
+ },
17698
+ "replayed": { "type": "boolean" },
17699
+ "runtimeSessionId": {},
17700
+ "schemaVersion": { "const": "pi-lead-dispatch/v1", "type": "string" },
17701
+ "state": {
17702
+ "enum": [
17703
+ "starting",
17704
+ "running",
17705
+ "awaiting_input",
17706
+ "cancelling",
17707
+ "completed",
17708
+ "failed",
17709
+ "cancelled",
17710
+ "timed_out",
17711
+ "unknown"
17712
+ ],
17713
+ "type": "string"
17714
+ }
17715
+ },
17716
+ "required": [
17717
+ "schemaVersion",
17718
+ "dispatchId",
17719
+ "intentId",
17720
+ "executionId",
17721
+ "attemptId",
17722
+ "runtimeSessionId",
17723
+ "state",
17724
+ "replayed"
17725
+ ],
17726
+ "type": "object"
17727
+ },
17728
+ "requestId": {}
17729
+ },
17730
+ "required": ["contractVersion", "requestId", "correlation", "data"],
17731
+ "type": "object"
17732
+ }
17733
+ }
17734
+ },
17735
+ "description": "Successful response"
17736
+ },
17737
+ "default": {
17738
+ "content": {
17739
+ "application/json": {
17740
+ "schema": {
17741
+ "additionalProperties": false,
17742
+ "properties": {
17743
+ "contractVersion": {
17744
+ "additionalProperties": false,
17745
+ "properties": {
17746
+ "major": {
17747
+ "exclusiveMinimum": 0,
17748
+ "maximum": 9007199254740991,
17749
+ "type": "integer"
17750
+ },
17751
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
17752
+ },
17753
+ "required": ["major", "minor"],
17754
+ "type": "object"
17755
+ },
17756
+ "correlation": {
17757
+ "additionalProperties": false,
17758
+ "properties": {
17759
+ "causationCommandId": {},
17760
+ "parentEventId": {},
17761
+ "traceId": {}
17762
+ },
17763
+ "required": ["traceId"],
17764
+ "type": "object"
17765
+ },
17766
+ "error": {
17767
+ "additionalProperties": false,
17768
+ "properties": {
17769
+ "class": {
17770
+ "enum": [
17771
+ "validation",
17772
+ "authentication",
17773
+ "authorization",
17774
+ "conflict",
17775
+ "stale_reference",
17776
+ "capability_mismatch",
17777
+ "runtime_unavailable",
17778
+ "internal"
17779
+ ],
17780
+ "type": "string"
17781
+ },
17782
+ "code": {
17783
+ "maxLength": 96,
17784
+ "minLength": 1,
17785
+ "pattern": "^[A-Z][A-Z0-9_]*$",
17786
+ "type": "string"
17787
+ },
17788
+ "details": {
17789
+ "additionalProperties": {},
17790
+ "propertyNames": { "maxLength": 64, "type": "string" },
17791
+ "type": "object"
17792
+ },
17793
+ "message": { "maxLength": 512, "minLength": 1, "type": "string" },
17794
+ "remediation": { "maxLength": 256, "minLength": 1, "type": "string" },
17795
+ "retryable": { "type": "boolean" },
17796
+ "source": {
17797
+ "enum": [
17798
+ "client",
17799
+ "auth",
17800
+ "policy",
17801
+ "runtime",
17802
+ "provider",
17803
+ "persistence",
17804
+ "workflow",
17805
+ "system"
17806
+ ],
17807
+ "type": "string"
17808
+ }
17809
+ },
17810
+ "required": ["class", "code", "message", "retryable", "source"],
17811
+ "type": "object"
17812
+ },
17813
+ "requestId": {}
17814
+ },
17815
+ "required": ["contractVersion", "requestId", "correlation", "error"],
17816
+ "type": "object"
17817
+ }
17818
+ }
17819
+ },
17820
+ "description": "Normalized error response"
17821
+ }
17822
+ },
17823
+ "security": [{ "serviceBearer": [] }]
17824
+ }
17825
+ },
17826
+ "/v3/pi-durable/lead-dispatches/lookup": {
17827
+ "post": {
17828
+ "operationId": "pi-durable.lead.lookup",
17829
+ "requestBody": {
17830
+ "content": {
17831
+ "application/json": {
17832
+ "schema": {
17833
+ "additionalProperties": false,
17834
+ "properties": {
17835
+ "caller": {
17836
+ "additionalProperties": false,
17837
+ "properties": {
17838
+ "servicePrincipalId": {
17839
+ "maxLength": 64,
17840
+ "minLength": 5,
17841
+ "pattern": "^svc_[a-z][a-z0-9-]*$",
17842
+ "type": "string"
17843
+ }
17844
+ },
17845
+ "required": ["servicePrincipalId"],
17846
+ "type": "object"
17847
+ },
17848
+ "contractVersion": {
17849
+ "additionalProperties": false,
17850
+ "properties": {
17851
+ "major": {
17852
+ "exclusiveMinimum": 0,
17853
+ "maximum": 9007199254740991,
17854
+ "type": "integer"
17855
+ },
17856
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
17857
+ },
17858
+ "required": ["major", "minor"],
17859
+ "type": "object"
17860
+ },
17861
+ "correlation": {
17862
+ "additionalProperties": false,
17863
+ "properties": {
17864
+ "causationCommandId": {
17865
+ "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$",
17866
+ "type": "string"
17867
+ },
17868
+ "parentEventId": {
17869
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
17870
+ "type": "string"
17871
+ },
17872
+ "traceId": { "pattern": "^trc_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
17873
+ },
17874
+ "required": ["traceId"],
17875
+ "type": "object"
17876
+ },
17877
+ "operation": { "const": "pi-durable.lead.lookup", "type": "string" },
17878
+ "parameters": {
17879
+ "additionalProperties": false,
17880
+ "properties": {
17881
+ "intentId": {
17882
+ "format": "uuid",
17883
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
17884
+ "type": "string"
17885
+ }
17886
+ },
17887
+ "required": ["intentId"],
17888
+ "type": "object"
17889
+ },
17890
+ "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17891
+ "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17892
+ "requestedAt": {
17893
+ "format": "date-time",
17894
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
17895
+ "type": "string"
17896
+ },
17897
+ "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
17898
+ },
17899
+ "required": [
17900
+ "caller",
17901
+ "contractVersion",
17902
+ "requestId",
17903
+ "workspaceId",
17904
+ "correlation",
17905
+ "operation",
17906
+ "requestedAt",
17907
+ "parameters"
17908
+ ],
17909
+ "type": "object"
17910
+ }
17911
+ }
17912
+ },
17913
+ "required": true
17914
+ },
17915
+ "responses": {
17916
+ "200": {
17917
+ "content": {
17918
+ "application/json": {
17919
+ "schema": {
17920
+ "additionalProperties": false,
17921
+ "properties": {
17922
+ "contractVersion": {
17923
+ "additionalProperties": false,
17924
+ "properties": {
17925
+ "major": {
17926
+ "exclusiveMinimum": 0,
17927
+ "maximum": 9007199254740991,
17928
+ "type": "integer"
17929
+ },
17930
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
17931
+ },
17932
+ "required": ["major", "minor"],
17933
+ "type": "object"
17934
+ },
17935
+ "correlation": {
17936
+ "additionalProperties": false,
17937
+ "properties": {
17938
+ "causationCommandId": {},
17939
+ "parentEventId": {},
17940
+ "traceId": {}
17941
+ },
17942
+ "required": ["traceId"],
17943
+ "type": "object"
17944
+ },
17945
+ "data": {
17946
+ "additionalProperties": false,
17947
+ "properties": {
17948
+ "intentId": {
17949
+ "format": "uuid",
17950
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
17951
+ "type": "string"
17952
+ },
17953
+ "receipt": {
17954
+ "anyOf": [
17955
+ {
17956
+ "additionalProperties": false,
17957
+ "properties": {
17958
+ "attemptId": {},
17959
+ "dispatchId": {
17960
+ "pattern": "^dispatch_[a-f0-9]{32}$",
17961
+ "type": "string"
17962
+ },
17963
+ "executionId": {},
17964
+ "runtimeSessionId": {},
17965
+ "state": {
17966
+ "enum": ["dispatching", "dispatched", "reconciliation_required"],
17967
+ "type": "string"
17968
+ }
17969
+ },
17970
+ "required": ["dispatchId", "executionId", "attemptId", "state"],
17971
+ "type": "object"
17972
+ },
17973
+ { "type": "null" }
17974
+ ]
17975
+ },
17976
+ "schemaVersion": { "const": "pi-lead-lookup/v1", "type": "string" },
17977
+ "workspaceId": {}
17978
+ },
17979
+ "required": ["schemaVersion", "workspaceId", "intentId", "receipt"],
17980
+ "type": "object"
17981
+ },
17982
+ "requestId": {}
17983
+ },
17984
+ "required": ["contractVersion", "requestId", "correlation", "data"],
17985
+ "type": "object"
17986
+ }
17987
+ }
17988
+ },
17989
+ "description": "Successful response"
17990
+ },
17991
+ "default": {
17992
+ "content": {
17993
+ "application/json": {
17994
+ "schema": {
17995
+ "additionalProperties": false,
17996
+ "properties": {
17997
+ "contractVersion": {
17998
+ "additionalProperties": false,
17999
+ "properties": {
18000
+ "major": {
18001
+ "exclusiveMinimum": 0,
18002
+ "maximum": 9007199254740991,
18003
+ "type": "integer"
18004
+ },
18005
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18006
+ },
18007
+ "required": ["major", "minor"],
18008
+ "type": "object"
18009
+ },
18010
+ "correlation": {
18011
+ "additionalProperties": false,
18012
+ "properties": {
18013
+ "causationCommandId": {},
18014
+ "parentEventId": {},
18015
+ "traceId": {}
18016
+ },
18017
+ "required": ["traceId"],
18018
+ "type": "object"
18019
+ },
18020
+ "error": {
18021
+ "additionalProperties": false,
18022
+ "properties": {
18023
+ "class": {
18024
+ "enum": [
18025
+ "validation",
18026
+ "authentication",
18027
+ "authorization",
18028
+ "conflict",
18029
+ "stale_reference",
18030
+ "capability_mismatch",
18031
+ "runtime_unavailable",
18032
+ "internal"
18033
+ ],
18034
+ "type": "string"
18035
+ },
18036
+ "code": {
18037
+ "maxLength": 96,
18038
+ "minLength": 1,
18039
+ "pattern": "^[A-Z][A-Z0-9_]*$",
18040
+ "type": "string"
18041
+ },
18042
+ "details": {
18043
+ "additionalProperties": {},
18044
+ "propertyNames": { "maxLength": 64, "type": "string" },
18045
+ "type": "object"
18046
+ },
18047
+ "message": { "maxLength": 512, "minLength": 1, "type": "string" },
18048
+ "remediation": { "maxLength": 256, "minLength": 1, "type": "string" },
18049
+ "retryable": { "type": "boolean" },
18050
+ "source": {
18051
+ "enum": [
18052
+ "client",
18053
+ "auth",
18054
+ "policy",
18055
+ "runtime",
18056
+ "provider",
18057
+ "persistence",
18058
+ "workflow",
18059
+ "system"
18060
+ ],
18061
+ "type": "string"
18062
+ }
18063
+ },
18064
+ "required": ["class", "code", "message", "retryable", "source"],
18065
+ "type": "object"
18066
+ },
18067
+ "requestId": {}
18068
+ },
18069
+ "required": ["contractVersion", "requestId", "correlation", "error"],
18070
+ "type": "object"
18071
+ }
18072
+ }
18073
+ },
18074
+ "description": "Normalized error response"
18075
+ }
18076
+ },
18077
+ "security": [{ "serviceBearer": [] }]
18078
+ }
18079
+ },
18080
+ "/v3/pi-durable/lead-dispatches/prepare": {
18081
+ "post": {
18082
+ "operationId": "pi-durable.lead.prepare",
18083
+ "requestBody": {
18084
+ "content": {
18085
+ "application/json": {
18086
+ "schema": {
18087
+ "additionalProperties": false,
18088
+ "properties": {
18089
+ "caller": {
18090
+ "additionalProperties": false,
18091
+ "properties": {
18092
+ "servicePrincipalId": {
18093
+ "maxLength": 64,
18094
+ "minLength": 5,
18095
+ "pattern": "^svc_[a-z][a-z0-9-]*$",
18096
+ "type": "string"
18097
+ }
18098
+ },
18099
+ "required": ["servicePrincipalId"],
18100
+ "type": "object"
18101
+ },
18102
+ "commandId": { "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18103
+ "contractVersion": {
18104
+ "additionalProperties": false,
18105
+ "properties": {
18106
+ "major": {
18107
+ "exclusiveMinimum": 0,
18108
+ "maximum": 9007199254740991,
18109
+ "type": "integer"
18110
+ },
18111
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18112
+ },
18113
+ "required": ["major", "minor"],
18114
+ "type": "object"
18115
+ },
18116
+ "correlation": {
18117
+ "additionalProperties": false,
18118
+ "properties": {
18119
+ "causationCommandId": {
18120
+ "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$",
18121
+ "type": "string"
18122
+ },
18123
+ "parentEventId": {
18124
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
18125
+ "type": "string"
18126
+ },
18127
+ "traceId": { "pattern": "^trc_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
18128
+ },
18129
+ "required": ["traceId"],
18130
+ "type": "object"
18131
+ },
18132
+ "idempotencyKey": {
18133
+ "maxLength": 128,
18134
+ "minLength": 16,
18135
+ "pattern": "^[A-Za-z0-9._:-]+$",
18136
+ "type": "string"
18137
+ },
18138
+ "issuedAt": {
18139
+ "format": "date-time",
18140
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
18141
+ "type": "string"
18142
+ },
18143
+ "operation": { "const": "pi-durable.lead.prepare", "type": "string" },
18144
+ "payload": {
18145
+ "additionalProperties": false,
18146
+ "properties": {
18147
+ "intentId": {
18148
+ "format": "uuid",
18149
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
18150
+ "type": "string"
18151
+ }
18152
+ },
18153
+ "required": ["intentId"],
18154
+ "type": "object"
18155
+ },
18156
+ "payloadHash": { "pattern": "^[a-f0-9]{64}$", "type": "string" },
18157
+ "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18158
+ "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18159
+ "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
18160
+ },
18161
+ "required": [
18162
+ "caller",
18163
+ "contractVersion",
18164
+ "requestId",
18165
+ "workspaceId",
18166
+ "correlation",
18167
+ "commandId",
18168
+ "idempotencyKey",
18169
+ "payloadHash",
18170
+ "operation",
18171
+ "issuedAt",
18172
+ "payload"
18173
+ ],
18174
+ "type": "object"
18175
+ }
18176
+ }
18177
+ },
18178
+ "required": true
18179
+ },
18180
+ "responses": {
18181
+ "200": {
18182
+ "content": {
18183
+ "application/json": {
18184
+ "schema": {
18185
+ "additionalProperties": false,
18186
+ "properties": {
18187
+ "contractVersion": {
18188
+ "additionalProperties": false,
18189
+ "properties": {
18190
+ "major": {
18191
+ "exclusiveMinimum": 0,
18192
+ "maximum": 9007199254740991,
18193
+ "type": "integer"
18194
+ },
18195
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18196
+ },
18197
+ "required": ["major", "minor"],
18198
+ "type": "object"
18199
+ },
18200
+ "correlation": {
18201
+ "additionalProperties": false,
18202
+ "properties": {
18203
+ "causationCommandId": {},
18204
+ "parentEventId": {},
18205
+ "traceId": {}
18206
+ },
18207
+ "required": ["traceId"],
18208
+ "type": "object"
18209
+ },
18210
+ "data": {
18211
+ "additionalProperties": false,
18212
+ "properties": {
18213
+ "attemptId": {},
18214
+ "executionId": {},
18215
+ "expiresAt": {
18216
+ "format": "date-time",
18217
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
18218
+ "type": "string"
18219
+ },
18220
+ "funding": {
18221
+ "additionalProperties": false,
18222
+ "properties": {
18223
+ "accountRef": {
18224
+ "maxLength": 256,
18225
+ "minLength": 1,
18226
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18227
+ "type": "string"
18228
+ },
18229
+ "attemptId": {},
18230
+ "authKind": {
18231
+ "enum": ["api_key", "provider_subscription", "local_runtime"],
18232
+ "type": "string"
18233
+ },
18234
+ "authorityRevision": {
18235
+ "exclusiveMinimum": 0,
18236
+ "maximum": 9007199254740991,
18237
+ "type": "integer"
18238
+ },
18239
+ "authorizationRef": {
18240
+ "maxLength": 256,
18241
+ "minLength": 1,
18242
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18243
+ "type": "string"
18244
+ },
18245
+ "executionId": {},
18246
+ "expiresAt": {
18247
+ "format": "date-time",
18248
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
18249
+ "type": "string"
18250
+ },
18251
+ "fundingOwner": {
18252
+ "additionalProperties": false,
18253
+ "properties": {
18254
+ "displayName": {
18255
+ "maxLength": 128,
18256
+ "minLength": 1,
18257
+ "type": "string"
18258
+ },
18259
+ "evidenceRef": {
18260
+ "maxLength": 256,
18261
+ "minLength": 1,
18262
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18263
+ "type": "string"
18264
+ },
18265
+ "kind": {
18266
+ "enum": ["provider_account", "workspace_account", "adea_account"],
18267
+ "type": "string"
18268
+ },
18269
+ "ownerRef": {
18270
+ "maxLength": 256,
18271
+ "minLength": 1,
18272
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18273
+ "type": "string"
18274
+ },
18275
+ "revision": {
18276
+ "exclusiveMinimum": 0,
18277
+ "maximum": 9007199254740991,
18278
+ "type": "integer"
18279
+ }
18280
+ },
18281
+ "required": [
18282
+ "ownerRef",
18283
+ "kind",
18284
+ "displayName",
18285
+ "revision",
18286
+ "evidenceRef"
18287
+ ],
18288
+ "type": "object"
18289
+ },
18290
+ "fundingSource": {
18291
+ "enum": ["hq_managed", "external_subscription", "byo_api"],
18292
+ "type": "string"
18293
+ },
18294
+ "provider": {
18295
+ "maxLength": 128,
18296
+ "minLength": 1,
18297
+ "pattern": "^[a-z][a-z0-9.-]*$",
18298
+ "type": "string"
18299
+ },
18300
+ "providerModel": { "maxLength": 256, "minLength": 1, "type": "string" },
18301
+ "schemaVersion": {
18302
+ "const": "model-funding-display/v1",
18303
+ "type": "string"
18304
+ },
18305
+ "selectionRef": { "pattern": "^msel_[a-f0-9]{32}$", "type": "string" },
18306
+ "selectionRevision": {
18307
+ "exclusiveMinimum": 0,
18308
+ "maximum": 9007199254740991,
18309
+ "type": "integer"
18310
+ },
18311
+ "state": { "const": "ready", "type": "string" },
18312
+ "workspaceId": {}
18313
+ },
18314
+ "required": [
18315
+ "schemaVersion",
18316
+ "workspaceId",
18317
+ "executionId",
18318
+ "attemptId",
18319
+ "selectionRef",
18320
+ "selectionRevision",
18321
+ "state",
18322
+ "provider",
18323
+ "providerModel",
18324
+ "accountRef",
18325
+ "authKind",
18326
+ "fundingSource",
18327
+ "fundingOwner",
18328
+ "authorizationRef",
18329
+ "authorityRevision",
18330
+ "expiresAt"
18331
+ ],
18332
+ "type": "object"
18333
+ },
18334
+ "intentId": {
18335
+ "format": "uuid",
18336
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
18337
+ "type": "string"
18338
+ },
18339
+ "preparationRef": { "pattern": "^prep_[a-f0-9]{32}$", "type": "string" },
18340
+ "replayed": { "type": "boolean" },
18341
+ "schemaVersion": { "const": "pi-lead-preparation/v1", "type": "string" },
18342
+ "selectionRef": { "pattern": "^msel_[a-f0-9]{32}$", "type": "string" },
18343
+ "selectionRevision": {
18344
+ "exclusiveMinimum": 0,
18345
+ "maximum": 9007199254740991,
18346
+ "type": "integer"
18347
+ }
18348
+ },
18349
+ "required": [
18350
+ "schemaVersion",
18351
+ "preparationRef",
18352
+ "intentId",
18353
+ "executionId",
18354
+ "attemptId",
18355
+ "selectionRef",
18356
+ "selectionRevision",
18357
+ "funding",
18358
+ "expiresAt",
18359
+ "replayed"
18360
+ ],
18361
+ "type": "object"
18362
+ },
18363
+ "requestId": {}
18364
+ },
18365
+ "required": ["contractVersion", "requestId", "correlation", "data"],
18366
+ "type": "object"
18367
+ }
18368
+ }
18369
+ },
18370
+ "description": "Successful response"
18371
+ },
18372
+ "default": {
18373
+ "content": {
18374
+ "application/json": {
18375
+ "schema": {
18376
+ "additionalProperties": false,
18377
+ "properties": {
18378
+ "contractVersion": {
18379
+ "additionalProperties": false,
18380
+ "properties": {
18381
+ "major": {
18382
+ "exclusiveMinimum": 0,
18383
+ "maximum": 9007199254740991,
18384
+ "type": "integer"
18385
+ },
18386
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18387
+ },
18388
+ "required": ["major", "minor"],
18389
+ "type": "object"
18390
+ },
18391
+ "correlation": {
18392
+ "additionalProperties": false,
18393
+ "properties": {
18394
+ "causationCommandId": {},
18395
+ "parentEventId": {},
18396
+ "traceId": {}
18397
+ },
18398
+ "required": ["traceId"],
18399
+ "type": "object"
18400
+ },
18401
+ "error": {
18402
+ "additionalProperties": false,
18403
+ "properties": {
18404
+ "class": {
18405
+ "enum": [
18406
+ "validation",
18407
+ "authentication",
18408
+ "authorization",
18409
+ "conflict",
18410
+ "stale_reference",
18411
+ "capability_mismatch",
18412
+ "runtime_unavailable",
18413
+ "internal"
18414
+ ],
18415
+ "type": "string"
18416
+ },
18417
+ "code": {
18418
+ "maxLength": 96,
18419
+ "minLength": 1,
18420
+ "pattern": "^[A-Z][A-Z0-9_]*$",
18421
+ "type": "string"
18422
+ },
18423
+ "details": {
18424
+ "additionalProperties": {},
18425
+ "propertyNames": { "maxLength": 64, "type": "string" },
18426
+ "type": "object"
18427
+ },
18428
+ "message": { "maxLength": 512, "minLength": 1, "type": "string" },
18429
+ "remediation": { "maxLength": 256, "minLength": 1, "type": "string" },
18430
+ "retryable": { "type": "boolean" },
18431
+ "source": {
18432
+ "enum": [
18433
+ "client",
18434
+ "auth",
18435
+ "policy",
18436
+ "runtime",
18437
+ "provider",
18438
+ "persistence",
18439
+ "workflow",
18440
+ "system"
18441
+ ],
18442
+ "type": "string"
18443
+ }
18444
+ },
18445
+ "required": ["class", "code", "message", "retryable", "source"],
18446
+ "type": "object"
18447
+ },
18448
+ "requestId": {}
18449
+ },
18450
+ "required": ["contractVersion", "requestId", "correlation", "error"],
18451
+ "type": "object"
18452
+ }
18453
+ }
18454
+ },
18455
+ "description": "Normalized error response"
18456
+ }
18457
+ },
18458
+ "security": [{ "serviceBearer": [] }]
18459
+ }
18460
+ },
18461
+ "/v3/pi-durable/lead-dispatches/progress": {
18462
+ "post": {
18463
+ "operationId": "pi-durable.lead.progress",
18464
+ "requestBody": {
18465
+ "content": {
18466
+ "application/json": {
18467
+ "schema": {
18468
+ "additionalProperties": false,
18469
+ "properties": {
18470
+ "caller": {
18471
+ "additionalProperties": false,
18472
+ "properties": {
18473
+ "servicePrincipalId": {
18474
+ "maxLength": 64,
18475
+ "minLength": 5,
18476
+ "pattern": "^svc_[a-z][a-z0-9-]*$",
18477
+ "type": "string"
18478
+ }
18479
+ },
18480
+ "required": ["servicePrincipalId"],
18481
+ "type": "object"
18482
+ },
18483
+ "contractVersion": {
18484
+ "additionalProperties": false,
18485
+ "properties": {
18486
+ "major": {
18487
+ "exclusiveMinimum": 0,
18488
+ "maximum": 9007199254740991,
18489
+ "type": "integer"
18490
+ },
18491
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18492
+ },
18493
+ "required": ["major", "minor"],
18494
+ "type": "object"
18495
+ },
18496
+ "correlation": {
18497
+ "additionalProperties": false,
18498
+ "properties": {
18499
+ "causationCommandId": {
18500
+ "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$",
18501
+ "type": "string"
18502
+ },
18503
+ "parentEventId": {
18504
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
18505
+ "type": "string"
18506
+ },
18507
+ "traceId": { "pattern": "^trc_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
18508
+ },
18509
+ "required": ["traceId"],
18510
+ "type": "object"
18511
+ },
18512
+ "operation": { "const": "pi-durable.lead.progress", "type": "string" },
18513
+ "parameters": {
18514
+ "additionalProperties": false,
18515
+ "properties": {
18516
+ "afterSequence": {
18517
+ "maximum": 9007199254740991,
18518
+ "minimum": 0,
18519
+ "type": "integer"
18520
+ },
18521
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" }
18522
+ },
18523
+ "required": ["dispatchId"],
18524
+ "type": "object"
18525
+ },
18526
+ "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18527
+ "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18528
+ "requestedAt": {
18529
+ "format": "date-time",
18530
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
18531
+ "type": "string"
18532
+ },
18533
+ "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
18534
+ },
18535
+ "required": [
18536
+ "caller",
18537
+ "contractVersion",
18538
+ "requestId",
18539
+ "workspaceId",
18540
+ "correlation",
18541
+ "operation",
18542
+ "requestedAt",
18543
+ "parameters"
18544
+ ],
18545
+ "type": "object"
18546
+ }
18547
+ }
18548
+ },
18549
+ "required": true
18550
+ },
18551
+ "responses": {
18552
+ "200": {
18553
+ "content": {
18554
+ "application/json": {
18555
+ "schema": {
18556
+ "$defs": {
18557
+ "__schema0": {
18558
+ "anyOf": [
18559
+ { "type": "string" },
18560
+ { "type": "number" },
18561
+ { "type": "boolean" },
18562
+ { "type": "null" },
18563
+ { "items": { "$ref": "#/$defs/__schema0" }, "type": "array" },
18564
+ {
18565
+ "additionalProperties": { "$ref": "#/$defs/__schema0" },
18566
+ "propertyNames": { "type": "string" },
18567
+ "type": "object"
18568
+ }
18569
+ ]
18570
+ }
18571
+ },
18572
+ "additionalProperties": false,
18573
+ "properties": {
18574
+ "contractVersion": {
18575
+ "additionalProperties": false,
18576
+ "properties": {
18577
+ "major": {
18578
+ "exclusiveMinimum": 0,
18579
+ "maximum": 9007199254740991,
18580
+ "type": "integer"
18581
+ },
18582
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18583
+ },
18584
+ "required": ["major", "minor"],
18585
+ "type": "object"
18586
+ },
18587
+ "correlation": {
18588
+ "additionalProperties": false,
18589
+ "properties": {
18590
+ "causationCommandId": {},
18591
+ "parentEventId": {},
18592
+ "traceId": {}
18593
+ },
18594
+ "required": ["traceId"],
18595
+ "type": "object"
18596
+ },
18597
+ "data": {
18598
+ "additionalProperties": false,
18599
+ "properties": {
18600
+ "attemptId": {},
18601
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
18602
+ "events": {
18603
+ "items": {
18604
+ "additionalProperties": false,
18605
+ "properties": {
18606
+ "data": {
18607
+ "additionalProperties": { "$ref": "#/$defs/__schema0" },
18608
+ "propertyNames": { "type": "string" },
18609
+ "type": "object"
18610
+ },
18611
+ "handleId": { "maxLength": 256, "minLength": 1, "type": "string" },
18612
+ "occurredAt": {
18613
+ "format": "date-time",
18614
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
18615
+ "type": "string"
18616
+ },
18617
+ "sequence": {
18618
+ "exclusiveMinimum": 0,
18619
+ "maximum": 9007199254740991,
18620
+ "type": "integer"
18621
+ },
18622
+ "type": {
18623
+ "enum": ["status", "output", "interaction", "usage", "artifact"],
18624
+ "type": "string"
18625
+ }
18626
+ },
18627
+ "required": ["handleId", "sequence", "occurredAt", "type", "data"],
18628
+ "type": "object"
18629
+ },
18630
+ "maxItems": 256,
18631
+ "type": "array"
18632
+ },
18633
+ "executionId": {},
18634
+ "intentId": {
18635
+ "format": "uuid",
18636
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
18637
+ "type": "string"
18638
+ },
18639
+ "nextSequence": {
18640
+ "maximum": 9007199254740991,
18641
+ "minimum": 0,
18642
+ "type": "integer"
18643
+ },
18644
+ "runtimeSessionId": {},
18645
+ "schemaVersion": { "const": "pi-lead-dispatch/v1", "type": "string" }
18646
+ },
18647
+ "required": [
18648
+ "schemaVersion",
18649
+ "dispatchId",
18650
+ "intentId",
18651
+ "executionId",
18652
+ "attemptId",
18653
+ "runtimeSessionId",
18654
+ "events",
18655
+ "nextSequence"
18656
+ ],
18657
+ "type": "object"
18658
+ },
18659
+ "requestId": {}
18660
+ },
18661
+ "required": ["contractVersion", "requestId", "correlation", "data"],
18662
+ "type": "object"
18663
+ }
18664
+ }
18665
+ },
18666
+ "description": "Successful response"
18667
+ },
18668
+ "default": {
18669
+ "content": {
18670
+ "application/json": {
18671
+ "schema": {
18672
+ "additionalProperties": false,
18673
+ "properties": {
18674
+ "contractVersion": {
18675
+ "additionalProperties": false,
18676
+ "properties": {
18677
+ "major": {
18678
+ "exclusiveMinimum": 0,
18679
+ "maximum": 9007199254740991,
18680
+ "type": "integer"
18681
+ },
18682
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18683
+ },
18684
+ "required": ["major", "minor"],
18685
+ "type": "object"
18686
+ },
18687
+ "correlation": {
18688
+ "additionalProperties": false,
18689
+ "properties": {
18690
+ "causationCommandId": {},
18691
+ "parentEventId": {},
18692
+ "traceId": {}
18693
+ },
18694
+ "required": ["traceId"],
18695
+ "type": "object"
18696
+ },
18697
+ "error": {
18698
+ "additionalProperties": false,
18699
+ "properties": {
18700
+ "class": {
18701
+ "enum": [
18702
+ "validation",
18703
+ "authentication",
18704
+ "authorization",
18705
+ "conflict",
18706
+ "stale_reference",
18707
+ "capability_mismatch",
18708
+ "runtime_unavailable",
18709
+ "internal"
18710
+ ],
18711
+ "type": "string"
18712
+ },
18713
+ "code": {
18714
+ "maxLength": 96,
18715
+ "minLength": 1,
18716
+ "pattern": "^[A-Z][A-Z0-9_]*$",
18717
+ "type": "string"
18718
+ },
18719
+ "details": {
18720
+ "additionalProperties": {},
18721
+ "propertyNames": { "maxLength": 64, "type": "string" },
18722
+ "type": "object"
18723
+ },
18724
+ "message": { "maxLength": 512, "minLength": 1, "type": "string" },
18725
+ "remediation": { "maxLength": 256, "minLength": 1, "type": "string" },
18726
+ "retryable": { "type": "boolean" },
18727
+ "source": {
18728
+ "enum": [
18729
+ "client",
18730
+ "auth",
18731
+ "policy",
18732
+ "runtime",
18733
+ "provider",
18734
+ "persistence",
18735
+ "workflow",
18736
+ "system"
18737
+ ],
18738
+ "type": "string"
18739
+ }
18740
+ },
18741
+ "required": ["class", "code", "message", "retryable", "source"],
18742
+ "type": "object"
18743
+ },
18744
+ "requestId": {}
18745
+ },
18746
+ "required": ["contractVersion", "requestId", "correlation", "error"],
18747
+ "type": "object"
18748
+ }
18749
+ }
18750
+ },
18751
+ "description": "Normalized error response"
18752
+ }
18753
+ },
18754
+ "security": [{ "serviceBearer": [] }]
18755
+ }
18756
+ },
18757
+ "/v3/pi-durable/lead-dispatches/status": {
18758
+ "post": {
18759
+ "operationId": "pi-durable.lead.status",
18760
+ "requestBody": {
18761
+ "content": {
18762
+ "application/json": {
18763
+ "schema": {
18764
+ "additionalProperties": false,
18765
+ "properties": {
18766
+ "caller": {
18767
+ "additionalProperties": false,
18768
+ "properties": {
18769
+ "servicePrincipalId": {
18770
+ "maxLength": 64,
18771
+ "minLength": 5,
18772
+ "pattern": "^svc_[a-z][a-z0-9-]*$",
18773
+ "type": "string"
18774
+ }
18775
+ },
18776
+ "required": ["servicePrincipalId"],
18777
+ "type": "object"
18778
+ },
18779
+ "contractVersion": {
18780
+ "additionalProperties": false,
18781
+ "properties": {
18782
+ "major": {
18783
+ "exclusiveMinimum": 0,
18784
+ "maximum": 9007199254740991,
18785
+ "type": "integer"
18786
+ },
18787
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18788
+ },
18789
+ "required": ["major", "minor"],
18790
+ "type": "object"
18791
+ },
18792
+ "correlation": {
18793
+ "additionalProperties": false,
18794
+ "properties": {
18795
+ "causationCommandId": {
18796
+ "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$",
18797
+ "type": "string"
18798
+ },
18799
+ "parentEventId": {
18800
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
18801
+ "type": "string"
18802
+ },
18803
+ "traceId": { "pattern": "^trc_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
18804
+ },
18805
+ "required": ["traceId"],
18806
+ "type": "object"
18807
+ },
18808
+ "operation": { "const": "pi-durable.lead.status", "type": "string" },
18809
+ "parameters": {
18810
+ "additionalProperties": false,
18811
+ "properties": {
18812
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" }
18813
+ },
18814
+ "required": ["dispatchId"],
18815
+ "type": "object"
18816
+ },
18817
+ "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18818
+ "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18819
+ "requestedAt": {
18820
+ "format": "date-time",
18821
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
18822
+ "type": "string"
18823
+ },
18824
+ "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
18825
+ },
18826
+ "required": [
18827
+ "caller",
18828
+ "contractVersion",
18829
+ "requestId",
18830
+ "workspaceId",
18831
+ "correlation",
18832
+ "operation",
18833
+ "requestedAt",
18834
+ "parameters"
18835
+ ],
18836
+ "type": "object"
18837
+ }
18838
+ }
18839
+ },
18840
+ "required": true
18841
+ },
18842
+ "responses": {
18843
+ "200": {
18844
+ "content": {
18845
+ "application/json": {
18846
+ "schema": {
18847
+ "$defs": {
18848
+ "__schema0": {
18849
+ "anyOf": [
18850
+ { "type": "string" },
18851
+ { "type": "number" },
18852
+ { "type": "boolean" },
18853
+ { "type": "null" },
18854
+ { "items": { "$ref": "#/$defs/__schema0" }, "type": "array" },
18855
+ {
18856
+ "additionalProperties": { "$ref": "#/$defs/__schema0" },
18857
+ "propertyNames": { "type": "string" },
18858
+ "type": "object"
18859
+ }
18860
+ ]
18861
+ },
18862
+ "__schema1": {
18863
+ "anyOf": [
18864
+ { "type": "string" },
18865
+ { "type": "number" },
18866
+ { "type": "boolean" },
18867
+ { "type": "null" },
18868
+ { "items": { "$ref": "#/$defs/__schema1" }, "type": "array" },
18869
+ {
18870
+ "additionalProperties": { "$ref": "#/$defs/__schema1" },
18871
+ "propertyNames": { "type": "string" },
18872
+ "type": "object"
18873
+ }
18874
+ ]
18875
+ }
18876
+ },
18877
+ "additionalProperties": false,
18878
+ "properties": {
18879
+ "contractVersion": {
18880
+ "additionalProperties": false,
18881
+ "properties": {
18882
+ "major": {
18883
+ "exclusiveMinimum": 0,
18884
+ "maximum": 9007199254740991,
18885
+ "type": "integer"
18886
+ },
18887
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18888
+ },
18889
+ "required": ["major", "minor"],
18890
+ "type": "object"
18891
+ },
18892
+ "correlation": {
18893
+ "additionalProperties": false,
18894
+ "properties": {
18895
+ "causationCommandId": {},
18896
+ "parentEventId": {},
18897
+ "traceId": {}
18898
+ },
18899
+ "required": ["traceId"],
18900
+ "type": "object"
18901
+ },
18902
+ "data": {
18903
+ "additionalProperties": false,
18904
+ "properties": {
18905
+ "attemptId": {},
18906
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
18907
+ "executionId": {},
18908
+ "intentId": {
18909
+ "format": "uuid",
18910
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
18911
+ "type": "string"
18912
+ },
18913
+ "runtimeSessionId": {},
18914
+ "schemaVersion": { "const": "pi-lead-dispatch/v1", "type": "string" },
18915
+ "state": {
18916
+ "enum": [
18917
+ "starting",
18918
+ "running",
18919
+ "awaiting_input",
18920
+ "cancelling",
18921
+ "completed",
18922
+ "failed",
18923
+ "cancelled",
18924
+ "timed_out",
18925
+ "unknown"
18926
+ ],
18927
+ "type": "string"
18928
+ },
18929
+ "status": {
18930
+ "additionalProperties": false,
18931
+ "properties": {
18932
+ "error": {
18933
+ "additionalProperties": false,
18934
+ "properties": {
18935
+ "classification": {
18936
+ "enum": [
18937
+ "validation",
18938
+ "unsupported",
18939
+ "unavailable",
18940
+ "conflict",
18941
+ "timeout",
18942
+ "cancelled",
18943
+ "runtime",
18944
+ "infrastructure",
18945
+ "unknown"
18946
+ ],
18947
+ "type": "string"
18948
+ },
18949
+ "code": {
18950
+ "maxLength": 128,
18951
+ "minLength": 1,
18952
+ "pattern": "^[A-Z][A-Z0-9_]*$",
18953
+ "type": "string"
18954
+ },
18955
+ "details": {
18956
+ "additionalProperties": { "$ref": "#/$defs/__schema1" },
18957
+ "propertyNames": { "type": "string" },
18958
+ "type": "object"
18959
+ },
18960
+ "message": { "maxLength": 4096, "minLength": 1, "type": "string" },
18961
+ "retryable": { "type": "boolean" }
18962
+ },
18963
+ "required": ["code", "classification", "message", "retryable"],
18964
+ "type": "object"
18965
+ },
18966
+ "handle": {
18967
+ "additionalProperties": false,
18968
+ "properties": {
18969
+ "attemptId": {},
18970
+ "externalSessionId": {},
18971
+ "handleId": { "maxLength": 256, "minLength": 1, "type": "string" },
18972
+ "startedAt": {
18973
+ "format": "date-time",
18974
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
18975
+ "type": "string"
18976
+ }
18977
+ },
18978
+ "required": ["handleId", "attemptId", "startedAt"],
18979
+ "type": "object"
18980
+ },
18981
+ "observedAt": {
18982
+ "format": "date-time",
18983
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
18984
+ "type": "string"
18985
+ },
18986
+ "result": {
18987
+ "additionalProperties": false,
18988
+ "properties": {
18989
+ "artifacts": {
18990
+ "items": {
18991
+ "additionalProperties": false,
18992
+ "properties": {
18993
+ "artifactId": {},
18994
+ "digest": {
18995
+ "pattern": "^sha256:[a-f0-9]{64}$",
18996
+ "type": "string"
18997
+ },
18998
+ "locator": {
18999
+ "maxLength": 512,
19000
+ "minLength": 1,
19001
+ "type": "string"
19002
+ },
19003
+ "mediaType": {
19004
+ "maxLength": 128,
19005
+ "minLength": 1,
19006
+ "type": "string"
19007
+ },
19008
+ "sizeBytes": {
19009
+ "maximum": 9007199254740991,
19010
+ "minimum": 0,
19011
+ "type": "integer"
19012
+ },
19013
+ "version": {
19014
+ "exclusiveMinimum": 0,
19015
+ "maximum": 9007199254740991,
19016
+ "type": "integer"
19017
+ }
19018
+ },
19019
+ "required": [
19020
+ "artifactId",
19021
+ "version",
19022
+ "mediaType",
19023
+ "digest",
19024
+ "sizeBytes",
19025
+ "locator"
19026
+ ],
19027
+ "type": "object"
19028
+ },
19029
+ "maxItems": 1024,
19030
+ "type": "array"
19031
+ },
19032
+ "outcome": { "const": "completed", "type": "string" },
19033
+ "output": { "$ref": "#/$defs/__schema0" },
19034
+ "usage": {
19035
+ "additionalProperties": false,
19036
+ "properties": {
19037
+ "accounting": {
19038
+ "additionalProperties": false,
19039
+ "description": "Reported accounting metadata only; consumers must verify source authority before charging.",
19040
+ "properties": {
19041
+ "chargedMicrounits": {
19042
+ "maximum": 9007199254740991,
19043
+ "minimum": 0,
19044
+ "type": "integer"
19045
+ },
19046
+ "costExact": { "const": true, "type": "boolean" },
19047
+ "currency": { "const": "USD", "type": "string" },
19048
+ "fundingSource": {
19049
+ "enum": [
19050
+ "hq_managed",
19051
+ "byo_api",
19052
+ "external_subscription"
19053
+ ],
19054
+ "type": "string"
19055
+ },
19056
+ "schemaVersion": { "const": 1, "type": "number" },
19057
+ "sourceId": {
19058
+ "maxLength": 256,
19059
+ "minLength": 1,
19060
+ "type": "string"
19061
+ }
19062
+ },
19063
+ "required": [
19064
+ "schemaVersion",
19065
+ "sourceId",
19066
+ "fundingSource",
19067
+ "currency",
19068
+ "chargedMicrounits",
19069
+ "costExact"
19070
+ ],
19071
+ "type": "object"
19072
+ },
19073
+ "cost": {
19074
+ "additionalProperties": false,
19075
+ "properties": {
19076
+ "amount": {
19077
+ "pattern": "^\\d+(?:\\.\\d+)?$",
19078
+ "type": "string"
19079
+ },
19080
+ "currency": { "pattern": "^[A-Z]{3}$", "type": "string" }
19081
+ },
19082
+ "required": ["amount", "currency"],
19083
+ "type": "object"
19084
+ },
19085
+ "durationMs": {
19086
+ "maximum": 9007199254740991,
19087
+ "minimum": 0,
19088
+ "type": "integer"
19089
+ },
19090
+ "inputTokens": {
19091
+ "maximum": 9007199254740991,
19092
+ "minimum": 0,
19093
+ "type": "integer"
19094
+ },
19095
+ "outputTokens": {
19096
+ "maximum": 9007199254740991,
19097
+ "minimum": 0,
19098
+ "type": "integer"
19099
+ }
19100
+ },
19101
+ "required": ["inputTokens", "outputTokens", "durationMs"],
19102
+ "type": "object"
19103
+ }
19104
+ },
19105
+ "required": ["outcome", "usage", "artifacts"],
19106
+ "type": "object"
19107
+ },
19108
+ "state": {
19109
+ "enum": [
19110
+ "starting",
19111
+ "running",
19112
+ "awaiting_input",
19113
+ "cancelling",
19114
+ "completed",
19115
+ "failed",
19116
+ "cancelled",
19117
+ "timed_out",
19118
+ "unknown"
19119
+ ],
19120
+ "type": "string"
19121
+ },
19122
+ "terminalUsage": {
19123
+ "additionalProperties": false,
19124
+ "properties": {
19125
+ "accounting": {
19126
+ "additionalProperties": false,
19127
+ "description": "Reported accounting metadata only; consumers must verify source authority before charging.",
19128
+ "properties": {
19129
+ "chargedMicrounits": {
19130
+ "maximum": 9007199254740991,
19131
+ "minimum": 0,
19132
+ "type": "integer"
19133
+ },
19134
+ "costExact": { "const": true, "type": "boolean" },
19135
+ "currency": { "const": "USD", "type": "string" },
19136
+ "fundingSource": {
19137
+ "enum": ["hq_managed", "byo_api", "external_subscription"],
19138
+ "type": "string"
19139
+ },
19140
+ "schemaVersion": { "const": 1, "type": "number" },
19141
+ "sourceId": {
19142
+ "maxLength": 256,
19143
+ "minLength": 1,
19144
+ "type": "string"
19145
+ }
19146
+ },
19147
+ "required": [
19148
+ "schemaVersion",
19149
+ "sourceId",
19150
+ "fundingSource",
19151
+ "currency",
19152
+ "chargedMicrounits",
19153
+ "costExact"
19154
+ ],
19155
+ "type": "object"
19156
+ },
19157
+ "cost": {
19158
+ "additionalProperties": false,
19159
+ "properties": {
19160
+ "amount": { "pattern": "^\\d+(?:\\.\\d+)?$", "type": "string" },
19161
+ "currency": { "pattern": "^[A-Z]{3}$", "type": "string" }
19162
+ },
19163
+ "required": ["amount", "currency"],
19164
+ "type": "object"
19165
+ },
19166
+ "durationMs": {
19167
+ "maximum": 9007199254740991,
19168
+ "minimum": 0,
19169
+ "type": "integer"
19170
+ },
19171
+ "inputTokens": {
19172
+ "maximum": 9007199254740991,
19173
+ "minimum": 0,
19174
+ "type": "integer"
19175
+ },
19176
+ "outputTokens": {
19177
+ "maximum": 9007199254740991,
19178
+ "minimum": 0,
19179
+ "type": "integer"
19180
+ }
19181
+ },
19182
+ "required": ["inputTokens", "outputTokens", "durationMs"],
19183
+ "type": "object"
19184
+ }
19185
+ },
19186
+ "required": ["handle", "state", "observedAt"],
19187
+ "type": "object"
19188
+ }
19189
+ },
19190
+ "required": [
19191
+ "schemaVersion",
19192
+ "dispatchId",
19193
+ "intentId",
19194
+ "executionId",
19195
+ "attemptId",
19196
+ "runtimeSessionId",
19197
+ "state",
19198
+ "status"
19199
+ ],
19200
+ "type": "object"
19201
+ },
19202
+ "requestId": {}
19203
+ },
19204
+ "required": ["contractVersion", "requestId", "correlation", "data"],
19205
+ "type": "object"
19206
+ }
19207
+ }
19208
+ },
19209
+ "description": "Successful response"
19210
+ },
19211
+ "default": {
19212
+ "content": {
19213
+ "application/json": {
19214
+ "schema": {
19215
+ "additionalProperties": false,
19216
+ "properties": {
19217
+ "contractVersion": {
19218
+ "additionalProperties": false,
19219
+ "properties": {
19220
+ "major": {
19221
+ "exclusiveMinimum": 0,
19222
+ "maximum": 9007199254740991,
19223
+ "type": "integer"
19224
+ },
19225
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
19226
+ },
19227
+ "required": ["major", "minor"],
19228
+ "type": "object"
19229
+ },
19230
+ "correlation": {
19231
+ "additionalProperties": false,
19232
+ "properties": {
19233
+ "causationCommandId": {},
19234
+ "parentEventId": {},
19235
+ "traceId": {}
19236
+ },
19237
+ "required": ["traceId"],
19238
+ "type": "object"
19239
+ },
19240
+ "error": {
19241
+ "additionalProperties": false,
19242
+ "properties": {
19243
+ "class": {
19244
+ "enum": [
19245
+ "validation",
19246
+ "authentication",
19247
+ "authorization",
19248
+ "conflict",
19249
+ "stale_reference",
19250
+ "capability_mismatch",
19251
+ "runtime_unavailable",
19252
+ "internal"
19253
+ ],
19254
+ "type": "string"
19255
+ },
19256
+ "code": {
19257
+ "maxLength": 96,
19258
+ "minLength": 1,
19259
+ "pattern": "^[A-Z][A-Z0-9_]*$",
19260
+ "type": "string"
19261
+ },
19262
+ "details": {
19263
+ "additionalProperties": {},
19264
+ "propertyNames": { "maxLength": 64, "type": "string" },
19265
+ "type": "object"
19266
+ },
19267
+ "message": { "maxLength": 512, "minLength": 1, "type": "string" },
19268
+ "remediation": { "maxLength": 256, "minLength": 1, "type": "string" },
19269
+ "retryable": { "type": "boolean" },
19270
+ "source": {
19271
+ "enum": [
19272
+ "client",
19273
+ "auth",
19274
+ "policy",
19275
+ "runtime",
19276
+ "provider",
19277
+ "persistence",
19278
+ "workflow",
19279
+ "system"
19280
+ ],
19281
+ "type": "string"
19282
+ }
19283
+ },
19284
+ "required": ["class", "code", "message", "retryable", "source"],
19285
+ "type": "object"
19286
+ },
19287
+ "requestId": {}
19288
+ },
19289
+ "required": ["contractVersion", "requestId", "correlation", "error"],
19290
+ "type": "object"
19291
+ }
19292
+ }
19293
+ },
19294
+ "description": "Normalized error response"
19295
+ }
19296
+ },
19297
+ "security": [{ "serviceBearer": [] }]
19298
+ }
16715
19299
  }
16716
19300
  },
16717
19301
  "components": {