@datalayer/agent-runtimes 1.5.96 → 1.5.97

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.
Files changed (92) hide show
  1. package/dist-embed/chunks/{index.esm-zOy6kFPv.js → index.esm-BLDeC6q1.js} +1 -1
  2. package/dist-embed/datalayer-app-main.js +80 -80
  3. package/lib/apps/apps/appspec.d.ts +11 -12
  4. package/lib/apps/apps/appspec.js +45 -87
  5. package/lib/components/cards/ToolApprovalCard.js +4 -2
  6. package/lib/components/teams/HarnessIcon.d.ts +11 -0
  7. package/lib/components/teams/HarnessIcon.js +17 -0
  8. package/lib/components/teams/SceneTranscript.d.ts +1 -1
  9. package/lib/components/teams/SceneTranscript.js +12 -7
  10. package/lib/components/teams/SceneView.d.ts +7 -1
  11. package/lib/components/teams/SceneView.js +2 -2
  12. package/lib/components/teams/backdrops/hero.js +1 -1
  13. package/lib/components/teams/backdrops/minimal.js +1 -1
  14. package/lib/components/teams/backdrops/nodes.js +4 -3
  15. package/lib/components/teams/backdrops/space.js +1 -1
  16. package/lib/components/teams/backdrops/types.d.ts +9 -0
  17. package/lib/components/teams/index.d.ts +2 -0
  18. package/lib/components/teams/index.js +2 -0
  19. package/lib/components/teams/memberHarness.d.ts +16 -0
  20. package/lib/components/teams/memberHarness.js +42 -0
  21. package/lib/components/teams/sceneTranscriptRules.js +6 -1
  22. package/lib/components/teams/transcript/LineSelect.d.ts +20 -0
  23. package/lib/components/teams/transcript/LineSelect.js +20 -0
  24. package/lib/components/teams/transcript/TranscriptTable.d.ts +11 -5
  25. package/lib/components/teams/transcript/TranscriptTable.js +24 -7
  26. package/lib/components/teams/transcript/TranscriptViews.js +1 -1
  27. package/lib/components/teams/transcript/recordingPlayback.d.ts +13 -0
  28. package/lib/components/teams/transcript/recordingPlayback.js +32 -0
  29. package/lib/components/teams/transcript/useSceneRecording.d.ts +1 -1
  30. package/lib/components/teams/transcript/useSceneRecording.js +19 -11
  31. package/lib/examples/PapAccountTokensExample.d.ts +1 -1
  32. package/lib/examples/PapAccountTokensExample.js +3 -3
  33. package/lib/examples/PapSessionJwtExample.d.ts +4 -0
  34. package/lib/examples/{PapDpopProofExample.js → PapSessionJwtExample.js} +9 -9
  35. package/lib/examples/PapSessionLifecycleExample.d.ts +1 -1
  36. package/lib/examples/PapSessionLifecycleExample.js +2 -2
  37. package/lib/examples/ScenesExample.js +15 -13
  38. package/lib/examples/example-selector.js +3 -3
  39. package/lib/examples/index.d.ts +1 -1
  40. package/lib/examples/index.js +1 -1
  41. package/lib/examples/main.js +1 -1
  42. package/lib/examples/pap/PapAccountTokensView.d.ts +1 -1
  43. package/lib/examples/pap/PapAuthorizationBoundaryView.js +15 -22
  44. package/lib/examples/pap/PapGuidedJourneyView.js +61 -60
  45. package/lib/examples/pap/PapSessionJwtView.d.ts +4 -0
  46. package/lib/examples/pap/PapSessionJwtView.js +69 -0
  47. package/lib/examples/pap/PapSessionLifecycleView.js +36 -58
  48. package/lib/examples/pap/PapSignInDisplayView.d.ts +1 -1
  49. package/lib/examples/pap/PapSignInDisplayView.js +1 -1
  50. package/lib/examples/pap/PapTraceView.d.ts +1 -1
  51. package/lib/examples/pap/PapTraceView.js +1 -1
  52. package/lib/examples/pap/traces/account-tokens.json +145 -173
  53. package/lib/examples/pap/traces/conversation-control.json +118 -140
  54. package/lib/examples/pap/traces/conversation-streaming.json +114 -134
  55. package/lib/examples/pap/traces/mediated-sign-in.json +151 -166
  56. package/lib/examples/pap/traces/operations.json +613 -391
  57. package/lib/examples/pap/traces/two-companies.json +380 -990
  58. package/lib/examples/pap/traces/user-with-a-company.json +319 -207
  59. package/lib/models/environments.generated.d.ts +2 -2
  60. package/lib/models/environments.generated.js +1 -1
  61. package/lib/pap/index.d.ts +1 -1
  62. package/lib/pap/index.js +3 -3
  63. package/lib/portable/displays.d.ts +13 -22
  64. package/lib/portable/displays.js +17 -65
  65. package/lib/portable/hosts/approvalRenderers.d.ts +4 -4
  66. package/lib/portable/hosts/approvalRenderers.js +26 -13
  67. package/lib/portable/hosts/contracts.json +5 -2
  68. package/lib/portable/index.d.ts +1 -1
  69. package/lib/portable/index.js +1 -1
  70. package/lib/protocols/decks/index.d.ts +37 -0
  71. package/lib/protocols/decks/index.js +48 -0
  72. package/lib/protocols/decks/pact-a-personal-agent-at-a-business.d.ts +2 -0
  73. package/lib/protocols/decks/pact-a-personal-agent-at-a-business.js +148 -0
  74. package/lib/protocols/decks/ucp-a-purchase-approved.d.ts +2 -0
  75. package/lib/protocols/decks/ucp-a-purchase-approved.js +154 -0
  76. package/lib/specs/actions.d.ts +1 -1
  77. package/lib/specs/actions.js +2 -2
  78. package/lib/specs/agents/agents.js +3 -3
  79. package/lib/specs/apps.d.ts +1 -1
  80. package/lib/specs/apps.js +10 -11
  81. package/lib/specs/appspecSchema.js +4 -112
  82. package/lib/specs/envvars.js +2 -2
  83. package/lib/specs/harnesses.js +9 -9
  84. package/lib/specs/scenes.js +10 -33
  85. package/lib/specs/teams/teams.js +2 -2
  86. package/lib/types/agentspecs.d.ts +91 -127
  87. package/package.json +409 -409
  88. package/scripts/codegen/generate_apps.py +6 -7
  89. package/scripts/validate_pap_examples.py +1 -1
  90. package/lib/examples/PapDpopProofExample.d.ts +0 -4
  91. package/lib/examples/pap/PapDpopProofView.d.ts +0 -4
  92. package/lib/examples/pap/PapDpopProofView.js +0 -61
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "slug": "user-with-a-company",
3
3
  "title": "A user with a company",
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 proofs over in-process HTTP, recorded and redacted.",
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.27.0",
6
+ "sdk": "personal-agent-protocol 0.28.0",
7
7
  "parties": [
8
8
  {
9
9
  "id": "user",
@@ -30,7 +30,7 @@
30
30
  {
31
31
  "title": "Atlas finds Manzanita",
32
32
  "channel": "Discovery + Session",
33
- "summary": "Atlas reads Manzanita's public poppy.json and OAuth metadata, then opens a signed-out, pairwise Session. Manzanita verifies Atlas by fetching its client metadata and keys.",
33
+ "summary": "Atlas reads Manzanita's protected resource metadata, public poppy.json and OAuth metadata. A Session is local: Atlas chooses a random sid for Ada's pairwise User ID, and no request is sent. Manzanita verifies Atlas's delegation at its first request.",
34
34
  "chat": [
35
35
  {
36
36
  "speaker": "user",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  {
53
53
  "label": "Session",
54
- "value": "signed out · DPoP-bound"
54
+ "value": "signed out · a Session JWT on every request"
55
55
  },
56
56
  {
57
57
  "label": "Vault (host only)",
@@ -65,15 +65,11 @@
65
65
  "manzanita": [
66
66
  {
67
67
  "label": "Verified client",
68
- "value": "atlas.example/agent.json"
68
+ "value": "None yet"
69
69
  },
70
70
  {
71
71
  "label": "Sessions",
72
- "value": "1 live · 0 signed in"
73
- },
74
- {
75
- "label": "Who is it?",
76
- "value": "A pairwise identifier only"
72
+ "value": "None"
77
73
  }
78
74
  ]
79
75
  },
@@ -102,22 +98,6 @@
102
98
  },
103
99
  "auth": {
104
100
  "issuer": "https://manzanita.example",
105
- "mediated": {
106
- "endpoint": "https://manzanita.example/poppy/sign-in",
107
- "fields": [
108
- {
109
- "name": "email",
110
- "label": "Email",
111
- "secret": false
112
- },
113
- {
114
- "name": "password",
115
- "label": "Password",
116
- "secret": true
117
- }
118
- ],
119
- "scopes": ["orders:read", "orders:write"]
120
- },
121
101
  "scopes": {
122
102
  "orders:read": "See your orders, returns and exchanges",
123
103
  "orders:write": "Exchange or return items in your orders"
@@ -164,8 +144,23 @@
164
144
  },
165
145
  "extensions": {
166
146
  "operations": {
147
+ "version": "2"
148
+ },
149
+ "mediated-sign-in": {
167
150
  "version": "1",
168
- "endpoint": "https://manzanita.example/poppy/operations"
151
+ "fields": [
152
+ {
153
+ "name": "email",
154
+ "label": "Email",
155
+ "secret": false
156
+ },
157
+ {
158
+ "name": "password",
159
+ "label": "Password",
160
+ "secret": true
161
+ }
162
+ ],
163
+ "scopes": ["orders:read", "orders:write"]
169
164
  }
170
165
  }
171
166
  }
@@ -176,7 +171,7 @@
176
171
  "from": "atlas",
177
172
  "to": "manzanita",
178
173
  "method": "GET",
179
- "url": "https://manzanita.example/.well-known/oauth-authorization-server",
174
+ "url": "https://manzanita.example/.well-known/oauth-protected-resource",
180
175
  "status": 200,
181
176
  "request": {
182
177
  "headers": {
@@ -188,24 +183,10 @@
188
183
  "content-type": "application/json"
189
184
  },
190
185
  "body": {
191
- "issuer": "https://manzanita.example",
192
- "token_endpoint": "https://manzanita.example/oauth/token",
193
- "revocation_endpoint": "https://manzanita.example/oauth/revoke",
194
- "grant_types_supported": [
195
- "urn:ietf:params:oauth:grant-type:jwt-bearer",
196
- "refresh_token",
197
- "authorization_code",
198
- "urn:ietf:params:oauth:grant-type:device_code"
199
- ],
186
+ "resource": "https://manzanita.example",
187
+ "authorization_servers": ["https://manzanita.example"],
200
188
  "scopes_supported": ["orders:read", "orders:write"],
201
- "protected_resources": [
202
- "https://manzanita.example",
203
- "https://manzanita.example/mcp"
204
- ],
205
- "dpop_signing_alg_values_supported": ["ES256", "RS256"],
206
- "authorization_endpoint": "https://manzanita.example/oauth/authorize",
207
- "code_challenge_methods_supported": ["S256"],
208
- "device_1": "https://manzanita.example/oauth/device"
189
+ "bearer_methods_supported": ["header"]
209
190
  }
210
191
  }
211
192
  },
@@ -213,72 +194,8 @@
213
194
  "kind": "http",
214
195
  "from": "atlas",
215
196
  "to": "manzanita",
216
- "method": "POST",
217
- "url": "https://manzanita.example/oauth/token",
218
- "status": 200,
219
- "request": {
220
- "headers": {
221
- "content-type": "application/x-www-form-urlencoded",
222
- "accept": "application/json",
223
- "dpop": "‹DPoP proof›"
224
- },
225
- "body": {
226
- "grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
227
- "assertion": "‹session assertion›",
228
- "client_id": "https://atlas.example/agent.json",
229
- "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
230
- "client_assertion": "‹client assertion›"
231
- },
232
- "encoding": "form"
233
- },
234
- "response": {
235
- "headers": {
236
- "content-type": "application/json",
237
- "cache-control": "no-store"
238
- },
239
- "body": {
240
- "access_token": "‹session token›",
241
- "token_type": "DPoP",
242
- "expires_in": 3600
243
- }
244
- }
245
- },
246
- {
247
- "kind": "http",
248
- "from": "manzanita",
249
- "to": "atlas",
250
197
  "method": "GET",
251
- "url": "https://atlas.example/agent.json",
252
- "status": 200,
253
- "request": {
254
- "headers": {
255
- "accept": "application/json"
256
- }
257
- },
258
- "response": {
259
- "headers": {
260
- "content-type": "application/json"
261
- },
262
- "body": {
263
- "client_id": "https://atlas.example/agent.json",
264
- "client_name": "Atlas",
265
- "jwks_uri": "https://atlas.example/jwks.json",
266
- "redirect_uris": ["https://atlas.example/oauth/callback"],
267
- "token_endpoint_auth_method": "private_key_jwt",
268
- "extensions": {
269
- "operations": {
270
- "version": "1"
271
- }
272
- }
273
- }
274
- }
275
- },
276
- {
277
- "kind": "http",
278
- "from": "manzanita",
279
- "to": "atlas",
280
- "method": "GET",
281
- "url": "https://atlas.example/jwks.json",
198
+ "url": "https://manzanita.example/.well-known/oauth-authorization-server",
282
199
  "status": 200,
283
200
  "request": {
284
201
  "headers": {
@@ -290,17 +207,23 @@
290
207
  "content-type": "application/json"
291
208
  },
292
209
  "body": {
293
- "keys": [
294
- {
295
- "kty": "EC",
296
- "crv": "P-256",
297
- "x": "‹public key›",
298
- "y": "‹public key›",
299
- "kid": "key-1",
300
- "use": "sig",
301
- "alg": "ES256"
302
- }
303
- ]
210
+ "issuer": "https://manzanita.example",
211
+ "token_endpoint": "https://manzanita.example/oauth/token",
212
+ "revocation_endpoint": "https://manzanita.example/oauth/revoke",
213
+ "grant_types_supported": [
214
+ "refresh_token",
215
+ "authorization_code",
216
+ "urn:ietf:params:oauth:grant-type:device_code",
217
+ "https://personalagentprotocol.org/grant/mediated-sign-in"
218
+ ],
219
+ "scopes_supported": ["orders:read", "orders:write"],
220
+ "protected_resources": [
221
+ "https://manzanita.example",
222
+ "https://manzanita.example/mcp"
223
+ ],
224
+ "authorization_endpoint": "https://manzanita.example/oauth/authorize",
225
+ "code_challenge_methods_supported": ["S256"],
226
+ "device_1": "https://manzanita.example/oauth/device"
304
227
  }
305
228
  }
306
229
  }
@@ -330,7 +253,7 @@
330
253
  },
331
254
  {
332
255
  "label": "Session",
333
- "value": "signed out · DPoP-bound"
256
+ "value": "signed out · a Session JWT on every request"
334
257
  },
335
258
  {
336
259
  "label": "Vault (host only)",
@@ -348,7 +271,7 @@
348
271
  },
349
272
  {
350
273
  "label": "Sessions",
351
- "value": "1 live · 0 signed in"
274
+ "value": "1 live"
352
275
  },
353
276
  {
354
277
  "label": "Who is it?",
@@ -372,8 +295,7 @@
372
295
  "headers": {
373
296
  "content-type": "application/json",
374
297
  "accept": "*/*",
375
- "authorization": "DPoP ‹session token›",
376
- "dpop": "‹DPoP proof›"
298
+ "poppy-session": "‹Session JWT›"
377
299
  },
378
300
  "body": {
379
301
  "message": {
@@ -446,13 +368,74 @@
446
368
  "responder": "agent"
447
369
  }
448
370
  }
371
+ },
372
+ {
373
+ "kind": "http",
374
+ "from": "manzanita",
375
+ "to": "atlas",
376
+ "method": "GET",
377
+ "url": "https://atlas.example/agent.json",
378
+ "status": 200,
379
+ "request": {
380
+ "headers": {
381
+ "accept": "application/json"
382
+ }
383
+ },
384
+ "response": {
385
+ "headers": {
386
+ "content-type": "application/json"
387
+ },
388
+ "body": {
389
+ "client_id": "https://atlas.example/agent.json",
390
+ "client_name": "Atlas",
391
+ "jwks_uri": "https://atlas.example/jwks.json",
392
+ "redirect_uris": ["https://atlas.example/oauth/callback"],
393
+ "token_endpoint_auth_method": "private_key_jwt",
394
+ "extensions": {
395
+ "operations": {
396
+ "version": "2"
397
+ }
398
+ }
399
+ }
400
+ }
401
+ },
402
+ {
403
+ "kind": "http",
404
+ "from": "manzanita",
405
+ "to": "atlas",
406
+ "method": "GET",
407
+ "url": "https://atlas.example/jwks.json",
408
+ "status": 200,
409
+ "request": {
410
+ "headers": {
411
+ "accept": "application/json"
412
+ }
413
+ },
414
+ "response": {
415
+ "headers": {
416
+ "content-type": "application/json"
417
+ },
418
+ "body": {
419
+ "keys": [
420
+ {
421
+ "kty": "EC",
422
+ "crv": "P-256",
423
+ "x": "‹public key›",
424
+ "y": "‹public key›",
425
+ "kid": "key-1",
426
+ "use": "sig",
427
+ "alg": "ES256"
428
+ }
429
+ ]
430
+ }
431
+ }
449
432
  }
450
433
  ]
451
434
  },
452
435
  {
453
436
  "title": "Ada signs in on Manzanita's page",
454
437
  "channel": "Device Sign-In",
455
- "summary": "Atlas shows Manzanita's link and code. Ada signs in on manzanita.example and approves. Atlas polls at the company's pace; the same Session is upgraded and the Account Token goes to the host's vault, by reference.",
438
+ "summary": "Atlas shows Manzanita's link and code. Ada signs in on manzanita.example and approves. Atlas polls at the company's pace; sign-in is plain OAuth and names no Session. The same Session sends the access token from now on, and the refresh token goes to the host's vault, by reference.",
456
439
  "chat": [
457
440
  {
458
441
  "speaker": "atlas",
@@ -479,7 +462,7 @@
479
462
  },
480
463
  {
481
464
  "label": "Session",
482
- "value": "signed in · DPoP-bound"
465
+ "value": "signed in · a Session JWT on every request"
483
466
  },
484
467
  {
485
468
  "label": "Scopes",
@@ -487,7 +470,7 @@
487
470
  },
488
471
  {
489
472
  "label": "Vault (host only)",
490
- "value": "1 Account Token by reference"
473
+ "value": "1 refresh token by reference"
491
474
  },
492
475
  {
493
476
  "label": "Model sees",
@@ -501,10 +484,10 @@
501
484
  },
502
485
  {
503
486
  "label": "Sessions",
504
- "value": "1 live · 1 signed in"
487
+ "value": "1 live"
505
488
  },
506
489
  {
507
- "label": "Account behind the Session",
490
+ "label": "Account behind the access token",
508
491
  "value": "acct_ada"
509
492
  },
510
493
  {
@@ -512,7 +495,7 @@
512
495
  "value": "orders:read orders:write"
513
496
  },
514
497
  {
515
- "label": "Account Tokens issued",
498
+ "label": "Refresh tokens issued",
516
499
  "value": "1 · 1 not revoked"
517
500
  },
518
501
  {
@@ -567,8 +550,7 @@
567
550
  "request": {
568
551
  "headers": {
569
552
  "content-type": "application/x-www-form-urlencoded",
570
- "accept": "application/json",
571
- "dpop": "‹DPoP proof›"
553
+ "accept": "application/json"
572
554
  },
573
555
  "body": {
574
556
  "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
@@ -605,8 +587,7 @@
605
587
  "request": {
606
588
  "headers": {
607
589
  "content-type": "application/x-www-form-urlencoded",
608
- "accept": "application/json",
609
- "dpop": "‹DPoP proof›"
590
+ "accept": "application/json"
610
591
  },
611
592
  "body": {
612
593
  "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
@@ -623,11 +604,10 @@
623
604
  "cache-control": "no-store"
624
605
  },
625
606
  "body": {
626
- "access_token": "‹session token›",
627
- "token_type": "DPoP",
607
+ "access_token": "‹access token›",
608
+ "token_type": "Bearer",
628
609
  "expires_in": 3600,
629
- "refresh_token": "‹account token›",
630
- "refresh_token_expires_in": 7776000
610
+ "refresh_token": "‹refresh token›"
631
611
  }
632
612
  }
633
613
  }
@@ -636,7 +616,7 @@
636
616
  {
637
617
  "title": "The same conversation, signed in",
638
618
  "channel": "Conversation + Operation",
639
- "summary": "The conversation keeps its ID; now signed in, Manzanita proposes the exchange as an operation: one summary, exact terms, revision 1. Nothing happens until it is confirmed.",
619
+ "summary": "The conversation keeps its ID; now signed in, Manzanita returns the exchange as an operation: one summary, exact terms, an opaque revision. Nothing happens until Ada approves it.",
640
620
  "chat": [
641
621
  {
642
622
  "speaker": "user",
@@ -651,7 +631,7 @@
651
631
  {
652
632
  "speaker": "manzanita",
653
633
  "kind": "approval",
654
- "title": "Revision 1 · needs your approval",
634
+ "title": "Revision rev_1 · needs your approval",
655
635
  "text": "Exchange the Ridge Jacket (M) from order ord_7Hk2 for the insulated Ridge Jacket (M), USD 70.00 more."
656
636
  }
657
637
  ],
@@ -663,7 +643,7 @@
663
643
  },
664
644
  {
665
645
  "label": "Session",
666
- "value": "signed in · DPoP-bound"
646
+ "value": "signed in · a Session JWT on every request"
667
647
  },
668
648
  {
669
649
  "label": "Scopes",
@@ -671,7 +651,7 @@
671
651
  },
672
652
  {
673
653
  "label": "Vault (host only)",
674
- "value": "1 Account Token by reference"
654
+ "value": "1 refresh token by reference"
675
655
  },
676
656
  {
677
657
  "label": "Model sees",
@@ -685,10 +665,10 @@
685
665
  },
686
666
  {
687
667
  "label": "Sessions",
688
- "value": "1 live · 1 signed in"
668
+ "value": "1 live"
689
669
  },
690
670
  {
691
- "label": "Account behind the Session",
671
+ "label": "Account behind the access token",
692
672
  "value": "acct_ada"
693
673
  },
694
674
  {
@@ -696,7 +676,7 @@
696
676
  "value": "orders:read orders:write"
697
677
  },
698
678
  {
699
- "label": "Account Tokens issued",
679
+ "label": "Refresh tokens issued",
700
680
  "value": "1 · 1 not revoked"
701
681
  },
702
682
  {
@@ -705,7 +685,7 @@
705
685
  },
706
686
  {
707
687
  "label": "Operation orders.exchange",
708
- "value": "revision 1 · proposed"
688
+ "value": "revision rev_1 · open"
709
689
  }
710
690
  ]
711
691
  },
@@ -721,8 +701,8 @@
721
701
  "headers": {
722
702
  "content-type": "application/json",
723
703
  "accept": "*/*",
724
- "authorization": "DPoP ‹session token›",
725
- "dpop": "‹DPoP proof›"
704
+ "authorization": "Bearer ‹access token›",
705
+ "poppy-session": "‹Session JWT›"
726
706
  },
727
707
  "body": {
728
708
  "message": {
@@ -774,8 +754,7 @@
774
754
  "text": "The insulated Ridge Jacket is in stock. Here is the exchange.",
775
755
  "operation": {
776
756
  "operation_id": "op_1",
777
- "revision": 1,
778
- "state": "proposed",
757
+ "revision": "rev_1",
779
758
  "summary": "Exchange the Ridge Jacket (M) from order ord_7Hk2 for the insulated Ridge Jacket (M), USD 70.00 more.",
780
759
  "terms": {
781
760
  "order_id": "ord_7Hk2",
@@ -784,11 +763,7 @@
784
763
  "currency": "USD"
785
764
  }
786
765
  },
787
- "expires_at": "2026-10-11T09:15:10Z",
788
- "user_approval_required": true,
789
- "url": "https://manzanita.example/operations/op_1",
790
- "confirmation": null,
791
- "result": null
766
+ "expires_at": "2026-10-11T09:15:10Z"
792
767
  }
793
768
  }
794
769
  },
@@ -811,13 +786,13 @@
811
786
  },
812
787
  {
813
788
  "title": "Ada approves this exact revision",
814
- "channel": "Operations v1",
815
- "summary": "Atlas confirms the revision Ada saw, with approved_by: user. Manzanita performs the exchange once and returns the result summary, which Atlas shows as written.",
789
+ "channel": "Operations version 2",
790
+ "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.",
816
791
  "chat": [
817
792
  {
818
793
  "speaker": "user",
819
794
  "kind": "approval",
820
- "title": "Revision 1 · approved",
795
+ "title": "Revision rev_1 · approved",
821
796
  "text": "Exchange the Ridge Jacket (M) from order ord_7Hk2 for the insulated Ridge Jacket (M), USD 70.00 more."
822
797
  },
823
798
  {
@@ -835,7 +810,7 @@
835
810
  },
836
811
  {
837
812
  "label": "Session",
838
- "value": "signed in · DPoP-bound"
813
+ "value": "signed in · a Session JWT on every request"
839
814
  },
840
815
  {
841
816
  "label": "Scopes",
@@ -843,7 +818,7 @@
843
818
  },
844
819
  {
845
820
  "label": "Vault (host only)",
846
- "value": "1 Account Token by reference"
821
+ "value": "1 refresh token by reference"
847
822
  },
848
823
  {
849
824
  "label": "Model sees",
@@ -857,10 +832,10 @@
857
832
  },
858
833
  {
859
834
  "label": "Sessions",
860
- "value": "1 live · 1 signed in"
835
+ "value": "1 live"
861
836
  },
862
837
  {
863
- "label": "Account behind the Session",
838
+ "label": "Account behind the access token",
864
839
  "value": "acct_ada"
865
840
  },
866
841
  {
@@ -868,16 +843,16 @@
868
843
  "value": "orders:read orders:write"
869
844
  },
870
845
  {
871
- "label": "Account Tokens issued",
846
+ "label": "Refresh tokens issued",
872
847
  "value": "1 · 1 not revoked"
873
848
  },
874
849
  {
875
850
  "label": "Conversation",
876
- "value": "idle · agent · 9 events"
851
+ "value": "idle · agent · 13 events"
877
852
  },
878
853
  {
879
854
  "label": "Operation orders.exchange",
880
- "value": "revision 1 · succeeded · approved by user"
855
+ "value": "revision rev_1 · performed"
881
856
  }
882
857
  ]
883
858
  },
@@ -886,25 +861,33 @@
886
861
  "kind": "action",
887
862
  "from": "user",
888
863
  "to": "atlas",
889
- "label": "Approves revision 1 as shown"
864
+ "label": "Approves revision rev_1 as shown"
890
865
  },
891
866
  {
892
867
  "kind": "http",
893
868
  "from": "atlas",
894
869
  "to": "manzanita",
895
870
  "method": "POST",
896
- "url": "https://manzanita.example/poppy/operations/op_1/confirm",
897
- "status": 200,
871
+ "url": "https://manzanita.example/poppy/conversations/cnv_1/messages?wait=0",
872
+ "status": 202,
898
873
  "request": {
899
874
  "headers": {
900
875
  "content-type": "application/json",
901
- "accept": "application/json",
902
- "authorization": "DPoP ‹session token›",
903
- "dpop": "‹DPoP proof›"
876
+ "accept": "*/*",
877
+ "authorization": "Bearer ‹access token›",
878
+ "poppy-session": "‹Session JWT›"
904
879
  },
905
880
  "body": {
906
- "revision": 1,
907
- "approved_by": "user"
881
+ "message": {
882
+ "id": "msg_5",
883
+ "author": {
884
+ "type": "agent"
885
+ },
886
+ "approval": {
887
+ "operation_id": "op_1",
888
+ "revision": "rev_1"
889
+ }
890
+ }
908
891
  }
909
892
  },
910
893
  "response": {
@@ -912,34 +895,163 @@
912
895
  "content-type": "application/json"
913
896
  },
914
897
  "body": {
915
- "operation_id": "op_1",
916
- "revision": 1,
917
- "state": "succeeded",
918
- "summary": "Exchange the Ridge Jacket (M) from order ord_7Hk2 for the insulated Ridge Jacket (M), USD 70.00 more.",
919
- "terms": {
920
- "order_id": "ord_7Hk2",
921
- "price_difference": {
922
- "amount": "70.00",
923
- "currency": "USD"
924
- }
925
- },
926
- "user_approval_required": true,
927
- "url": "https://manzanita.example/operations/op_1",
928
- "confirmation": {
929
- "revision": 1,
930
- "approved_by": "user",
931
- "confirmed_at": "2026-10-11T09:00:10Z"
932
- },
933
- "result": {
934
- "summary": "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.",
935
- "data": {
936
- "order_id": "ord_7Hk2",
937
- "charged": {
938
- "amount": "70.00",
939
- "currency": "USD"
898
+ "conversation_id": "cnv_1",
899
+ "events": [
900
+ {
901
+ "id": "evt_1",
902
+ "created_at": "2026-10-11T09:00:00Z",
903
+ "type": "message",
904
+ "message": {
905
+ "id": "msg_1",
906
+ "author": {
907
+ "type": "human"
908
+ },
909
+ "text": "Where is my jacket order?",
910
+ "role": "user"
911
+ }
912
+ },
913
+ {
914
+ "id": "evt_2",
915
+ "created_at": "2026-10-11T09:00:00Z",
916
+ "type": "state",
917
+ "status": "working",
918
+ "responder": "agent"
919
+ },
920
+ {
921
+ "id": "evt_3",
922
+ "created_at": "2026-10-11T09:00:00Z",
923
+ "type": "message",
924
+ "message": {
925
+ "id": "msg_2",
926
+ "author": {
927
+ "type": "agent"
928
+ },
929
+ "role": "company",
930
+ "text": "I can look that up once you sign in to your Manzanita account."
931
+ }
932
+ },
933
+ {
934
+ "id": "evt_4",
935
+ "created_at": "2026-10-11T09:00:00Z",
936
+ "type": "authorization",
937
+ "error": "insufficient_scope",
938
+ "scope": "orders:read orders:write"
939
+ },
940
+ {
941
+ "id": "evt_5",
942
+ "created_at": "2026-10-11T09:00:00Z",
943
+ "type": "state",
944
+ "status": "idle",
945
+ "responder": "agent"
946
+ },
947
+ {
948
+ "id": "evt_6",
949
+ "created_at": "2026-10-11T09:00:10Z",
950
+ "type": "message",
951
+ "message": {
952
+ "id": "msg_3",
953
+ "author": {
954
+ "type": "human"
955
+ },
956
+ "text": "Exchange it for something warmer",
957
+ "role": "user"
958
+ }
959
+ },
960
+ {
961
+ "id": "evt_7",
962
+ "created_at": "2026-10-11T09:00:10Z",
963
+ "type": "state",
964
+ "status": "working",
965
+ "responder": "agent"
966
+ },
967
+ {
968
+ "id": "evt_8",
969
+ "created_at": "2026-10-11T09:00:10Z",
970
+ "type": "message",
971
+ "message": {
972
+ "id": "msg_4",
973
+ "author": {
974
+ "type": "agent"
975
+ },
976
+ "role": "company",
977
+ "text": "The insulated Ridge Jacket is in stock. Here is the exchange.",
978
+ "operation": {
979
+ "operation_id": "op_1",
980
+ "revision": "rev_1",
981
+ "summary": "Exchange the Ridge Jacket (M) from order ord_7Hk2 for the insulated Ridge Jacket (M), USD 70.00 more.",
982
+ "terms": {
983
+ "order_id": "ord_7Hk2",
984
+ "price_difference": {
985
+ "amount": "70.00",
986
+ "currency": "USD"
987
+ }
988
+ },
989
+ "expires_at": "2026-10-11T09:15:10Z"
990
+ }
991
+ }
992
+ },
993
+ {
994
+ "id": "evt_9",
995
+ "created_at": "2026-10-11T09:00:10Z",
996
+ "type": "state",
997
+ "status": "idle",
998
+ "responder": "agent"
999
+ },
1000
+ {
1001
+ "id": "evt_10",
1002
+ "created_at": "2026-10-11T09:00:10Z",
1003
+ "type": "message",
1004
+ "message": {
1005
+ "id": "msg_5",
1006
+ "author": {
1007
+ "type": "agent"
1008
+ },
1009
+ "approval": {
1010
+ "operation_id": "op_1",
1011
+ "revision": "rev_1"
1012
+ },
1013
+ "role": "user"
940
1014
  }
1015
+ },
1016
+ {
1017
+ "id": "evt_11",
1018
+ "created_at": "2026-10-11T09:00:10Z",
1019
+ "type": "state",
1020
+ "status": "working",
1021
+ "responder": "agent"
1022
+ },
1023
+ {
1024
+ "id": "evt_12",
1025
+ "created_at": "2026-10-11T09:00:10Z",
1026
+ "type": "message",
1027
+ "message": {
1028
+ "id": "msg_6",
1029
+ "author": {
1030
+ "type": "agent"
1031
+ },
1032
+ "role": "company",
1033
+ "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.",
1034
+ "data": {
1035
+ "order_id": "ord_7Hk2",
1036
+ "charged": {
1037
+ "amount": "70.00",
1038
+ "currency": "USD"
1039
+ }
1040
+ }
1041
+ }
1042
+ },
1043
+ {
1044
+ "id": "evt_13",
1045
+ "created_at": "2026-10-11T09:00:10Z",
1046
+ "type": "state",
1047
+ "status": "idle",
1048
+ "responder": "agent"
941
1049
  }
942
- }
1050
+ ],
1051
+ "cursor": "evt_13",
1052
+ "has_more": false,
1053
+ "status": "idle",
1054
+ "responder": "agent"
943
1055
  }
944
1056
  }
945
1057
  }
@@ -947,8 +1059,8 @@
947
1059
  },
948
1060
  {
949
1061
  "title": "Ada disconnects Atlas",
950
- "channel": "Account Token revocation",
951
- "summary": "Atlas revokes the Account Token at Manzanita, then forgets it. Every Session signed in with it continues signed out.",
1062
+ "channel": "Refresh token revocation",
1063
+ "summary": "Atlas revokes the refresh token at Manzanita, then forgets it. With no valid refresh token left, the account is signed out.",
952
1064
  "chat": [
953
1065
  {
954
1066
  "speaker": "user",
@@ -983,23 +1095,23 @@
983
1095
  },
984
1096
  {
985
1097
  "label": "Sessions",
986
- "value": "1 live · 0 signed in"
1098
+ "value": "1 live"
987
1099
  },
988
1100
  {
989
1101
  "label": "Who is it?",
990
1102
  "value": "A pairwise identifier only"
991
1103
  },
992
1104
  {
993
- "label": "Account Tokens issued",
1105
+ "label": "Refresh tokens issued",
994
1106
  "value": "1 · 0 not revoked"
995
1107
  },
996
1108
  {
997
1109
  "label": "Conversation",
998
- "value": "idle · agent · 9 events"
1110
+ "value": "idle · agent · 13 events"
999
1111
  },
1000
1112
  {
1001
1113
  "label": "Operation orders.exchange",
1002
- "value": "revision 1 · succeeded · approved by user"
1114
+ "value": "revision rev_1 · performed"
1003
1115
  }
1004
1116
  ]
1005
1117
  },
@@ -1023,7 +1135,7 @@
1023
1135
  "accept": "application/json"
1024
1136
  },
1025
1137
  "body": {
1026
- "token": "‹account token›",
1138
+ "token": "‹refresh token›",
1027
1139
  "token_type_hint": "refresh_token",
1028
1140
  "client_id": "https://atlas.example/agent.json",
1029
1141
  "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",