@datalayer/agent-runtimes 1.5.4 → 1.5.7
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/datalayer-app-main.js +58 -58
- package/lib/apps/apps/appspec.d.ts +1 -1
- package/lib/apps/apps/appspec.js +46 -0
- package/lib/apps/apps/sceneYaml.js +4 -0
- package/lib/examples/ScenesExample.js +2 -1
- package/lib/protocols/commerce.js +11 -3
- package/lib/protocols/ucp/index.d.ts +4 -0
- package/lib/protocols/ucp/index.js +31 -1
- package/lib/protocols/ucp/merchant.js +27 -2
- package/lib/specs/actions.js +28 -15
- package/lib/specs/apps.d.ts +7 -0
- package/lib/specs/apps.js +2046 -185
- package/lib/specs/appspecSchema.js +86 -1
- package/lib/specs/protocols.js +4 -4
- package/lib/specs/sceneSchema.js +185 -1
- package/lib/specs/scenes.d.ts +6 -0
- package/lib/specs/scenes.js +1034 -0
- package/lib/types/agentspecs.d.ts +29 -0
- package/lib/types/scenes.d.ts +52 -0
- package/package.json +1 -1
- package/scripts/codegen/generate_apps.py +2 -2
- package/scripts/codegen/generate_scenes.py +11 -4
|
@@ -201,6 +201,62 @@ export const APPSPEC_SCHEMA = {
|
|
|
201
201
|
title: 'AppCommand',
|
|
202
202
|
type: 'object',
|
|
203
203
|
},
|
|
204
|
+
AppCommerce: {
|
|
205
|
+
additionalProperties: false,
|
|
206
|
+
description: 'Commerce: the merchants it shops at for each person (AGENT_PROTOCOLS PI-01).',
|
|
207
|
+
properties: {
|
|
208
|
+
merchants: {
|
|
209
|
+
description: 'Merchants, over UCP or ACP: test merchants only for now',
|
|
210
|
+
items: {
|
|
211
|
+
$ref: '#/$defs/AppCommerceMerchant',
|
|
212
|
+
},
|
|
213
|
+
title: 'Merchants',
|
|
214
|
+
type: 'array',
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
title: 'AppCommerce',
|
|
218
|
+
type: 'object',
|
|
219
|
+
},
|
|
220
|
+
AppCommerceMerchant: {
|
|
221
|
+
additionalProperties: false,
|
|
222
|
+
description: "A merchant the application shops at for each person, over UCP or ACP (AGENT_PROTOCOLS PI-01).\n\nDecided 2026-10-13: test merchants only, with no real payment — a\npurchase is always asked of the person first (*Ask me first*, PI-21),\nas the exact checkout, and made at most once; Datalayer's gateway pays\nwith a test instrument and refuses any merchant it does not know as a\ntest one. Named by its domain (its profile at `/.well-known/ucp`, or\n`/.well-known/acp.json`), always in each person's own name. No\ncredential is ever part of a spec.",
|
|
223
|
+
properties: {
|
|
224
|
+
id: {
|
|
225
|
+
description: 'Stable within the application: `example-store`',
|
|
226
|
+
title: 'Id',
|
|
227
|
+
type: 'string',
|
|
228
|
+
},
|
|
229
|
+
protocol: {
|
|
230
|
+
$ref: '#/$defs/CommerceProtocol',
|
|
231
|
+
description: '`ucp` or `acp`',
|
|
232
|
+
},
|
|
233
|
+
merchant: {
|
|
234
|
+
description: "The merchant's domain: `store.example`",
|
|
235
|
+
title: 'Merchant',
|
|
236
|
+
type: 'string',
|
|
237
|
+
},
|
|
238
|
+
access: {
|
|
239
|
+
$ref: '#/$defs/Access',
|
|
240
|
+
default: 'read',
|
|
241
|
+
description: 'How far: `read` (searches and reads its checkouts), or `write` (also fills a checkout and buys, each purchase asked of the person)',
|
|
242
|
+
},
|
|
243
|
+
limit: {
|
|
244
|
+
anyOf: [
|
|
245
|
+
{
|
|
246
|
+
$ref: '#/$defs/AppSpendLimit',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
type: 'null',
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
default: null,
|
|
253
|
+
description: 'The most one purchase may cost there: required for `write`',
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
required: ['id', 'protocol', 'merchant'],
|
|
257
|
+
title: 'AppCommerceMerchant',
|
|
258
|
+
type: 'object',
|
|
259
|
+
},
|
|
204
260
|
AppComputer: {
|
|
205
261
|
additionalProperties: false,
|
|
206
262
|
description: 'What the application may do on its own computer. Each is off until it is turned on.',
|
|
@@ -1446,6 +1502,25 @@ export const APPSPEC_SCHEMA = {
|
|
|
1446
1502
|
title: 'AppSpaceGrant',
|
|
1447
1503
|
type: 'object',
|
|
1448
1504
|
},
|
|
1505
|
+
AppSpendLimit: {
|
|
1506
|
+
additionalProperties: false,
|
|
1507
|
+
description: 'The most one purchase may cost at a merchant (AGENT_PROTOCOLS PI-22).',
|
|
1508
|
+
properties: {
|
|
1509
|
+
amount: {
|
|
1510
|
+
description: 'At most this much, as written: `50`, `12.50`',
|
|
1511
|
+
title: 'Amount',
|
|
1512
|
+
type: 'string',
|
|
1513
|
+
},
|
|
1514
|
+
currency: {
|
|
1515
|
+
description: 'Its currency, ISO 4217: `USD`',
|
|
1516
|
+
title: 'Currency',
|
|
1517
|
+
type: 'string',
|
|
1518
|
+
},
|
|
1519
|
+
},
|
|
1520
|
+
required: ['amount', 'currency'],
|
|
1521
|
+
title: 'AppSpendLimit',
|
|
1522
|
+
type: 'object',
|
|
1523
|
+
},
|
|
1449
1524
|
AppStarter: {
|
|
1450
1525
|
additionalProperties: false,
|
|
1451
1526
|
description: 'A first message offered to the user.',
|
|
@@ -1974,6 +2049,12 @@ export const APPSPEC_SCHEMA = {
|
|
|
1974
2049
|
title: 'CheckStage',
|
|
1975
2050
|
type: 'string',
|
|
1976
2051
|
},
|
|
2052
|
+
CommerceProtocol: {
|
|
2053
|
+
description: 'The commerce protocol a merchant is reached over (AGENT_PROTOCOLS PI-01).',
|
|
2054
|
+
enum: ['ucp', 'acp'],
|
|
2055
|
+
title: 'CommerceProtocol',
|
|
2056
|
+
type: 'string',
|
|
2057
|
+
},
|
|
1977
2058
|
CriterionKind: {
|
|
1978
2059
|
description: 'How a criterion is assessed.',
|
|
1979
2060
|
enum: ['metric', 'noul', 'choice', 'score'],
|
|
@@ -2311,7 +2392,7 @@ export const APPSPEC_SCHEMA = {
|
|
|
2311
2392
|
type: 'array',
|
|
2312
2393
|
},
|
|
2313
2394
|
protocols: {
|
|
2314
|
-
description: 'The agent protocols it speaks, ids of the protocols catalogue (AGENT_PROTOCOLS PS-02): its `pap`, `pact` and `a2a` blocks are refused unless their protocol is listed, and a planned protocol only while it is not offered',
|
|
2395
|
+
description: 'The agent protocols it speaks, ids of the protocols catalogue (AGENT_PROTOCOLS PS-02): its `pap`, `pact` and `a2a` blocks, and each merchant of `commerce`, are refused unless their protocol is listed, and a planned protocol only while it is not offered',
|
|
2315
2396
|
items: {
|
|
2316
2397
|
type: 'string',
|
|
2317
2398
|
},
|
|
@@ -2334,6 +2415,10 @@ export const APPSPEC_SCHEMA = {
|
|
|
2334
2415
|
$ref: '#/$defs/AppPact',
|
|
2335
2416
|
description: 'PACT: businesses it asks for each person',
|
|
2336
2417
|
},
|
|
2418
|
+
commerce: {
|
|
2419
|
+
$ref: '#/$defs/AppCommerce',
|
|
2420
|
+
description: 'UCP and ACP: merchants it shops at for each person',
|
|
2421
|
+
},
|
|
2337
2422
|
a2a: {
|
|
2338
2423
|
$ref: '#/$defs/AppA2A',
|
|
2339
2424
|
description: 'A2A: the extensions its Agent Card advertises',
|
package/lib/specs/protocols.js
CHANGED
|
@@ -41,12 +41,12 @@ export const ACP_PROTOCOL_0_0_1 = {
|
|
|
41
41
|
id: 'acp',
|
|
42
42
|
version: '0.0.1',
|
|
43
43
|
name: 'Agentic Commerce Protocol',
|
|
44
|
-
description: 'Checkout sessions at a seller, completed with a
|
|
44
|
+
description: 'Checkout sessions at a seller, completed with a payment the model never sees. In applications at test merchants only, with no real payment token (decided 2026-10-13): each purchase asked of the person first, made at most once.',
|
|
45
45
|
publisher: 'OpenAI, Stripe',
|
|
46
46
|
layer: 'commerce',
|
|
47
47
|
specUrl: 'https://github.com/agentic-commerce-protocol/agentic-commerce-protocol',
|
|
48
48
|
specVersion: '2026-04-17',
|
|
49
|
-
status: '
|
|
49
|
+
status: 'shipped',
|
|
50
50
|
connects: 'Sellers, to check out with a delegated payment',
|
|
51
51
|
packages: {
|
|
52
52
|
python: ['agent-runtimes'],
|
|
@@ -145,12 +145,12 @@ export const UCP_PROTOCOL_0_0_1 = {
|
|
|
145
145
|
id: 'ucp',
|
|
146
146
|
version: '0.0.1',
|
|
147
147
|
name: 'Universal Commerce Protocol',
|
|
148
|
-
description: 'Shopping at a merchant: catalogue, checkout and orders, every purchase an exact proposal the person approves.
|
|
148
|
+
description: 'Shopping at a merchant: catalogue, checkout and orders, every purchase an exact proposal the person approves. In applications at test merchants only, with no real payment (decided 2026-10-13): each purchase asked of the person first, made at most once.',
|
|
149
149
|
publisher: 'Google, with Shopify and retailers',
|
|
150
150
|
layer: 'commerce',
|
|
151
151
|
specUrl: 'https://github.com/Universal-Commerce-Protocol/ucp',
|
|
152
152
|
specVersion: '2026-08-25',
|
|
153
|
-
status: '
|
|
153
|
+
status: 'shipped',
|
|
154
154
|
connects: 'Merchants, to search, check out and follow orders',
|
|
155
155
|
packages: {
|
|
156
156
|
python: ['ucp-sdk', 'agent-runtimes'],
|
package/lib/specs/sceneSchema.js
CHANGED
|
@@ -116,6 +116,35 @@ export const SCENE_SCHEMA = {
|
|
|
116
116
|
title: 'RehearsalBeat',
|
|
117
117
|
type: 'object',
|
|
118
118
|
},
|
|
119
|
+
SceneActor: {
|
|
120
|
+
additionalProperties: false,
|
|
121
|
+
description: 'Somebody on a scripted scene: a person, an application, a company — never a team member.',
|
|
122
|
+
properties: {
|
|
123
|
+
id: {
|
|
124
|
+
description: 'Its id, as the lines name it',
|
|
125
|
+
title: 'Id',
|
|
126
|
+
type: 'string',
|
|
127
|
+
},
|
|
128
|
+
name: {
|
|
129
|
+
description: 'The name the audience sees',
|
|
130
|
+
title: 'Name',
|
|
131
|
+
type: 'string',
|
|
132
|
+
},
|
|
133
|
+
face: {
|
|
134
|
+
description: 'One emoji, drawn before the name',
|
|
135
|
+
title: 'Face',
|
|
136
|
+
type: 'string',
|
|
137
|
+
},
|
|
138
|
+
is: {
|
|
139
|
+
description: 'What it is, in a few words',
|
|
140
|
+
title: 'Is',
|
|
141
|
+
type: 'string',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
required: ['id', 'name', 'face', 'is'],
|
|
145
|
+
title: 'SceneActor',
|
|
146
|
+
type: 'object',
|
|
147
|
+
},
|
|
119
148
|
SceneAudience: {
|
|
120
149
|
additionalProperties: false,
|
|
121
150
|
description: 'Who may watch and ask, and what an ask may cost.',
|
|
@@ -242,6 +271,47 @@ export const SCENE_SCHEMA = {
|
|
|
242
271
|
title: 'SceneBranch',
|
|
243
272
|
type: 'object',
|
|
244
273
|
},
|
|
274
|
+
SceneCard: {
|
|
275
|
+
additionalProperties: false,
|
|
276
|
+
description: 'What the audience reads on a line: rows and sentences, never a credential.',
|
|
277
|
+
properties: {
|
|
278
|
+
kind: {
|
|
279
|
+
$ref: '#/$defs/SceneCardKind',
|
|
280
|
+
},
|
|
281
|
+
title: {
|
|
282
|
+
title: 'Title',
|
|
283
|
+
type: 'string',
|
|
284
|
+
},
|
|
285
|
+
rows: {
|
|
286
|
+
description: 'Its rows: each a label and a value',
|
|
287
|
+
items: {
|
|
288
|
+
items: {
|
|
289
|
+
type: 'string',
|
|
290
|
+
},
|
|
291
|
+
type: 'array',
|
|
292
|
+
},
|
|
293
|
+
title: 'Rows',
|
|
294
|
+
type: 'array',
|
|
295
|
+
},
|
|
296
|
+
lines: {
|
|
297
|
+
description: 'Its sentences',
|
|
298
|
+
items: {
|
|
299
|
+
type: 'string',
|
|
300
|
+
},
|
|
301
|
+
title: 'Lines',
|
|
302
|
+
type: 'array',
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
required: ['kind', 'title'],
|
|
306
|
+
title: 'SceneCard',
|
|
307
|
+
type: 'object',
|
|
308
|
+
},
|
|
309
|
+
SceneCardKind: {
|
|
310
|
+
description: 'What a card of a scripted line is.',
|
|
311
|
+
enum: ['found', 'sign-in', 'approval', 'done', 'record'],
|
|
312
|
+
title: 'SceneCardKind',
|
|
313
|
+
type: 'string',
|
|
314
|
+
},
|
|
245
315
|
SceneCastMember: {
|
|
246
316
|
additionalProperties: false,
|
|
247
317
|
description: 'A member of the cast.\n\nOn a staged team, it names a member of the team (`member`) and says only\nhow it appears here (`persona`) and what it is for in this scene\n(`brief`). Written inline — a scene with no `team` — it is the member:\nwhat it is (`app`, `ref` or `server`), its `role`, where it `runs_in`\nand whom it `talks_to`, as a team member says them.',
|
|
@@ -370,6 +440,67 @@ export const SCENE_SCHEMA = {
|
|
|
370
440
|
title: 'SceneDeployment',
|
|
371
441
|
type: 'object',
|
|
372
442
|
},
|
|
443
|
+
SceneKind: {
|
|
444
|
+
description: 'What a scene plays: a team, live (`team`), or lines written out (`scripted`).',
|
|
445
|
+
enum: ['team', 'scripted'],
|
|
446
|
+
title: 'SceneKind',
|
|
447
|
+
type: 'string',
|
|
448
|
+
},
|
|
449
|
+
SceneLine: {
|
|
450
|
+
additionalProperties: false,
|
|
451
|
+
description: 'One line of a scripted scene: who acts, to whom, what they say or do.',
|
|
452
|
+
properties: {
|
|
453
|
+
from: {
|
|
454
|
+
description: "Who acts: an actor's id",
|
|
455
|
+
title: 'From',
|
|
456
|
+
type: 'string',
|
|
457
|
+
},
|
|
458
|
+
to: {
|
|
459
|
+
default: '',
|
|
460
|
+
description: 'To whom, when somebody is addressed',
|
|
461
|
+
title: 'To',
|
|
462
|
+
type: 'string',
|
|
463
|
+
},
|
|
464
|
+
says: {
|
|
465
|
+
description: 'What they say or do, in a sentence; in quotes when it is said',
|
|
466
|
+
title: 'Says',
|
|
467
|
+
type: 'string',
|
|
468
|
+
},
|
|
469
|
+
card: {
|
|
470
|
+
anyOf: [
|
|
471
|
+
{
|
|
472
|
+
$ref: '#/$defs/SceneCard',
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
type: 'null',
|
|
476
|
+
},
|
|
477
|
+
],
|
|
478
|
+
default: null,
|
|
479
|
+
description: 'What the audience reads',
|
|
480
|
+
},
|
|
481
|
+
how: {
|
|
482
|
+
default: '',
|
|
483
|
+
description: "What happened underneath, in a visitor's words",
|
|
484
|
+
title: 'How',
|
|
485
|
+
type: 'string',
|
|
486
|
+
},
|
|
487
|
+
turn: {
|
|
488
|
+
anyOf: [
|
|
489
|
+
{
|
|
490
|
+
$ref: '#/$defs/SceneTurn',
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
type: 'null',
|
|
494
|
+
},
|
|
495
|
+
],
|
|
496
|
+
default: null,
|
|
497
|
+
description: "The audience's turn: the scene waits",
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
required: ['from', 'says'],
|
|
501
|
+
title: 'SceneLine',
|
|
502
|
+
type: 'object',
|
|
503
|
+
},
|
|
373
504
|
SceneMove: {
|
|
374
505
|
additionalProperties: false,
|
|
375
506
|
description: 'One member asking another over a protocol, or answering the audience.',
|
|
@@ -680,6 +811,32 @@ export const SCENE_SCHEMA = {
|
|
|
680
811
|
title: 'SceneTranscript',
|
|
681
812
|
type: 'object',
|
|
682
813
|
},
|
|
814
|
+
SceneTurn: {
|
|
815
|
+
additionalProperties: false,
|
|
816
|
+
description: "The audience's turn on a scripted line: the scene waits for them.",
|
|
817
|
+
properties: {
|
|
818
|
+
yes: {
|
|
819
|
+
description: 'What saying yes is called',
|
|
820
|
+
title: 'Yes',
|
|
821
|
+
type: 'string',
|
|
822
|
+
},
|
|
823
|
+
no: {
|
|
824
|
+
default: '',
|
|
825
|
+
description: 'What saying no is called; none when there is nothing to refuse',
|
|
826
|
+
title: 'No',
|
|
827
|
+
type: 'string',
|
|
828
|
+
},
|
|
829
|
+
declined: {
|
|
830
|
+
default: '',
|
|
831
|
+
description: 'What happens once they said no: the scene ends there',
|
|
832
|
+
title: 'Declined',
|
|
833
|
+
type: 'string',
|
|
834
|
+
},
|
|
835
|
+
},
|
|
836
|
+
required: ['yes'],
|
|
837
|
+
title: 'SceneTurn',
|
|
838
|
+
type: 'object',
|
|
839
|
+
},
|
|
683
840
|
StagePosition: {
|
|
684
841
|
additionalProperties: false,
|
|
685
842
|
description: 'Where a member stands: fractions of the box, left to right and top to bottom.',
|
|
@@ -757,7 +914,7 @@ export const SCENE_SCHEMA = {
|
|
|
757
914
|
},
|
|
758
915
|
},
|
|
759
916
|
additionalProperties: false,
|
|
760
|
-
description: 'Specification for a scene: a team, staged.',
|
|
917
|
+
description: 'Specification for a scene: a team, staged — or, `kind: scripted`, lines written out.',
|
|
761
918
|
properties: {
|
|
762
919
|
schema: {
|
|
763
920
|
description: 'The version of the spec itself',
|
|
@@ -806,6 +963,11 @@ export const SCENE_SCHEMA = {
|
|
|
806
963
|
title: 'Emoji',
|
|
807
964
|
type: 'string',
|
|
808
965
|
},
|
|
966
|
+
kind: {
|
|
967
|
+
$ref: '#/$defs/SceneKind',
|
|
968
|
+
default: 'team',
|
|
969
|
+
description: '`team`: a team staged, live; `scripted`: lines written out, played as written, with no team or cast',
|
|
970
|
+
},
|
|
809
971
|
team: {
|
|
810
972
|
default: '',
|
|
811
973
|
description: 'The team it stages, `id` or `id:version`',
|
|
@@ -854,6 +1016,28 @@ export const SCENE_SCHEMA = {
|
|
|
854
1016
|
$ref: '#/$defs/SceneDeployment',
|
|
855
1017
|
description: 'Where it plays',
|
|
856
1018
|
},
|
|
1019
|
+
actors: {
|
|
1020
|
+
description: "A scripted scene's actors",
|
|
1021
|
+
items: {
|
|
1022
|
+
$ref: '#/$defs/SceneActor',
|
|
1023
|
+
},
|
|
1024
|
+
title: 'Actors',
|
|
1025
|
+
type: 'array',
|
|
1026
|
+
},
|
|
1027
|
+
lines: {
|
|
1028
|
+
description: "A scripted scene's lines, in order",
|
|
1029
|
+
items: {
|
|
1030
|
+
$ref: '#/$defs/SceneLine',
|
|
1031
|
+
},
|
|
1032
|
+
title: 'Lines',
|
|
1033
|
+
type: 'array',
|
|
1034
|
+
},
|
|
1035
|
+
live: {
|
|
1036
|
+
default: '',
|
|
1037
|
+
description: 'A scripted scene: what of it runs on Datalayer today, said honestly',
|
|
1038
|
+
title: 'Live',
|
|
1039
|
+
type: 'string',
|
|
1040
|
+
},
|
|
857
1041
|
},
|
|
858
1042
|
required: ['id', 'name'],
|
|
859
1043
|
title: 'Scene spec',
|
package/lib/specs/scenes.d.ts
CHANGED
|
@@ -11,7 +11,13 @@ import type { SceneSpec } from '../types/scenes';
|
|
|
11
11
|
export declare const CROP_MONITORING_SCENE_0_0_1: SceneSpec;
|
|
12
12
|
export declare const DISASTER_ASSESSMENT_SCENE_0_0_1: SceneSpec;
|
|
13
13
|
export declare const MONTH_END_CLOSE_SCENE_0_0_1: SceneSpec;
|
|
14
|
+
export declare const PACT_A_PERSONAL_AGENT_AT_A_BUSINESS_SCENE_0_0_1: SceneSpec;
|
|
15
|
+
export declare const PAP_A_PERSON_AND_A_COMPANY_SCENE_0_0_1: SceneSpec;
|
|
16
|
+
export declare const PAP_APPROVE_ONCE_SCENE_0_0_1: SceneSpec;
|
|
17
|
+
export declare const PAP_TWO_COMPANIES_SCENE_0_0_1: SceneSpec;
|
|
18
|
+
export declare const PAP_YOUR_APPLICATION_A_COMPANY_SCENE_0_0_1: SceneSpec;
|
|
14
19
|
export declare const SALES_AND_ACCOUNTING_SCENE_0_0_1: SceneSpec;
|
|
20
|
+
export declare const UCP_A_PURCHASE_APPROVED_SCENE_0_0_1: SceneSpec;
|
|
15
21
|
export declare const SCENE_CATALOGUE: Record<string, SceneSpec>;
|
|
16
22
|
/** A scene, by `id` or `id:version`, or undefined. */
|
|
17
23
|
export declare function getSceneSpec(ref: string): SceneSpec | undefined;
|