@datalayer/agent-runtimes 1.6.30 → 1.6.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-embed/chunks/AgentInspector-C66D0b0W.js +1 -0
- package/dist-embed/chunks/{AgentInspectorDialog-DTQHUrHA.js → AgentInspectorDialog-DeK96QG1.js} +1 -1
- package/dist-embed/datalayer-app-main.js +8 -8
- package/lib/examples/pap/traces/account-tokens.json +6 -8
- package/lib/examples/pap/traces/conversation-control.json +16 -18
- package/lib/examples/pap/traces/conversation-streaming.json +10 -12
- package/lib/examples/pap/traces/mediated-sign-in.json +6 -8
- package/lib/examples/pap/traces/operations.json +38 -32
- package/lib/examples/pap/traces/two-companies.json +40 -37
- package/lib/examples/pap/traces/user-with-a-company.json +22 -22
- package/lib/portable/displays.d.ts +8 -1
- package/lib/portable/displays.js +46 -3
- package/package.json +2 -2
- package/dist-embed/chunks/AgentInspector-CPJcLyP9.js +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"title": "Two companies working together",
|
|
4
4
|
"description": "Ledgerly, an accounting firm, is a PAP company to Ada's agent Atlas and a PAP personal agent at Northwind Bank for her. Every approval is Ada's. This is composition: draft 0.4 defines no company-to-company protocol.",
|
|
5
5
|
"generator": "examples/personal-agent-protocol/traces/generate.py",
|
|
6
|
-
"sdk": "personal-agent-protocol 0.
|
|
6
|
+
"sdk": "personal-agent-protocol 0.33.0",
|
|
7
7
|
"parties": [
|
|
8
8
|
{
|
|
9
9
|
"id": "user",
|
|
@@ -145,13 +145,13 @@
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
|
-
"
|
|
149
|
-
"endpoint": "https://ledgerly.example/poppy/
|
|
148
|
+
"tasks": {
|
|
149
|
+
"endpoint": "https://ledgerly.example/poppy/tasks"
|
|
150
150
|
},
|
|
151
151
|
"extensions": {
|
|
152
152
|
"operations": [
|
|
153
153
|
{
|
|
154
|
-
"version": "
|
|
154
|
+
"version": "3"
|
|
155
155
|
}
|
|
156
156
|
]
|
|
157
157
|
}
|
|
@@ -212,7 +212,8 @@
|
|
|
212
212
|
"protected_resources": ["https://ledgerly.example"],
|
|
213
213
|
"authorization_endpoint": "https://ledgerly.example/oauth/authorize",
|
|
214
214
|
"code_challenge_methods_supported": ["S256"],
|
|
215
|
-
"device_1": "https://ledgerly.example/oauth/device"
|
|
215
|
+
"device_1": "https://ledgerly.example/oauth/device",
|
|
216
|
+
"client_id_metadata_document_supported": true
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
219
|
}
|
|
@@ -543,7 +544,7 @@
|
|
|
543
544
|
"poppy-session": "‹Session JWT›"
|
|
544
545
|
},
|
|
545
546
|
"body": {
|
|
546
|
-
"id": "
|
|
547
|
+
"id": "req_pMQP06OhGpHnbJB-3EndYg",
|
|
547
548
|
"message": {
|
|
548
549
|
"author": {
|
|
549
550
|
"type": "human"
|
|
@@ -564,7 +565,7 @@
|
|
|
564
565
|
"created_at": "2026-10-11T09:00:05Z",
|
|
565
566
|
"type": "message",
|
|
566
567
|
"message": {
|
|
567
|
-
"id": "
|
|
568
|
+
"id": "req_pMQP06OhGpHnbJB-3EndYg",
|
|
568
569
|
"author": {
|
|
569
570
|
"type": "human"
|
|
570
571
|
},
|
|
@@ -582,7 +583,7 @@
|
|
|
582
583
|
"type": "agent"
|
|
583
584
|
},
|
|
584
585
|
"role": "company",
|
|
585
|
-
"as_of_request": "
|
|
586
|
+
"as_of_request": "req_pMQP06OhGpHnbJB-3EndYg",
|
|
586
587
|
"text": "To pay from your Northwind account, let Ledgerly connect to it: open https://northwind.example/device and enter the code shown with this message. Tell me when done.",
|
|
587
588
|
"data": {
|
|
588
589
|
"connect": {
|
|
@@ -650,16 +651,13 @@
|
|
|
650
651
|
}
|
|
651
652
|
}
|
|
652
653
|
},
|
|
653
|
-
"
|
|
654
|
-
"endpoint": "https://northwind.example/poppy/
|
|
655
|
-
},
|
|
656
|
-
"excluded_tasks": {
|
|
657
|
-
"url": "https://northwind.example/poppy/excluded-tasks.json"
|
|
654
|
+
"tasks": {
|
|
655
|
+
"endpoint": "https://northwind.example/poppy/tasks"
|
|
658
656
|
},
|
|
659
657
|
"extensions": {
|
|
660
658
|
"operations": [
|
|
661
659
|
{
|
|
662
|
-
"version": "
|
|
660
|
+
"version": "3"
|
|
663
661
|
}
|
|
664
662
|
],
|
|
665
663
|
"mediated-sign-in": [
|
|
@@ -739,7 +737,8 @@
|
|
|
739
737
|
"protected_resources": ["https://northwind.example"],
|
|
740
738
|
"authorization_endpoint": "https://northwind.example/oauth/authorize",
|
|
741
739
|
"code_challenge_methods_supported": ["S256"],
|
|
742
|
-
"device_1": "https://northwind.example/oauth/device"
|
|
740
|
+
"device_1": "https://northwind.example/oauth/device",
|
|
741
|
+
"client_id_metadata_document_supported": true
|
|
743
742
|
}
|
|
744
743
|
}
|
|
745
744
|
},
|
|
@@ -1072,7 +1071,7 @@
|
|
|
1072
1071
|
"poppy-session": "‹Session JWT›"
|
|
1073
1072
|
},
|
|
1074
1073
|
"body": {
|
|
1075
|
-
"id": "
|
|
1074
|
+
"id": "req_CqSVKU9-LmCqTCJe7FQUgA",
|
|
1076
1075
|
"message": {
|
|
1077
1076
|
"author": {
|
|
1078
1077
|
"type": "human"
|
|
@@ -1093,7 +1092,7 @@
|
|
|
1093
1092
|
"created_at": "2026-10-11T09:00:10Z",
|
|
1094
1093
|
"type": "message",
|
|
1095
1094
|
"message": {
|
|
1096
|
-
"id": "
|
|
1095
|
+
"id": "req_CqSVKU9-LmCqTCJe7FQUgA",
|
|
1097
1096
|
"author": {
|
|
1098
1097
|
"type": "human"
|
|
1099
1098
|
},
|
|
@@ -1111,7 +1110,7 @@
|
|
|
1111
1110
|
"type": "agent"
|
|
1112
1111
|
},
|
|
1113
1112
|
"role": "company",
|
|
1114
|
-
"as_of_request": "
|
|
1113
|
+
"as_of_request": "req_CqSVKU9-LmCqTCJe7FQUgA",
|
|
1115
1114
|
"text": "Northwind Bank asks approval for this payment.",
|
|
1116
1115
|
"extensions": {
|
|
1117
1116
|
"operations": {
|
|
@@ -1195,7 +1194,7 @@
|
|
|
1195
1194
|
"poppy-session": "‹Session JWT›"
|
|
1196
1195
|
},
|
|
1197
1196
|
"body": {
|
|
1198
|
-
"id": "
|
|
1197
|
+
"id": "req_JyiGOChf_Zl9KQ2DkxSrJw",
|
|
1199
1198
|
"message": {
|
|
1200
1199
|
"author": {
|
|
1201
1200
|
"type": "agent"
|
|
@@ -1216,7 +1215,7 @@
|
|
|
1216
1215
|
"created_at": "2026-10-11T09:00:10Z",
|
|
1217
1216
|
"type": "message",
|
|
1218
1217
|
"message": {
|
|
1219
|
-
"id": "
|
|
1218
|
+
"id": "req_JyiGOChf_Zl9KQ2DkxSrJw",
|
|
1220
1219
|
"author": {
|
|
1221
1220
|
"type": "agent"
|
|
1222
1221
|
},
|
|
@@ -1234,7 +1233,7 @@
|
|
|
1234
1233
|
"type": "agent"
|
|
1235
1234
|
},
|
|
1236
1235
|
"role": "company",
|
|
1237
|
-
"as_of_request": "
|
|
1236
|
+
"as_of_request": "req_JyiGOChf_Zl9KQ2DkxSrJw",
|
|
1238
1237
|
"text": "Ready to pay INV-0042.",
|
|
1239
1238
|
"extensions": {
|
|
1240
1239
|
"operations": {
|
|
@@ -1410,7 +1409,7 @@
|
|
|
1410
1409
|
"poppy-session": "‹Session JWT›"
|
|
1411
1410
|
},
|
|
1412
1411
|
"body": {
|
|
1413
|
-
"id": "
|
|
1412
|
+
"id": "req_T1V3E9OUnVO5BCckFnm72g",
|
|
1414
1413
|
"message": {
|
|
1415
1414
|
"author": {
|
|
1416
1415
|
"type": "agent"
|
|
@@ -1420,6 +1419,7 @@
|
|
|
1420
1419
|
"approval": {
|
|
1421
1420
|
"operation_id": "op_1",
|
|
1422
1421
|
"revision": "rev_1",
|
|
1422
|
+
"approver": "user",
|
|
1423
1423
|
"approved_at": 1791709210
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
@@ -1439,7 +1439,7 @@
|
|
|
1439
1439
|
"created_at": "2026-10-11T09:00:10Z",
|
|
1440
1440
|
"type": "message",
|
|
1441
1441
|
"message": {
|
|
1442
|
-
"id": "
|
|
1442
|
+
"id": "req_T1V3E9OUnVO5BCckFnm72g",
|
|
1443
1443
|
"author": {
|
|
1444
1444
|
"type": "agent"
|
|
1445
1445
|
},
|
|
@@ -1448,6 +1448,7 @@
|
|
|
1448
1448
|
"approval": {
|
|
1449
1449
|
"operation_id": "op_1",
|
|
1450
1450
|
"revision": "rev_1",
|
|
1451
|
+
"approver": "user",
|
|
1451
1452
|
"approved_at": 1791709210
|
|
1452
1453
|
}
|
|
1453
1454
|
}
|
|
@@ -1465,7 +1466,7 @@
|
|
|
1465
1466
|
"type": "agent"
|
|
1466
1467
|
},
|
|
1467
1468
|
"role": "company",
|
|
1468
|
-
"as_of_request": "
|
|
1469
|
+
"as_of_request": "req_T1V3E9OUnVO5BCckFnm72g",
|
|
1469
1470
|
"text": "Northwind Bank: Sent EUR 1250.00 to Acme GmbH for INV-0042 from DE89 3704 0044 0532 0130 00. Bank reference NW-0001.",
|
|
1470
1471
|
"data": {
|
|
1471
1472
|
"bank_reference": "NW-0001"
|
|
@@ -1497,7 +1498,7 @@
|
|
|
1497
1498
|
"poppy-session": "‹Session JWT›"
|
|
1498
1499
|
},
|
|
1499
1500
|
"body": {
|
|
1500
|
-
"id": "
|
|
1501
|
+
"id": "req_z-aYm9dCe1d2bErLGg8Zng",
|
|
1501
1502
|
"message": {
|
|
1502
1503
|
"author": {
|
|
1503
1504
|
"type": "agent"
|
|
@@ -1506,7 +1507,8 @@
|
|
|
1506
1507
|
"operations": {
|
|
1507
1508
|
"approval": {
|
|
1508
1509
|
"operation_id": "op_2",
|
|
1509
|
-
"revision": "rev_2"
|
|
1510
|
+
"revision": "rev_2",
|
|
1511
|
+
"approver": "user"
|
|
1510
1512
|
}
|
|
1511
1513
|
}
|
|
1512
1514
|
}
|
|
@@ -1525,7 +1527,7 @@
|
|
|
1525
1527
|
"created_at": "2026-10-11T09:00:10Z",
|
|
1526
1528
|
"type": "message",
|
|
1527
1529
|
"message": {
|
|
1528
|
-
"id": "
|
|
1530
|
+
"id": "req_JyiGOChf_Zl9KQ2DkxSrJw",
|
|
1529
1531
|
"author": {
|
|
1530
1532
|
"type": "agent"
|
|
1531
1533
|
},
|
|
@@ -1543,7 +1545,7 @@
|
|
|
1543
1545
|
"type": "agent"
|
|
1544
1546
|
},
|
|
1545
1547
|
"role": "company",
|
|
1546
|
-
"as_of_request": "
|
|
1548
|
+
"as_of_request": "req_JyiGOChf_Zl9KQ2DkxSrJw",
|
|
1547
1549
|
"text": "Ready to pay INV-0042.",
|
|
1548
1550
|
"extensions": {
|
|
1549
1551
|
"operations": {
|
|
@@ -1571,7 +1573,7 @@
|
|
|
1571
1573
|
"created_at": "2026-10-11T09:00:10Z",
|
|
1572
1574
|
"type": "message",
|
|
1573
1575
|
"message": {
|
|
1574
|
-
"id": "
|
|
1576
|
+
"id": "req_z-aYm9dCe1d2bErLGg8Zng",
|
|
1575
1577
|
"author": {
|
|
1576
1578
|
"type": "agent"
|
|
1577
1579
|
},
|
|
@@ -1579,7 +1581,8 @@
|
|
|
1579
1581
|
"operations": {
|
|
1580
1582
|
"approval": {
|
|
1581
1583
|
"operation_id": "op_2",
|
|
1582
|
-
"revision": "rev_2"
|
|
1584
|
+
"revision": "rev_2",
|
|
1585
|
+
"approver": "user"
|
|
1583
1586
|
}
|
|
1584
1587
|
}
|
|
1585
1588
|
},
|
|
@@ -1596,7 +1599,7 @@
|
|
|
1596
1599
|
"type": "agent"
|
|
1597
1600
|
},
|
|
1598
1601
|
"role": "company",
|
|
1599
|
-
"as_of_request": "
|
|
1602
|
+
"as_of_request": "req_z-aYm9dCe1d2bErLGg8Zng",
|
|
1600
1603
|
"text": "Sent EUR 1250.00 to Acme GmbH for INV-0042 from DE89 3704 0044 0532 0130 00. Bank reference NW-0001.",
|
|
1601
1604
|
"data": {
|
|
1602
1605
|
"bank_reference": "NW-0001"
|
|
@@ -1767,7 +1770,7 @@
|
|
|
1767
1770
|
"poppy-session": "‹Session JWT›"
|
|
1768
1771
|
},
|
|
1769
1772
|
"body": {
|
|
1770
|
-
"id": "
|
|
1773
|
+
"id": "req_bovnfdS3S_JgOHVbHglrGw",
|
|
1771
1774
|
"message": {
|
|
1772
1775
|
"author": {
|
|
1773
1776
|
"type": "human"
|
|
@@ -1788,7 +1791,7 @@
|
|
|
1788
1791
|
"created_at": "2026-10-11T09:00:10Z",
|
|
1789
1792
|
"type": "message",
|
|
1790
1793
|
"message": {
|
|
1791
|
-
"id": "
|
|
1794
|
+
"id": "req_bovnfdS3S_JgOHVbHglrGw",
|
|
1792
1795
|
"author": {
|
|
1793
1796
|
"type": "human"
|
|
1794
1797
|
},
|
|
@@ -1806,7 +1809,7 @@
|
|
|
1806
1809
|
"type": "agent"
|
|
1807
1810
|
},
|
|
1808
1811
|
"role": "company",
|
|
1809
|
-
"as_of_request": "
|
|
1812
|
+
"as_of_request": "req_bovnfdS3S_JgOHVbHglrGw",
|
|
1810
1813
|
"text": "Northwind Bank asks approval for this payment.",
|
|
1811
1814
|
"extensions": {
|
|
1812
1815
|
"operations": {
|
|
@@ -1856,7 +1859,7 @@
|
|
|
1856
1859
|
"poppy-session": "‹Session JWT›"
|
|
1857
1860
|
},
|
|
1858
1861
|
"body": {
|
|
1859
|
-
"id": "
|
|
1862
|
+
"id": "req_BhJgASlbuXqQpKcJ-9EYfQ",
|
|
1860
1863
|
"message": {
|
|
1861
1864
|
"author": {
|
|
1862
1865
|
"type": "agent"
|
|
@@ -1877,7 +1880,7 @@
|
|
|
1877
1880
|
"created_at": "2026-10-11T09:00:10Z",
|
|
1878
1881
|
"type": "message",
|
|
1879
1882
|
"message": {
|
|
1880
|
-
"id": "
|
|
1883
|
+
"id": "req_BhJgASlbuXqQpKcJ-9EYfQ",
|
|
1881
1884
|
"author": {
|
|
1882
1885
|
"type": "agent"
|
|
1883
1886
|
},
|
|
@@ -1895,7 +1898,7 @@
|
|
|
1895
1898
|
"type": "agent"
|
|
1896
1899
|
},
|
|
1897
1900
|
"role": "company",
|
|
1898
|
-
"as_of_request": "
|
|
1901
|
+
"as_of_request": "req_BhJgASlbuXqQpKcJ-9EYfQ",
|
|
1899
1902
|
"text": "Ready to pay INV-0043.",
|
|
1900
1903
|
"extensions": {
|
|
1901
1904
|
"operations": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"title": "A user with a company",
|
|
4
4
|
"description": "Ada asks her personal agent, Atlas, to exchange a jacket at Manzanita Outfitters. Both sides are the PAP Python SDK's demo world: real keys and Session JWTs over in-process HTTP, recorded and redacted.",
|
|
5
5
|
"generator": "examples/personal-agent-protocol/traces/generate.py",
|
|
6
|
-
"sdk": "personal-agent-protocol 0.
|
|
6
|
+
"sdk": "personal-agent-protocol 0.33.0",
|
|
7
7
|
"parties": [
|
|
8
8
|
{
|
|
9
9
|
"id": "user",
|
|
@@ -137,16 +137,13 @@
|
|
|
137
137
|
"web": {
|
|
138
138
|
"browser_session_endpoint": "https://manzanita.example/poppy/browser-session"
|
|
139
139
|
},
|
|
140
|
-
"
|
|
141
|
-
"endpoint": "https://manzanita.example/poppy/
|
|
142
|
-
},
|
|
143
|
-
"excluded_tasks": {
|
|
144
|
-
"url": "https://manzanita.example/poppy/excluded-tasks.json"
|
|
140
|
+
"tasks": {
|
|
141
|
+
"endpoint": "https://manzanita.example/poppy/tasks"
|
|
145
142
|
},
|
|
146
143
|
"extensions": {
|
|
147
144
|
"operations": [
|
|
148
145
|
{
|
|
149
|
-
"version": "
|
|
146
|
+
"version": "3"
|
|
150
147
|
}
|
|
151
148
|
],
|
|
152
149
|
"links": [
|
|
@@ -252,7 +249,8 @@
|
|
|
252
249
|
],
|
|
253
250
|
"authorization_endpoint": "https://manzanita.example/oauth/authorize",
|
|
254
251
|
"code_challenge_methods_supported": ["S256"],
|
|
255
|
-
"device_1": "https://manzanita.example/oauth/device"
|
|
252
|
+
"device_1": "https://manzanita.example/oauth/device",
|
|
253
|
+
"client_id_metadata_document_supported": true
|
|
256
254
|
}
|
|
257
255
|
}
|
|
258
256
|
}
|
|
@@ -327,7 +325,7 @@
|
|
|
327
325
|
"poppy-session": "‹Session JWT›"
|
|
328
326
|
},
|
|
329
327
|
"body": {
|
|
330
|
-
"id": "
|
|
328
|
+
"id": "req_43xgy9LqXuTGUmd_MXSqlw",
|
|
331
329
|
"message": {
|
|
332
330
|
"author": {
|
|
333
331
|
"type": "human"
|
|
@@ -348,7 +346,7 @@
|
|
|
348
346
|
"created_at": "2026-10-11T09:00:00Z",
|
|
349
347
|
"type": "message",
|
|
350
348
|
"message": {
|
|
351
|
-
"id": "
|
|
349
|
+
"id": "req_43xgy9LqXuTGUmd_MXSqlw",
|
|
352
350
|
"author": {
|
|
353
351
|
"type": "human"
|
|
354
352
|
},
|
|
@@ -366,7 +364,7 @@
|
|
|
366
364
|
"type": "agent"
|
|
367
365
|
},
|
|
368
366
|
"role": "company",
|
|
369
|
-
"as_of_request": "
|
|
367
|
+
"as_of_request": "req_43xgy9LqXuTGUmd_MXSqlw",
|
|
370
368
|
"text": "I can look that up once you sign in to your Manzanita account."
|
|
371
369
|
}
|
|
372
370
|
},
|
|
@@ -718,7 +716,7 @@
|
|
|
718
716
|
"poppy-session": "‹Session JWT›"
|
|
719
717
|
},
|
|
720
718
|
"body": {
|
|
721
|
-
"id": "
|
|
719
|
+
"id": "req_8VhvmsTpdYvTlDl9F74dEg",
|
|
722
720
|
"message": {
|
|
723
721
|
"author": {
|
|
724
722
|
"type": "human"
|
|
@@ -739,7 +737,7 @@
|
|
|
739
737
|
"created_at": "2026-10-11T09:00:10Z",
|
|
740
738
|
"type": "message",
|
|
741
739
|
"message": {
|
|
742
|
-
"id": "
|
|
740
|
+
"id": "req_8VhvmsTpdYvTlDl9F74dEg",
|
|
743
741
|
"author": {
|
|
744
742
|
"type": "human"
|
|
745
743
|
},
|
|
@@ -757,7 +755,7 @@
|
|
|
757
755
|
"type": "agent"
|
|
758
756
|
},
|
|
759
757
|
"role": "company",
|
|
760
|
-
"as_of_request": "
|
|
758
|
+
"as_of_request": "req_8VhvmsTpdYvTlDl9F74dEg",
|
|
761
759
|
"text": "The insulated Ridge Jacket is in stock. Here is the exchange.",
|
|
762
760
|
"extensions": {
|
|
763
761
|
"operations": {
|
|
@@ -799,7 +797,7 @@
|
|
|
799
797
|
},
|
|
800
798
|
{
|
|
801
799
|
"title": "Ada approves this exact revision",
|
|
802
|
-
"channel": "Operations version
|
|
800
|
+
"channel": "Operations version 3",
|
|
803
801
|
"summary": "Atlas asks Ada in its own interface, and sends her approval of that revision as a message in the conversation. Manzanita performs the exchange once and says how it went, which Atlas shows as written.",
|
|
804
802
|
"chat": [
|
|
805
803
|
{
|
|
@@ -891,7 +889,7 @@
|
|
|
891
889
|
"poppy-session": "‹Session JWT›"
|
|
892
890
|
},
|
|
893
891
|
"body": {
|
|
894
|
-
"id": "
|
|
892
|
+
"id": "req_PEqBxZCrAfpTjQLa5Hn6gw",
|
|
895
893
|
"message": {
|
|
896
894
|
"author": {
|
|
897
895
|
"type": "agent"
|
|
@@ -901,6 +899,7 @@
|
|
|
901
899
|
"approval": {
|
|
902
900
|
"operation_id": "op_1",
|
|
903
901
|
"revision": "rev_1",
|
|
902
|
+
"approver": "user",
|
|
904
903
|
"approved_at": 1791709210
|
|
905
904
|
}
|
|
906
905
|
}
|
|
@@ -920,7 +919,7 @@
|
|
|
920
919
|
"created_at": "2026-10-11T09:00:00Z",
|
|
921
920
|
"type": "message",
|
|
922
921
|
"message": {
|
|
923
|
-
"id": "
|
|
922
|
+
"id": "req_43xgy9LqXuTGUmd_MXSqlw",
|
|
924
923
|
"author": {
|
|
925
924
|
"type": "human"
|
|
926
925
|
},
|
|
@@ -938,7 +937,7 @@
|
|
|
938
937
|
"type": "agent"
|
|
939
938
|
},
|
|
940
939
|
"role": "company",
|
|
941
|
-
"as_of_request": "
|
|
940
|
+
"as_of_request": "req_43xgy9LqXuTGUmd_MXSqlw",
|
|
942
941
|
"text": "I can look that up once you sign in to your Manzanita account."
|
|
943
942
|
}
|
|
944
943
|
},
|
|
@@ -954,7 +953,7 @@
|
|
|
954
953
|
"created_at": "2026-10-11T09:00:10Z",
|
|
955
954
|
"type": "message",
|
|
956
955
|
"message": {
|
|
957
|
-
"id": "
|
|
956
|
+
"id": "req_8VhvmsTpdYvTlDl9F74dEg",
|
|
958
957
|
"author": {
|
|
959
958
|
"type": "human"
|
|
960
959
|
},
|
|
@@ -972,7 +971,7 @@
|
|
|
972
971
|
"type": "agent"
|
|
973
972
|
},
|
|
974
973
|
"role": "company",
|
|
975
|
-
"as_of_request": "
|
|
974
|
+
"as_of_request": "req_8VhvmsTpdYvTlDl9F74dEg",
|
|
976
975
|
"text": "The insulated Ridge Jacket is in stock. Here is the exchange.",
|
|
977
976
|
"extensions": {
|
|
978
977
|
"operations": {
|
|
@@ -1005,7 +1004,7 @@
|
|
|
1005
1004
|
"created_at": "2026-10-11T09:00:10Z",
|
|
1006
1005
|
"type": "message",
|
|
1007
1006
|
"message": {
|
|
1008
|
-
"id": "
|
|
1007
|
+
"id": "req_PEqBxZCrAfpTjQLa5Hn6gw",
|
|
1009
1008
|
"author": {
|
|
1010
1009
|
"type": "agent"
|
|
1011
1010
|
},
|
|
@@ -1014,6 +1013,7 @@
|
|
|
1014
1013
|
"approval": {
|
|
1015
1014
|
"operation_id": "op_1",
|
|
1016
1015
|
"revision": "rev_1",
|
|
1016
|
+
"approver": "user",
|
|
1017
1017
|
"approved_at": 1791709210
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
@@ -1031,7 +1031,7 @@
|
|
|
1031
1031
|
"type": "agent"
|
|
1032
1032
|
},
|
|
1033
1033
|
"role": "company",
|
|
1034
|
-
"as_of_request": "
|
|
1034
|
+
"as_of_request": "req_PEqBxZCrAfpTjQLa5Hn6gw",
|
|
1035
1035
|
"text": "Exchanged the Ridge Jacket (M) for the insulated Ridge Jacket (M). USD 70.00 charged to the card ending 4242; a return label was emailed.",
|
|
1036
1036
|
"data": {
|
|
1037
1037
|
"order_id": "ord_7Hk2",
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
* or a business's `pact_sign_in` answer): Direct, Device or Mediated, its
|
|
9
9
|
* page (`https` only), its code, until when, what it needs.
|
|
10
10
|
* - **An operation to approve** (`…pap.confirm+json`): the company's words
|
|
11
|
-
* verbatim
|
|
11
|
+
* verbatim — its summary, or the values of its terms when it wrote none
|
|
12
|
+
* (Operations 3: `terms` required, `summary` optional) — its terms and what
|
|
13
|
+
* the terms check found, the opaque revision
|
|
12
14
|
* and the one it replaced, what it does (a Rules class; `buy` when money
|
|
13
15
|
* moves — a purchase). Every operation is the person's: it is answered where
|
|
14
16
|
* approvals are, never here, and the approval it stands for is named
|
|
@@ -53,7 +55,10 @@ export type ProtocolDisplay = ({
|
|
|
53
55
|
/** The approval it stands for: answered where approvals are. */
|
|
54
56
|
approvalId: string;
|
|
55
57
|
company: string;
|
|
58
|
+
/** The company's summary, else the values of its terms, one `path: value` a line. */
|
|
56
59
|
summary: string;
|
|
60
|
+
/** Whether `summary` is the company's own (else it is the terms' values). */
|
|
61
|
+
summaryGiven: boolean;
|
|
57
62
|
terms: Record<string, unknown>;
|
|
58
63
|
operationRef: string;
|
|
59
64
|
/** Opaque, the company's: approved exactly as it is shown. */
|
|
@@ -114,6 +119,8 @@ export type ProtocolDisplay = ({
|
|
|
114
119
|
version: number;
|
|
115
120
|
text: string;
|
|
116
121
|
};
|
|
122
|
+
/** The terms as a host shows them when the company wrote no summary (Operations 5). */
|
|
123
|
+
export declare function shownTerms(terms: Record<string, unknown>): string;
|
|
117
124
|
/** A display's wire (`{type, version, id, text, data}`) decoded, or `unknown` with its text. */
|
|
118
125
|
export declare function protocolDisplayOf(wire: unknown): ProtocolDisplay | null;
|
|
119
126
|
/** `pap_handoff`, as the gateway names it with or without a prefix. */
|
package/lib/portable/displays.js
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* or a business's `pact_sign_in` answer): Direct, Device or Mediated, its
|
|
13
13
|
* page (`https` only), its code, until when, what it needs.
|
|
14
14
|
* - **An operation to approve** (`…pap.confirm+json`): the company's words
|
|
15
|
-
* verbatim
|
|
15
|
+
* verbatim — its summary, or the values of its terms when it wrote none
|
|
16
|
+
* (Operations 3: `terms` required, `summary` optional) — its terms and what
|
|
17
|
+
* the terms check found, the opaque revision
|
|
16
18
|
* and the one it replaced, what it does (a Rules class; `buy` when money
|
|
17
19
|
* moves — a purchase). Every operation is the person's: it is answered where
|
|
18
20
|
* approvals are, never here, and the approval it stands for is named
|
|
@@ -47,6 +49,42 @@ const record = (value) => value && typeof value === 'object' && !Array.isArray(v
|
|
|
47
49
|
: null;
|
|
48
50
|
const text = (value) => typeof value === 'string' ? value : '';
|
|
49
51
|
const words = (value) => text(value).trim();
|
|
52
|
+
/** Every leaf of the terms with its dotted path, as the SDK's `termsLeaves`. */
|
|
53
|
+
function termsLeaves(value, path = '', found = []) {
|
|
54
|
+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
55
|
+
for (const [key, item] of Object.entries(value)) {
|
|
56
|
+
termsLeaves(item, path ? `${path}.${key}` : key, found);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
found.push([path, value]);
|
|
61
|
+
}
|
|
62
|
+
return found;
|
|
63
|
+
}
|
|
64
|
+
/** A leaf as text, as the SDK's `shownValue` (Python's `str`) writes it. */
|
|
65
|
+
function shownValue(value, nested = false) {
|
|
66
|
+
if (typeof value === 'string')
|
|
67
|
+
return nested ? `'${value}'` : value;
|
|
68
|
+
if (typeof value === 'boolean')
|
|
69
|
+
return value ? 'True' : 'False';
|
|
70
|
+
if (value === null || value === undefined)
|
|
71
|
+
return 'None';
|
|
72
|
+
if (Array.isArray(value)) {
|
|
73
|
+
return `[${value.map(item => shownValue(item, true)).join(', ')}]`;
|
|
74
|
+
}
|
|
75
|
+
if (typeof value === 'object') {
|
|
76
|
+
return `{${Object.entries(value)
|
|
77
|
+
.map(([key, item]) => `'${key}': ${shownValue(item, true)}`)
|
|
78
|
+
.join(', ')}}`;
|
|
79
|
+
}
|
|
80
|
+
return String(value);
|
|
81
|
+
}
|
|
82
|
+
/** The terms as a host shows them when the company wrote no summary (Operations 5). */
|
|
83
|
+
export function shownTerms(terms) {
|
|
84
|
+
return termsLeaves(terms)
|
|
85
|
+
.map(([path, value]) => `${path}: ${shownValue(value)}`)
|
|
86
|
+
.join('\n');
|
|
87
|
+
}
|
|
50
88
|
const ACTIONS = [
|
|
51
89
|
'read',
|
|
52
90
|
'write',
|
|
@@ -83,7 +121,7 @@ export function protocolDisplayOf(wire) {
|
|
|
83
121
|
}
|
|
84
122
|
case PAP_CONFIRM_TYPE: {
|
|
85
123
|
const company = words(data.company);
|
|
86
|
-
const
|
|
124
|
+
const given = text(data.summary);
|
|
87
125
|
const operationRef = words(data.operation_ref);
|
|
88
126
|
const revision = words(data.revision);
|
|
89
127
|
const terms = record(data.terms);
|
|
@@ -91,7 +129,7 @@ export function protocolDisplayOf(wire) {
|
|
|
91
129
|
const wasRevision = was ? words(was.revision) : '';
|
|
92
130
|
const expiresAt = words(data.expires_at);
|
|
93
131
|
if (!company ||
|
|
94
|
-
|
|
132
|
+
(data.summary !== undefined && data.summary !== null && !given.trim()) ||
|
|
95
133
|
!operationRef ||
|
|
96
134
|
!revision ||
|
|
97
135
|
!terms ||
|
|
@@ -108,6 +146,10 @@ export function protocolDisplayOf(wire) {
|
|
|
108
146
|
: ACTIONS.find(a => a === data.does);
|
|
109
147
|
if (does === undefined)
|
|
110
148
|
return unknown;
|
|
149
|
+
const summaryGiven = Boolean(given.trim());
|
|
150
|
+
const summary = summaryGiven ? given : shownTerms(terms);
|
|
151
|
+
if (!summary.trim())
|
|
152
|
+
return unknown;
|
|
111
153
|
const session = record(data.session);
|
|
112
154
|
return {
|
|
113
155
|
kind: 'confirm',
|
|
@@ -115,6 +157,7 @@ export function protocolDisplayOf(wire) {
|
|
|
115
157
|
approvalId: id.slice(0, -'-confirm'.length),
|
|
116
158
|
company,
|
|
117
159
|
summary,
|
|
160
|
+
summaryGiven,
|
|
118
161
|
terms,
|
|
119
162
|
operationRef,
|
|
120
163
|
revision,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datalayer/agent-runtimes",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
".",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"@datalayer/lexical-loro": "^1.0.6",
|
|
165
165
|
"@datalayer/primer-addons": "^1.0.46",
|
|
166
166
|
"@datalayer/primer-rjsf": "^1.0.3",
|
|
167
|
-
"@datalayer/personal-agent-protocol": "
|
|
167
|
+
"@datalayer/personal-agent-protocol": ">=0.33.0 <0.35",
|
|
168
168
|
"@datalayer/reactor": "^1.3.5",
|
|
169
169
|
"@datalayer/reactor-commands": "^1.0.4",
|
|
170
170
|
"@datalayer/reactor-manager": "^1.0.4",
|