@adea-ai/sdk 2.1.0 → 3.0.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.
@@ -8233,7 +8233,14 @@
8233
8233
  "operation": { "const": "marketplace.catalog.read", "type": "string" },
8234
8234
  "parameters": {
8235
8235
  "properties": {
8236
+ "cursor": {
8237
+ "maxLength": 512,
8238
+ "minLength": 8,
8239
+ "pattern": "^cur_[A-Za-z0-9_-]+$",
8240
+ "type": "string"
8241
+ },
8236
8242
  "installedBy": { "maxLength": 128, "minLength": 1, "type": "string" },
8243
+ "limit": { "maximum": 100, "minimum": 1, "type": "integer" },
8237
8244
  "workspaceIdentity": {
8238
8245
  "properties": {
8239
8246
  "userId": { "maxLength": 128, "minLength": 1, "type": "string" },
@@ -8377,8 +8384,21 @@
8377
8384
  ],
8378
8385
  "type": "object"
8379
8386
  },
8387
+ "maxItems": 100,
8380
8388
  "type": "array"
8381
8389
  },
8390
+ "installationsPage": {
8391
+ "additionalProperties": false,
8392
+ "properties": {
8393
+ "nextCursor": {
8394
+ "maxLength": 512,
8395
+ "minLength": 8,
8396
+ "pattern": "^cur_[A-Za-z0-9_-]+$",
8397
+ "type": "string"
8398
+ }
8399
+ },
8400
+ "type": "object"
8401
+ },
8382
8402
  "releaseId": { "pattern": "^catalog:[a-f0-9]{64}$", "type": "string" },
8383
8403
  "state": { "enum": ["ready", "stale"], "type": "string" }
8384
8404
  },
@@ -10672,10 +10692,7 @@
10672
10692
  "target": {
10673
10693
  "additionalProperties": false,
10674
10694
  "properties": {
10675
- "harness": {
10676
- "enum": ["pi", "pi_durable", "cloudflare_agents", "acp"],
10677
- "type": "string"
10678
- },
10695
+ "harness": { "enum": ["pi", "pi_durable", "acp"], "type": "string" },
10679
10696
  "harnessVersion": {
10680
10697
  "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$",
10681
10698
  "type": "string"
@@ -10685,12 +10702,7 @@
10685
10702
  "type": "string"
10686
10703
  },
10687
10704
  "providerBinding": {
10688
- "enum": [
10689
- "pi_model_runtime",
10690
- "pi_durable_models",
10691
- "cloudflare_binding",
10692
- "native_harness"
10693
- ],
10705
+ "enum": ["pi_model_runtime", "pi_durable_models", "native_harness"],
10694
10706
  "type": "string"
10695
10707
  }
10696
10708
  },
@@ -11830,10 +11842,7 @@
11830
11842
  "target": {
11831
11843
  "additionalProperties": false,
11832
11844
  "properties": {
11833
- "harness": {
11834
- "enum": ["pi", "pi_durable", "cloudflare_agents", "acp"],
11835
- "type": "string"
11836
- },
11845
+ "harness": { "enum": ["pi", "pi_durable", "acp"], "type": "string" },
11837
11846
  "harnessVersion": {
11838
11847
  "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$",
11839
11848
  "type": "string"
@@ -11843,12 +11852,7 @@
11843
11852
  "type": "string"
11844
11853
  },
11845
11854
  "providerBinding": {
11846
- "enum": [
11847
- "pi_model_runtime",
11848
- "pi_durable_models",
11849
- "cloudflare_binding",
11850
- "native_harness"
11851
- ],
11855
+ "enum": ["pi_model_runtime", "pi_durable_models", "native_harness"],
11852
11856
  "type": "string"
11853
11857
  }
11854
11858
  },
@@ -11953,10 +11957,7 @@
11953
11957
  "enum": ["hq_managed", "external_subscription", "byo_api"],
11954
11958
  "type": "string"
11955
11959
  },
11956
- "harness": {
11957
- "enum": ["pi", "pi_durable", "cloudflare_agents", "acp"],
11958
- "type": "string"
11959
- },
11960
+ "harness": { "enum": ["pi", "pi_durable", "acp"], "type": "string" },
11960
11961
  "harnessVersion": {
11961
11962
  "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$",
11962
11963
  "type": "string"
@@ -11972,12 +11973,7 @@
11972
11973
  "type": "string"
11973
11974
  },
11974
11975
  "providerBinding": {
11975
- "enum": [
11976
- "pi_model_runtime",
11977
- "pi_durable_models",
11978
- "cloudflare_binding",
11979
- "native_harness"
11980
- ],
11976
+ "enum": ["pi_model_runtime", "pi_durable_models", "native_harness"],
11981
11977
  "type": "string"
11982
11978
  },
11983
11979
  "providerModel": {
@@ -17559,9 +17555,9 @@
17559
17555
  "security": [{ "serviceBearer": [] }]
17560
17556
  }
17561
17557
  },
17562
- "/v3/pi-durable/lead-dispatches/lookup": {
17558
+ "/v3/pi-durable/lead-dispatches/events": {
17563
17559
  "post": {
17564
- "operationId": "pi-durable.lead.lookup",
17560
+ "operationId": "pi-durable.lead.events",
17565
17561
  "requestBody": {
17566
17562
  "content": {
17567
17563
  "application/json": {
@@ -17610,17 +17606,22 @@
17610
17606
  "required": ["traceId"],
17611
17607
  "type": "object"
17612
17608
  },
17613
- "operation": { "const": "pi-durable.lead.lookup", "type": "string" },
17609
+ "operation": { "const": "pi-durable.lead.events", "type": "string" },
17614
17610
  "parameters": {
17615
17611
  "additionalProperties": false,
17616
17612
  "properties": {
17617
- "intentId": {
17618
- "format": "uuid",
17619
- "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)$",
17613
+ "afterSeq": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" },
17614
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
17615
+ "limit": { "maximum": 256, "minimum": 1, "type": "integer" },
17616
+ "messageId": {
17617
+ "maxLength": 128,
17618
+ "minLength": 1,
17619
+ "pattern": "^[A-Za-z0-9._:-]+$",
17620
17620
  "type": "string"
17621
- }
17621
+ },
17622
+ "waitMs": { "maximum": 8000, "minimum": 0, "type": "integer" }
17622
17623
  },
17623
- "required": ["intentId"],
17624
+ "required": ["dispatchId", "messageId", "afterSeq", "waitMs"],
17624
17625
  "type": "object"
17625
17626
  },
17626
17627
  "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
@@ -17681,103 +17682,84 @@
17681
17682
  "data": {
17682
17683
  "additionalProperties": false,
17683
17684
  "properties": {
17684
- "intentId": {
17685
- "format": "uuid",
17686
- "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)$",
17687
- "type": "string"
17688
- },
17689
- "receipt": {
17690
- "anyOf": [
17691
- {
17692
- "additionalProperties": false,
17693
- "properties": {
17694
- "attemptId": {},
17695
- "dispatchId": {
17696
- "pattern": "^dispatch_[a-f0-9]{32}$",
17697
- "type": "string"
17698
- },
17699
- "executionId": {},
17700
- "observedTarget": {
17701
- "additionalProperties": false,
17702
- "properties": {
17703
- "generation": {
17704
- "additionalProperties": false,
17705
- "properties": {
17706
- "attemptId": {},
17707
- "inferenceId": {
17708
- "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$",
17709
- "type": "string"
17710
- },
17711
- "inferenceKey": {
17712
- "maxLength": 8192,
17713
- "minLength": 1,
17714
- "type": "string"
17715
- },
17716
- "schemaVersion": {
17717
- "const": "runtime-observed-generation/v1",
17718
- "type": "string"
17719
- },
17720
- "turnKey": {
17721
- "maxLength": 4096,
17722
- "minLength": 1,
17723
- "type": "string"
17724
- }
17725
- },
17726
- "required": [
17727
- "schemaVersion",
17728
- "attemptId",
17729
- "turnKey",
17730
- "inferenceId",
17731
- "inferenceKey"
17732
- ],
17733
- "type": "object"
17734
- },
17735
- "sessionId": {
17736
- "maxLength": 256,
17737
- "minLength": 1,
17738
- "type": "string"
17739
- },
17740
- "taskId": { "maxLength": 256, "minLength": 1, "type": "string" }
17741
- },
17742
- "readOnly": true,
17743
- "required": ["sessionId", "taskId"],
17744
- "type": "object"
17745
- },
17746
- "requestedTarget": {
17747
- "additionalProperties": false,
17748
- "properties": {
17749
- "generation": {
17750
- "maximum": 9007199254740991,
17751
- "minimum": 0,
17752
- "type": "integer"
17753
- },
17754
- "sessionId": {
17755
- "maxLength": 256,
17756
- "minLength": 1,
17757
- "type": "string"
17758
- },
17759
- "taskId": { "maxLength": 256, "minLength": 1, "type": "string" }
17760
- },
17761
- "readOnly": true,
17762
- "required": ["sessionId", "taskId", "generation"],
17763
- "type": "object"
17764
- },
17765
- "runtimeSessionId": {},
17766
- "state": {
17767
- "enum": ["dispatching", "dispatched", "reconciliation_required"],
17768
- "type": "string"
17769
- }
17685
+ "complete": { "type": "boolean" },
17686
+ "contractVersion": { "const": 1, "type": "number" },
17687
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
17688
+ "events": {
17689
+ "items": {
17690
+ "additionalProperties": false,
17691
+ "properties": {
17692
+ "classification": {
17693
+ "enum": ["workspace_private", "restricted_local"],
17694
+ "type": "string"
17770
17695
  },
17771
- "required": ["dispatchId", "executionId", "attemptId", "state"],
17772
- "type": "object"
17696
+ "confidence": { "const": "authoritative", "type": "string" },
17697
+ "eventId": { "maxLength": 256, "minLength": 1, "type": "string" },
17698
+ "generation": { "const": 1, "type": "number" },
17699
+ "harnessRunId": {
17700
+ "maxLength": 256,
17701
+ "minLength": 1,
17702
+ "type": "string"
17703
+ },
17704
+ "kind": { "maxLength": 64, "minLength": 1, "type": "string" },
17705
+ "occurredAt": {
17706
+ "format": "date-time",
17707
+ "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))$",
17708
+ "type": "string"
17709
+ },
17710
+ "payload": {
17711
+ "additionalProperties": {},
17712
+ "propertyNames": { "type": "string" },
17713
+ "type": "object"
17714
+ },
17715
+ "receivedAt": {
17716
+ "format": "date-time",
17717
+ "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))$",
17718
+ "type": "string"
17719
+ },
17720
+ "runtimeSessionId": {
17721
+ "pattern": "^pi-lead:dispatch_[a-f0-9]{32}$",
17722
+ "type": "string"
17723
+ },
17724
+ "schemaVersion": { "const": 1, "type": "number" },
17725
+ "seq": { "pattern": "^[1-9]\\d*$", "type": "string" },
17726
+ "source": { "const": "native", "type": "string" },
17727
+ "sourceEventId": {
17728
+ "maxLength": 256,
17729
+ "minLength": 1,
17730
+ "type": "string"
17731
+ }
17773
17732
  },
17774
- { "type": "null" }
17775
- ]
17733
+ "required": [
17734
+ "schemaVersion",
17735
+ "eventId",
17736
+ "runtimeSessionId",
17737
+ "harnessRunId",
17738
+ "generation",
17739
+ "seq",
17740
+ "occurredAt",
17741
+ "receivedAt",
17742
+ "source",
17743
+ "sourceEventId",
17744
+ "confidence",
17745
+ "classification",
17746
+ "kind",
17747
+ "payload"
17748
+ ],
17749
+ "type": "object"
17750
+ },
17751
+ "maxItems": 256,
17752
+ "type": "array"
17776
17753
  },
17777
- "schemaVersion": { "const": "pi-lead-lookup/v1", "type": "string" },
17778
- "workspaceId": {}
17754
+ "nextSeq": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
17779
17755
  },
17780
- "required": ["schemaVersion", "workspaceId", "intentId", "receipt"],
17756
+ "required": [
17757
+ "contractVersion",
17758
+ "dispatchId",
17759
+ "events",
17760
+ "nextSeq",
17761
+ "complete"
17762
+ ],
17781
17763
  "type": "object"
17782
17764
  },
17783
17765
  "requestId": {}
@@ -17878,9 +17860,9 @@
17878
17860
  "security": [{ "serviceBearer": [] }]
17879
17861
  }
17880
17862
  },
17881
- "/v3/pi-durable/lead-dispatches/prepare": {
17863
+ "/v3/pi-durable/lead-dispatches/lookup": {
17882
17864
  "post": {
17883
- "operationId": "pi-durable.lead.prepare",
17865
+ "operationId": "pi-durable.lead.lookup",
17884
17866
  "requestBody": {
17885
17867
  "content": {
17886
17868
  "application/json": {
@@ -17900,7 +17882,6 @@
17900
17882
  "required": ["servicePrincipalId"],
17901
17883
  "type": "object"
17902
17884
  },
17903
- "commandId": { "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17904
17885
  "contractVersion": {
17905
17886
  "additionalProperties": false,
17906
17887
  "properties": {
@@ -17930,19 +17911,8 @@
17930
17911
  "required": ["traceId"],
17931
17912
  "type": "object"
17932
17913
  },
17933
- "idempotencyKey": {
17934
- "maxLength": 128,
17935
- "minLength": 16,
17936
- "pattern": "^[A-Za-z0-9._:-]+$",
17937
- "type": "string"
17938
- },
17939
- "issuedAt": {
17940
- "format": "date-time",
17941
- "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))$",
17942
- "type": "string"
17943
- },
17944
- "operation": { "const": "pi-durable.lead.prepare", "type": "string" },
17945
- "payload": {
17914
+ "operation": { "const": "pi-durable.lead.lookup", "type": "string" },
17915
+ "parameters": {
17946
17916
  "additionalProperties": false,
17947
17917
  "properties": {
17948
17918
  "intentId": {
@@ -17954,9 +17924,13 @@
17954
17924
  "required": ["intentId"],
17955
17925
  "type": "object"
17956
17926
  },
17957
- "payloadHash": { "pattern": "^[a-f0-9]{64}$", "type": "string" },
17958
17927
  "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17959
17928
  "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
17929
+ "requestedAt": {
17930
+ "format": "date-time",
17931
+ "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))$",
17932
+ "type": "string"
17933
+ },
17960
17934
  "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
17961
17935
  },
17962
17936
  "required": [
@@ -17965,12 +17939,9 @@
17965
17939
  "requestId",
17966
17940
  "workspaceId",
17967
17941
  "correlation",
17968
- "commandId",
17969
- "idempotencyKey",
17970
- "payloadHash",
17971
17942
  "operation",
17972
- "issuedAt",
17973
- "payload"
17943
+ "requestedAt",
17944
+ "parameters"
17974
17945
  ],
17975
17946
  "type": "object"
17976
17947
  }
@@ -18011,264 +17982,103 @@
18011
17982
  "data": {
18012
17983
  "additionalProperties": false,
18013
17984
  "properties": {
18014
- "attemptId": {},
18015
- "childAllowance": {
18016
- "oneOf": [
17985
+ "intentId": {
17986
+ "format": "uuid",
17987
+ "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)$",
17988
+ "type": "string"
17989
+ },
17990
+ "receipt": {
17991
+ "anyOf": [
18017
17992
  {
18018
17993
  "additionalProperties": false,
18019
17994
  "properties": {
18020
- "currency": { "const": "USD", "type": "string" },
18021
- "executionPlanDigest": {
18022
- "pattern": "^sha256:[a-f0-9]{64}$",
17995
+ "attemptId": {},
17996
+ "dispatchId": {
17997
+ "pattern": "^dispatch_[a-f0-9]{32}$",
18023
17998
  "type": "string"
18024
17999
  },
18025
- "maximumMicrounits": {
18026
- "exclusiveMinimum": 0,
18027
- "maximum": 9007199254740991,
18028
- "type": "integer"
18029
- },
18030
- "maximumTokens": {
18031
- "exclusiveMinimum": 0,
18032
- "maximum": 9007199254740991,
18033
- "type": "integer"
18034
- },
18035
- "profile": {
18000
+ "executionId": {},
18001
+ "observedTarget": {
18036
18002
  "additionalProperties": false,
18037
18003
  "properties": {
18038
- "profileId": {},
18039
- "profileVersionId": {},
18040
- "revision": {
18041
- "exclusiveMinimum": 0,
18042
- "maximum": 9007199254740991,
18043
- "type": "integer"
18044
- },
18045
- "version": {
18046
- "exclusiveMinimum": 0,
18047
- "maximum": 9007199254740991,
18048
- "type": "integer"
18049
- }
18050
- },
18051
- "readOnly": true,
18052
- "required": [
18053
- "profileId",
18054
- "profileVersionId",
18055
- "version",
18056
- "revision"
18057
- ],
18004
+ "generation": {
18005
+ "additionalProperties": false,
18006
+ "properties": {
18007
+ "attemptId": {},
18008
+ "inferenceId": {
18009
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$",
18010
+ "type": "string"
18011
+ },
18012
+ "inferenceKey": {
18013
+ "maxLength": 8192,
18014
+ "minLength": 1,
18015
+ "type": "string"
18016
+ },
18017
+ "schemaVersion": {
18018
+ "const": "runtime-observed-generation/v1",
18019
+ "type": "string"
18020
+ },
18021
+ "turnKey": {
18022
+ "maxLength": 4096,
18023
+ "minLength": 1,
18024
+ "type": "string"
18025
+ }
18026
+ },
18027
+ "required": [
18028
+ "schemaVersion",
18029
+ "attemptId",
18030
+ "turnKey",
18031
+ "inferenceId",
18032
+ "inferenceKey"
18033
+ ],
18034
+ "type": "object"
18035
+ },
18036
+ "sessionId": {
18037
+ "maxLength": 256,
18038
+ "minLength": 1,
18039
+ "type": "string"
18040
+ },
18041
+ "taskId": { "maxLength": 256, "minLength": 1, "type": "string" }
18042
+ },
18043
+ "readOnly": true,
18044
+ "required": ["sessionId", "taskId"],
18058
18045
  "type": "object"
18059
18046
  },
18060
- "schemaVersion": {
18061
- "const": "pi-lead-child-allowance/v1",
18062
- "type": "string"
18063
- },
18064
- "state": { "const": "stated", "type": "string" }
18065
- },
18066
- "required": [
18067
- "schemaVersion",
18068
- "executionPlanDigest",
18069
- "profile",
18070
- "state",
18071
- "currency",
18072
- "maximumMicrounits",
18073
- "maximumTokens"
18074
- ],
18075
- "type": "object"
18076
- },
18077
- {
18078
- "additionalProperties": false,
18079
- "properties": {
18080
- "executionPlanDigest": {
18081
- "pattern": "^sha256:[a-f0-9]{64}$",
18082
- "type": "string"
18083
- },
18084
- "profile": {
18047
+ "requestedTarget": {
18085
18048
  "additionalProperties": false,
18086
18049
  "properties": {
18087
- "profileId": {},
18088
- "profileVersionId": {},
18089
- "revision": {
18090
- "exclusiveMinimum": 0,
18050
+ "generation": {
18091
18051
  "maximum": 9007199254740991,
18052
+ "minimum": 0,
18092
18053
  "type": "integer"
18093
18054
  },
18094
- "version": {
18095
- "exclusiveMinimum": 0,
18096
- "maximum": 9007199254740991,
18097
- "type": "integer"
18098
- }
18055
+ "sessionId": {
18056
+ "maxLength": 256,
18057
+ "minLength": 1,
18058
+ "type": "string"
18059
+ },
18060
+ "taskId": { "maxLength": 256, "minLength": 1, "type": "string" }
18099
18061
  },
18100
18062
  "readOnly": true,
18101
- "required": [
18102
- "profileId",
18103
- "profileVersionId",
18104
- "version",
18105
- "revision"
18106
- ],
18063
+ "required": ["sessionId", "taskId", "generation"],
18107
18064
  "type": "object"
18108
18065
  },
18109
- "schemaVersion": {
18110
- "const": "pi-lead-child-allowance/v1",
18111
- "type": "string"
18112
- },
18113
- "state": { "const": "not_stated", "type": "string" }
18114
- },
18115
- "required": [
18116
- "schemaVersion",
18117
- "executionPlanDigest",
18118
- "profile",
18119
- "state"
18120
- ],
18121
- "type": "object"
18122
- }
18123
- ]
18124
- },
18125
- "executionId": {},
18126
- "expiresAt": {
18127
- "format": "date-time",
18128
- "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))$",
18129
- "type": "string"
18130
- },
18131
- "funding": {
18132
- "additionalProperties": false,
18133
- "properties": {
18134
- "accountRef": {
18135
- "maxLength": 256,
18136
- "minLength": 1,
18137
- "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18138
- "type": "string"
18139
- },
18140
- "attemptId": {},
18141
- "authKind": {
18142
- "enum": ["api_key", "provider_subscription", "local_runtime"],
18143
- "type": "string"
18144
- },
18145
- "authorityRevision": {
18146
- "exclusiveMinimum": 0,
18147
- "maximum": 9007199254740991,
18148
- "type": "integer"
18149
- },
18150
- "authorizationRef": {
18151
- "maxLength": 256,
18152
- "minLength": 1,
18153
- "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18154
- "type": "string"
18155
- },
18156
- "executionId": {},
18157
- "expiresAt": {
18158
- "format": "date-time",
18159
- "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))$",
18160
- "type": "string"
18161
- },
18162
- "fundingOwner": {
18163
- "additionalProperties": false,
18164
- "properties": {
18165
- "displayName": {
18166
- "maxLength": 128,
18167
- "minLength": 1,
18168
- "type": "string"
18169
- },
18170
- "evidenceRef": {
18171
- "maxLength": 256,
18172
- "minLength": 1,
18173
- "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18174
- "type": "string"
18175
- },
18176
- "kind": {
18177
- "enum": ["provider_account", "workspace_account", "adea_account"],
18178
- "type": "string"
18179
- },
18180
- "ownerRef": {
18181
- "maxLength": 256,
18182
- "minLength": 1,
18183
- "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18066
+ "runtimeSessionId": {},
18067
+ "state": {
18068
+ "enum": ["dispatching", "dispatched", "reconciliation_required"],
18184
18069
  "type": "string"
18185
- },
18186
- "revision": {
18187
- "exclusiveMinimum": 0,
18188
- "maximum": 9007199254740991,
18189
- "type": "integer"
18190
18070
  }
18191
18071
  },
18192
- "required": [
18193
- "ownerRef",
18194
- "kind",
18195
- "displayName",
18196
- "revision",
18197
- "evidenceRef"
18198
- ],
18072
+ "required": ["dispatchId", "executionId", "attemptId", "state"],
18199
18073
  "type": "object"
18200
18074
  },
18201
- "fundingSource": {
18202
- "enum": ["hq_managed", "external_subscription", "byo_api"],
18203
- "type": "string"
18204
- },
18205
- "provider": {
18206
- "maxLength": 128,
18207
- "minLength": 1,
18208
- "pattern": "^[a-z][a-z0-9.-]*$",
18209
- "type": "string"
18210
- },
18211
- "providerModel": { "maxLength": 256, "minLength": 1, "type": "string" },
18212
- "schemaVersion": {
18213
- "const": "model-funding-display/v1",
18214
- "type": "string"
18215
- },
18216
- "selectionRef": { "pattern": "^msel_[a-f0-9]{32}$", "type": "string" },
18217
- "selectionRevision": {
18218
- "exclusiveMinimum": 0,
18219
- "maximum": 9007199254740991,
18220
- "type": "integer"
18221
- },
18222
- "state": { "const": "ready", "type": "string" },
18223
- "workspaceId": {}
18224
- },
18225
- "required": [
18226
- "schemaVersion",
18227
- "workspaceId",
18228
- "executionId",
18229
- "attemptId",
18230
- "selectionRef",
18231
- "selectionRevision",
18232
- "state",
18233
- "provider",
18234
- "providerModel",
18235
- "accountRef",
18236
- "authKind",
18237
- "fundingSource",
18238
- "fundingOwner",
18239
- "authorizationRef",
18240
- "authorityRevision",
18241
- "expiresAt"
18242
- ],
18243
- "type": "object"
18244
- },
18245
- "intentId": {
18246
- "format": "uuid",
18247
- "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)$",
18248
- "type": "string"
18075
+ { "type": "null" }
18076
+ ]
18249
18077
  },
18250
- "preparationRef": { "pattern": "^prep_[a-f0-9]{32}$", "type": "string" },
18251
- "replayed": { "type": "boolean" },
18252
- "schemaVersion": { "const": "pi-lead-preparation/v1", "type": "string" },
18253
- "selectionRef": { "pattern": "^msel_[a-f0-9]{32}$", "type": "string" },
18254
- "selectionRevision": {
18255
- "exclusiveMinimum": 0,
18256
- "maximum": 9007199254740991,
18257
- "type": "integer"
18258
- }
18078
+ "schemaVersion": { "const": "pi-lead-lookup/v1", "type": "string" },
18079
+ "workspaceId": {}
18259
18080
  },
18260
- "required": [
18261
- "schemaVersion",
18262
- "preparationRef",
18263
- "intentId",
18264
- "executionId",
18265
- "attemptId",
18266
- "selectionRef",
18267
- "selectionRevision",
18268
- "funding",
18269
- "expiresAt",
18270
- "replayed"
18271
- ],
18081
+ "required": ["schemaVersion", "workspaceId", "intentId", "receipt"],
18272
18082
  "type": "object"
18273
18083
  },
18274
18084
  "requestId": {}
@@ -18369,9 +18179,9 @@
18369
18179
  "security": [{ "serviceBearer": [] }]
18370
18180
  }
18371
18181
  },
18372
- "/v3/pi-durable/lead-dispatches/progress": {
18182
+ "/v3/pi-durable/lead-dispatches/prepare": {
18373
18183
  "post": {
18374
- "operationId": "pi-durable.lead.progress",
18184
+ "operationId": "pi-durable.lead.prepare",
18375
18185
  "requestBody": {
18376
18186
  "content": {
18377
18187
  "application/json": {
@@ -18391,6 +18201,7 @@
18391
18201
  "required": ["servicePrincipalId"],
18392
18202
  "type": "object"
18393
18203
  },
18204
+ "commandId": { "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18394
18205
  "contractVersion": {
18395
18206
  "additionalProperties": false,
18396
18207
  "properties": {
@@ -18420,27 +18231,33 @@
18420
18231
  "required": ["traceId"],
18421
18232
  "type": "object"
18422
18233
  },
18423
- "operation": { "const": "pi-durable.lead.progress", "type": "string" },
18424
- "parameters": {
18234
+ "idempotencyKey": {
18235
+ "maxLength": 128,
18236
+ "minLength": 16,
18237
+ "pattern": "^[A-Za-z0-9._:-]+$",
18238
+ "type": "string"
18239
+ },
18240
+ "issuedAt": {
18241
+ "format": "date-time",
18242
+ "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))$",
18243
+ "type": "string"
18244
+ },
18245
+ "operation": { "const": "pi-durable.lead.prepare", "type": "string" },
18246
+ "payload": {
18425
18247
  "additionalProperties": false,
18426
18248
  "properties": {
18427
- "afterSequence": {
18428
- "maximum": 9007199254740991,
18429
- "minimum": 0,
18430
- "type": "integer"
18431
- },
18432
- "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" }
18249
+ "intentId": {
18250
+ "format": "uuid",
18251
+ "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)$",
18252
+ "type": "string"
18253
+ }
18433
18254
  },
18434
- "required": ["dispatchId"],
18255
+ "required": ["intentId"],
18435
18256
  "type": "object"
18436
18257
  },
18258
+ "payloadHash": { "pattern": "^[a-f0-9]{64}$", "type": "string" },
18437
18259
  "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18438
18260
  "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18439
- "requestedAt": {
18440
- "format": "date-time",
18441
- "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))$",
18442
- "type": "string"
18443
- },
18444
18261
  "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
18445
18262
  },
18446
18263
  "required": [
@@ -18449,9 +18266,12 @@
18449
18266
  "requestId",
18450
18267
  "workspaceId",
18451
18268
  "correlation",
18269
+ "commandId",
18270
+ "idempotencyKey",
18271
+ "payloadHash",
18452
18272
  "operation",
18453
- "requestedAt",
18454
- "parameters"
18273
+ "issuedAt",
18274
+ "payload"
18455
18275
  ],
18456
18276
  "type": "object"
18457
18277
  }
@@ -18464,22 +18284,6 @@
18464
18284
  "content": {
18465
18285
  "application/json": {
18466
18286
  "schema": {
18467
- "$defs": {
18468
- "__schema0": {
18469
- "anyOf": [
18470
- { "type": "string" },
18471
- { "type": "number" },
18472
- { "type": "boolean" },
18473
- { "type": "null" },
18474
- { "items": { "$ref": "#/$defs/__schema0" }, "type": "array" },
18475
- {
18476
- "additionalProperties": { "$ref": "#/$defs/__schema0" },
18477
- "propertyNames": { "type": "string" },
18478
- "type": "object"
18479
- }
18480
- ]
18481
- }
18482
- },
18483
18287
  "additionalProperties": false,
18484
18288
  "properties": {
18485
18289
  "contractVersion": {
@@ -18509,114 +18313,1321 @@
18509
18313
  "additionalProperties": false,
18510
18314
  "properties": {
18511
18315
  "attemptId": {},
18512
- "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
18513
- "events": {
18514
- "items": {
18515
- "additionalProperties": false,
18516
- "properties": {
18517
- "data": {
18518
- "additionalProperties": { "$ref": "#/$defs/__schema0" },
18519
- "propertyNames": { "type": "string" },
18520
- "type": "object"
18521
- },
18522
- "handleId": { "maxLength": 256, "minLength": 1, "type": "string" },
18523
- "occurredAt": {
18524
- "format": "date-time",
18525
- "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))$",
18526
- "type": "string"
18527
- },
18528
- "sequence": {
18529
- "exclusiveMinimum": 0,
18530
- "maximum": 9007199254740991,
18531
- "type": "integer"
18316
+ "childAllowance": {
18317
+ "oneOf": [
18318
+ {
18319
+ "additionalProperties": false,
18320
+ "properties": {
18321
+ "currency": { "const": "USD", "type": "string" },
18322
+ "executionPlanDigest": {
18323
+ "pattern": "^sha256:[a-f0-9]{64}$",
18324
+ "type": "string"
18325
+ },
18326
+ "maximumMicrounits": {
18327
+ "exclusiveMinimum": 0,
18328
+ "maximum": 9007199254740991,
18329
+ "type": "integer"
18330
+ },
18331
+ "maximumTokens": {
18332
+ "exclusiveMinimum": 0,
18333
+ "maximum": 9007199254740991,
18334
+ "type": "integer"
18335
+ },
18336
+ "profile": {
18337
+ "additionalProperties": false,
18338
+ "properties": {
18339
+ "profileId": {},
18340
+ "profileVersionId": {},
18341
+ "revision": {
18342
+ "exclusiveMinimum": 0,
18343
+ "maximum": 9007199254740991,
18344
+ "type": "integer"
18345
+ },
18346
+ "version": {
18347
+ "exclusiveMinimum": 0,
18348
+ "maximum": 9007199254740991,
18349
+ "type": "integer"
18350
+ }
18351
+ },
18352
+ "readOnly": true,
18353
+ "required": [
18354
+ "profileId",
18355
+ "profileVersionId",
18356
+ "version",
18357
+ "revision"
18358
+ ],
18359
+ "type": "object"
18360
+ },
18361
+ "schemaVersion": {
18362
+ "const": "pi-lead-child-allowance/v1",
18363
+ "type": "string"
18364
+ },
18365
+ "state": { "const": "stated", "type": "string" }
18532
18366
  },
18533
- "type": {
18534
- "enum": ["status", "output", "interaction", "usage", "artifact"],
18535
- "type": "string"
18536
- }
18367
+ "required": [
18368
+ "schemaVersion",
18369
+ "executionPlanDigest",
18370
+ "profile",
18371
+ "state",
18372
+ "currency",
18373
+ "maximumMicrounits",
18374
+ "maximumTokens"
18375
+ ],
18376
+ "type": "object"
18537
18377
  },
18538
- "required": ["handleId", "sequence", "occurredAt", "type", "data"],
18539
- "type": "object"
18540
- },
18541
- "maxItems": 256,
18542
- "type": "array"
18543
- },
18544
- "executionId": {},
18545
- "intentId": {
18546
- "format": "uuid",
18547
- "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)$",
18548
- "type": "string"
18549
- },
18550
- "nextSequence": {
18551
- "maximum": 9007199254740991,
18552
- "minimum": 0,
18553
- "type": "integer"
18554
- },
18555
- "observedTarget": {
18556
- "additionalProperties": false,
18557
- "properties": {
18558
- "generation": {
18378
+ {
18559
18379
  "additionalProperties": false,
18560
18380
  "properties": {
18561
- "attemptId": {},
18562
- "inferenceId": {
18563
- "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$",
18381
+ "executionPlanDigest": {
18382
+ "pattern": "^sha256:[a-f0-9]{64}$",
18564
18383
  "type": "string"
18565
18384
  },
18566
- "inferenceKey": {
18567
- "maxLength": 8192,
18568
- "minLength": 1,
18569
- "type": "string"
18385
+ "profile": {
18386
+ "additionalProperties": false,
18387
+ "properties": {
18388
+ "profileId": {},
18389
+ "profileVersionId": {},
18390
+ "revision": {
18391
+ "exclusiveMinimum": 0,
18392
+ "maximum": 9007199254740991,
18393
+ "type": "integer"
18394
+ },
18395
+ "version": {
18396
+ "exclusiveMinimum": 0,
18397
+ "maximum": 9007199254740991,
18398
+ "type": "integer"
18399
+ }
18400
+ },
18401
+ "readOnly": true,
18402
+ "required": [
18403
+ "profileId",
18404
+ "profileVersionId",
18405
+ "version",
18406
+ "revision"
18407
+ ],
18408
+ "type": "object"
18570
18409
  },
18571
18410
  "schemaVersion": {
18572
- "const": "runtime-observed-generation/v1",
18411
+ "const": "pi-lead-child-allowance/v1",
18573
18412
  "type": "string"
18574
18413
  },
18575
- "turnKey": { "maxLength": 4096, "minLength": 1, "type": "string" }
18414
+ "state": { "const": "not_stated", "type": "string" }
18576
18415
  },
18577
18416
  "required": [
18578
18417
  "schemaVersion",
18579
- "attemptId",
18580
- "turnKey",
18581
- "inferenceId",
18582
- "inferenceKey"
18418
+ "executionPlanDigest",
18419
+ "profile",
18420
+ "state"
18583
18421
  ],
18584
18422
  "type": "object"
18585
- },
18586
- "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" },
18587
- "taskId": { "maxLength": 256, "minLength": 1, "type": "string" }
18588
- },
18589
- "readOnly": true,
18590
- "required": ["sessionId", "taskId"],
18591
- "type": "object"
18423
+ }
18424
+ ]
18592
18425
  },
18593
- "requestedTarget": {
18426
+ "executionId": {},
18427
+ "expiresAt": {
18428
+ "format": "date-time",
18429
+ "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))$",
18430
+ "type": "string"
18431
+ },
18432
+ "funding": {
18594
18433
  "additionalProperties": false,
18595
18434
  "properties": {
18596
- "generation": {
18435
+ "accountRef": {
18436
+ "maxLength": 256,
18437
+ "minLength": 1,
18438
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18439
+ "type": "string"
18440
+ },
18441
+ "attemptId": {},
18442
+ "authKind": {
18443
+ "enum": ["api_key", "provider_subscription", "local_runtime"],
18444
+ "type": "string"
18445
+ },
18446
+ "authorityRevision": {
18447
+ "exclusiveMinimum": 0,
18597
18448
  "maximum": 9007199254740991,
18598
- "minimum": 0,
18599
18449
  "type": "integer"
18600
18450
  },
18601
- "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" },
18602
- "taskId": { "maxLength": 256, "minLength": 1, "type": "string" }
18603
- },
18604
- "readOnly": true,
18605
- "required": ["sessionId", "taskId", "generation"],
18606
- "type": "object"
18607
- },
18608
- "runtimeSessionId": {},
18609
- "schemaVersion": { "const": "pi-lead-dispatch/v1", "type": "string" }
18610
- },
18611
- "required": [
18612
- "schemaVersion",
18451
+ "authorizationRef": {
18452
+ "maxLength": 256,
18453
+ "minLength": 1,
18454
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18455
+ "type": "string"
18456
+ },
18457
+ "executionId": {},
18458
+ "expiresAt": {
18459
+ "format": "date-time",
18460
+ "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))$",
18461
+ "type": "string"
18462
+ },
18463
+ "fundingOwner": {
18464
+ "additionalProperties": false,
18465
+ "properties": {
18466
+ "displayName": {
18467
+ "maxLength": 128,
18468
+ "minLength": 1,
18469
+ "type": "string"
18470
+ },
18471
+ "evidenceRef": {
18472
+ "maxLength": 256,
18473
+ "minLength": 1,
18474
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18475
+ "type": "string"
18476
+ },
18477
+ "kind": {
18478
+ "enum": ["provider_account", "workspace_account", "adea_account"],
18479
+ "type": "string"
18480
+ },
18481
+ "ownerRef": {
18482
+ "maxLength": 256,
18483
+ "minLength": 1,
18484
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
18485
+ "type": "string"
18486
+ },
18487
+ "revision": {
18488
+ "exclusiveMinimum": 0,
18489
+ "maximum": 9007199254740991,
18490
+ "type": "integer"
18491
+ }
18492
+ },
18493
+ "required": [
18494
+ "ownerRef",
18495
+ "kind",
18496
+ "displayName",
18497
+ "revision",
18498
+ "evidenceRef"
18499
+ ],
18500
+ "type": "object"
18501
+ },
18502
+ "fundingSource": {
18503
+ "enum": ["hq_managed", "external_subscription", "byo_api"],
18504
+ "type": "string"
18505
+ },
18506
+ "provider": {
18507
+ "maxLength": 128,
18508
+ "minLength": 1,
18509
+ "pattern": "^[a-z][a-z0-9.-]*$",
18510
+ "type": "string"
18511
+ },
18512
+ "providerModel": { "maxLength": 256, "minLength": 1, "type": "string" },
18513
+ "schemaVersion": {
18514
+ "const": "model-funding-display/v1",
18515
+ "type": "string"
18516
+ },
18517
+ "selectionRef": { "pattern": "^msel_[a-f0-9]{32}$", "type": "string" },
18518
+ "selectionRevision": {
18519
+ "exclusiveMinimum": 0,
18520
+ "maximum": 9007199254740991,
18521
+ "type": "integer"
18522
+ },
18523
+ "state": { "const": "ready", "type": "string" },
18524
+ "workspaceId": {}
18525
+ },
18526
+ "required": [
18527
+ "schemaVersion",
18528
+ "workspaceId",
18529
+ "executionId",
18530
+ "attemptId",
18531
+ "selectionRef",
18532
+ "selectionRevision",
18533
+ "state",
18534
+ "provider",
18535
+ "providerModel",
18536
+ "accountRef",
18537
+ "authKind",
18538
+ "fundingSource",
18539
+ "fundingOwner",
18540
+ "authorizationRef",
18541
+ "authorityRevision",
18542
+ "expiresAt"
18543
+ ],
18544
+ "type": "object"
18545
+ },
18546
+ "intentId": {
18547
+ "format": "uuid",
18548
+ "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)$",
18549
+ "type": "string"
18550
+ },
18551
+ "preparationRef": { "pattern": "^prep_[a-f0-9]{32}$", "type": "string" },
18552
+ "replayed": { "type": "boolean" },
18553
+ "schemaVersion": { "const": "pi-lead-preparation/v1", "type": "string" },
18554
+ "selectionRef": { "pattern": "^msel_[a-f0-9]{32}$", "type": "string" },
18555
+ "selectionRevision": {
18556
+ "exclusiveMinimum": 0,
18557
+ "maximum": 9007199254740991,
18558
+ "type": "integer"
18559
+ }
18560
+ },
18561
+ "required": [
18562
+ "schemaVersion",
18563
+ "preparationRef",
18564
+ "intentId",
18565
+ "executionId",
18566
+ "attemptId",
18567
+ "selectionRef",
18568
+ "selectionRevision",
18569
+ "funding",
18570
+ "expiresAt",
18571
+ "replayed"
18572
+ ],
18573
+ "type": "object"
18574
+ },
18575
+ "requestId": {}
18576
+ },
18577
+ "required": ["contractVersion", "requestId", "correlation", "data"],
18578
+ "type": "object"
18579
+ }
18580
+ }
18581
+ },
18582
+ "description": "Successful response"
18583
+ },
18584
+ "default": {
18585
+ "content": {
18586
+ "application/json": {
18587
+ "schema": {
18588
+ "additionalProperties": false,
18589
+ "properties": {
18590
+ "contractVersion": {
18591
+ "additionalProperties": false,
18592
+ "properties": {
18593
+ "major": {
18594
+ "exclusiveMinimum": 0,
18595
+ "maximum": 9007199254740991,
18596
+ "type": "integer"
18597
+ },
18598
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18599
+ },
18600
+ "required": ["major", "minor"],
18601
+ "type": "object"
18602
+ },
18603
+ "correlation": {
18604
+ "additionalProperties": false,
18605
+ "properties": {
18606
+ "causationCommandId": {},
18607
+ "parentEventId": {},
18608
+ "traceId": {}
18609
+ },
18610
+ "required": ["traceId"],
18611
+ "type": "object"
18612
+ },
18613
+ "error": {
18614
+ "additionalProperties": false,
18615
+ "properties": {
18616
+ "class": {
18617
+ "enum": [
18618
+ "validation",
18619
+ "authentication",
18620
+ "authorization",
18621
+ "conflict",
18622
+ "stale_reference",
18623
+ "capability_mismatch",
18624
+ "runtime_unavailable",
18625
+ "internal"
18626
+ ],
18627
+ "type": "string"
18628
+ },
18629
+ "code": {
18630
+ "maxLength": 96,
18631
+ "minLength": 1,
18632
+ "pattern": "^[A-Z][A-Z0-9_]*$",
18633
+ "type": "string"
18634
+ },
18635
+ "details": {
18636
+ "additionalProperties": {},
18637
+ "propertyNames": { "maxLength": 64, "type": "string" },
18638
+ "type": "object"
18639
+ },
18640
+ "message": { "maxLength": 512, "minLength": 1, "type": "string" },
18641
+ "remediation": { "maxLength": 256, "minLength": 1, "type": "string" },
18642
+ "retryable": { "type": "boolean" },
18643
+ "source": {
18644
+ "enum": [
18645
+ "client",
18646
+ "auth",
18647
+ "policy",
18648
+ "runtime",
18649
+ "provider",
18650
+ "persistence",
18651
+ "workflow",
18652
+ "system"
18653
+ ],
18654
+ "type": "string"
18655
+ }
18656
+ },
18657
+ "required": ["class", "code", "message", "retryable", "source"],
18658
+ "type": "object"
18659
+ },
18660
+ "requestId": {}
18661
+ },
18662
+ "required": ["contractVersion", "requestId", "correlation", "error"],
18663
+ "type": "object"
18664
+ }
18665
+ }
18666
+ },
18667
+ "description": "Normalized error response"
18668
+ }
18669
+ },
18670
+ "security": [{ "serviceBearer": [] }]
18671
+ }
18672
+ },
18673
+ "/v3/pi-durable/lead-dispatches/progress": {
18674
+ "post": {
18675
+ "operationId": "pi-durable.lead.progress",
18676
+ "requestBody": {
18677
+ "content": {
18678
+ "application/json": {
18679
+ "schema": {
18680
+ "additionalProperties": false,
18681
+ "properties": {
18682
+ "caller": {
18683
+ "additionalProperties": false,
18684
+ "properties": {
18685
+ "servicePrincipalId": {
18686
+ "maxLength": 64,
18687
+ "minLength": 5,
18688
+ "pattern": "^svc_[a-z][a-z0-9-]*$",
18689
+ "type": "string"
18690
+ }
18691
+ },
18692
+ "required": ["servicePrincipalId"],
18693
+ "type": "object"
18694
+ },
18695
+ "contractVersion": {
18696
+ "additionalProperties": false,
18697
+ "properties": {
18698
+ "major": {
18699
+ "exclusiveMinimum": 0,
18700
+ "maximum": 9007199254740991,
18701
+ "type": "integer"
18702
+ },
18703
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18704
+ },
18705
+ "required": ["major", "minor"],
18706
+ "type": "object"
18707
+ },
18708
+ "correlation": {
18709
+ "additionalProperties": false,
18710
+ "properties": {
18711
+ "causationCommandId": {
18712
+ "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$",
18713
+ "type": "string"
18714
+ },
18715
+ "parentEventId": {
18716
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
18717
+ "type": "string"
18718
+ },
18719
+ "traceId": { "pattern": "^trc_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
18720
+ },
18721
+ "required": ["traceId"],
18722
+ "type": "object"
18723
+ },
18724
+ "operation": { "const": "pi-durable.lead.progress", "type": "string" },
18725
+ "parameters": {
18726
+ "additionalProperties": false,
18727
+ "properties": {
18728
+ "afterSequence": {
18729
+ "maximum": 9007199254740991,
18730
+ "minimum": 0,
18731
+ "type": "integer"
18732
+ },
18733
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" }
18734
+ },
18735
+ "required": ["dispatchId"],
18736
+ "type": "object"
18737
+ },
18738
+ "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18739
+ "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
18740
+ "requestedAt": {
18741
+ "format": "date-time",
18742
+ "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))$",
18743
+ "type": "string"
18744
+ },
18745
+ "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
18746
+ },
18747
+ "required": [
18748
+ "caller",
18749
+ "contractVersion",
18750
+ "requestId",
18751
+ "workspaceId",
18752
+ "correlation",
18753
+ "operation",
18754
+ "requestedAt",
18755
+ "parameters"
18756
+ ],
18757
+ "type": "object"
18758
+ }
18759
+ }
18760
+ },
18761
+ "required": true
18762
+ },
18763
+ "responses": {
18764
+ "200": {
18765
+ "content": {
18766
+ "application/json": {
18767
+ "schema": {
18768
+ "$defs": {
18769
+ "__schema0": {
18770
+ "anyOf": [
18771
+ { "type": "string" },
18772
+ { "type": "number" },
18773
+ { "type": "boolean" },
18774
+ { "type": "null" },
18775
+ { "items": { "$ref": "#/$defs/__schema0" }, "type": "array" },
18776
+ {
18777
+ "additionalProperties": { "$ref": "#/$defs/__schema0" },
18778
+ "propertyNames": { "type": "string" },
18779
+ "type": "object"
18780
+ }
18781
+ ]
18782
+ }
18783
+ },
18784
+ "additionalProperties": false,
18785
+ "properties": {
18786
+ "contractVersion": {
18787
+ "additionalProperties": false,
18788
+ "properties": {
18789
+ "major": {
18790
+ "exclusiveMinimum": 0,
18791
+ "maximum": 9007199254740991,
18792
+ "type": "integer"
18793
+ },
18794
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18795
+ },
18796
+ "required": ["major", "minor"],
18797
+ "type": "object"
18798
+ },
18799
+ "correlation": {
18800
+ "additionalProperties": false,
18801
+ "properties": {
18802
+ "causationCommandId": {},
18803
+ "parentEventId": {},
18804
+ "traceId": {}
18805
+ },
18806
+ "required": ["traceId"],
18807
+ "type": "object"
18808
+ },
18809
+ "data": {
18810
+ "additionalProperties": false,
18811
+ "properties": {
18812
+ "attemptId": {},
18813
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
18814
+ "events": {
18815
+ "items": {
18816
+ "additionalProperties": false,
18817
+ "properties": {
18818
+ "data": {
18819
+ "additionalProperties": { "$ref": "#/$defs/__schema0" },
18820
+ "propertyNames": { "type": "string" },
18821
+ "type": "object"
18822
+ },
18823
+ "handleId": { "maxLength": 256, "minLength": 1, "type": "string" },
18824
+ "occurredAt": {
18825
+ "format": "date-time",
18826
+ "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))$",
18827
+ "type": "string"
18828
+ },
18829
+ "sequence": {
18830
+ "exclusiveMinimum": 0,
18831
+ "maximum": 9007199254740991,
18832
+ "type": "integer"
18833
+ },
18834
+ "type": {
18835
+ "enum": ["status", "output", "interaction", "usage", "artifact"],
18836
+ "type": "string"
18837
+ }
18838
+ },
18839
+ "required": ["handleId", "sequence", "occurredAt", "type", "data"],
18840
+ "type": "object"
18841
+ },
18842
+ "maxItems": 256,
18843
+ "type": "array"
18844
+ },
18845
+ "executionId": {},
18846
+ "intentId": {
18847
+ "format": "uuid",
18848
+ "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)$",
18849
+ "type": "string"
18850
+ },
18851
+ "nextSequence": {
18852
+ "maximum": 9007199254740991,
18853
+ "minimum": 0,
18854
+ "type": "integer"
18855
+ },
18856
+ "observedTarget": {
18857
+ "additionalProperties": false,
18858
+ "properties": {
18859
+ "generation": {
18860
+ "additionalProperties": false,
18861
+ "properties": {
18862
+ "attemptId": {},
18863
+ "inferenceId": {
18864
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$",
18865
+ "type": "string"
18866
+ },
18867
+ "inferenceKey": {
18868
+ "maxLength": 8192,
18869
+ "minLength": 1,
18870
+ "type": "string"
18871
+ },
18872
+ "schemaVersion": {
18873
+ "const": "runtime-observed-generation/v1",
18874
+ "type": "string"
18875
+ },
18876
+ "turnKey": { "maxLength": 4096, "minLength": 1, "type": "string" }
18877
+ },
18878
+ "required": [
18879
+ "schemaVersion",
18880
+ "attemptId",
18881
+ "turnKey",
18882
+ "inferenceId",
18883
+ "inferenceKey"
18884
+ ],
18885
+ "type": "object"
18886
+ },
18887
+ "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" },
18888
+ "taskId": { "maxLength": 256, "minLength": 1, "type": "string" }
18889
+ },
18890
+ "readOnly": true,
18891
+ "required": ["sessionId", "taskId"],
18892
+ "type": "object"
18893
+ },
18894
+ "requestedTarget": {
18895
+ "additionalProperties": false,
18896
+ "properties": {
18897
+ "generation": {
18898
+ "maximum": 9007199254740991,
18899
+ "minimum": 0,
18900
+ "type": "integer"
18901
+ },
18902
+ "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" },
18903
+ "taskId": { "maxLength": 256, "minLength": 1, "type": "string" }
18904
+ },
18905
+ "readOnly": true,
18906
+ "required": ["sessionId", "taskId", "generation"],
18907
+ "type": "object"
18908
+ },
18909
+ "runtimeSessionId": {},
18910
+ "schemaVersion": { "const": "pi-lead-dispatch/v1", "type": "string" }
18911
+ },
18912
+ "required": [
18913
+ "schemaVersion",
18914
+ "dispatchId",
18915
+ "intentId",
18916
+ "executionId",
18917
+ "attemptId",
18918
+ "runtimeSessionId",
18919
+ "events",
18920
+ "nextSequence"
18921
+ ],
18922
+ "type": "object"
18923
+ },
18924
+ "requestId": {}
18925
+ },
18926
+ "required": ["contractVersion", "requestId", "correlation", "data"],
18927
+ "type": "object"
18928
+ }
18929
+ }
18930
+ },
18931
+ "description": "Successful response"
18932
+ },
18933
+ "default": {
18934
+ "content": {
18935
+ "application/json": {
18936
+ "schema": {
18937
+ "additionalProperties": false,
18938
+ "properties": {
18939
+ "contractVersion": {
18940
+ "additionalProperties": false,
18941
+ "properties": {
18942
+ "major": {
18943
+ "exclusiveMinimum": 0,
18944
+ "maximum": 9007199254740991,
18945
+ "type": "integer"
18946
+ },
18947
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
18948
+ },
18949
+ "required": ["major", "minor"],
18950
+ "type": "object"
18951
+ },
18952
+ "correlation": {
18953
+ "additionalProperties": false,
18954
+ "properties": {
18955
+ "causationCommandId": {},
18956
+ "parentEventId": {},
18957
+ "traceId": {}
18958
+ },
18959
+ "required": ["traceId"],
18960
+ "type": "object"
18961
+ },
18962
+ "error": {
18963
+ "additionalProperties": false,
18964
+ "properties": {
18965
+ "class": {
18966
+ "enum": [
18967
+ "validation",
18968
+ "authentication",
18969
+ "authorization",
18970
+ "conflict",
18971
+ "stale_reference",
18972
+ "capability_mismatch",
18973
+ "runtime_unavailable",
18974
+ "internal"
18975
+ ],
18976
+ "type": "string"
18977
+ },
18978
+ "code": {
18979
+ "maxLength": 96,
18980
+ "minLength": 1,
18981
+ "pattern": "^[A-Z][A-Z0-9_]*$",
18982
+ "type": "string"
18983
+ },
18984
+ "details": {
18985
+ "additionalProperties": {},
18986
+ "propertyNames": { "maxLength": 64, "type": "string" },
18987
+ "type": "object"
18988
+ },
18989
+ "message": { "maxLength": 512, "minLength": 1, "type": "string" },
18990
+ "remediation": { "maxLength": 256, "minLength": 1, "type": "string" },
18991
+ "retryable": { "type": "boolean" },
18992
+ "source": {
18993
+ "enum": [
18994
+ "client",
18995
+ "auth",
18996
+ "policy",
18997
+ "runtime",
18998
+ "provider",
18999
+ "persistence",
19000
+ "workflow",
19001
+ "system"
19002
+ ],
19003
+ "type": "string"
19004
+ }
19005
+ },
19006
+ "required": ["class", "code", "message", "retryable", "source"],
19007
+ "type": "object"
19008
+ },
19009
+ "requestId": {}
19010
+ },
19011
+ "required": ["contractVersion", "requestId", "correlation", "error"],
19012
+ "type": "object"
19013
+ }
19014
+ }
19015
+ },
19016
+ "description": "Normalized error response"
19017
+ }
19018
+ },
19019
+ "security": [{ "serviceBearer": [] }]
19020
+ }
19021
+ },
19022
+ "/v3/pi-durable/lead-dispatches/questions/answer": {
19023
+ "post": {
19024
+ "operationId": "pi-durable.lead.question-answer",
19025
+ "requestBody": {
19026
+ "content": {
19027
+ "application/json": {
19028
+ "schema": {
19029
+ "additionalProperties": false,
19030
+ "properties": {
19031
+ "caller": {
19032
+ "additionalProperties": false,
19033
+ "properties": {
19034
+ "servicePrincipalId": {
19035
+ "maxLength": 64,
19036
+ "minLength": 5,
19037
+ "pattern": "^svc_[a-z][a-z0-9-]*$",
19038
+ "type": "string"
19039
+ }
19040
+ },
19041
+ "required": ["servicePrincipalId"],
19042
+ "type": "object"
19043
+ },
19044
+ "commandId": { "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
19045
+ "contractVersion": {
19046
+ "additionalProperties": false,
19047
+ "properties": {
19048
+ "major": {
19049
+ "exclusiveMinimum": 0,
19050
+ "maximum": 9007199254740991,
19051
+ "type": "integer"
19052
+ },
19053
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
19054
+ },
19055
+ "required": ["major", "minor"],
19056
+ "type": "object"
19057
+ },
19058
+ "correlation": {
19059
+ "additionalProperties": false,
19060
+ "properties": {
19061
+ "causationCommandId": {
19062
+ "pattern": "^cmd_[0-9A-HJKMNP-TV-Z]{26}$",
19063
+ "type": "string"
19064
+ },
19065
+ "parentEventId": {
19066
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
19067
+ "type": "string"
19068
+ },
19069
+ "traceId": { "pattern": "^trc_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
19070
+ },
19071
+ "required": ["traceId"],
19072
+ "type": "object"
19073
+ },
19074
+ "idempotencyKey": {
19075
+ "maxLength": 128,
19076
+ "minLength": 16,
19077
+ "pattern": "^[A-Za-z0-9._:-]+$",
19078
+ "type": "string"
19079
+ },
19080
+ "issuedAt": {
19081
+ "format": "date-time",
19082
+ "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))$",
19083
+ "type": "string"
19084
+ },
19085
+ "operation": { "const": "pi-durable.lead.question-answer", "type": "string" },
19086
+ "payload": {
19087
+ "additionalProperties": false,
19088
+ "properties": {
19089
+ "answers": {
19090
+ "items": {
19091
+ "anyOf": [
19092
+ {
19093
+ "additionalProperties": false,
19094
+ "properties": {
19095
+ "questionId": {
19096
+ "maxLength": 64,
19097
+ "minLength": 1,
19098
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
19099
+ "type": "string"
19100
+ },
19101
+ "text": { "maxLength": 16384, "minLength": 1, "type": "string" }
19102
+ },
19103
+ "required": ["questionId", "text"],
19104
+ "type": "object"
19105
+ },
19106
+ {
19107
+ "additionalProperties": false,
19108
+ "properties": {
19109
+ "optionIds": {
19110
+ "items": {
19111
+ "maxLength": 64,
19112
+ "minLength": 1,
19113
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
19114
+ "type": "string"
19115
+ },
19116
+ "maxItems": 16,
19117
+ "minItems": 1,
19118
+ "type": "array"
19119
+ },
19120
+ "questionId": {
19121
+ "maxLength": 64,
19122
+ "minLength": 1,
19123
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
19124
+ "type": "string"
19125
+ }
19126
+ },
19127
+ "required": ["questionId", "optionIds"],
19128
+ "type": "object"
19129
+ },
19130
+ {
19131
+ "additionalProperties": false,
19132
+ "properties": {
19133
+ "questionId": {
19134
+ "maxLength": 64,
19135
+ "minLength": 1,
19136
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
19137
+ "type": "string"
19138
+ },
19139
+ "skipped": { "const": true, "type": "boolean" }
19140
+ },
19141
+ "required": ["questionId", "skipped"],
19142
+ "type": "object"
19143
+ }
19144
+ ]
19145
+ },
19146
+ "maxItems": 8,
19147
+ "type": "array"
19148
+ },
19149
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
19150
+ "requestId": { "pattern": "^pi-question:[a-f0-9]{32}$", "type": "string" }
19151
+ },
19152
+ "required": ["dispatchId", "requestId", "answers"],
19153
+ "type": "object"
19154
+ },
19155
+ "payloadHash": { "pattern": "^[a-f0-9]{64}$", "type": "string" },
19156
+ "projectId": { "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
19157
+ "requestId": { "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" },
19158
+ "workspaceId": { "pattern": "^wsp_[0-9A-HJKMNP-TV-Z]{26}$", "type": "string" }
19159
+ },
19160
+ "required": [
19161
+ "caller",
19162
+ "contractVersion",
19163
+ "requestId",
19164
+ "workspaceId",
19165
+ "correlation",
19166
+ "commandId",
19167
+ "idempotencyKey",
19168
+ "payloadHash",
19169
+ "operation",
19170
+ "issuedAt",
19171
+ "payload"
19172
+ ],
19173
+ "type": "object"
19174
+ }
19175
+ }
19176
+ },
19177
+ "required": true
19178
+ },
19179
+ "responses": {
19180
+ "200": {
19181
+ "content": {
19182
+ "application/json": {
19183
+ "schema": {
19184
+ "$defs": {
19185
+ "__schema0": {
19186
+ "anyOf": [
19187
+ { "type": "string" },
19188
+ { "type": "number" },
19189
+ { "type": "boolean" },
19190
+ { "type": "null" },
19191
+ { "items": { "$ref": "#/$defs/__schema0" }, "type": "array" },
19192
+ {
19193
+ "additionalProperties": { "$ref": "#/$defs/__schema0" },
19194
+ "propertyNames": { "type": "string" },
19195
+ "type": "object"
19196
+ }
19197
+ ]
19198
+ },
19199
+ "__schema1": {
19200
+ "anyOf": [
19201
+ { "type": "string" },
19202
+ { "type": "number" },
19203
+ { "type": "boolean" },
19204
+ { "type": "null" },
19205
+ { "items": { "$ref": "#/$defs/__schema1" }, "type": "array" },
19206
+ {
19207
+ "additionalProperties": { "$ref": "#/$defs/__schema1" },
19208
+ "propertyNames": { "type": "string" },
19209
+ "type": "object"
19210
+ }
19211
+ ]
19212
+ }
19213
+ },
19214
+ "additionalProperties": false,
19215
+ "properties": {
19216
+ "contractVersion": {
19217
+ "additionalProperties": false,
19218
+ "properties": {
19219
+ "major": {
19220
+ "exclusiveMinimum": 0,
19221
+ "maximum": 9007199254740991,
19222
+ "type": "integer"
19223
+ },
19224
+ "minor": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }
19225
+ },
19226
+ "required": ["major", "minor"],
19227
+ "type": "object"
19228
+ },
19229
+ "correlation": {
19230
+ "additionalProperties": false,
19231
+ "properties": {
19232
+ "causationCommandId": {},
19233
+ "parentEventId": {},
19234
+ "traceId": {}
19235
+ },
19236
+ "required": ["traceId"],
19237
+ "type": "object"
19238
+ },
19239
+ "data": {
19240
+ "additionalProperties": false,
19241
+ "properties": {
19242
+ "attemptId": {},
19243
+ "dispatchId": { "pattern": "^dispatch_[a-f0-9]{32}$", "type": "string" },
19244
+ "executionId": {},
19245
+ "intentId": {
19246
+ "format": "uuid",
19247
+ "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)$",
19248
+ "type": "string"
19249
+ },
19250
+ "observedTarget": {
19251
+ "additionalProperties": false,
19252
+ "properties": {
19253
+ "generation": {
19254
+ "additionalProperties": false,
19255
+ "properties": {
19256
+ "attemptId": {},
19257
+ "inferenceId": {
19258
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$",
19259
+ "type": "string"
19260
+ },
19261
+ "inferenceKey": {
19262
+ "maxLength": 8192,
19263
+ "minLength": 1,
19264
+ "type": "string"
19265
+ },
19266
+ "schemaVersion": {
19267
+ "const": "runtime-observed-generation/v1",
19268
+ "type": "string"
19269
+ },
19270
+ "turnKey": { "maxLength": 4096, "minLength": 1, "type": "string" }
19271
+ },
19272
+ "required": [
19273
+ "schemaVersion",
19274
+ "attemptId",
19275
+ "turnKey",
19276
+ "inferenceId",
19277
+ "inferenceKey"
19278
+ ],
19279
+ "type": "object"
19280
+ },
19281
+ "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" },
19282
+ "taskId": { "maxLength": 256, "minLength": 1, "type": "string" }
19283
+ },
19284
+ "readOnly": true,
19285
+ "required": ["sessionId", "taskId"],
19286
+ "type": "object"
19287
+ },
19288
+ "outcome": {
19289
+ "enum": ["answered", "already_answered", "expired"],
19290
+ "type": "string"
19291
+ },
19292
+ "questionSchemaVersion": {
19293
+ "const": "pi-lead-question-answer/v1",
19294
+ "type": "string"
19295
+ },
19296
+ "requestEventId": { "maxLength": 256, "minLength": 1, "type": "string" },
19297
+ "requestId": { "pattern": "^pi-question:[a-f0-9]{32}$", "type": "string" },
19298
+ "requestedTarget": {
19299
+ "additionalProperties": false,
19300
+ "properties": {
19301
+ "generation": {
19302
+ "maximum": 9007199254740991,
19303
+ "minimum": 0,
19304
+ "type": "integer"
19305
+ },
19306
+ "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" },
19307
+ "taskId": { "maxLength": 256, "minLength": 1, "type": "string" }
19308
+ },
19309
+ "readOnly": true,
19310
+ "required": ["sessionId", "taskId", "generation"],
19311
+ "type": "object"
19312
+ },
19313
+ "runtimeSessionId": {},
19314
+ "schemaVersion": { "const": "pi-lead-dispatch/v1", "type": "string" },
19315
+ "state": {
19316
+ "enum": [
19317
+ "starting",
19318
+ "running",
19319
+ "awaiting_input",
19320
+ "cancelling",
19321
+ "completed",
19322
+ "failed",
19323
+ "cancelled",
19324
+ "timed_out",
19325
+ "unknown"
19326
+ ],
19327
+ "type": "string"
19328
+ },
19329
+ "status": {
19330
+ "additionalProperties": false,
19331
+ "properties": {
19332
+ "error": {
19333
+ "additionalProperties": false,
19334
+ "properties": {
19335
+ "classification": {
19336
+ "enum": [
19337
+ "validation",
19338
+ "unsupported",
19339
+ "unavailable",
19340
+ "conflict",
19341
+ "timeout",
19342
+ "cancelled",
19343
+ "runtime",
19344
+ "infrastructure",
19345
+ "unknown"
19346
+ ],
19347
+ "type": "string"
19348
+ },
19349
+ "code": {
19350
+ "maxLength": 128,
19351
+ "minLength": 1,
19352
+ "pattern": "^[A-Z][A-Z0-9_]*$",
19353
+ "type": "string"
19354
+ },
19355
+ "details": {
19356
+ "additionalProperties": { "$ref": "#/$defs/__schema1" },
19357
+ "propertyNames": { "type": "string" },
19358
+ "type": "object"
19359
+ },
19360
+ "message": { "maxLength": 4096, "minLength": 1, "type": "string" },
19361
+ "retryable": { "type": "boolean" }
19362
+ },
19363
+ "required": ["code", "classification", "message", "retryable"],
19364
+ "type": "object"
19365
+ },
19366
+ "handle": {
19367
+ "additionalProperties": false,
19368
+ "properties": {
19369
+ "attemptId": {},
19370
+ "externalSessionId": {},
19371
+ "handleId": { "maxLength": 256, "minLength": 1, "type": "string" },
19372
+ "startedAt": {
19373
+ "format": "date-time",
19374
+ "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))$",
19375
+ "type": "string"
19376
+ }
19377
+ },
19378
+ "required": ["handleId", "attemptId", "startedAt"],
19379
+ "type": "object"
19380
+ },
19381
+ "observedAt": {
19382
+ "format": "date-time",
19383
+ "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))$",
19384
+ "type": "string"
19385
+ },
19386
+ "observedGeneration": {
19387
+ "additionalProperties": false,
19388
+ "properties": {
19389
+ "attemptId": {},
19390
+ "inferenceId": {
19391
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$",
19392
+ "type": "string"
19393
+ },
19394
+ "inferenceKey": {
19395
+ "maxLength": 8192,
19396
+ "minLength": 1,
19397
+ "type": "string"
19398
+ },
19399
+ "schemaVersion": {
19400
+ "const": "runtime-observed-generation/v1",
19401
+ "type": "string"
19402
+ },
19403
+ "turnKey": { "maxLength": 4096, "minLength": 1, "type": "string" }
19404
+ },
19405
+ "required": [
19406
+ "schemaVersion",
19407
+ "attemptId",
19408
+ "turnKey",
19409
+ "inferenceId",
19410
+ "inferenceKey"
19411
+ ],
19412
+ "type": "object"
19413
+ },
19414
+ "result": {
19415
+ "additionalProperties": false,
19416
+ "properties": {
19417
+ "artifacts": {
19418
+ "items": {
19419
+ "additionalProperties": false,
19420
+ "properties": {
19421
+ "artifactId": {},
19422
+ "digest": {
19423
+ "pattern": "^sha256:[a-f0-9]{64}$",
19424
+ "type": "string"
19425
+ },
19426
+ "locator": {
19427
+ "maxLength": 512,
19428
+ "minLength": 1,
19429
+ "type": "string"
19430
+ },
19431
+ "mediaType": {
19432
+ "maxLength": 128,
19433
+ "minLength": 1,
19434
+ "type": "string"
19435
+ },
19436
+ "sizeBytes": {
19437
+ "maximum": 9007199254740991,
19438
+ "minimum": 0,
19439
+ "type": "integer"
19440
+ },
19441
+ "version": {
19442
+ "exclusiveMinimum": 0,
19443
+ "maximum": 9007199254740991,
19444
+ "type": "integer"
19445
+ }
19446
+ },
19447
+ "required": [
19448
+ "artifactId",
19449
+ "version",
19450
+ "mediaType",
19451
+ "digest",
19452
+ "sizeBytes",
19453
+ "locator"
19454
+ ],
19455
+ "type": "object"
19456
+ },
19457
+ "maxItems": 1024,
19458
+ "type": "array"
19459
+ },
19460
+ "outcome": { "const": "completed", "type": "string" },
19461
+ "output": { "$ref": "#/$defs/__schema0" },
19462
+ "usage": {
19463
+ "additionalProperties": false,
19464
+ "properties": {
19465
+ "accounting": {
19466
+ "additionalProperties": false,
19467
+ "description": "Reported accounting metadata only; consumers must verify source authority before charging.",
19468
+ "properties": {
19469
+ "chargedMicrounits": {
19470
+ "maximum": 9007199254740991,
19471
+ "minimum": 0,
19472
+ "type": "integer"
19473
+ },
19474
+ "costExact": { "const": true, "type": "boolean" },
19475
+ "currency": { "const": "USD", "type": "string" },
19476
+ "fundingSource": {
19477
+ "enum": [
19478
+ "hq_managed",
19479
+ "byo_api",
19480
+ "external_subscription"
19481
+ ],
19482
+ "type": "string"
19483
+ },
19484
+ "schemaVersion": { "const": 1, "type": "number" },
19485
+ "sourceId": {
19486
+ "maxLength": 256,
19487
+ "minLength": 1,
19488
+ "type": "string"
19489
+ }
19490
+ },
19491
+ "required": [
19492
+ "schemaVersion",
19493
+ "sourceId",
19494
+ "fundingSource",
19495
+ "currency",
19496
+ "chargedMicrounits",
19497
+ "costExact"
19498
+ ],
19499
+ "type": "object"
19500
+ },
19501
+ "cost": {
19502
+ "additionalProperties": false,
19503
+ "properties": {
19504
+ "amount": {
19505
+ "pattern": "^\\d+(?:\\.\\d+)?$",
19506
+ "type": "string"
19507
+ },
19508
+ "currency": { "pattern": "^[A-Z]{3}$", "type": "string" }
19509
+ },
19510
+ "required": ["amount", "currency"],
19511
+ "type": "object"
19512
+ },
19513
+ "durationMs": {
19514
+ "maximum": 9007199254740991,
19515
+ "minimum": 0,
19516
+ "type": "integer"
19517
+ },
19518
+ "inputTokens": {
19519
+ "maximum": 9007199254740991,
19520
+ "minimum": 0,
19521
+ "type": "integer"
19522
+ },
19523
+ "outputTokens": {
19524
+ "maximum": 9007199254740991,
19525
+ "minimum": 0,
19526
+ "type": "integer"
19527
+ }
19528
+ },
19529
+ "required": ["inputTokens", "outputTokens", "durationMs"],
19530
+ "type": "object"
19531
+ }
19532
+ },
19533
+ "required": ["outcome", "usage", "artifacts"],
19534
+ "type": "object"
19535
+ },
19536
+ "state": {
19537
+ "enum": [
19538
+ "starting",
19539
+ "running",
19540
+ "awaiting_input",
19541
+ "cancelling",
19542
+ "completed",
19543
+ "failed",
19544
+ "cancelled",
19545
+ "timed_out",
19546
+ "unknown"
19547
+ ],
19548
+ "type": "string"
19549
+ },
19550
+ "terminalUsage": {
19551
+ "additionalProperties": false,
19552
+ "properties": {
19553
+ "accounting": {
19554
+ "additionalProperties": false,
19555
+ "description": "Reported accounting metadata only; consumers must verify source authority before charging.",
19556
+ "properties": {
19557
+ "chargedMicrounits": {
19558
+ "maximum": 9007199254740991,
19559
+ "minimum": 0,
19560
+ "type": "integer"
19561
+ },
19562
+ "costExact": { "const": true, "type": "boolean" },
19563
+ "currency": { "const": "USD", "type": "string" },
19564
+ "fundingSource": {
19565
+ "enum": ["hq_managed", "byo_api", "external_subscription"],
19566
+ "type": "string"
19567
+ },
19568
+ "schemaVersion": { "const": 1, "type": "number" },
19569
+ "sourceId": {
19570
+ "maxLength": 256,
19571
+ "minLength": 1,
19572
+ "type": "string"
19573
+ }
19574
+ },
19575
+ "required": [
19576
+ "schemaVersion",
19577
+ "sourceId",
19578
+ "fundingSource",
19579
+ "currency",
19580
+ "chargedMicrounits",
19581
+ "costExact"
19582
+ ],
19583
+ "type": "object"
19584
+ },
19585
+ "cost": {
19586
+ "additionalProperties": false,
19587
+ "properties": {
19588
+ "amount": { "pattern": "^\\d+(?:\\.\\d+)?$", "type": "string" },
19589
+ "currency": { "pattern": "^[A-Z]{3}$", "type": "string" }
19590
+ },
19591
+ "required": ["amount", "currency"],
19592
+ "type": "object"
19593
+ },
19594
+ "durationMs": {
19595
+ "maximum": 9007199254740991,
19596
+ "minimum": 0,
19597
+ "type": "integer"
19598
+ },
19599
+ "inputTokens": {
19600
+ "maximum": 9007199254740991,
19601
+ "minimum": 0,
19602
+ "type": "integer"
19603
+ },
19604
+ "outputTokens": {
19605
+ "maximum": 9007199254740991,
19606
+ "minimum": 0,
19607
+ "type": "integer"
19608
+ }
19609
+ },
19610
+ "required": ["inputTokens", "outputTokens", "durationMs"],
19611
+ "type": "object"
19612
+ }
19613
+ },
19614
+ "required": ["handle", "state", "observedAt"],
19615
+ "type": "object"
19616
+ }
19617
+ },
19618
+ "required": [
19619
+ "schemaVersion",
18613
19620
  "dispatchId",
18614
19621
  "intentId",
18615
19622
  "executionId",
18616
19623
  "attemptId",
18617
19624
  "runtimeSessionId",
18618
- "events",
18619
- "nextSequence"
19625
+ "questionSchemaVersion",
19626
+ "requestId",
19627
+ "requestEventId",
19628
+ "outcome",
19629
+ "state",
19630
+ "status"
18620
19631
  ],
18621
19632
  "type": "object"
18622
19633
  },