@kya-os/consent 0.2.2 → 0.3.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 (266) hide show
  1. package/README.md +344 -2
  2. package/dist/bundle/index.d.ts +48 -36
  3. package/dist/bundle/index.d.ts.map +1 -1
  4. package/dist/bundle/index.js +45 -33
  5. package/dist/bundle/index.js.map +1 -1
  6. package/dist/bundle/inline.d.ts.map +1 -1
  7. package/dist/bundle/inline.js +4 -4
  8. package/dist/bundle/inline.js.map +1 -1
  9. package/dist/bundle/shell.d.ts +7 -0
  10. package/dist/bundle/shell.d.ts.map +1 -1
  11. package/dist/bundle/shell.js +5 -0
  12. package/dist/bundle/shell.js.map +1 -1
  13. package/dist/cjs/bundle/index.js +14 -1
  14. package/dist/cjs/bundle/index.js.map +1 -1
  15. package/dist/cjs/bundle/inline.js +4 -4
  16. package/dist/cjs/bundle/inline.js.map +1 -1
  17. package/dist/cjs/bundle/shell.js +5 -0
  18. package/dist/cjs/bundle/shell.js.map +1 -1
  19. package/dist/cjs/components/consent-action-bar.js +66 -15
  20. package/dist/cjs/components/consent-action-bar.js.map +1 -1
  21. package/dist/cjs/components/consent-agent-header.js +20 -10
  22. package/dist/cjs/components/consent-agent-header.js.map +1 -1
  23. package/dist/cjs/components/consent-capabilities-screen.js +57 -79
  24. package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
  25. package/dist/cjs/components/consent-checkbox.js +2 -2
  26. package/dist/cjs/components/consent-checkbox.js.map +1 -1
  27. package/dist/cjs/components/consent-duration.js +187 -0
  28. package/dist/cjs/components/consent-duration.js.map +1 -0
  29. package/dist/cjs/components/consent-folder-scope.js +169 -0
  30. package/dist/cjs/components/consent-folder-scope.js.map +1 -0
  31. package/dist/cjs/components/consent-footer.js +13 -2
  32. package/dist/cjs/components/consent-footer.js.map +1 -1
  33. package/dist/cjs/components/consent-grant-terms.js +321 -0
  34. package/dist/cjs/components/consent-grant-terms.js.map +1 -0
  35. package/dist/cjs/components/consent-headline.js +138 -0
  36. package/dist/cjs/components/consent-headline.js.map +1 -0
  37. package/dist/cjs/components/consent-input.js +47 -27
  38. package/dist/cjs/components/consent-input.js.map +1 -1
  39. package/dist/cjs/components/consent-otp-input.js +79 -55
  40. package/dist/cjs/components/consent-otp-input.js.map +1 -1
  41. package/dist/cjs/components/consent-phone-handoff.js +219 -0
  42. package/dist/cjs/components/consent-phone-handoff.js.map +1 -0
  43. package/dist/cjs/components/consent-request-expiry.js +159 -0
  44. package/dist/cjs/components/consent-request-expiry.js.map +1 -0
  45. package/dist/cjs/components/consent-revoke.js +308 -0
  46. package/dist/cjs/components/consent-revoke.js.map +1 -0
  47. package/dist/cjs/components/consent-shell.js +3 -0
  48. package/dist/cjs/components/consent-shell.js.map +1 -1
  49. package/dist/cjs/components/consent-terms.js +2 -2
  50. package/dist/cjs/components/consent-terms.js.map +1 -1
  51. package/dist/cjs/components/consent-wallet-check.js +107 -0
  52. package/dist/cjs/components/consent-wallet-check.js.map +1 -0
  53. package/dist/cjs/components/consent-wallet-notice.js +189 -0
  54. package/dist/cjs/components/consent-wallet-notice.js.map +1 -0
  55. package/dist/cjs/components/consent-wallet-orb.js +273 -0
  56. package/dist/cjs/components/consent-wallet-orb.js.map +1 -0
  57. package/dist/cjs/components/consent-wallet-signature.js +104 -0
  58. package/dist/cjs/components/consent-wallet-signature.js.map +1 -0
  59. package/dist/cjs/components/grant-field-styles.js +85 -0
  60. package/dist/cjs/components/grant-field-styles.js.map +1 -0
  61. package/dist/cjs/components/index.js +34 -1
  62. package/dist/cjs/components/index.js.map +1 -1
  63. package/dist/cjs/components/mcp-consent.js +60 -2
  64. package/dist/cjs/components/mcp-consent.js.map +1 -1
  65. package/dist/cjs/components/template-link.js +32 -0
  66. package/dist/cjs/components/template-link.js.map +1 -0
  67. package/dist/cjs/components/wallet-globe.js +184 -0
  68. package/dist/cjs/components/wallet-globe.js.map +1 -0
  69. package/dist/cjs/components/wallet-icons.js +19 -0
  70. package/dist/cjs/components/wallet-icons.js.map +1 -0
  71. package/dist/cjs/components/wallet-status.js +34 -0
  72. package/dist/cjs/components/wallet-status.js.map +1 -0
  73. package/dist/cjs/copy/tokens.js +107 -1
  74. package/dist/cjs/copy/tokens.js.map +1 -1
  75. package/dist/cjs/grant/index.js +24 -0
  76. package/dist/cjs/grant/index.js.map +1 -0
  77. package/dist/cjs/grant/terms.js +148 -0
  78. package/dist/cjs/grant/terms.js.map +1 -0
  79. package/dist/cjs/identity/agent-identity.js +314 -0
  80. package/dist/cjs/identity/agent-identity.js.map +1 -0
  81. package/dist/cjs/identity/documents.js +212 -0
  82. package/dist/cjs/identity/documents.js.map +1 -0
  83. package/dist/cjs/identity/entity-card.js +128 -0
  84. package/dist/cjs/identity/entity-card.js.map +1 -0
  85. package/dist/cjs/identity/index.js +31 -0
  86. package/dist/cjs/identity/index.js.map +1 -0
  87. package/dist/cjs/identity/resolve.js +122 -0
  88. package/dist/cjs/identity/resolve.js.map +1 -0
  89. package/dist/cjs/identity/schemas.js +88 -0
  90. package/dist/cjs/identity/schemas.js.map +1 -0
  91. package/dist/cjs/index.js +5 -1
  92. package/dist/cjs/index.js.map +1 -1
  93. package/dist/cjs/mcp-app/inline.js +2 -2
  94. package/dist/cjs/mcp-app/inline.js.map +1 -1
  95. package/dist/cjs/mcp-app/types.js +1 -1
  96. package/dist/cjs/popup/launcher.js +3 -3
  97. package/dist/cjs/react/index.js +260 -25
  98. package/dist/cjs/react/index.js.map +1 -1
  99. package/dist/cjs/templates/index.js +1 -1
  100. package/dist/cjs/types/index.js +1 -1
  101. package/dist/components/consent-action-bar.d.ts +17 -0
  102. package/dist/components/consent-action-bar.d.ts.map +1 -1
  103. package/dist/components/consent-action-bar.js +67 -16
  104. package/dist/components/consent-action-bar.js.map +1 -1
  105. package/dist/components/consent-agent-header.d.ts +3 -1
  106. package/dist/components/consent-agent-header.d.ts.map +1 -1
  107. package/dist/components/consent-agent-header.js +20 -10
  108. package/dist/components/consent-agent-header.js.map +1 -1
  109. package/dist/components/consent-capabilities-screen.d.ts +23 -3
  110. package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
  111. package/dist/components/consent-capabilities-screen.js +57 -79
  112. package/dist/components/consent-capabilities-screen.js.map +1 -1
  113. package/dist/components/consent-checkbox.d.ts +1 -1
  114. package/dist/components/consent-checkbox.js +2 -2
  115. package/dist/components/consent-checkbox.js.map +1 -1
  116. package/dist/components/consent-duration.d.ts +64 -0
  117. package/dist/components/consent-duration.d.ts.map +1 -0
  118. package/dist/components/consent-duration.js +184 -0
  119. package/dist/components/consent-duration.js.map +1 -0
  120. package/dist/components/consent-folder-scope.d.ts +70 -0
  121. package/dist/components/consent-folder-scope.d.ts.map +1 -0
  122. package/dist/components/consent-folder-scope.js +166 -0
  123. package/dist/components/consent-folder-scope.js.map +1 -0
  124. package/dist/components/consent-footer.d.ts.map +1 -1
  125. package/dist/components/consent-footer.js +13 -2
  126. package/dist/components/consent-footer.js.map +1 -1
  127. package/dist/components/consent-grant-terms.d.ts +88 -0
  128. package/dist/components/consent-grant-terms.d.ts.map +1 -0
  129. package/dist/components/consent-grant-terms.js +318 -0
  130. package/dist/components/consent-grant-terms.js.map +1 -0
  131. package/dist/components/consent-headline.d.ts +42 -0
  132. package/dist/components/consent-headline.d.ts.map +1 -0
  133. package/dist/components/consent-headline.js +135 -0
  134. package/dist/components/consent-headline.js.map +1 -0
  135. package/dist/components/consent-input.d.ts +4 -4
  136. package/dist/components/consent-input.d.ts.map +1 -1
  137. package/dist/components/consent-input.js +49 -29
  138. package/dist/components/consent-input.js.map +1 -1
  139. package/dist/components/consent-otp-input.d.ts +11 -6
  140. package/dist/components/consent-otp-input.d.ts.map +1 -1
  141. package/dist/components/consent-otp-input.js +81 -57
  142. package/dist/components/consent-otp-input.js.map +1 -1
  143. package/dist/components/consent-phone-handoff.d.ts +50 -0
  144. package/dist/components/consent-phone-handoff.d.ts.map +1 -0
  145. package/dist/components/consent-phone-handoff.js +215 -0
  146. package/dist/components/consent-phone-handoff.js.map +1 -0
  147. package/dist/components/consent-request-expiry.d.ts +52 -0
  148. package/dist/components/consent-request-expiry.d.ts.map +1 -0
  149. package/dist/components/consent-request-expiry.js +154 -0
  150. package/dist/components/consent-request-expiry.js.map +1 -0
  151. package/dist/components/consent-revoke.d.ts +53 -0
  152. package/dist/components/consent-revoke.d.ts.map +1 -0
  153. package/dist/components/consent-revoke.js +305 -0
  154. package/dist/components/consent-revoke.js.map +1 -0
  155. package/dist/components/consent-shell.d.ts.map +1 -1
  156. package/dist/components/consent-shell.js +3 -0
  157. package/dist/components/consent-shell.js.map +1 -1
  158. package/dist/components/consent-terms.d.ts +1 -1
  159. package/dist/components/consent-terms.js +2 -2
  160. package/dist/components/consent-terms.js.map +1 -1
  161. package/dist/components/consent-wallet-check.d.ts +45 -0
  162. package/dist/components/consent-wallet-check.d.ts.map +1 -0
  163. package/dist/components/consent-wallet-check.js +102 -0
  164. package/dist/components/consent-wallet-check.js.map +1 -0
  165. package/dist/components/consent-wallet-notice.d.ts +54 -0
  166. package/dist/components/consent-wallet-notice.d.ts.map +1 -0
  167. package/dist/components/consent-wallet-notice.js +186 -0
  168. package/dist/components/consent-wallet-notice.js.map +1 -0
  169. package/dist/components/consent-wallet-orb.d.ts +48 -0
  170. package/dist/components/consent-wallet-orb.d.ts.map +1 -0
  171. package/dist/components/consent-wallet-orb.js +269 -0
  172. package/dist/components/consent-wallet-orb.js.map +1 -0
  173. package/dist/components/consent-wallet-signature.d.ts +26 -0
  174. package/dist/components/consent-wallet-signature.d.ts.map +1 -0
  175. package/dist/components/consent-wallet-signature.js +101 -0
  176. package/dist/components/consent-wallet-signature.js.map +1 -0
  177. package/dist/components/grant-field-styles.d.ts +9 -0
  178. package/dist/components/grant-field-styles.d.ts.map +1 -0
  179. package/dist/components/grant-field-styles.js +82 -0
  180. package/dist/components/grant-field-styles.js.map +1 -0
  181. package/dist/components/index.d.ts +28 -17
  182. package/dist/components/index.d.ts.map +1 -1
  183. package/dist/components/index.js +31 -17
  184. package/dist/components/index.js.map +1 -1
  185. package/dist/components/mcp-consent.d.ts +16 -0
  186. package/dist/components/mcp-consent.d.ts.map +1 -1
  187. package/dist/components/mcp-consent.js +60 -2
  188. package/dist/components/mcp-consent.js.map +1 -1
  189. package/dist/components/template-link.d.ts +24 -0
  190. package/dist/components/template-link.d.ts.map +1 -0
  191. package/dist/components/template-link.js +29 -0
  192. package/dist/components/template-link.js.map +1 -0
  193. package/dist/components/wallet-globe.d.ts +29 -0
  194. package/dist/components/wallet-globe.d.ts.map +1 -0
  195. package/dist/components/wallet-globe.js +181 -0
  196. package/dist/components/wallet-globe.js.map +1 -0
  197. package/dist/components/wallet-icons.d.ts +16 -0
  198. package/dist/components/wallet-icons.d.ts.map +1 -0
  199. package/dist/components/wallet-icons.js +16 -0
  200. package/dist/components/wallet-icons.js.map +1 -0
  201. package/dist/components/wallet-status.d.ts +19 -0
  202. package/dist/components/wallet-status.d.ts.map +1 -0
  203. package/dist/components/wallet-status.js +29 -0
  204. package/dist/components/wallet-status.js.map +1 -0
  205. package/dist/consent.js +3547 -811
  206. package/dist/consent.min.js +1366 -295
  207. package/dist/copy/tokens.d.ts +107 -1
  208. package/dist/copy/tokens.d.ts.map +1 -1
  209. package/dist/copy/tokens.js +107 -1
  210. package/dist/copy/tokens.js.map +1 -1
  211. package/dist/grant/index.d.ts +8 -0
  212. package/dist/grant/index.d.ts.map +1 -0
  213. package/dist/grant/index.js +8 -0
  214. package/dist/grant/index.js.map +1 -0
  215. package/dist/grant/terms.d.ts +97 -0
  216. package/dist/grant/terms.d.ts.map +1 -0
  217. package/dist/grant/terms.js +139 -0
  218. package/dist/grant/terms.js.map +1 -0
  219. package/dist/identity/agent-identity.d.ts +199 -0
  220. package/dist/identity/agent-identity.d.ts.map +1 -0
  221. package/dist/identity/agent-identity.js +305 -0
  222. package/dist/identity/agent-identity.js.map +1 -0
  223. package/dist/identity/documents.d.ts +63 -0
  224. package/dist/identity/documents.d.ts.map +1 -0
  225. package/dist/identity/documents.js +206 -0
  226. package/dist/identity/documents.js.map +1 -0
  227. package/dist/identity/entity-card.d.ts +80 -0
  228. package/dist/identity/entity-card.d.ts.map +1 -0
  229. package/dist/identity/entity-card.js +119 -0
  230. package/dist/identity/entity-card.js.map +1 -0
  231. package/dist/identity/index.d.ts +15 -0
  232. package/dist/identity/index.d.ts.map +1 -0
  233. package/dist/identity/index.js +15 -0
  234. package/dist/identity/index.js.map +1 -0
  235. package/dist/identity/resolve.d.ts +31 -0
  236. package/dist/identity/resolve.d.ts.map +1 -0
  237. package/dist/identity/resolve.js +119 -0
  238. package/dist/identity/resolve.js.map +1 -0
  239. package/dist/identity/schemas.d.ts +404 -0
  240. package/dist/identity/schemas.d.ts.map +1 -0
  241. package/dist/identity/schemas.js +84 -0
  242. package/dist/identity/schemas.js.map +1 -0
  243. package/dist/index.d.ts +3 -1
  244. package/dist/index.d.ts.map +1 -1
  245. package/dist/index.js +5 -1
  246. package/dist/index.js.map +1 -1
  247. package/dist/kya-os/index.d.ts +55 -0
  248. package/dist/kya-os/index.d.ts.map +1 -0
  249. package/dist/kya-os/index.js +235 -0
  250. package/dist/kya-os/index.js.map +1 -0
  251. package/dist/mcp-app/inline.d.ts.map +1 -1
  252. package/dist/mcp-app/inline.js +2 -2
  253. package/dist/mcp-app/inline.js.map +1 -1
  254. package/dist/mcp-app/types.d.ts +1 -1
  255. package/dist/mcp-app/types.js +1 -1
  256. package/dist/popup/launcher.d.ts +3 -3
  257. package/dist/popup/launcher.js +3 -3
  258. package/dist/react/index.d.ts +182 -22
  259. package/dist/react/index.d.ts.map +1 -1
  260. package/dist/react/index.js +270 -35
  261. package/dist/react/index.js.map +1 -1
  262. package/dist/templates/index.d.ts +1 -1
  263. package/dist/templates/index.js +1 -1
  264. package/dist/types/index.d.ts +1 -1
  265. package/dist/types/index.js +1 -1
  266. package/package.json +49 -8
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /**
3
+ * The wallet check's statuses, shared by `consent-wallet-orb` and
4
+ * `consent-wallet-check`.
5
+ *
6
+ * @module components/wallet-status
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.WALLET_ORB_STATUSES = exports.WALLET_CHECK_STATUSES = void 0;
10
+ exports.readWalletStatus = readWalletStatus;
11
+ exports.readWalletOrbStatus = readWalletOrbStatus;
12
+ exports.WALLET_CHECK_STATUSES = [
13
+ "checking",
14
+ "syncing",
15
+ "ready",
16
+ "conflict",
17
+ "error",
18
+ ];
19
+ /** A status the elements know, or `checking`. */
20
+ function readWalletStatus(status) {
21
+ return exports.WALLET_CHECK_STATUSES.includes(status)
22
+ ? status
23
+ : "checking";
24
+ }
25
+ /**
26
+ * The orb's statuses: the check's, and `idle` before anything has started,
27
+ * for a screen that shows the orb while it waits for the person.
28
+ */
29
+ exports.WALLET_ORB_STATUSES = ["idle", ...exports.WALLET_CHECK_STATUSES];
30
+ /** A status the orb knows, or `checking`. */
31
+ function readWalletOrbStatus(status) {
32
+ return status === "idle" ? "idle" : readWalletStatus(status);
33
+ }
34
+ //# sourceMappingURL=wallet-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-status.js","sourceRoot":"","sources":["../../../src/components/wallet-status.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAaH,4CAIC;AAWD,kDAEC;AA5BY,QAAA,qBAAqB,GAAG;IACnC,UAAU;IACV,SAAS;IACT,OAAO;IACP,UAAU;IACV,OAAO;CACC,CAAC;AAIX,iDAAiD;AACjD,SAAgB,gBAAgB,CAAC,MAAc;IAC7C,OAAQ,6BAA2C,CAAC,QAAQ,CAAC,MAAM,CAAC;QAClE,CAAC,CAAE,MAA4B;QAC/B,CAAC,CAAC,UAAU,CAAC;AACjB,CAAC;AAED;;;GAGG;AACU,QAAA,mBAAmB,GAAG,CAAC,MAAM,EAAE,GAAG,6BAAqB,CAAU,CAAC;AAI/E,6CAA6C;AAC7C,SAAgB,mBAAmB,CAAC,MAAc;IAChD,OAAO,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAC/D,CAAC"}
@@ -44,7 +44,22 @@ exports.CONSENT_COPY_TOKENS = {
44
44
  * names the client, it does not verify it.
45
45
  */
46
46
  domainPillPrefix: "Identified by",
47
- /** `{Vendor}` → vendor name. `{Surface}` → surface label. */
47
+ /**
48
+ * The meta line under the agent's name is built from the parts that are
49
+ * known, joined by `metaSeparator`: an unknown vendor or surface is left
50
+ * out rather than filled with a placeholder.
51
+ *
52
+ * `{Vendor}` → vendor name.
53
+ */
54
+ madeBy: "Made by {Vendor}",
55
+ /** `{Surface}` → surface label, e.g. "Mac". */
56
+ askingFrom: "Asking from your {Surface}",
57
+ metaSeparator: " · ",
58
+ /**
59
+ * @deprecated The header no longer uses this: it can't leave out an
60
+ * unknown vendor or surface. Use `madeBy`, `askingFrom` and
61
+ * `metaSeparator`.
62
+ */
48
63
  metaTemplate: "Made by {Vendor} · Asking from your {Surface} · {Connected}",
49
64
  connectedJustNow: "Connected just now",
50
65
  /** `{Minutes}` → minutes since connection. */
@@ -93,6 +108,97 @@ exports.CONSENT_COPY_TOKENS = {
93
108
  /** Dark theme secondary. */
94
109
  deny: "Deny",
95
110
  },
111
+ /**
112
+ * `consent-grant-terms`, `consent-duration` and `consent-folder-scope`
113
+ * defaults. Each element takes its own label, hint and placeholder too.
114
+ */
115
+ grant: {
116
+ /** The button that opens the terms. */
117
+ customize: "Customize",
118
+ /** Between the parts of the closed summary: "8 hours · Every folder". */
119
+ summarySeparator: " · ",
120
+ durationLabel: "Valid for",
121
+ durationHint: "The grant ends on its own after this. The agent has to ask again.",
122
+ folderLabel: "Limit to a folder (optional)",
123
+ folderPlaceholder: "e.g. notes/",
124
+ folderHint: "Only files under this folder. Leave it blank to allow every folder.",
125
+ /** The summary when no folder is set. */
126
+ everyFolder: "Every folder",
127
+ /** `{Folder}` → the folder, e.g. "notes/". */
128
+ onlyFolderTemplate: "Only {Folder}",
129
+ /** A folder with a `.` or `..` segment, which no request can match. */
130
+ folderDotSegment: "Use a folder path without . or .. in it.",
131
+ /** The summary while the folder can't be used. */
132
+ folderNeedsFixing: "Folder needs fixing",
133
+ /** `chained`: what a delegation chain lets the agent do with the grant. */
134
+ passOn: "The agent can pass on only a narrower grant, never a wider one.",
135
+ },
136
+ /** `consent-revoke` defaults. `{Agent}` → agent display name. */
137
+ revoke: {
138
+ titleTemplate: "Take back {Agent}'s access?",
139
+ bodyTemplate: "It ends right away, and {Agent} has to ask again to get it back.",
140
+ /** Heading over what ends. */
141
+ endsTitle: "This ends",
142
+ /** `chained`: the grants the agent made under this one end too. */
143
+ chainedItemTemplate: "Every narrower grant {Agent} passed on",
144
+ confirm: "Take back access",
145
+ keep: "Keep access",
146
+ working: "Taking back…",
147
+ doneTitle: "Access taken back",
148
+ /** `{Agent}` never starts a sentence: it falls back to "this agent". */
149
+ doneBodyTemplate: "It has ended, and {Agent} can no longer use it.",
150
+ },
151
+ /**
152
+ * The wallet elements: `consent-wallet-check`, `consent-wallet-notice`,
153
+ * `consent-wallet-signature` and `consent-phone-handoff`. `{App}` → the
154
+ * app's name. `{CredentialsLink}` and `{RevokeLink}` → a link to the page
155
+ * where the person manages their wallet and their grants.
156
+ */
157
+ wallet: {
158
+ /** The caption under the wallet check, one per status. */
159
+ check: {
160
+ checking: "Checking wallet identity…",
161
+ syncing: "Syncing this device's wallet to your account…",
162
+ ready: "Wallet verified",
163
+ conflict: "This browser can't sign for your wallet",
164
+ error: "Couldn't verify your wallet",
165
+ },
166
+ notice: {
167
+ /** `{App}` when the host doesn't name its app. */
168
+ appFallback: "this app",
169
+ credentialsLink: "your credentials page",
170
+ /** `updates-on-its-own`: the page reflects an approval made elsewhere. */
171
+ updatesOnItsOwn: "This page updates on its own once you do.",
172
+ errorTitle: "Couldn't check your wallet",
173
+ errorBody: "Refresh the page to try again. If it keeps happening, open {CredentialsLink} to check the wallet there.",
174
+ passkeyUnreachableTitle: "Approve from the browser that holds your passkey",
175
+ passkeyUnreachableBody: "Your wallet is derived from a passkey this browser can't reach, so nothing can be signed here. Open this same link in the browser where {App} is already set up and approve it there.",
176
+ passkeyUnreachableMore: "To approve from this browser in future, sync that passkey to it (iCloud Keychain, Google Password Manager, or 1Password).",
177
+ keyDriftTitle: "This browser's wallet key doesn't match your account",
178
+ keyDriftBody: "It holds your account identity but signs with a different key than the one your account publishes, so anything it signs would be rejected. Approve from the browser where {App} was first set up, or re-link this browser from {CredentialsLink}.",
179
+ supersededTitle: "Your identity was re-registered",
180
+ supersededBody: "The registry's current record for your account doesn't include this device's signing key. Re-link your account with the registry from {CredentialsLink}, then reopen this request.",
181
+ /** A conflict with a reason the element doesn't know: `message` follows. */
182
+ otherTitle: "This browser can't sign this request",
183
+ },
184
+ signature: {
185
+ signedBy: "Signed by your KYA-OS wallet.",
186
+ revokeTemplate: "Revoke any time from {RevokeLink}.",
187
+ revokeLink: "your credentials list",
188
+ },
189
+ handoff: {
190
+ title: "Approve on your phone instead",
191
+ body: "If your wallet's passkey is on your phone, approving there with Face ID or Touch ID is faster and more reliable than signing from this computer.",
192
+ scan: "Scan this with your phone's camera and approve there.",
193
+ updatesOnItsOwn: "This page updates on its own once you do.",
194
+ qrLabel: "QR code that opens this request on your phone",
195
+ },
196
+ },
197
+ /** `consent-request-expiry`. `{Time}` → the time left, e.g. "4:59". */
198
+ request: {
199
+ expiresTemplate: "This request expires in {Time}. Approve before then, or the agent will need to ask again.",
200
+ expired: "This request expired. Ask the agent to try again.",
201
+ },
96
202
  attribution: {
97
203
  /** Light theme. */
98
204
  protectedBy: "Protected by Checkpoint",
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/copy/tokens.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AA4IH,kCAQC;AAlJY,QAAA,mBAAmB,GAAG;IACjC,OAAO,EAAE;QACP,oCAAoC;QACpC,iBAAiB,EAAE,oBAA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sC;YAChD,OAAO,EAAE,iDAAiD;YAC1D,OAAO,EAAE,sCAAsC;SAChD;KACF;CACO,CAAC;AAIX;;;;GAIG;AACH,SAAgB,WAAW,CACzB,QAAgB,EAChB,MAAmD;IAEnD,OAAO,QAAQ,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,GAAW,EAAE,EAAE;QAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * Grant terms: a grant's duration and folder, in the field names of
4
+ * `@kya-os/id`'s `DelegationRequest`.
5
+ *
6
+ * @module @kya-os/consent/grant
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./terms.js"), exports);
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/grant/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,6CAA2B"}
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ /**
3
+ * Grant terms: how long a grant lasts and which folder it covers.
4
+ *
5
+ * The person chooses them on the consent screen (`consent-duration`,
6
+ * `consent-folder-scope`, grouped by `consent-grant-terms`), and the host
7
+ * mints a credential with them. `GrantTerms` has the field names of
8
+ * `@kya-os/id`'s `DelegationRequest`, so the terms spread straight into
9
+ * `wallet.issueDelegation({ ...terms, capability, subjectDid })`. The types
10
+ * are declared here, not imported, so this module never needs `@kya-os/id`.
11
+ *
12
+ * Pure functions, no DOM.
13
+ *
14
+ * @module @kya-os/consent/grant
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.DEFAULT_DURATION_SECONDS = exports.DURATION_OPTIONS = void 0;
18
+ exports.durationOptionsWithin = durationOptionsWithin;
19
+ exports.pickDuration = pickDuration;
20
+ exports.formatDuration = formatDuration;
21
+ exports.readFolder = readFolder;
22
+ exports.folderTerms = folderTerms;
23
+ exports.mergeGrantTerms = mergeGrantTerms;
24
+ const MINUTE = 60;
25
+ const HOUR = 60 * MINUTE;
26
+ const DAY = 24 * HOUR;
27
+ /** The durations a picker offers when its host sets none. */
28
+ exports.DURATION_OPTIONS = Object.freeze([
29
+ { label: "15 minutes", seconds: 15 * MINUTE },
30
+ { label: "30 minutes", seconds: 30 * MINUTE },
31
+ { label: "1 hour", seconds: HOUR },
32
+ { label: "8 hours", seconds: 8 * HOUR },
33
+ { label: "24 hours", seconds: DAY },
34
+ { label: "7 days", seconds: 7 * DAY },
35
+ { label: "30 days", seconds: 30 * DAY },
36
+ ]);
37
+ /**
38
+ * The duration a picker starts on: a working session, so the agent doesn't
39
+ * have to ask again within the hour.
40
+ */
41
+ exports.DEFAULT_DURATION_SECONDS = 8 * HOUR;
42
+ /**
43
+ * The options no longer than `maxSeconds`, in their own order. Never empty:
44
+ * a cap shorter than every option still offers the shortest one.
45
+ */
46
+ function durationOptionsWithin(options, maxSeconds) {
47
+ const valid = options.filter((o) => Number.isFinite(o.seconds) && o.seconds > 0);
48
+ if (valid.length === 0)
49
+ return [...exports.DURATION_OPTIONS.slice(0, 1)];
50
+ if (maxSeconds === undefined || !Number.isFinite(maxSeconds)) {
51
+ return valid;
52
+ }
53
+ const within = valid.filter((o) => o.seconds <= maxSeconds);
54
+ if (within.length > 0)
55
+ return within;
56
+ const shortest = valid.reduce((a, b) => (b.seconds < a.seconds ? b : a));
57
+ return [shortest];
58
+ }
59
+ /**
60
+ * The option a picker shows for `seconds`: that option when it is offered,
61
+ * otherwise the longest offered option shorter than it, otherwise the
62
+ * shortest. A grant never gets longer than the host asked for.
63
+ */
64
+ function pickDuration(seconds, options, maxSeconds) {
65
+ const offered = durationOptionsWithin(options, maxSeconds);
66
+ const exact = offered.find((o) => o.seconds === seconds);
67
+ if (exact)
68
+ return exact;
69
+ const shorter = offered.filter((o) => o.seconds < seconds);
70
+ if (shorter.length > 0) {
71
+ return shorter.reduce((a, b) => (b.seconds > a.seconds ? b : a));
72
+ }
73
+ return offered.reduce((a, b) => (b.seconds < a.seconds ? b : a));
74
+ }
75
+ /**
76
+ * A duration in words: "1 hour", "8 hours", "7 days", "90 seconds".
77
+ * Uses the largest unit that divides it evenly.
78
+ */
79
+ function formatDuration(seconds) {
80
+ const units = [
81
+ [DAY, "day"],
82
+ [HOUR, "hour"],
83
+ [MINUTE, "minute"],
84
+ [1, "second"],
85
+ ];
86
+ const whole = Math.max(0, Math.round(seconds));
87
+ for (const [size, name] of units) {
88
+ if (whole >= size && whole % size === 0) {
89
+ const n = whole / size;
90
+ return `${n} ${name}${n === 1 ? "" : "s"}`;
91
+ }
92
+ }
93
+ return `${whole} seconds`;
94
+ }
95
+ /**
96
+ * Read what a person typed into a folder field.
97
+ *
98
+ * - Blank, `/` or `*` means every folder.
99
+ * - Leading slashes and a trailing `*` are dropped: `/notes/*` is `notes/`.
100
+ * - `\` reads as `/`, and repeated slashes as one: `notes\\a//b` is
101
+ * `notes/a/b`. The matcher compares the raw string, so either would
102
+ * otherwise cover nothing a vault path can be.
103
+ * - A `.` or `..` segment is refused. The matcher refuses those too, so the
104
+ * grant would cover nothing at all.
105
+ */
106
+ function readFolder(input) {
107
+ let folder = input
108
+ .trim()
109
+ .replace(/\\/g, "/")
110
+ .replace(/\/{2,}/g, "/")
111
+ .replace(/^\//, "");
112
+ if (folder.endsWith("*"))
113
+ folder = folder.slice(0, -1);
114
+ if (folder.replace(/\/+$/, "") === "")
115
+ return { ok: true, folder: "" };
116
+ const segments = folder.split("/");
117
+ if (segments.some((s) => s === "." || s === "..")) {
118
+ return { ok: false, problem: "dot-segment" };
119
+ }
120
+ return { ok: true, folder };
121
+ }
122
+ /** The grant terms for a folder: none for every folder. */
123
+ function folderTerms(folder) {
124
+ return folder
125
+ ? { crispScopes: [{ resource: folder, matcher: "path-prefix" }] }
126
+ : {};
127
+ }
128
+ /**
129
+ * Combine the terms several fields chose. Folder scopes add up (a grant
130
+ * covers each of them); when more than one field sets a duration, the
131
+ * shortest wins, so combining terms never lengthens a grant.
132
+ */
133
+ function mergeGrantTerms(...parts) {
134
+ const merged = {};
135
+ for (const part of parts) {
136
+ if (part.notAfter !== undefined) {
137
+ merged.notAfter =
138
+ merged.notAfter === undefined
139
+ ? part.notAfter
140
+ : Math.min(merged.notAfter, part.notAfter);
141
+ }
142
+ if (part.crispScopes?.length) {
143
+ merged.crispScopes = [...(merged.crispScopes ?? []), ...part.crispScopes];
144
+ }
145
+ }
146
+ return merged;
147
+ }
148
+ //# sourceMappingURL=terms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terms.js","sourceRoot":"","sources":["../../../src/grant/terms.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAmCH,sDAeC;AAOD,oCAaC;AAMD,wCAeC;AAgDD,gCAaC;AAGD,kCAIC;AAOD,0CAcC;AA1KD,MAAM,MAAM,GAAG,EAAE,CAAC;AAClB,MAAM,IAAI,GAAG,EAAE,GAAG,MAAM,CAAC;AACzB,MAAM,GAAG,GAAG,EAAE,GAAG,IA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