@exponential_app/engine 0.0.0-stage → 0.1.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.
Files changed (84) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +54 -0
  3. package/README.md +35 -2
  4. package/dist/capabilities.js +29 -0
  5. package/dist/capabilities.js.map +9 -0
  6. package/dist/chunks/index-4ntgtkmb.js +6783 -0
  7. package/dist/chunks/index-4ntgtkmb.js.map +13 -0
  8. package/dist/chunks/index-ans80t68.js +382 -0
  9. package/dist/chunks/index-ans80t68.js.map +9 -0
  10. package/dist/chunks/index-ax4aay30.js +315 -0
  11. package/dist/chunks/index-ax4aay30.js.map +10 -0
  12. package/dist/chunks/index-e49v2qpf.js +2177 -0
  13. package/dist/chunks/index-e49v2qpf.js.map +9 -0
  14. package/dist/chunks/index-m2845dn6.js +72 -0
  15. package/dist/chunks/index-m2845dn6.js.map +10 -0
  16. package/dist/chunks/index-md3hz6r2.js +3015 -0
  17. package/dist/chunks/index-md3hz6r2.js.map +19 -0
  18. package/dist/chunks/index-n0acffvs.js +366 -0
  19. package/dist/chunks/index-n0acffvs.js.map +10 -0
  20. package/dist/chunks/index-nrr8x2kq.js +259 -0
  21. package/dist/chunks/index-nrr8x2kq.js.map +10 -0
  22. package/dist/chunks/index-s3xjr701.js +170 -0
  23. package/dist/chunks/index-s3xjr701.js.map +10 -0
  24. package/dist/chunks/index-t89cvabm.js +2301 -0
  25. package/dist/chunks/index-t89cvabm.js.map +10 -0
  26. package/dist/chunks/index-zw0575tv.js +126 -0
  27. package/dist/chunks/index-zw0575tv.js.map +10 -0
  28. package/dist/consent.js +24 -0
  29. package/dist/consent.js.map +9 -0
  30. package/dist/index.js +526 -0
  31. package/dist/index.js.map +11 -0
  32. package/dist/lifecycle.js +11 -0
  33. package/dist/lifecycle.js.map +9 -0
  34. package/dist/outbox.js +27 -0
  35. package/dist/outbox.js.map +9 -0
  36. package/dist/pdf.js +15 -0
  37. package/dist/pdf.js.map +9 -0
  38. package/dist/providers.js +26 -0
  39. package/dist/providers.js.map +9 -0
  40. package/dist/runner.js +24 -0
  41. package/dist/runner.js.map +9 -0
  42. package/dist/tools.js +38 -0
  43. package/dist/tools.js.map +9 -0
  44. package/dist/types/domain-contract/src/app-records.d.ts +3148 -0
  45. package/dist/types/domain-contract/src/app-share.d.ts +222 -0
  46. package/dist/types/domain-contract/src/apps.d.ts +594 -0
  47. package/dist/types/eengine/fixtures/providers.json +55 -0
  48. package/dist/types/eengine/src/broker.d.ts +80 -0
  49. package/dist/types/eengine/src/capabilities.d.ts +86 -0
  50. package/dist/types/eengine/src/consent.d.ts +50 -0
  51. package/dist/types/eengine/src/index.d.ts +11 -0
  52. package/dist/types/eengine/src/instance.d.ts +122 -0
  53. package/dist/types/eengine/src/lifecycle.d.ts +64 -0
  54. package/dist/types/eengine/src/outbox.d.ts +3 -0
  55. package/dist/types/eengine/src/pdf.d.ts +36 -0
  56. package/dist/types/eengine/src/providers.d.ts +38 -0
  57. package/dist/types/eengine/src/runner.d.ts +82 -0
  58. package/dist/types/eengine/src/stores.d.ts +125 -0
  59. package/dist/types/eengine/src/tools.d.ts +79 -0
  60. package/dist/types/eengine/src/web/index.d.ts +20 -0
  61. package/dist/types/eengine/src/web/mcp.d.ts +27 -0
  62. package/dist/types/eengine/src/web/platform.d.ts +91 -0
  63. package/dist/types/eengine/src/web/stores.d.ts +125 -0
  64. package/dist/types/emcp/fixtures/automations.json +521 -0
  65. package/dist/types/emcp/fixtures/hub.json +498 -0
  66. package/dist/types/emcp/src/access.d.ts +55 -0
  67. package/dist/types/emcp/src/audit.d.ts +22 -0
  68. package/dist/types/emcp/src/automations.d.ts +111 -0
  69. package/dist/types/emcp/src/exposes.d.ts +242 -0
  70. package/dist/types/emcp/src/hub.d.ts +63 -0
  71. package/dist/types/emcp/src/index.d.ts +7 -0
  72. package/dist/types/emcp/src/pure.d.ts +11 -0
  73. package/dist/types/emcp/src/upstream.d.ts +288 -0
  74. package/dist/types/emcp/src/vault.d.ts +34 -0
  75. package/dist/web/index.js +791 -0
  76. package/dist/web/index.js.map +13 -0
  77. package/fixtures/bundle.json +1165 -0
  78. package/fixtures/capabilities.json +373 -0
  79. package/fixtures/consent.json +146 -0
  80. package/fixtures/lifecycle.json +125 -0
  81. package/fixtures/outbox.json +8 -0
  82. package/fixtures/providers.json +55 -0
  83. package/fixtures/runner.json +2167 -0
  84. package/package.json +92 -4
@@ -0,0 +1,1165 @@
1
+ {
2
+ "$comment": "E7 (#VAPP-270, epic #VAPP-259; docs/spec/apps.md §13.3, runner.json `bundle`): `exponential bundle`, the CLI that exports a signed package to native binaries on the prebuilt runners. Rust only (`apps/desktop/crates/eengine-bundle`, `tests/fixture.rs` replays every case; the CLI subcommand is `crates/cli` `bundle`). NOTHING IS COMPILED PER APP except iOS (the Mac lane links only the declared capability modules, ITMS-90683). THE STEPS, in order: (1) PREPARE (`prepareCases`, `prepare(file, bundleToml, options)` -> `{ok: {package, config, scopes}} | {refused: {code, detail}}`, the first refusal wins in this order): the file is not JSON = `notJson`; its signature does not verify = `signature`; unsigned (no `signature`) = `unsigned` unless `--allow-unsigned`; the package's `catalogId` is one of `refuse.catalogs` (the Exponential-app catalog: `exponential.*` actions and the in-app shapes exist only inside Exponential) = `catalog`; a declared capability scope that is `hostOnly` in capabilities.json (`shell.edit`) or unknown = `capability` (detail = the scope); genUI refuses the package (eengine `package::validate`) = `invalid`; bundle.toml's `config.keys` read through runner.json's `runnerConfig` (its issues = `config`, detail `<key>:<code>` joined by `,`; any key outside `config.keys` + `config.sections` is an issue too, so no update feed, telemetry or account can be configured). `scopes` = the package's `capabilities[].id` sorted, de-duplicated. (2) RUNNER: the prebuilt runner kit per target (`kits`): `--runners <dir>` (a workspace build, `scripts/runner-kits.sh`) or the release assets of the pinned `eengine-v<eengine version>` (`kits.release`; each asset's sha256 is checked against its `.sha256` asset). A kit missing its `NOTICES.txt` is refused (`notices`): every export ships the third-party notices of what it runs. (3) INJECT: `app/` = runner.json `bundle` (`package.app.json` byte for byte as given, `runner.json` = the prepared config as `{id, name, version, network}`), at the target's runner.json `bundle.locations`; the icons (`icons`, rendered from the one SVG at every size the target asks for); the platform manifest. (4) PERMISSIONS (`permissions`, `permissionCases`, `platformManifest(target, scopes, config, purposes)`): ONLY what the declared scopes ask for, never more: Android `<uses-permission>` lines between the template's `E7:PERMISSIONS` markers (+ INTERNET when `network` is not `off`); iOS the capability MODULES to link and the Info.plist purpose strings, each = the scope's `why` from the package (else `purposeFallback` with the app name); macOS the sandbox entitlements (`base` always + per scope + `network.client` when `network` is not `off`) and the URL scheme; Linux the `.desktop` entry (`Exec=<bin> %u`, `MimeType=x-scheme-handler/<scheme>;`); Windows the URL protocol under `HKCU\\\\Software\\\\Classes\\\\<scheme>` written by the installer; the web manifest fields (no permissions: every web capability is a picker or asks in the page). The URL scheme is the config id (runner.json: deep links are `<config id>://<screen>?<params>`). (5) SIGN (`signing`): with the AUTHOR's own keys from bundle.toml `[signing.<target>]` or the environment; we never hold them. Without them the output is ad-hoc (macOS `codesign -s -`, iOS unsigned .ipa for re-signing) or unsigned (Windows, Linux) and the CLI says so; Android without a keystore signs with a throwaway debug key and says the .apk is for testing only. (6) OUT (`outputs`): the files per target under `--out` (default `dist/`). NO updater, NO update feed, NO telemetry, NO account: a new package version is a rebundle.",
3
+ "command": "exponential bundle <package.app.json> --icon <icon.svg> --config <bundle.toml> --target <targets,comma separated> [--runners <dir>] [--out <dir>] [--allow-unsigned]",
4
+ "targets": [
5
+ "macos",
6
+ "windows",
7
+ "linux",
8
+ "android",
9
+ "ios",
10
+ "web"
11
+ ],
12
+ "refuse": {
13
+ "catalogs": [
14
+ "https://ui.exponential.at/catalogs/exponential-app/v1"
15
+ ]
16
+ },
17
+ "config": {
18
+ "file": "bundle.toml",
19
+ "keys": [
20
+ "id",
21
+ "name",
22
+ "version",
23
+ "network"
24
+ ],
25
+ "sections": [
26
+ "signing"
27
+ ]
28
+ },
29
+ "kits": {
30
+ "dir": "<runners>/<target>",
31
+ "release": "https://github.com/Niach/exponential/releases/download/eengine-v{version}/eengine-runner-kit-{target}.tar.gz",
32
+ "notices": "NOTICES.txt"
33
+ },
34
+ "icons": {
35
+ "macos": [
36
+ 16,
37
+ 32,
38
+ 64,
39
+ 128,
40
+ 256,
41
+ 512,
42
+ 1024
43
+ ],
44
+ "windows": [
45
+ 16,
46
+ 24,
47
+ 32,
48
+ 48,
49
+ 64,
50
+ 256
51
+ ],
52
+ "linux": [
53
+ 32,
54
+ 48,
55
+ 64,
56
+ 128,
57
+ 256,
58
+ 512
59
+ ],
60
+ "android": {
61
+ "mdpi": 48,
62
+ "hdpi": 72,
63
+ "xhdpi": 96,
64
+ "xxhdpi": 144,
65
+ "xxxhdpi": 192
66
+ },
67
+ "ios": [
68
+ 1024
69
+ ],
70
+ "web": [
71
+ 192,
72
+ 512
73
+ ]
74
+ },
75
+ "outputs": {
76
+ "macos": [
77
+ "{name}.app",
78
+ "{name}-{version}.dmg"
79
+ ],
80
+ "windows": [
81
+ "{name}-{version}-setup.exe"
82
+ ],
83
+ "linux": [
84
+ "{id}_{version}_{arch}.deb",
85
+ "{name}-{version}-{arch}.AppImage"
86
+ ],
87
+ "android": [
88
+ "{name}-{version}.apk",
89
+ "{name}-{version}.aab"
90
+ ],
91
+ "ios": [
92
+ "{name}-{version}.ipa"
93
+ ],
94
+ "web": [
95
+ "{name}-{version}-web/"
96
+ ]
97
+ },
98
+ "permissions": {
99
+ "android": {
100
+ "scopes": {
101
+ "photos.read": [
102
+ "<uses-permission android:name=\"android.permission.READ_MEDIA_IMAGES\" />",
103
+ "<uses-permission android:name=\"android.permission.READ_MEDIA_VISUAL_USER_SELECTED\" />",
104
+ "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" android:maxSdkVersion=\"32\" />"
105
+ ],
106
+ "notifications.post": [
107
+ "<uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" />",
108
+ "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />"
109
+ ]
110
+ },
111
+ "network": [
112
+ "<uses-permission android:name=\"android.permission.INTERNET\" />"
113
+ ],
114
+ "markers": [
115
+ "<!-- E7:PERMISSIONS -->",
116
+ "<!-- /E7:PERMISSIONS -->"
117
+ ]
118
+ },
119
+ "ios": {
120
+ "modules": {
121
+ "photos.read": "ExponentialEnginePhotos",
122
+ "files.read": "ExponentialEngineFiles",
123
+ "files.write": "ExponentialEngineFiles",
124
+ "share.send": "ExponentialEngineShare",
125
+ "print.pdf": "ExponentialEnginePrint",
126
+ "notifications.post": "ExponentialEngineNotifications"
127
+ },
128
+ "purposes": {
129
+ "photos.read": "NSPhotoLibraryUsageDescription",
130
+ "share.send": "NSPhotoLibraryAddUsageDescription"
131
+ },
132
+ "purposeFallback": {
133
+ "NSPhotoLibraryUsageDescription": "{name} opens the photos you pick.",
134
+ "NSPhotoLibraryAddUsageDescription": "{name} saves images you share."
135
+ }
136
+ },
137
+ "macos": {
138
+ "base": [
139
+ "com.apple.security.app-sandbox"
140
+ ],
141
+ "scopes": {
142
+ "photos.read": [
143
+ "com.apple.security.assets.pictures.read-only",
144
+ "com.apple.security.files.user-selected.read-only"
145
+ ],
146
+ "files.read": [
147
+ "com.apple.security.files.user-selected.read-only"
148
+ ],
149
+ "files.write": [
150
+ "com.apple.security.files.user-selected.read-write"
151
+ ],
152
+ "print.pdf": [
153
+ "com.apple.security.print"
154
+ ]
155
+ },
156
+ "network": [
157
+ "com.apple.security.network.client"
158
+ ]
159
+ },
160
+ "linux": {
161
+ "exec": "{bin} %u",
162
+ "mimeType": "x-scheme-handler/{scheme};",
163
+ "categories": "Utility;"
164
+ },
165
+ "windows": {
166
+ "protocolKey": "HKCU\\Software\\Classes\\{scheme}"
167
+ },
168
+ "web": {
169
+ "display": "standalone",
170
+ "startUrl": "./",
171
+ "scope": "./",
172
+ "color": "#09090b"
173
+ }
174
+ },
175
+ "signing": {
176
+ "macos": {
177
+ "inputs": [
178
+ "identity (Developer ID Application)",
179
+ "notary: rcodesign API key JSON (issuer id, key id, .p8)"
180
+ ],
181
+ "fallback": "adhoc"
182
+ },
183
+ "windows": {
184
+ "inputs": [
185
+ "osslsigncode: certificate (.pfx) + password",
186
+ "or Azure Trusted Signing: endpoint, account, profile"
187
+ ],
188
+ "fallback": "unsigned"
189
+ },
190
+ "linux": {
191
+ "inputs": [],
192
+ "fallback": "unsigned"
193
+ },
194
+ "android": {
195
+ "inputs": [
196
+ "keystore (.jks/.p12), alias, store + key passwords"
197
+ ],
198
+ "fallback": "debugKey"
199
+ },
200
+ "ios": {
201
+ "inputs": [
202
+ "DEVELOPMENT_TEAM",
203
+ "distribution certificate + provisioning profile (TestFlight)"
204
+ ],
205
+ "fallback": "unsigned"
206
+ },
207
+ "web": {
208
+ "inputs": [],
209
+ "fallback": "none"
210
+ }
211
+ },
212
+ "prepareCases": [
213
+ {
214
+ "name": "a signed core package: prepared",
215
+ "file": {
216
+ "package": {
217
+ "formatVersion": 5,
218
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
219
+ "id": "acme.photobook",
220
+ "name": "Photobook",
221
+ "version": "1.0.0",
222
+ "functions": [
223
+ "records.*",
224
+ "photos.pick",
225
+ "print.pdf",
226
+ "share.send",
227
+ "files.save"
228
+ ],
229
+ "templates": {
230
+ "albums": {
231
+ "components": [
232
+ {
233
+ "id": "root",
234
+ "component": "Page",
235
+ "title": "Albums",
236
+ "children": [
237
+ "body"
238
+ ]
239
+ },
240
+ {
241
+ "id": "body",
242
+ "component": "Text",
243
+ "text": "Albums"
244
+ }
245
+ ]
246
+ }
247
+ },
248
+ "capabilities": [
249
+ {
250
+ "id": "photos.read",
251
+ "why": "Pick the photos for an album."
252
+ },
253
+ {
254
+ "id": "files.write",
255
+ "why": "Save the album's PDF where you pick."
256
+ },
257
+ {
258
+ "id": "print.pdf",
259
+ "why": "Lay out the album as a PDF."
260
+ },
261
+ {
262
+ "id": "share.send",
263
+ "why": "Share the album's PDF."
264
+ }
265
+ ]
266
+ },
267
+ "author": {
268
+ "name": "Acme",
269
+ "key": "ed25519:6kpsY-KcUgq-9VB7Ey7F-ZVHdq6-vnuSQh7qaRRG0iw"
270
+ },
271
+ "signature": {
272
+ "alg": "ed25519",
273
+ "value": "D8HNq-kcqgs4lp-vpN7JFwYQUz83_t-eSImCIOUzY2jxF5g_zAk_gnfQsdMX4cOTangMqPtnH-dH7pasodcvDA"
274
+ }
275
+ },
276
+ "bundleToml": {
277
+ "id": "at.acme.photobook",
278
+ "name": "Photobook",
279
+ "version": "1.0.0"
280
+ },
281
+ "expected": {
282
+ "ok": {
283
+ "config": {
284
+ "id": "at.acme.photobook",
285
+ "name": "Photobook",
286
+ "version": "1.0.0",
287
+ "network": "off"
288
+ },
289
+ "scopes": [
290
+ "files.write",
291
+ "photos.read",
292
+ "print.pdf",
293
+ "share.send"
294
+ ]
295
+ }
296
+ }
297
+ },
298
+ {
299
+ "name": "not JSON",
300
+ "fileText": "{\"package\": ",
301
+ "bundleToml": {
302
+ "id": "at.acme.photobook",
303
+ "name": "Photobook",
304
+ "version": "1.0.0"
305
+ },
306
+ "expected": {
307
+ "refused": {
308
+ "code": "notJson"
309
+ }
310
+ }
311
+ },
312
+ {
313
+ "name": "a tampered file: signature",
314
+ "file": {
315
+ "package": {
316
+ "formatVersion": 5,
317
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
318
+ "id": "acme.photobook",
319
+ "name": "Photobook 2",
320
+ "version": "1.0.0",
321
+ "functions": [
322
+ "records.*",
323
+ "photos.pick",
324
+ "print.pdf",
325
+ "share.send",
326
+ "files.save"
327
+ ],
328
+ "templates": {
329
+ "albums": {
330
+ "components": [
331
+ {
332
+ "id": "root",
333
+ "component": "Page",
334
+ "title": "Albums",
335
+ "children": [
336
+ "body"
337
+ ]
338
+ },
339
+ {
340
+ "id": "body",
341
+ "component": "Text",
342
+ "text": "Albums"
343
+ }
344
+ ]
345
+ }
346
+ },
347
+ "capabilities": [
348
+ {
349
+ "id": "photos.read",
350
+ "why": "Pick the photos for an album."
351
+ },
352
+ {
353
+ "id": "files.write",
354
+ "why": "Save the album's PDF where you pick."
355
+ },
356
+ {
357
+ "id": "print.pdf",
358
+ "why": "Lay out the album as a PDF."
359
+ },
360
+ {
361
+ "id": "share.send",
362
+ "why": "Share the album's PDF."
363
+ }
364
+ ]
365
+ },
366
+ "author": {
367
+ "name": "Acme",
368
+ "key": "ed25519:6kpsY-KcUgq-9VB7Ey7F-ZVHdq6-vnuSQh7qaRRG0iw"
369
+ },
370
+ "signature": {
371
+ "alg": "ed25519",
372
+ "value": "D8HNq-kcqgs4lp-vpN7JFwYQUz83_t-eSImCIOUzY2jxF5g_zAk_gnfQsdMX4cOTangMqPtnH-dH7pasodcvDA"
373
+ }
374
+ },
375
+ "bundleToml": {
376
+ "id": "at.acme.photobook",
377
+ "name": "Photobook",
378
+ "version": "1.0.0"
379
+ },
380
+ "expected": {
381
+ "refused": {
382
+ "code": "signature"
383
+ }
384
+ }
385
+ },
386
+ {
387
+ "name": "unsigned: refused by default",
388
+ "file": {
389
+ "package": {
390
+ "formatVersion": 5,
391
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
392
+ "id": "acme.photobook",
393
+ "name": "Photobook",
394
+ "version": "1.0.0",
395
+ "functions": [
396
+ "records.*",
397
+ "photos.pick",
398
+ "print.pdf",
399
+ "share.send",
400
+ "files.save"
401
+ ],
402
+ "templates": {
403
+ "albums": {
404
+ "components": [
405
+ {
406
+ "id": "root",
407
+ "component": "Page",
408
+ "title": "Albums",
409
+ "children": [
410
+ "body"
411
+ ]
412
+ },
413
+ {
414
+ "id": "body",
415
+ "component": "Text",
416
+ "text": "Albums"
417
+ }
418
+ ]
419
+ }
420
+ },
421
+ "capabilities": [
422
+ {
423
+ "id": "photos.read",
424
+ "why": "Pick the photos for an album."
425
+ },
426
+ {
427
+ "id": "files.write",
428
+ "why": "Save the album's PDF where you pick."
429
+ },
430
+ {
431
+ "id": "print.pdf",
432
+ "why": "Lay out the album as a PDF."
433
+ },
434
+ {
435
+ "id": "share.send",
436
+ "why": "Share the album's PDF."
437
+ }
438
+ ]
439
+ }
440
+ },
441
+ "bundleToml": {
442
+ "id": "at.acme.photobook",
443
+ "name": "Photobook",
444
+ "version": "1.0.0"
445
+ },
446
+ "expected": {
447
+ "refused": {
448
+ "code": "unsigned"
449
+ }
450
+ }
451
+ },
452
+ {
453
+ "name": "unsigned with --allow-unsigned: prepared",
454
+ "file": {
455
+ "package": {
456
+ "formatVersion": 5,
457
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
458
+ "id": "acme.photobook",
459
+ "name": "Photobook",
460
+ "version": "1.0.0",
461
+ "functions": [
462
+ "records.*",
463
+ "photos.pick",
464
+ "print.pdf",
465
+ "share.send",
466
+ "files.save"
467
+ ],
468
+ "templates": {
469
+ "albums": {
470
+ "components": [
471
+ {
472
+ "id": "root",
473
+ "component": "Page",
474
+ "title": "Albums",
475
+ "children": [
476
+ "body"
477
+ ]
478
+ },
479
+ {
480
+ "id": "body",
481
+ "component": "Text",
482
+ "text": "Albums"
483
+ }
484
+ ]
485
+ }
486
+ },
487
+ "capabilities": [
488
+ {
489
+ "id": "photos.read",
490
+ "why": "Pick the photos for an album."
491
+ },
492
+ {
493
+ "id": "files.write",
494
+ "why": "Save the album's PDF where you pick."
495
+ },
496
+ {
497
+ "id": "print.pdf",
498
+ "why": "Lay out the album as a PDF."
499
+ },
500
+ {
501
+ "id": "share.send",
502
+ "why": "Share the album's PDF."
503
+ }
504
+ ]
505
+ }
506
+ },
507
+ "bundleToml": {
508
+ "id": "at.acme.photobook",
509
+ "name": "Photobook",
510
+ "version": "1.0.0"
511
+ },
512
+ "allowUnsigned": true,
513
+ "expected": {
514
+ "ok": {
515
+ "config": {
516
+ "id": "at.acme.photobook",
517
+ "name": "Photobook",
518
+ "version": "1.0.0",
519
+ "network": "off"
520
+ },
521
+ "scopes": [
522
+ "files.write",
523
+ "photos.read",
524
+ "print.pdf",
525
+ "share.send"
526
+ ]
527
+ }
528
+ }
529
+ },
530
+ {
531
+ "name": "the Exponential-app catalog (the samples/apps gallery): catalog",
532
+ "file": {
533
+ "package": {
534
+ "formatVersion": 5,
535
+ "catalogId": "https://ui.exponential.at/catalogs/exponential-app/v1",
536
+ "id": "acme.photobook",
537
+ "name": "Photobook",
538
+ "version": "1.0.0",
539
+ "functions": [
540
+ "records.*",
541
+ "photos.pick",
542
+ "print.pdf",
543
+ "share.send",
544
+ "files.save"
545
+ ],
546
+ "templates": {
547
+ "albums": {
548
+ "components": [
549
+ {
550
+ "id": "root",
551
+ "component": "Page",
552
+ "title": "Albums",
553
+ "children": [
554
+ "body"
555
+ ]
556
+ },
557
+ {
558
+ "id": "body",
559
+ "component": "Text",
560
+ "text": "Albums"
561
+ }
562
+ ]
563
+ }
564
+ },
565
+ "capabilities": [
566
+ {
567
+ "id": "photos.read",
568
+ "why": "Pick the photos for an album."
569
+ },
570
+ {
571
+ "id": "files.write",
572
+ "why": "Save the album's PDF where you pick."
573
+ },
574
+ {
575
+ "id": "print.pdf",
576
+ "why": "Lay out the album as a PDF."
577
+ },
578
+ {
579
+ "id": "share.send",
580
+ "why": "Share the album's PDF."
581
+ }
582
+ ]
583
+ },
584
+ "author": {
585
+ "name": "Acme",
586
+ "key": "ed25519:6kpsY-KcUgq-9VB7Ey7F-ZVHdq6-vnuSQh7qaRRG0iw"
587
+ },
588
+ "signature": {
589
+ "alg": "ed25519",
590
+ "value": "uvb-Wm3GGN-8WrRYifXbUjSQTsPT03njvRQl7y79zsOIijotb-HERdAlEf0VrRHLpG2Bk33ROqRsMu3GrglIBw"
591
+ }
592
+ },
593
+ "bundleToml": {
594
+ "id": "at.acme.photobook",
595
+ "name": "Photobook",
596
+ "version": "1.0.0"
597
+ },
598
+ "expected": {
599
+ "refused": {
600
+ "code": "catalog"
601
+ }
602
+ }
603
+ },
604
+ {
605
+ "name": "a package genUI refuses: invalid",
606
+ "file": {
607
+ "package": {
608
+ "formatVersion": 5,
609
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
610
+ "id": "acme.photobook",
611
+ "name": "Photobook",
612
+ "version": "1.0.0",
613
+ "functions": [
614
+ "records.*",
615
+ "photos.pick",
616
+ "print.pdf",
617
+ "share.send",
618
+ "files.save"
619
+ ],
620
+ "templates": {},
621
+ "capabilities": [
622
+ {
623
+ "id": "photos.read",
624
+ "why": "Pick the photos for an album."
625
+ },
626
+ {
627
+ "id": "files.write",
628
+ "why": "Save the album's PDF where you pick."
629
+ },
630
+ {
631
+ "id": "print.pdf",
632
+ "why": "Lay out the album as a PDF."
633
+ },
634
+ {
635
+ "id": "share.send",
636
+ "why": "Share the album's PDF."
637
+ }
638
+ ]
639
+ },
640
+ "author": {
641
+ "name": "Acme",
642
+ "key": "ed25519:6kpsY-KcUgq-9VB7Ey7F-ZVHdq6-vnuSQh7qaRRG0iw"
643
+ },
644
+ "signature": {
645
+ "alg": "ed25519",
646
+ "value": "Cp2nYHZWQDWMgUnxt2ZjHSAeZlkxpkTw5k55b77TZ-y6TyeHG4dzHL_Nhc5KtpMDGVKYwdGeO7y9NmYYULBBDg"
647
+ }
648
+ },
649
+ "bundleToml": {
650
+ "id": "at.acme.photobook",
651
+ "name": "Photobook",
652
+ "version": "1.0.0"
653
+ },
654
+ "expected": {
655
+ "refused": {
656
+ "code": "invalid"
657
+ }
658
+ }
659
+ },
660
+ {
661
+ "name": "a host-only scope: capability",
662
+ "file": {
663
+ "package": {
664
+ "formatVersion": 5,
665
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
666
+ "id": "acme.photobook",
667
+ "name": "Photobook",
668
+ "version": "1.0.0",
669
+ "functions": [
670
+ "records.*",
671
+ "shell.edit"
672
+ ],
673
+ "templates": {
674
+ "albums": {
675
+ "components": [
676
+ {
677
+ "id": "root",
678
+ "component": "Page",
679
+ "title": "Albums",
680
+ "children": [
681
+ "body"
682
+ ]
683
+ },
684
+ {
685
+ "id": "body",
686
+ "component": "Text",
687
+ "text": "Albums"
688
+ }
689
+ ]
690
+ }
691
+ },
692
+ "capabilities": [
693
+ {
694
+ "id": "shell.edit",
695
+ "why": "Change the desktop."
696
+ }
697
+ ]
698
+ },
699
+ "author": {
700
+ "name": "Acme",
701
+ "key": "ed25519:6kpsY-KcUgq-9VB7Ey7F-ZVHdq6-vnuSQh7qaRRG0iw"
702
+ },
703
+ "signature": {
704
+ "alg": "ed25519",
705
+ "value": "dF-vrFWFT9DB7JmSZaG15Q2hXe5N-7NtKx7yN8Xzr_mMtMBU_ystznyAPfdpiHSKY3oe14sXOfFk6kTA0u7cCQ"
706
+ }
707
+ },
708
+ "bundleToml": {
709
+ "id": "at.acme.photobook",
710
+ "name": "Photobook",
711
+ "version": "1.0.0"
712
+ },
713
+ "expected": {
714
+ "refused": {
715
+ "code": "capability",
716
+ "detail": "shell.edit"
717
+ }
718
+ }
719
+ },
720
+ {
721
+ "name": "bundle.toml without an id and with an update feed: config",
722
+ "file": {
723
+ "package": {
724
+ "formatVersion": 5,
725
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
726
+ "id": "acme.photobook",
727
+ "name": "Photobook",
728
+ "version": "1.0.0",
729
+ "functions": [
730
+ "records.*",
731
+ "photos.pick",
732
+ "print.pdf",
733
+ "share.send",
734
+ "files.save"
735
+ ],
736
+ "templates": {
737
+ "albums": {
738
+ "components": [
739
+ {
740
+ "id": "root",
741
+ "component": "Page",
742
+ "title": "Albums",
743
+ "children": [
744
+ "body"
745
+ ]
746
+ },
747
+ {
748
+ "id": "body",
749
+ "component": "Text",
750
+ "text": "Albums"
751
+ }
752
+ ]
753
+ }
754
+ },
755
+ "capabilities": [
756
+ {
757
+ "id": "photos.read",
758
+ "why": "Pick the photos for an album."
759
+ },
760
+ {
761
+ "id": "files.write",
762
+ "why": "Save the album's PDF where you pick."
763
+ },
764
+ {
765
+ "id": "print.pdf",
766
+ "why": "Lay out the album as a PDF."
767
+ },
768
+ {
769
+ "id": "share.send",
770
+ "why": "Share the album's PDF."
771
+ }
772
+ ]
773
+ },
774
+ "author": {
775
+ "name": "Acme",
776
+ "key": "ed25519:6kpsY-KcUgq-9VB7Ey7F-ZVHdq6-vnuSQh7qaRRG0iw"
777
+ },
778
+ "signature": {
779
+ "alg": "ed25519",
780
+ "value": "D8HNq-kcqgs4lp-vpN7JFwYQUz83_t-eSImCIOUzY2jxF5g_zAk_gnfQsdMX4cOTangMqPtnH-dH7pasodcvDA"
781
+ }
782
+ },
783
+ "bundleToml": {
784
+ "name": "Photobook",
785
+ "version": "1.0.0",
786
+ "feed": "https://x"
787
+ },
788
+ "expected": {
789
+ "refused": {
790
+ "code": "config",
791
+ "detail": "id:missing,feed:forbidden"
792
+ }
793
+ }
794
+ },
795
+ {
796
+ "name": "bundle.toml with a bad version: config",
797
+ "file": {
798
+ "package": {
799
+ "formatVersion": 5,
800
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
801
+ "id": "acme.photobook",
802
+ "name": "Photobook",
803
+ "version": "1.0.0",
804
+ "functions": [
805
+ "records.*",
806
+ "photos.pick",
807
+ "print.pdf",
808
+ "share.send",
809
+ "files.save"
810
+ ],
811
+ "templates": {
812
+ "albums": {
813
+ "components": [
814
+ {
815
+ "id": "root",
816
+ "component": "Page",
817
+ "title": "Albums",
818
+ "children": [
819
+ "body"
820
+ ]
821
+ },
822
+ {
823
+ "id": "body",
824
+ "component": "Text",
825
+ "text": "Albums"
826
+ }
827
+ ]
828
+ }
829
+ },
830
+ "capabilities": [
831
+ {
832
+ "id": "photos.read",
833
+ "why": "Pick the photos for an album."
834
+ },
835
+ {
836
+ "id": "files.write",
837
+ "why": "Save the album's PDF where you pick."
838
+ },
839
+ {
840
+ "id": "print.pdf",
841
+ "why": "Lay out the album as a PDF."
842
+ },
843
+ {
844
+ "id": "share.send",
845
+ "why": "Share the album's PDF."
846
+ }
847
+ ]
848
+ },
849
+ "author": {
850
+ "name": "Acme",
851
+ "key": "ed25519:6kpsY-KcUgq-9VB7Ey7F-ZVHdq6-vnuSQh7qaRRG0iw"
852
+ },
853
+ "signature": {
854
+ "alg": "ed25519",
855
+ "value": "D8HNq-kcqgs4lp-vpN7JFwYQUz83_t-eSImCIOUzY2jxF5g_zAk_gnfQsdMX4cOTangMqPtnH-dH7pasodcvDA"
856
+ }
857
+ },
858
+ "bundleToml": {
859
+ "id": "at.acme.photobook",
860
+ "name": "Photobook",
861
+ "version": "1.0"
862
+ },
863
+ "expected": {
864
+ "refused": {
865
+ "code": "config",
866
+ "detail": "version:invalid"
867
+ }
868
+ }
869
+ },
870
+ {
871
+ "name": "bundle.toml network any",
872
+ "file": {
873
+ "package": {
874
+ "formatVersion": 5,
875
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
876
+ "id": "acme.photobook",
877
+ "name": "Photobook",
878
+ "version": "1.0.0",
879
+ "functions": [
880
+ "records.*",
881
+ "photos.pick",
882
+ "print.pdf",
883
+ "share.send",
884
+ "files.save"
885
+ ],
886
+ "templates": {
887
+ "albums": {
888
+ "components": [
889
+ {
890
+ "id": "root",
891
+ "component": "Page",
892
+ "title": "Albums",
893
+ "children": [
894
+ "body"
895
+ ]
896
+ },
897
+ {
898
+ "id": "body",
899
+ "component": "Text",
900
+ "text": "Albums"
901
+ }
902
+ ]
903
+ }
904
+ },
905
+ "capabilities": [
906
+ {
907
+ "id": "photos.read",
908
+ "why": "Pick the photos for an album."
909
+ },
910
+ {
911
+ "id": "files.write",
912
+ "why": "Save the album's PDF where you pick."
913
+ },
914
+ {
915
+ "id": "print.pdf",
916
+ "why": "Lay out the album as a PDF."
917
+ },
918
+ {
919
+ "id": "share.send",
920
+ "why": "Share the album's PDF."
921
+ }
922
+ ]
923
+ },
924
+ "author": {
925
+ "name": "Acme",
926
+ "key": "ed25519:6kpsY-KcUgq-9VB7Ey7F-ZVHdq6-vnuSQh7qaRRG0iw"
927
+ },
928
+ "signature": {
929
+ "alg": "ed25519",
930
+ "value": "D8HNq-kcqgs4lp-vpN7JFwYQUz83_t-eSImCIOUzY2jxF5g_zAk_gnfQsdMX4cOTangMqPtnH-dH7pasodcvDA"
931
+ }
932
+ },
933
+ "bundleToml": {
934
+ "id": "at.acme.photobook",
935
+ "name": "Photobook",
936
+ "version": "1.0.0",
937
+ "network": "any"
938
+ },
939
+ "expected": {
940
+ "ok": {
941
+ "config": {
942
+ "id": "at.acme.photobook",
943
+ "name": "Photobook",
944
+ "version": "1.0.0",
945
+ "network": "any"
946
+ },
947
+ "scopes": [
948
+ "files.write",
949
+ "photos.read",
950
+ "print.pdf",
951
+ "share.send"
952
+ ]
953
+ }
954
+ }
955
+ }
956
+ ],
957
+ "permissionCases": [
958
+ {
959
+ "name": "the Photobook: photos, files.write, print, share; offline",
960
+ "scopes": [
961
+ "files.write",
962
+ "photos.read",
963
+ "print.pdf",
964
+ "share.send"
965
+ ],
966
+ "config": {
967
+ "id": "at.acme.photobook",
968
+ "name": "Photobook",
969
+ "version": "1.0.0",
970
+ "network": "off"
971
+ },
972
+ "whys": {
973
+ "photos.read": "Pick the photos for an album."
974
+ },
975
+ "expected": {
976
+ "android": {
977
+ "permissions": [
978
+ "<uses-permission android:name=\"android.permission.READ_MEDIA_IMAGES\" />",
979
+ "<uses-permission android:name=\"android.permission.READ_MEDIA_VISUAL_USER_SELECTED\" />",
980
+ "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" android:maxSdkVersion=\"32\" />"
981
+ ]
982
+ },
983
+ "ios": {
984
+ "modules": [
985
+ "ExponentialEngineFiles",
986
+ "ExponentialEnginePhotos",
987
+ "ExponentialEnginePrint",
988
+ "ExponentialEngineShare"
989
+ ],
990
+ "purposes": {
991
+ "NSPhotoLibraryUsageDescription": "Pick the photos for an album.",
992
+ "NSPhotoLibraryAddUsageDescription": "Photobook saves images you share."
993
+ }
994
+ },
995
+ "macos": {
996
+ "entitlements": [
997
+ "com.apple.security.app-sandbox",
998
+ "com.apple.security.assets.pictures.read-only",
999
+ "com.apple.security.files.user-selected.read-only",
1000
+ "com.apple.security.files.user-selected.read-write",
1001
+ "com.apple.security.print"
1002
+ ],
1003
+ "scheme": "at.acme.photobook"
1004
+ },
1005
+ "linux": {
1006
+ "desktopEntry": "[Desktop Entry]\nType=Application\nName=Photobook\nExec=at.acme.photobook %u\nIcon=at.acme.photobook\nTerminal=false\nCategories=Utility;\nMimeType=x-scheme-handler/at.acme.photobook;\n"
1007
+ },
1008
+ "windows": {
1009
+ "protocolKey": "HKCU\\Software\\Classes\\at.acme.photobook"
1010
+ },
1011
+ "web": {
1012
+ "manifest": {
1013
+ "id": "./",
1014
+ "name": "Photobook",
1015
+ "short_name": "Photobook",
1016
+ "start_url": "./",
1017
+ "scope": "./",
1018
+ "display": "standalone",
1019
+ "background_color": "#09090b",
1020
+ "theme_color": "#09090b",
1021
+ "icons": [
1022
+ {
1023
+ "src": "icons/icon-192.png",
1024
+ "sizes": "192x192",
1025
+ "type": "image/png",
1026
+ "purpose": "any"
1027
+ },
1028
+ {
1029
+ "src": "icons/icon-512.png",
1030
+ "sizes": "512x512",
1031
+ "type": "image/png",
1032
+ "purpose": "any"
1033
+ }
1034
+ ]
1035
+ }
1036
+ }
1037
+ }
1038
+ },
1039
+ {
1040
+ "name": "notifications with the network on",
1041
+ "scopes": [
1042
+ "notifications.post"
1043
+ ],
1044
+ "config": {
1045
+ "id": "at.acme.photobook",
1046
+ "name": "Photobook",
1047
+ "version": "1.0.0",
1048
+ "network": "any"
1049
+ },
1050
+ "whys": {},
1051
+ "expected": {
1052
+ "android": {
1053
+ "permissions": [
1054
+ "<uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" />",
1055
+ "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />",
1056
+ "<uses-permission android:name=\"android.permission.INTERNET\" />"
1057
+ ]
1058
+ },
1059
+ "ios": {
1060
+ "modules": [
1061
+ "ExponentialEngineNotifications"
1062
+ ],
1063
+ "purposes": {}
1064
+ },
1065
+ "macos": {
1066
+ "entitlements": [
1067
+ "com.apple.security.app-sandbox",
1068
+ "com.apple.security.network.client"
1069
+ ],
1070
+ "scheme": "at.acme.photobook"
1071
+ },
1072
+ "linux": {
1073
+ "desktopEntry": "[Desktop Entry]\nType=Application\nName=Photobook\nExec=at.acme.photobook %u\nIcon=at.acme.photobook\nTerminal=false\nCategories=Utility;\nMimeType=x-scheme-handler/at.acme.photobook;\n"
1074
+ },
1075
+ "windows": {
1076
+ "protocolKey": "HKCU\\Software\\Classes\\at.acme.photobook"
1077
+ },
1078
+ "web": {
1079
+ "manifest": {
1080
+ "id": "./",
1081
+ "name": "Photobook",
1082
+ "short_name": "Photobook",
1083
+ "start_url": "./",
1084
+ "scope": "./",
1085
+ "display": "standalone",
1086
+ "background_color": "#09090b",
1087
+ "theme_color": "#09090b",
1088
+ "icons": [
1089
+ {
1090
+ "src": "icons/icon-192.png",
1091
+ "sizes": "192x192",
1092
+ "type": "image/png",
1093
+ "purpose": "any"
1094
+ },
1095
+ {
1096
+ "src": "icons/icon-512.png",
1097
+ "sizes": "512x512",
1098
+ "type": "image/png",
1099
+ "purpose": "any"
1100
+ }
1101
+ ]
1102
+ }
1103
+ }
1104
+ }
1105
+ },
1106
+ {
1107
+ "name": "no capabilities: nothing but the sandbox",
1108
+ "scopes": [],
1109
+ "config": {
1110
+ "id": "at.acme.photobook",
1111
+ "name": "Photobook",
1112
+ "version": "1.0.0",
1113
+ "network": "off"
1114
+ },
1115
+ "whys": {},
1116
+ "expected": {
1117
+ "android": {
1118
+ "permissions": []
1119
+ },
1120
+ "ios": {
1121
+ "modules": [],
1122
+ "purposes": {}
1123
+ },
1124
+ "macos": {
1125
+ "entitlements": [
1126
+ "com.apple.security.app-sandbox"
1127
+ ],
1128
+ "scheme": "at.acme.photobook"
1129
+ },
1130
+ "linux": {
1131
+ "desktopEntry": "[Desktop Entry]\nType=Application\nName=Photobook\nExec=at.acme.photobook %u\nIcon=at.acme.photobook\nTerminal=false\nCategories=Utility;\nMimeType=x-scheme-handler/at.acme.photobook;\n"
1132
+ },
1133
+ "windows": {
1134
+ "protocolKey": "HKCU\\Software\\Classes\\at.acme.photobook"
1135
+ },
1136
+ "web": {
1137
+ "manifest": {
1138
+ "id": "./",
1139
+ "name": "Photobook",
1140
+ "short_name": "Photobook",
1141
+ "start_url": "./",
1142
+ "scope": "./",
1143
+ "display": "standalone",
1144
+ "background_color": "#09090b",
1145
+ "theme_color": "#09090b",
1146
+ "icons": [
1147
+ {
1148
+ "src": "icons/icon-192.png",
1149
+ "sizes": "192x192",
1150
+ "type": "image/png",
1151
+ "purpose": "any"
1152
+ },
1153
+ {
1154
+ "src": "icons/icon-512.png",
1155
+ "sizes": "512x512",
1156
+ "type": "image/png",
1157
+ "purpose": "any"
1158
+ }
1159
+ ]
1160
+ }
1161
+ }
1162
+ }
1163
+ }
1164
+ ]
1165
+ }