pico-engine 1.5.0 → 1.6.1

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 (62) hide show
  1. package/README.md +41 -0
  2. package/dist/RulesetRegistryLoaderFs.js +2 -0
  3. package/dist/auth/AuthService.js +77 -13
  4. package/dist/bundledKrl.js +42 -0
  5. package/dist/identity/IdentityService.js +340 -0
  6. package/dist/identity/crossPico.js +238 -0
  7. package/dist/identity/dbHelpers.js +67 -0
  8. package/dist/identity/didcommIngressRoutes.js +44 -0
  9. package/dist/identity/didoModule.js +252 -0
  10. package/dist/identity/errors.js +11 -0
  11. package/dist/identity/establishSubscription.js +97 -0
  12. package/dist/identity/index.js +15 -0
  13. package/dist/identity/peerDid.js +9 -0
  14. package/dist/identity/skyIntro.js +194 -0
  15. package/dist/identity/skyProtocol.js +105 -0
  16. package/dist/identity/store.js +233 -0
  17. package/dist/identity/types.js +13 -0
  18. package/dist/identity/veramoDidComm.js +260 -0
  19. package/dist/identity/webvh.js +266 -0
  20. package/dist/identity/webvhCrypto.js +128 -0
  21. package/dist/identity/webvhRoutes.js +61 -0
  22. package/dist/index.js +26 -2
  23. package/dist/oauth/OAuthService.js +32 -0
  24. package/dist/provisionRoot.js +56 -18
  25. package/dist/server.js +52 -1
  26. package/dist/uiChannelPolicies.js +48 -0
  27. package/krl/io.picolabs.did-o.krl +5 -1
  28. package/krl/io.picolabs.pico-engine-ui.krl +106 -18
  29. package/krl/io.picolabs.subscription.krl +242 -23
  30. package/krl/io.picolabs.wrangler.krl +221 -12
  31. package/package.json +29 -6
  32. package/public/docs/krl/_sidebar.md +1 -0
  33. package/public/docs/krl/discovery.md +144 -0
  34. package/public/docs/krl/modules/ctx.md +8 -0
  35. package/public/docs/krl/modules/event.md +41 -0
  36. package/public/pico-engine-ui.css +1 -1
  37. package/public/pico-engine-ui.js +21 -18
  38. package/src/RulesetRegistryLoaderFs.ts +2 -0
  39. package/src/auth/AuthService.ts +109 -14
  40. package/src/bundledKrl.ts +42 -0
  41. package/src/identity/IdentityService.ts +571 -0
  42. package/src/identity/crossPico.ts +371 -0
  43. package/src/identity/dbHelpers.ts +51 -0
  44. package/src/identity/didcommIngressRoutes.ts +54 -0
  45. package/src/identity/didoModule.ts +388 -0
  46. package/src/identity/errors.ts +8 -0
  47. package/src/identity/establishSubscription.ts +160 -0
  48. package/src/identity/index.ts +24 -0
  49. package/src/identity/peerDid.ts +22 -0
  50. package/src/identity/skyIntro.ts +321 -0
  51. package/src/identity/skyProtocol.ts +192 -0
  52. package/src/identity/store.ts +343 -0
  53. package/src/identity/types.ts +63 -0
  54. package/src/identity/veramoDidComm.ts +363 -0
  55. package/src/identity/webvh.ts +325 -0
  56. package/src/identity/webvhCrypto.ts +200 -0
  57. package/src/identity/webvhRoutes.ts +64 -0
  58. package/src/index.ts +31 -2
  59. package/src/oauth/OAuthService.ts +36 -0
  60. package/src/provisionRoot.ts +75 -21
  61. package/src/server.ts +58 -1
  62. package/src/uiChannelPolicies.ts +49 -0
@@ -0,0 +1,49 @@
1
+ import { EventPolicy, QueryPolicy } from "pico-framework";
2
+
3
+ /** Keep in sync with uiChannelEventPolicy() in io.picolabs.pico-engine-ui.krl */
4
+ export const UI_CHANNEL_EVENT_POLICY: EventPolicy = {
5
+ allow: [
6
+ { domain: "engine_ui", name: "setup" },
7
+ { domain: "engine_ui", name: "box" },
8
+ { domain: "engine_ui", name: "new" },
9
+ { domain: "engine_ui", name: "del" },
10
+ { domain: "engine_ui", name: "install" },
11
+ { domain: "engine_ui", name: "uninstall" },
12
+ { domain: "engine_ui", name: "flush" },
13
+ { domain: "engine_ui", name: "new_channel" },
14
+ { domain: "engine_ui", name: "del_channel" },
15
+ { domain: "engine_ui", name: "update_channel" },
16
+ { domain: "engine_ui", name: "testing_eci" },
17
+ { domain: "engine", name: "started" },
18
+ { domain: "wrangler", name: "subscription" },
19
+ { domain: "wrangler", name: "pending_subscription_approval" },
20
+ { domain: "wrangler", name: "inbound_rejection" },
21
+ { domain: "wrangler", name: "outbound_cancellation" },
22
+ { domain: "wrangler", name: "subscription_cancellation" },
23
+ { domain: "wrangler", name: "set_public_intro" },
24
+ { domain: "wrangler", name: "send_event_on_subs" },
25
+ ],
26
+ deny: [],
27
+ };
28
+
29
+ /** Keep in sync with uiChannelQueryPolicy() in io.picolabs.pico-engine-ui.krl */
30
+ export const UI_CHANNEL_QUERY_POLICY: QueryPolicy = {
31
+ allow: [
32
+ { rid: "*", name: "__testing" },
33
+ { rid: "io.picolabs.pico-engine-ui", name: "uiECI" },
34
+ { rid: "io.picolabs.pico-engine-ui", name: "box" },
35
+ { rid: "io.picolabs.pico-engine-ui", name: "pico" },
36
+ { rid: "io.picolabs.pico-engine-ui", name: "logs" },
37
+ { rid: "io.picolabs.pico-engine-ui", name: "testingECI" },
38
+ { rid: "io.picolabs.pico-engine-ui", name: "name" },
39
+ { rid: "io.picolabs.subscription", name: "established" },
40
+ { rid: "io.picolabs.subscription", name: "inbound" },
41
+ { rid: "io.picolabs.subscription", name: "outbound" },
42
+ { rid: "io.picolabs.subscription", name: "wellKnown_Rx" },
43
+ { rid: "io.picolabs.wrangler", name: "myDid" },
44
+ { rid: "io.picolabs.wrangler", name: "publicIntro" },
45
+ ],
46
+ deny: [],
47
+ };
48
+
49
+ export const UI_CHANNEL_TAGS = ["engine", "ui"] as const;