@datalayer/agent-runtimes 1.5.6 → 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 +57 -57
- 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 +13 -0
- package/lib/specs/apps.d.ts +6 -0
- package/lib/specs/apps.js +1712 -136
- package/lib/specs/scenes.d.ts +2 -0
- package/lib/specs/scenes.js +338 -0
- package/package.json +1 -1
package/lib/specs/scenes.d.ts
CHANGED
|
@@ -11,11 +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;
|
|
14
15
|
export declare const PAP_A_PERSON_AND_A_COMPANY_SCENE_0_0_1: SceneSpec;
|
|
15
16
|
export declare const PAP_APPROVE_ONCE_SCENE_0_0_1: SceneSpec;
|
|
16
17
|
export declare const PAP_TWO_COMPANIES_SCENE_0_0_1: SceneSpec;
|
|
17
18
|
export declare const PAP_YOUR_APPLICATION_A_COMPANY_SCENE_0_0_1: SceneSpec;
|
|
18
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;
|
|
19
21
|
export declare const SCENE_CATALOGUE: Record<string, SceneSpec>;
|
|
20
22
|
/** A scene, by `id` or `id:version`, or undefined. */
|
|
21
23
|
export declare function getSceneSpec(ref: string): SceneSpec | undefined;
|
package/lib/specs/scenes.js
CHANGED
|
@@ -1053,6 +1053,174 @@ export const MONTH_END_CLOSE_SCENE_0_0_1 = {
|
|
|
1053
1053
|
runtime: '1.3.93',
|
|
1054
1054
|
},
|
|
1055
1055
|
};
|
|
1056
|
+
export const PACT_A_PERSONAL_AGENT_AT_A_BUSINESS_SCENE_0_0_1 = {
|
|
1057
|
+
schema: 'loop.scene/v1',
|
|
1058
|
+
id: 'pact-a-personal-agent-at-a-business',
|
|
1059
|
+
version: '0.0.1',
|
|
1060
|
+
name: 'A Personal Agent at a Business',
|
|
1061
|
+
description: 'Ada’s Travel Desk asks an airline about her flight, and she allows it to read her bookings, not to change them.',
|
|
1062
|
+
tags: ['stage', 'pact'],
|
|
1063
|
+
icon: 'people',
|
|
1064
|
+
emoji: '✈️',
|
|
1065
|
+
kind: 'scripted',
|
|
1066
|
+
team: '',
|
|
1067
|
+
entry: '',
|
|
1068
|
+
cast: [],
|
|
1069
|
+
setting: {
|
|
1070
|
+
systems: [],
|
|
1071
|
+
period: '',
|
|
1072
|
+
language: '',
|
|
1073
|
+
assumes: '',
|
|
1074
|
+
},
|
|
1075
|
+
script: [],
|
|
1076
|
+
stage: {
|
|
1077
|
+
positions: {},
|
|
1078
|
+
opensFirst: '',
|
|
1079
|
+
transcript: {
|
|
1080
|
+
tools: true,
|
|
1081
|
+
narration: true,
|
|
1082
|
+
},
|
|
1083
|
+
inspectors: [],
|
|
1084
|
+
restsAfter: '',
|
|
1085
|
+
pace: 'steady',
|
|
1086
|
+
},
|
|
1087
|
+
audience: {
|
|
1088
|
+
who: 'signed-in',
|
|
1089
|
+
ceilingPerAsk: 0.0,
|
|
1090
|
+
asksADay: 0,
|
|
1091
|
+
},
|
|
1092
|
+
rehearsal: {
|
|
1093
|
+
beats: [],
|
|
1094
|
+
within: '',
|
|
1095
|
+
verified: {
|
|
1096
|
+
live: [],
|
|
1097
|
+
recorded: [],
|
|
1098
|
+
unverified: [],
|
|
1099
|
+
},
|
|
1100
|
+
},
|
|
1101
|
+
deployment: {
|
|
1102
|
+
account: '',
|
|
1103
|
+
page: '',
|
|
1104
|
+
addresses: {},
|
|
1105
|
+
},
|
|
1106
|
+
actors: [
|
|
1107
|
+
{
|
|
1108
|
+
id: 'ada',
|
|
1109
|
+
name: 'Ada',
|
|
1110
|
+
face: '🧑',
|
|
1111
|
+
is: 'the person',
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
id: 'agent',
|
|
1115
|
+
name: 'Travel Desk',
|
|
1116
|
+
face: '🤖',
|
|
1117
|
+
is: 'an application on Datalayer, working for Ada',
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
id: 'air',
|
|
1121
|
+
name: 'Example Air Support',
|
|
1122
|
+
face: '🛫',
|
|
1123
|
+
is: 'a business, at air.examples.datalayer.run',
|
|
1124
|
+
},
|
|
1125
|
+
],
|
|
1126
|
+
lines: [
|
|
1127
|
+
{
|
|
1128
|
+
from: 'ada',
|
|
1129
|
+
to: 'agent',
|
|
1130
|
+
says: '“When is my flight?”',
|
|
1131
|
+
how: '',
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
from: 'agent',
|
|
1135
|
+
to: '',
|
|
1136
|
+
says: 'Finds Example Air Support by its domain and checks who answers for it.',
|
|
1137
|
+
card: {
|
|
1138
|
+
kind: 'found',
|
|
1139
|
+
title: 'Example Air Support',
|
|
1140
|
+
rows: [
|
|
1141
|
+
['Its domain', 'air.examples.datalayer.run'],
|
|
1142
|
+
['Answered for it by', 'Example Provider'],
|
|
1143
|
+
['How a person signs in', 'With a code, on the airline’s page'],
|
|
1144
|
+
[
|
|
1145
|
+
'It may ask',
|
|
1146
|
+
'See your bookings and their status · Change the date of a booking',
|
|
1147
|
+
],
|
|
1148
|
+
],
|
|
1149
|
+
lines: [],
|
|
1150
|
+
},
|
|
1151
|
+
how: 'The application reads the card the business publishes for agents, at its own domain.',
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
from: 'agent',
|
|
1155
|
+
to: 'air',
|
|
1156
|
+
says: 'Asks the airline’s agent about Ada’s bookings, as Travel Desk.',
|
|
1157
|
+
how: 'Each request says which application asks, signed by Datalayer; nobody is signed in yet.',
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
from: 'air',
|
|
1161
|
+
to: 'agent',
|
|
1162
|
+
says: '“Happy to help. Please sign in so I can see your bookings.”',
|
|
1163
|
+
how: 'The business asks for a sign-in and names what it may ask for.',
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
from: 'agent',
|
|
1167
|
+
to: 'ada',
|
|
1168
|
+
says: 'Asks Ada to sign in at Example Air, on the airline’s own page.',
|
|
1169
|
+
card: {
|
|
1170
|
+
kind: 'sign-in',
|
|
1171
|
+
title: 'Sign in at Example Air',
|
|
1172
|
+
rows: [],
|
|
1173
|
+
lines: [
|
|
1174
|
+
'Travel Desk asks for: See your bookings and their status; Change the date of a booking.',
|
|
1175
|
+
'You sign in on the airline’s page, and choose what it may do there.',
|
|
1176
|
+
'You can allow fewer permissions than it asks for.',
|
|
1177
|
+
],
|
|
1178
|
+
},
|
|
1179
|
+
how: '',
|
|
1180
|
+
turn: {
|
|
1181
|
+
yes: 'Sign in, and allow only “See your bookings”',
|
|
1182
|
+
no: '',
|
|
1183
|
+
declined: '',
|
|
1184
|
+
},
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
from: 'ada',
|
|
1188
|
+
to: 'air',
|
|
1189
|
+
says: 'Signs in on the airline’s page and allows “See your bookings and their status” only.',
|
|
1190
|
+
how: 'The airline gives Travel Desk a permission of its own, for Ada and for this application only; Datalayer keeps it, out of the agent’s reach.',
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
from: 'air',
|
|
1194
|
+
to: 'agent',
|
|
1195
|
+
says: '“Your booking AB123 flies on 2026-11-02.”',
|
|
1196
|
+
how: 'The airline signs a receipt of what it did with the permission.',
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
from: 'agent',
|
|
1200
|
+
to: 'ada',
|
|
1201
|
+
says: '“Your flight, booking AB123, is on 2 November 2026.”',
|
|
1202
|
+
how: '',
|
|
1203
|
+
},
|
|
1204
|
+
{
|
|
1205
|
+
from: 'agent',
|
|
1206
|
+
to: '',
|
|
1207
|
+
says: 'Keeps the airline’s receipt with its record, for Ada and for whoever built it.',
|
|
1208
|
+
card: {
|
|
1209
|
+
kind: 'record',
|
|
1210
|
+
title: 'Activity',
|
|
1211
|
+
rows: [
|
|
1212
|
+
['Signed in at', 'Example Air, for Ada'],
|
|
1213
|
+
['Allowed', 'See your bookings and their status'],
|
|
1214
|
+
['Receipt', 'Looked up booking AB123, signed by the airline'],
|
|
1215
|
+
],
|
|
1216
|
+
lines: [],
|
|
1217
|
+
},
|
|
1218
|
+
how: 'Ada sees the permission under In your name, and ends it there with Disconnect.',
|
|
1219
|
+
},
|
|
1220
|
+
],
|
|
1221
|
+
live: 'Working with a business over PACT is built in the Studio and its services; asking a business through Datalayer waits for them to be shipped.',
|
|
1222
|
+
setup: [],
|
|
1223
|
+
};
|
|
1056
1224
|
export const PAP_A_PERSON_AND_A_COMPANY_SCENE_0_0_1 = {
|
|
1057
1225
|
schema: 'loop.scene/v1',
|
|
1058
1226
|
id: 'pap-a-person-and-a-company',
|
|
@@ -2108,15 +2276,185 @@ export const SALES_AND_ACCOUNTING_SCENE_0_0_1 = {
|
|
|
2108
2276
|
runtime: '1.3.93',
|
|
2109
2277
|
},
|
|
2110
2278
|
};
|
|
2279
|
+
export const UCP_A_PURCHASE_APPROVED_SCENE_0_0_1 = {
|
|
2280
|
+
schema: 'loop.scene/v1',
|
|
2281
|
+
id: 'ucp-a-purchase-approved',
|
|
2282
|
+
version: '0.0.1',
|
|
2283
|
+
name: 'A Purchase, Approved',
|
|
2284
|
+
description: 'Ada’s Shopping Desk fills a basket at a test shop, and buys only once she approves the exact purchase.',
|
|
2285
|
+
tags: ['stage', 'ucp', 'commerce'],
|
|
2286
|
+
icon: 'people',
|
|
2287
|
+
emoji: '🛍️',
|
|
2288
|
+
kind: 'scripted',
|
|
2289
|
+
team: '',
|
|
2290
|
+
entry: '',
|
|
2291
|
+
cast: [],
|
|
2292
|
+
setting: {
|
|
2293
|
+
systems: [],
|
|
2294
|
+
period: '',
|
|
2295
|
+
language: '',
|
|
2296
|
+
assumes: '',
|
|
2297
|
+
},
|
|
2298
|
+
script: [],
|
|
2299
|
+
stage: {
|
|
2300
|
+
positions: {},
|
|
2301
|
+
opensFirst: '',
|
|
2302
|
+
transcript: {
|
|
2303
|
+
tools: true,
|
|
2304
|
+
narration: true,
|
|
2305
|
+
},
|
|
2306
|
+
inspectors: [],
|
|
2307
|
+
restsAfter: '',
|
|
2308
|
+
pace: 'steady',
|
|
2309
|
+
},
|
|
2310
|
+
audience: {
|
|
2311
|
+
who: 'signed-in',
|
|
2312
|
+
ceilingPerAsk: 0.0,
|
|
2313
|
+
asksADay: 0,
|
|
2314
|
+
},
|
|
2315
|
+
rehearsal: {
|
|
2316
|
+
beats: [],
|
|
2317
|
+
within: '',
|
|
2318
|
+
verified: {
|
|
2319
|
+
live: [],
|
|
2320
|
+
recorded: [],
|
|
2321
|
+
unverified: [],
|
|
2322
|
+
},
|
|
2323
|
+
},
|
|
2324
|
+
deployment: {
|
|
2325
|
+
account: '',
|
|
2326
|
+
page: '',
|
|
2327
|
+
addresses: {},
|
|
2328
|
+
},
|
|
2329
|
+
actors: [
|
|
2330
|
+
{
|
|
2331
|
+
id: 'ada',
|
|
2332
|
+
name: 'Ada',
|
|
2333
|
+
face: '🧑',
|
|
2334
|
+
is: 'the person',
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
id: 'agent',
|
|
2338
|
+
name: 'Shopping Desk',
|
|
2339
|
+
face: '🤖',
|
|
2340
|
+
is: 'an application on Datalayer, shopping for Ada',
|
|
2341
|
+
},
|
|
2342
|
+
{
|
|
2343
|
+
id: 'store',
|
|
2344
|
+
name: 'Example Store',
|
|
2345
|
+
face: '🍵',
|
|
2346
|
+
is: 'a test shop, at store.examples.datalayer.run',
|
|
2347
|
+
},
|
|
2348
|
+
],
|
|
2349
|
+
lines: [
|
|
2350
|
+
{
|
|
2351
|
+
from: 'ada',
|
|
2352
|
+
to: 'agent',
|
|
2353
|
+
says: '“Buy me a stoneware mug.”',
|
|
2354
|
+
how: '',
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
from: 'agent',
|
|
2358
|
+
to: 'store',
|
|
2359
|
+
says: 'Searches the shop for a mug.',
|
|
2360
|
+
how: 'The application reads the page every shop publishes for agents, then its catalogue; reading changes nothing, so its rule lets it do it.',
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
from: 'store',
|
|
2364
|
+
to: 'agent',
|
|
2365
|
+
says: '“Stoneware mug: USD 24.00.”',
|
|
2366
|
+
how: '',
|
|
2367
|
+
},
|
|
2368
|
+
{
|
|
2369
|
+
from: 'agent',
|
|
2370
|
+
to: 'store',
|
|
2371
|
+
says: 'Fills a checkout with one stoneware mug, for Ada.',
|
|
2372
|
+
how: 'A checkout the shop can cancel; nothing is bought yet.',
|
|
2373
|
+
},
|
|
2374
|
+
{
|
|
2375
|
+
from: 'store',
|
|
2376
|
+
to: 'agent',
|
|
2377
|
+
says: '“Your checkout is ready to complete.”',
|
|
2378
|
+
how: '',
|
|
2379
|
+
},
|
|
2380
|
+
{
|
|
2381
|
+
from: 'agent',
|
|
2382
|
+
to: 'ada',
|
|
2383
|
+
says: 'Every purchase is asked first, whatever its rule says: it waits for Ada.',
|
|
2384
|
+
card: {
|
|
2385
|
+
kind: 'approval',
|
|
2386
|
+
title: 'Shopping Desk asks you to approve a purchase',
|
|
2387
|
+
rows: [
|
|
2388
|
+
['Shop', 'Example Store'],
|
|
2389
|
+
['What', 'Stoneware mug × 1'],
|
|
2390
|
+
['Tax', 'USD 1.92'],
|
|
2391
|
+
['Total', 'USD 25.92'],
|
|
2392
|
+
['The most one purchase may cost', 'USD 50.00'],
|
|
2393
|
+
],
|
|
2394
|
+
lines: ['Buy 1 Stoneware mug at Example Store for USD 25.92.'],
|
|
2395
|
+
},
|
|
2396
|
+
how: 'The purchase is the shop’s own checkout, read again before it is shown; approving this one never approves a changed basket.',
|
|
2397
|
+
turn: {
|
|
2398
|
+
yes: 'Approve',
|
|
2399
|
+
no: 'Decline',
|
|
2400
|
+
declined: 'Ada declined: the checkout is cancelled, and nothing is bought.',
|
|
2401
|
+
},
|
|
2402
|
+
},
|
|
2403
|
+
{
|
|
2404
|
+
from: 'agent',
|
|
2405
|
+
to: 'store',
|
|
2406
|
+
says: 'Completes the checkout, exactly as Ada approved it, with a test payment.',
|
|
2407
|
+
how: 'Datalayer writes down that it buys before it does: asked again, it reads the order back instead of paying twice. No card is ever in the conversation.',
|
|
2408
|
+
},
|
|
2409
|
+
{
|
|
2410
|
+
from: 'store',
|
|
2411
|
+
to: 'agent',
|
|
2412
|
+
says: '“Your order is placed.”',
|
|
2413
|
+
how: '',
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
from: 'agent',
|
|
2417
|
+
to: 'ada',
|
|
2418
|
+
says: 'Tells Ada what the shop says it did.',
|
|
2419
|
+
card: {
|
|
2420
|
+
kind: 'done',
|
|
2421
|
+
title: 'Bought, once',
|
|
2422
|
+
rows: [],
|
|
2423
|
+
lines: ['1 Stoneware mug, USD 25.92, at Example Store.'],
|
|
2424
|
+
},
|
|
2425
|
+
how: '',
|
|
2426
|
+
},
|
|
2427
|
+
{
|
|
2428
|
+
from: 'agent',
|
|
2429
|
+
to: '',
|
|
2430
|
+
says: 'Keeps a record of the purchase, for Ada and for whoever built it.',
|
|
2431
|
+
card: {
|
|
2432
|
+
kind: 'record',
|
|
2433
|
+
title: 'Activity',
|
|
2434
|
+
rows: [
|
|
2435
|
+
['Bought at', 'Example Store, for Ada'],
|
|
2436
|
+
['Amount', 'USD 25.92'],
|
|
2437
|
+
['Approved by', 'Ada, once'],
|
|
2438
|
+
],
|
|
2439
|
+
lines: [],
|
|
2440
|
+
},
|
|
2441
|
+
how: 'The purchase shows in the application’s Activity with its amount.',
|
|
2442
|
+
},
|
|
2443
|
+
],
|
|
2444
|
+
live: 'Buying at a test shop is built in the Studio and its services, always asked first, under a limit, with no real payment; the test shops answering on Datalayer wait for them to be shipped.',
|
|
2445
|
+
setup: [],
|
|
2446
|
+
};
|
|
2111
2447
|
export const SCENE_CATALOGUE = {
|
|
2112
2448
|
'crop-monitoring': CROP_MONITORING_SCENE_0_0_1,
|
|
2113
2449
|
'disaster-assessment': DISASTER_ASSESSMENT_SCENE_0_0_1,
|
|
2114
2450
|
'month-end-close': MONTH_END_CLOSE_SCENE_0_0_1,
|
|
2451
|
+
'pact-a-personal-agent-at-a-business': PACT_A_PERSONAL_AGENT_AT_A_BUSINESS_SCENE_0_0_1,
|
|
2115
2452
|
'pap-a-person-and-a-company': PAP_A_PERSON_AND_A_COMPANY_SCENE_0_0_1,
|
|
2116
2453
|
'pap-approve-once': PAP_APPROVE_ONCE_SCENE_0_0_1,
|
|
2117
2454
|
'pap-two-companies': PAP_TWO_COMPANIES_SCENE_0_0_1,
|
|
2118
2455
|
'pap-your-application-a-company': PAP_YOUR_APPLICATION_A_COMPANY_SCENE_0_0_1,
|
|
2119
2456
|
'sales-and-accounting': SALES_AND_ACCOUNTING_SCENE_0_0_1,
|
|
2457
|
+
'ucp-a-purchase-approved': UCP_A_PURCHASE_APPROVED_SCENE_0_0_1,
|
|
2120
2458
|
};
|
|
2121
2459
|
/** A scene, by `id` or `id:version`, or undefined. */
|
|
2122
2460
|
export function getSceneSpec(ref) {
|