@mhome/conversation-protocol 3.16.0 → 4.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.
- package/README.md +11 -8
- package/fixtures/execution/app-facade-prepared.v1.json +12 -25
- package/fixtures/execution/interaction-required-event.v1.json +19 -21
- package/fixtures/execution/user-action-required-event.v1.json +85 -0
- package/fixtures/interaction-answer.request.json +9 -4
- package/fixtures/interaction.event.json +12 -6
- package/fixtures/interaction.request.json +7 -2
- package/manifest/targets.v1.json +1 -1
- package/package.json +1 -1
- package/protocol.json +1 -1
- package/schema/conversation-frame.v2.schema.json +253 -216
- package/schema/execution/envelope.v1.schema.json +276 -187
- package/fixtures/execution/app-facade-user-action.v1.json +0 -50
|
@@ -454,29 +454,19 @@
|
|
|
454
454
|
"additionalProperties": false,
|
|
455
455
|
"required": [
|
|
456
456
|
"batch_id",
|
|
457
|
-
"
|
|
457
|
+
"responses"
|
|
458
458
|
],
|
|
459
459
|
"properties": {
|
|
460
460
|
"batch_id": {
|
|
461
|
-
"
|
|
461
|
+
"type": "string",
|
|
462
|
+
"minLength": 1,
|
|
463
|
+
"pattern": "\\S"
|
|
462
464
|
},
|
|
463
|
-
"
|
|
465
|
+
"responses": {
|
|
464
466
|
"type": "array",
|
|
467
|
+
"minItems": 1,
|
|
465
468
|
"items": {
|
|
466
|
-
"
|
|
467
|
-
"additionalProperties": false,
|
|
468
|
-
"required": [
|
|
469
|
-
"action_id",
|
|
470
|
-
"proceed"
|
|
471
|
-
],
|
|
472
|
-
"properties": {
|
|
473
|
-
"action_id": {
|
|
474
|
-
"$ref": "#/$defs/identifier"
|
|
475
|
-
},
|
|
476
|
-
"proceed": {
|
|
477
|
-
"type": "boolean"
|
|
478
|
-
}
|
|
479
|
-
}
|
|
469
|
+
"$ref": "#/$defs/interactionItemResponse"
|
|
480
470
|
}
|
|
481
471
|
}
|
|
482
472
|
}
|
|
@@ -705,166 +695,15 @@
|
|
|
705
695
|
}
|
|
706
696
|
}
|
|
707
697
|
},
|
|
708
|
-
"preview_value": {
|
|
709
|
-
"oneOf": [
|
|
710
|
-
{
|
|
711
|
-
"type": "object",
|
|
712
|
-
"additionalProperties": false,
|
|
713
|
-
"required": [
|
|
714
|
-
"type",
|
|
715
|
-
"text"
|
|
716
|
-
],
|
|
717
|
-
"properties": {
|
|
718
|
-
"type": {
|
|
719
|
-
"const": "text"
|
|
720
|
-
},
|
|
721
|
-
"text": {
|
|
722
|
-
"type": "string"
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
"type": "object",
|
|
728
|
-
"additionalProperties": false,
|
|
729
|
-
"required": [
|
|
730
|
-
"type",
|
|
731
|
-
"items"
|
|
732
|
-
],
|
|
733
|
-
"properties": {
|
|
734
|
-
"type": {
|
|
735
|
-
"const": "text_list"
|
|
736
|
-
},
|
|
737
|
-
"items": {
|
|
738
|
-
"type": "array",
|
|
739
|
-
"items": {
|
|
740
|
-
"type": "string"
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
},
|
|
745
|
-
{
|
|
746
|
-
"type": "object",
|
|
747
|
-
"additionalProperties": false,
|
|
748
|
-
"required": [
|
|
749
|
-
"type",
|
|
750
|
-
"value"
|
|
751
|
-
],
|
|
752
|
-
"properties": {
|
|
753
|
-
"type": {
|
|
754
|
-
"const": "number"
|
|
755
|
-
},
|
|
756
|
-
"value": {
|
|
757
|
-
"type": "number"
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
},
|
|
761
|
-
{
|
|
762
|
-
"type": "object",
|
|
763
|
-
"additionalProperties": false,
|
|
764
|
-
"required": [
|
|
765
|
-
"type",
|
|
766
|
-
"value"
|
|
767
|
-
],
|
|
768
|
-
"properties": {
|
|
769
|
-
"type": {
|
|
770
|
-
"const": "bool"
|
|
771
|
-
},
|
|
772
|
-
"value": {
|
|
773
|
-
"type": "boolean"
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
]
|
|
778
|
-
},
|
|
779
|
-
"interaction_preview": {
|
|
780
|
-
"type": "object",
|
|
781
|
-
"additionalProperties": false,
|
|
782
|
-
"required": [
|
|
783
|
-
"actionCode",
|
|
784
|
-
"title",
|
|
785
|
-
"message",
|
|
786
|
-
"tone",
|
|
787
|
-
"details",
|
|
788
|
-
"proceedLabel",
|
|
789
|
-
"rejectLabel"
|
|
790
|
-
],
|
|
791
|
-
"properties": {
|
|
792
|
-
"actionCode": {
|
|
793
|
-
"$ref": "#/$defs/identifier"
|
|
794
|
-
},
|
|
795
|
-
"title": {
|
|
796
|
-
"$ref": "#/$defs/identifier"
|
|
797
|
-
},
|
|
798
|
-
"message": {
|
|
799
|
-
"type": "string"
|
|
800
|
-
},
|
|
801
|
-
"tone": {
|
|
802
|
-
"enum": [
|
|
803
|
-
"normal",
|
|
804
|
-
"danger"
|
|
805
|
-
]
|
|
806
|
-
},
|
|
807
|
-
"details": {
|
|
808
|
-
"type": "array",
|
|
809
|
-
"items": {
|
|
810
|
-
"type": "object",
|
|
811
|
-
"additionalProperties": false,
|
|
812
|
-
"required": [
|
|
813
|
-
"label",
|
|
814
|
-
"value"
|
|
815
|
-
],
|
|
816
|
-
"properties": {
|
|
817
|
-
"label": {
|
|
818
|
-
"$ref": "#/$defs/identifier"
|
|
819
|
-
},
|
|
820
|
-
"value": {
|
|
821
|
-
"$ref": "#/$defs/preview_value"
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
},
|
|
826
|
-
"proceedLabel": {
|
|
827
|
-
"$ref": "#/$defs/identifier"
|
|
828
|
-
},
|
|
829
|
-
"rejectLabel": {
|
|
830
|
-
"$ref": "#/$defs/identifier"
|
|
831
|
-
},
|
|
832
|
-
"clientTask": {
|
|
833
|
-
"type": "object",
|
|
834
|
-
"additionalProperties": false,
|
|
835
|
-
"required": [
|
|
836
|
-
"type",
|
|
837
|
-
"integrationId",
|
|
838
|
-
"sessionId"
|
|
839
|
-
],
|
|
840
|
-
"properties": {
|
|
841
|
-
"type": {
|
|
842
|
-
"const": "connect_integration"
|
|
843
|
-
},
|
|
844
|
-
"integrationId": {
|
|
845
|
-
"type": "string",
|
|
846
|
-
"minLength": 1,
|
|
847
|
-
"pattern": "\\S"
|
|
848
|
-
},
|
|
849
|
-
"sessionId": {
|
|
850
|
-
"type": "string",
|
|
851
|
-
"minLength": 1,
|
|
852
|
-
"pattern": "\\S"
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
},
|
|
858
698
|
"prepared_action": {
|
|
859
699
|
"type": "object",
|
|
860
700
|
"additionalProperties": false,
|
|
861
701
|
"required": [
|
|
862
702
|
"action_id",
|
|
863
703
|
"operation_id",
|
|
864
|
-
"
|
|
704
|
+
"card",
|
|
865
705
|
"payload",
|
|
866
|
-
"revision"
|
|
867
|
-
"interaction_kind"
|
|
706
|
+
"revision"
|
|
868
707
|
],
|
|
869
708
|
"properties": {
|
|
870
709
|
"action_id": {
|
|
@@ -873,19 +712,13 @@
|
|
|
873
712
|
"operation_id": {
|
|
874
713
|
"$ref": "#/$defs/identifier"
|
|
875
714
|
},
|
|
876
|
-
"preview": {
|
|
877
|
-
"$ref": "#/$defs/interaction_preview"
|
|
878
|
-
},
|
|
879
715
|
"payload": true,
|
|
880
716
|
"revision": {
|
|
881
717
|
"type": "integer",
|
|
882
718
|
"minimum": 0
|
|
883
719
|
},
|
|
884
|
-
"
|
|
885
|
-
"
|
|
886
|
-
"approval",
|
|
887
|
-
"user_action"
|
|
888
|
-
]
|
|
720
|
+
"card": {
|
|
721
|
+
"$ref": "#/$defs/interactionCard"
|
|
889
722
|
}
|
|
890
723
|
}
|
|
891
724
|
},
|
|
@@ -993,7 +826,7 @@
|
|
|
993
826
|
"required": [
|
|
994
827
|
"type",
|
|
995
828
|
"batch_id",
|
|
996
|
-
"
|
|
829
|
+
"items",
|
|
997
830
|
"usage"
|
|
998
831
|
],
|
|
999
832
|
"properties": {
|
|
@@ -1003,14 +836,31 @@
|
|
|
1003
836
|
"batch_id": {
|
|
1004
837
|
"$ref": "#/$defs/identifier"
|
|
1005
838
|
},
|
|
1006
|
-
"
|
|
839
|
+
"usage": {
|
|
840
|
+
"$ref": "#/$defs/usage"
|
|
841
|
+
},
|
|
842
|
+
"items": {
|
|
1007
843
|
"type": "array",
|
|
844
|
+
"minItems": 1,
|
|
1008
845
|
"items": {
|
|
1009
|
-
"
|
|
846
|
+
"type": "object",
|
|
847
|
+
"additionalProperties": false,
|
|
848
|
+
"required": [
|
|
849
|
+
"item",
|
|
850
|
+
"prepared_action_id"
|
|
851
|
+
],
|
|
852
|
+
"properties": {
|
|
853
|
+
"item": {
|
|
854
|
+
"$ref": "#/$defs/interactionItem"
|
|
855
|
+
},
|
|
856
|
+
"prepared_action_id": {
|
|
857
|
+
"type": [
|
|
858
|
+
"string",
|
|
859
|
+
"null"
|
|
860
|
+
]
|
|
861
|
+
}
|
|
862
|
+
}
|
|
1010
863
|
}
|
|
1011
|
-
},
|
|
1012
|
-
"usage": {
|
|
1013
|
-
"$ref": "#/$defs/usage"
|
|
1014
864
|
}
|
|
1015
865
|
}
|
|
1016
866
|
},
|
|
@@ -1365,9 +1215,6 @@
|
|
|
1365
1215
|
],
|
|
1366
1216
|
"properties": {
|
|
1367
1217
|
"value": true,
|
|
1368
|
-
"continuation": {
|
|
1369
|
-
"$ref": "#/$defs/prepared_action"
|
|
1370
|
-
},
|
|
1371
1218
|
"context_invalidation": {
|
|
1372
1219
|
"type": "object",
|
|
1373
1220
|
"additionalProperties": false,
|
|
@@ -1965,6 +1812,248 @@
|
|
|
1965
1812
|
}
|
|
1966
1813
|
}
|
|
1967
1814
|
]
|
|
1815
|
+
},
|
|
1816
|
+
"interactionCard": {
|
|
1817
|
+
"type": "object",
|
|
1818
|
+
"additionalProperties": false,
|
|
1819
|
+
"required": [
|
|
1820
|
+
"type",
|
|
1821
|
+
"title",
|
|
1822
|
+
"message",
|
|
1823
|
+
"tone",
|
|
1824
|
+
"continueLabel",
|
|
1825
|
+
"cancelLabel",
|
|
1826
|
+
"data"
|
|
1827
|
+
],
|
|
1828
|
+
"properties": {
|
|
1829
|
+
"type": {
|
|
1830
|
+
"type": "string",
|
|
1831
|
+
"minLength": 1,
|
|
1832
|
+
"pattern": "^[a-z0-9._]+$"
|
|
1833
|
+
},
|
|
1834
|
+
"title": {
|
|
1835
|
+
"type": "string",
|
|
1836
|
+
"minLength": 1,
|
|
1837
|
+
"pattern": "\\S"
|
|
1838
|
+
},
|
|
1839
|
+
"message": {
|
|
1840
|
+
"type": "string"
|
|
1841
|
+
},
|
|
1842
|
+
"tone": {
|
|
1843
|
+
"enum": [
|
|
1844
|
+
"normal",
|
|
1845
|
+
"danger"
|
|
1846
|
+
]
|
|
1847
|
+
},
|
|
1848
|
+
"continueLabel": {
|
|
1849
|
+
"type": "string",
|
|
1850
|
+
"minLength": 1,
|
|
1851
|
+
"pattern": "\\S"
|
|
1852
|
+
},
|
|
1853
|
+
"cancelLabel": {
|
|
1854
|
+
"type": "string",
|
|
1855
|
+
"minLength": 1,
|
|
1856
|
+
"pattern": "\\S"
|
|
1857
|
+
},
|
|
1858
|
+
"data": {
|
|
1859
|
+
"type": "object"
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
"interactionAnswer": {
|
|
1864
|
+
"oneOf": [
|
|
1865
|
+
{
|
|
1866
|
+
"type": "object",
|
|
1867
|
+
"additionalProperties": false,
|
|
1868
|
+
"required": [
|
|
1869
|
+
"action"
|
|
1870
|
+
],
|
|
1871
|
+
"properties": {
|
|
1872
|
+
"action": {
|
|
1873
|
+
"const": "approve"
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
"type": "object",
|
|
1879
|
+
"additionalProperties": false,
|
|
1880
|
+
"required": [
|
|
1881
|
+
"action"
|
|
1882
|
+
],
|
|
1883
|
+
"properties": {
|
|
1884
|
+
"action": {
|
|
1885
|
+
"const": "reject"
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
},
|
|
1889
|
+
{
|
|
1890
|
+
"type": "object",
|
|
1891
|
+
"additionalProperties": false,
|
|
1892
|
+
"required": [
|
|
1893
|
+
"action",
|
|
1894
|
+
"data"
|
|
1895
|
+
],
|
|
1896
|
+
"properties": {
|
|
1897
|
+
"action": {
|
|
1898
|
+
"const": "continue"
|
|
1899
|
+
},
|
|
1900
|
+
"data": {}
|
|
1901
|
+
}
|
|
1902
|
+
},
|
|
1903
|
+
{
|
|
1904
|
+
"type": "object",
|
|
1905
|
+
"additionalProperties": false,
|
|
1906
|
+
"required": [
|
|
1907
|
+
"action"
|
|
1908
|
+
],
|
|
1909
|
+
"properties": {
|
|
1910
|
+
"action": {
|
|
1911
|
+
"const": "cancel"
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
]
|
|
1916
|
+
},
|
|
1917
|
+
"interactionItem": {
|
|
1918
|
+
"type": "object",
|
|
1919
|
+
"additionalProperties": false,
|
|
1920
|
+
"required": [
|
|
1921
|
+
"actionId",
|
|
1922
|
+
"kind",
|
|
1923
|
+
"card"
|
|
1924
|
+
],
|
|
1925
|
+
"properties": {
|
|
1926
|
+
"actionId": {
|
|
1927
|
+
"type": "string",
|
|
1928
|
+
"minLength": 1,
|
|
1929
|
+
"pattern": "\\S"
|
|
1930
|
+
},
|
|
1931
|
+
"kind": {
|
|
1932
|
+
"enum": [
|
|
1933
|
+
"approval",
|
|
1934
|
+
"user_action"
|
|
1935
|
+
]
|
|
1936
|
+
},
|
|
1937
|
+
"expiresAt": {
|
|
1938
|
+
"type": "string"
|
|
1939
|
+
},
|
|
1940
|
+
"card": {
|
|
1941
|
+
"type": "object",
|
|
1942
|
+
"additionalProperties": false,
|
|
1943
|
+
"required": [
|
|
1944
|
+
"type",
|
|
1945
|
+
"title",
|
|
1946
|
+
"message",
|
|
1947
|
+
"tone",
|
|
1948
|
+
"continueLabel",
|
|
1949
|
+
"cancelLabel",
|
|
1950
|
+
"data"
|
|
1951
|
+
],
|
|
1952
|
+
"properties": {
|
|
1953
|
+
"type": {
|
|
1954
|
+
"type": "string",
|
|
1955
|
+
"minLength": 1,
|
|
1956
|
+
"pattern": "^[a-z0-9._]+$"
|
|
1957
|
+
},
|
|
1958
|
+
"title": {
|
|
1959
|
+
"type": "string",
|
|
1960
|
+
"minLength": 1,
|
|
1961
|
+
"pattern": "\\S"
|
|
1962
|
+
},
|
|
1963
|
+
"message": {
|
|
1964
|
+
"type": "string"
|
|
1965
|
+
},
|
|
1966
|
+
"tone": {
|
|
1967
|
+
"enum": [
|
|
1968
|
+
"normal",
|
|
1969
|
+
"danger"
|
|
1970
|
+
]
|
|
1971
|
+
},
|
|
1972
|
+
"continueLabel": {
|
|
1973
|
+
"type": "string",
|
|
1974
|
+
"minLength": 1,
|
|
1975
|
+
"pattern": "\\S"
|
|
1976
|
+
},
|
|
1977
|
+
"cancelLabel": {
|
|
1978
|
+
"type": "string",
|
|
1979
|
+
"minLength": 1,
|
|
1980
|
+
"pattern": "\\S"
|
|
1981
|
+
},
|
|
1982
|
+
"data": {
|
|
1983
|
+
"type": "object"
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
"interactionItemResponse": {
|
|
1990
|
+
"type": "object",
|
|
1991
|
+
"additionalProperties": false,
|
|
1992
|
+
"required": [
|
|
1993
|
+
"actionId",
|
|
1994
|
+
"response"
|
|
1995
|
+
],
|
|
1996
|
+
"properties": {
|
|
1997
|
+
"actionId": {
|
|
1998
|
+
"type": "string",
|
|
1999
|
+
"minLength": 1,
|
|
2000
|
+
"pattern": "\\S"
|
|
2001
|
+
},
|
|
2002
|
+
"response": {
|
|
2003
|
+
"oneOf": [
|
|
2004
|
+
{
|
|
2005
|
+
"type": "object",
|
|
2006
|
+
"additionalProperties": false,
|
|
2007
|
+
"required": [
|
|
2008
|
+
"action"
|
|
2009
|
+
],
|
|
2010
|
+
"properties": {
|
|
2011
|
+
"action": {
|
|
2012
|
+
"const": "approve"
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
},
|
|
2016
|
+
{
|
|
2017
|
+
"type": "object",
|
|
2018
|
+
"additionalProperties": false,
|
|
2019
|
+
"required": [
|
|
2020
|
+
"action"
|
|
2021
|
+
],
|
|
2022
|
+
"properties": {
|
|
2023
|
+
"action": {
|
|
2024
|
+
"const": "reject"
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
},
|
|
2028
|
+
{
|
|
2029
|
+
"type": "object",
|
|
2030
|
+
"additionalProperties": false,
|
|
2031
|
+
"required": [
|
|
2032
|
+
"action",
|
|
2033
|
+
"data"
|
|
2034
|
+
],
|
|
2035
|
+
"properties": {
|
|
2036
|
+
"action": {
|
|
2037
|
+
"const": "continue"
|
|
2038
|
+
},
|
|
2039
|
+
"data": {}
|
|
2040
|
+
}
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
"type": "object",
|
|
2044
|
+
"additionalProperties": false,
|
|
2045
|
+
"required": [
|
|
2046
|
+
"action"
|
|
2047
|
+
],
|
|
2048
|
+
"properties": {
|
|
2049
|
+
"action": {
|
|
2050
|
+
"const": "cancel"
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
]
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
1968
2057
|
}
|
|
1969
2058
|
}
|
|
1970
2059
|
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"metadata": {
|
|
3
|
-
"version": 1,
|
|
4
|
-
"message_id": "message-user-action-1",
|
|
5
|
-
"correlation_id": "correlation-tool-2",
|
|
6
|
-
"causation_id": "message-prepare-2",
|
|
7
|
-
"sent_at_unix_ms": 1700000000520,
|
|
8
|
-
"dispatch": {
|
|
9
|
-
"dispatch_id": "dispatch-1",
|
|
10
|
-
"agent_session_id": "agent-session-1"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"payload": {
|
|
14
|
-
"family": "app_facade_response",
|
|
15
|
-
"payload": {
|
|
16
|
-
"type": "prepared",
|
|
17
|
-
"action": {
|
|
18
|
-
"action_id": "action-install-1",
|
|
19
|
-
"operation_id": "run-1:step:0:tool:call-2",
|
|
20
|
-
"preview": {
|
|
21
|
-
"actionCode": "integration.install",
|
|
22
|
-
"title": "Connect integration",
|
|
23
|
-
"message": "Complete the connection flow, then check installation.",
|
|
24
|
-
"tone": "normal",
|
|
25
|
-
"details": [
|
|
26
|
-
{
|
|
27
|
-
"label": "Integration",
|
|
28
|
-
"value": {
|
|
29
|
-
"type": "text",
|
|
30
|
-
"text": "provider.example"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"proceedLabel": "Done, check installation",
|
|
35
|
-
"rejectLabel": "Cancel",
|
|
36
|
-
"clientTask": {
|
|
37
|
-
"type": "connect_integration",
|
|
38
|
-
"integrationId": "provider.example",
|
|
39
|
-
"sessionId": "connection-session"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"payload": {
|
|
43
|
-
"target": "/app/integration/connect"
|
|
44
|
-
},
|
|
45
|
-
"revision": 8,
|
|
46
|
-
"interaction_kind": "user_action"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|