@coffre/ui 0.14.5 → 0.15.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 (115) hide show
  1. package/dist/chunks/{audit-sentence-JgJEwQEC.js → actions-log-DupYCEyV.js} +186 -21
  2. package/dist/chunks/actions-log-DupYCEyV.js.map +1 -0
  3. package/dist/chunks/{connected-apps-IJdunsu8.js → connected-apps-CGUQlFMx.js} +5 -5
  4. package/dist/chunks/{connected-apps-IJdunsu8.js.map → connected-apps-CGUQlFMx.js.map} +1 -1
  5. package/dist/chunks/{delete-place-dIVoK87I.js → delete-place-CswZ-meh.js} +5 -5
  6. package/dist/chunks/{delete-place-dIVoK87I.js.map → delete-place-CswZ-meh.js.map} +1 -1
  7. package/dist/chunks/{directory-BM8yoiJN.js → directory-DrswWQLT.js} +15 -15
  8. package/dist/chunks/directory-DrswWQLT.js.map +1 -0
  9. package/dist/chunks/environment-actions-8rL9Cw6X.js +576 -0
  10. package/dist/chunks/environment-actions-8rL9Cw6X.js.map +1 -0
  11. package/dist/chunks/{folders-D3A1NGpt.js → folders-A6sbR_PG.js} +3 -3
  12. package/dist/chunks/{folders-D3A1NGpt.js.map → folders-A6sbR_PG.js.map} +1 -1
  13. package/dist/chunks/{grants-CjVmOgb2.js → grants-C0cb2oii.js} +8 -8
  14. package/dist/chunks/grants-C0cb2oii.js.map +1 -0
  15. package/dist/chunks/{multi-combobox-B0JzP1QN.js → multi-combobox-B3SEv1gq.js} +3 -3
  16. package/dist/chunks/{multi-combobox-B0JzP1QN.js.map → multi-combobox-B3SEv1gq.js.map} +1 -1
  17. package/dist/chunks/{offboarding-DbozhPym.js → offboarding-C1jbG_dk.js} +72 -67
  18. package/dist/chunks/offboarding-C1jbG_dk.js.map +1 -0
  19. package/dist/chunks/{page-JTORvh-N.js → page-CfhC9Hp1.js} +11 -6
  20. package/dist/chunks/page-CfhC9Hp1.js.map +1 -0
  21. package/dist/chunks/{personal-tokens-zWZOzLIC.js → personal-tokens-xC9wulhg.js} +5 -5
  22. package/dist/chunks/{personal-tokens-zWZOzLIC.js.map → personal-tokens-xC9wulhg.js.map} +1 -1
  23. package/dist/chunks/{principal-DFBswTBr.js → principal-CI17XK13.js} +2 -2
  24. package/dist/chunks/{principal-DFBswTBr.js.map → principal-CI17XK13.js.map} +1 -1
  25. package/dist/chunks/{principal-page-jJ0RVFg8.js → principal-page-CdSeftGD.js} +17 -127
  26. package/dist/chunks/principal-page-CdSeftGD.js.map +1 -0
  27. package/dist/chunks/{project-page-BjwEoXfU.js → project-page-CHxjBE97.js} +3 -3
  28. package/dist/chunks/{project-page-BjwEoXfU.js.map → project-page-CHxjBE97.js.map} +1 -1
  29. package/dist/chunks/{queries-2jdgTwfZ.js → queries-D1JuimTu.js} +82 -26
  30. package/dist/chunks/queries-D1JuimTu.js.map +1 -0
  31. package/dist/chunks/{references-CRT2BsOS.js → references-D5llUGQL.js} +5 -5
  32. package/dist/chunks/{references-CRT2BsOS.js.map → references-D5llUGQL.js.map} +1 -1
  33. package/dist/chunks/{role-field-DswIpPqY.js → role-field-CoCv8wse.js} +5 -5
  34. package/dist/chunks/role-field-CoCv8wse.js.map +1 -0
  35. package/dist/chunks/{row-state-xtRGFnDc.js → row-state-CYH7kZHl.js} +3 -3
  36. package/dist/chunks/{row-state-xtRGFnDc.js.map → row-state-CYH7kZHl.js.map} +1 -1
  37. package/dist/chunks/{theme-Ck45wzWB.js → theme-rF44Wbmm.js} +3 -3
  38. package/dist/chunks/{theme-Ck45wzWB.js.map → theme-rF44Wbmm.js.map} +1 -1
  39. package/dist/chunks/{ui-D-blFWfx.js → ui-CGdORVzW.js} +2 -2
  40. package/dist/chunks/{ui-D-blFWfx.js.map → ui-CGdORVzW.js.map} +1 -1
  41. package/dist/chunks/{use-action-CXEFFjx5.js → use-action-BxrHTBZw.js} +3 -3
  42. package/dist/chunks/{use-action-CXEFFjx5.js.map → use-action-BxrHTBZw.js.map} +1 -1
  43. package/dist/chunks/{use-change-BC4xo02c.js → use-change-BorW2R6C.js} +4 -4
  44. package/dist/chunks/{use-change-BC4xo02c.js.map → use-change-BorW2R6C.js.map} +1 -1
  45. package/dist/chunks/{use-roles-DswiNxBk.js → use-roles-BZnJ9Cq0.js} +56 -13
  46. package/dist/chunks/use-roles-BZnJ9Cq0.js.map +1 -0
  47. package/dist/chunks/{use-shell-zpjE_MKh.js → use-shell-CPskgi1k.js} +3 -3
  48. package/dist/chunks/{use-shell-zpjE_MKh.js.map → use-shell-CPskgi1k.js.map} +1 -1
  49. package/dist/index.d.ts +46 -2
  50. package/dist/index.js +30 -11
  51. package/dist/index.js.map +1 -1
  52. package/dist/pages/account.js +11 -11
  53. package/dist/pages/account.js.map +1 -1
  54. package/dist/pages/approval.js +2 -2
  55. package/dist/pages/audit.js +55 -21
  56. package/dist/pages/audit.js.map +1 -1
  57. package/dist/pages/device-login.js +2 -2
  58. package/dist/pages/environment.js +228 -389
  59. package/dist/pages/environment.js.map +1 -1
  60. package/dist/pages/login.js +3 -3
  61. package/dist/pages/oauth-authorize.js +2 -2
  62. package/dist/pages/project-access.js +11 -11
  63. package/dist/pages/project-environments.js +28 -359
  64. package/dist/pages/project-environments.js.map +1 -1
  65. package/dist/pages/project-settings.js +8 -8
  66. package/dist/pages/project.js +3 -3
  67. package/dist/pages/projects.js +8 -8
  68. package/dist/pages/service-account.js +11 -10
  69. package/dist/pages/service-account.js.map +1 -1
  70. package/dist/pages/service-accounts.js +7 -6
  71. package/dist/pages/service-accounts.js.map +1 -1
  72. package/dist/pages/settings.d.ts +6 -1
  73. package/dist/pages/settings.js +284 -164
  74. package/dist/pages/settings.js.map +1 -1
  75. package/dist/pages/unregistered.js +2 -2
  76. package/dist/pages/user.js +7 -6
  77. package/dist/pages/user.js.map +1 -1
  78. package/dist/pages/users.js +7 -6
  79. package/dist/pages/users.js.map +1 -1
  80. package/package.json +3 -3
  81. package/src/components/actions-log.tsx +61 -8
  82. package/src/components/directory.tsx +5 -5
  83. package/src/components/environment-actions.tsx +508 -0
  84. package/src/components/grants.tsx +2 -2
  85. package/src/components/icons.tsx +2 -0
  86. package/src/components/offboarding.tsx +7 -0
  87. package/src/components/page.tsx +3 -2
  88. package/src/components/principal-page.tsx +1 -1
  89. package/src/components/protected.tsx +52 -39
  90. package/src/components/role-editor.tsx +99 -68
  91. package/src/components/role-field.tsx +1 -1
  92. package/src/lib/audit-sentences.ts +21 -18
  93. package/src/lib/queries.ts +85 -21
  94. package/src/lib/roles.ts +36 -10
  95. package/src/options.ts +19 -3
  96. package/src/pages/account.tsx +1 -1
  97. package/src/pages/audit.tsx +56 -16
  98. package/src/pages/environment.tsx +227 -352
  99. package/src/pages/project-environments.tsx +20 -322
  100. package/src/pages/service-accounts.tsx +1 -1
  101. package/src/pages/settings.tsx +129 -48
  102. package/src/pages/users.tsx +1 -1
  103. package/src/parity.ts +18 -11
  104. package/src/styles/globals.css +271 -89
  105. package/dist/chunks/audit-sentence-JgJEwQEC.js.map +0 -1
  106. package/dist/chunks/directory-BM8yoiJN.js.map +0 -1
  107. package/dist/chunks/grants-CjVmOgb2.js.map +0 -1
  108. package/dist/chunks/offboarding-DbozhPym.js.map +0 -1
  109. package/dist/chunks/page-JTORvh-N.js.map +0 -1
  110. package/dist/chunks/principal-page-jJ0RVFg8.js.map +0 -1
  111. package/dist/chunks/protected-y7KVhtHd.js +0 -77
  112. package/dist/chunks/protected-y7KVhtHd.js.map +0 -1
  113. package/dist/chunks/queries-2jdgTwfZ.js.map +0 -1
  114. package/dist/chunks/role-field-DswIpPqY.js.map +0 -1
  115. package/dist/chunks/use-roles-DswiNxBk.js.map +0 -1
@@ -1369,15 +1369,6 @@ a.crumb-link:hover {
1369
1369
  padding-left: 2rem;
1370
1370
  }
1371
1371
 
1372
- /* A secret's value field holds two buttons, Generate and Show, side by side. */
1373
- .input-group.has-generate .input {
1374
- padding-right: 3.875rem;
1375
- }
1376
-
1377
- .input-group .input-addon-generate {
1378
- right: calc(0.1875rem + 1.75rem);
1379
- }
1380
-
1381
1372
  /* The engine's clear button for a search field, drawn in the field's own ink
1382
1373
  rather than the bright system glyph. */
1383
1374
  .input[type='search']::-webkit-search-cancel-button {
@@ -1898,14 +1889,19 @@ table.claims-table td {
1898
1889
  opacity: 0.8;
1899
1890
  }
1900
1891
 
1901
- /* A tag that is also the button changing what it says (an environment's
1902
- protection, for whoever may change it): outlined on hover, as a button. */
1903
- .tag-control {
1904
- cursor: pointer;
1905
- }
1906
-
1907
- .tag-control:hover {
1908
- box-shadow: inset 0 0 0 1px currentColor;
1892
+ /* An environment's protection on its card: a lock, its note behind it,
1893
+ above the card's stretched link. */
1894
+ .protected-mark {
1895
+ position: relative;
1896
+ z-index: 1;
1897
+ display: inline-flex;
1898
+ align-self: center;
1899
+ padding: 0.125rem;
1900
+ border: 0;
1901
+ border-radius: var(--radius);
1902
+ background: none;
1903
+ color: var(--amber);
1904
+ cursor: help;
1909
1905
  }
1910
1906
 
1911
1907
  .dot {
@@ -2088,6 +2084,13 @@ table.claims-table td {
2088
2084
  color: var(--ink-3);
2089
2085
  }
2090
2086
 
2087
+ /* Under a number of 0.15's sealed log, which numbers its changes apart from 0.14's chain. */
2088
+ .dt .n .n-log {
2089
+ display: block;
2090
+ font-size: 0.625rem;
2091
+ letter-spacing: 0.02em;
2092
+ }
2093
+
2091
2094
  /* A folder's heading: the rows below it, up to the next one, are filed in it. */
2092
2095
  .dt .folder-row th {
2093
2096
  height: 2.25rem;
@@ -2407,13 +2410,6 @@ table.claims-table td {
2407
2410
  display: none;
2408
2411
  }
2409
2412
 
2410
- /* Its buttons stay on its first line, however tall a paste makes it, and
2411
- hide the text that scrolls under them. */
2412
- .secret-row .input.value-lines ~ .input-addon {
2413
- top: 0.0625rem;
2414
- background: var(--panel);
2415
- }
2416
-
2417
2413
  /* Masked where the browser cannot draw discs: the text is there, unseen. */
2418
2414
  .input.is-masked-fallback {
2419
2415
  color: transparent;
@@ -2701,9 +2697,108 @@ table.claims-table td {
2701
2697
  color: var(--red);
2702
2698
  }
2703
2699
 
2704
- /* Who sees the value being written: three radios as a small segmented control, what the level means beside it. */
2705
- .sensitivity-field {
2706
- gap: 0.25rem 0.625rem;
2700
+ /* A row being written is one line: each cell's first line is its field's,
2701
+ and what a field has to say goes beneath it, the row growing down. A
2702
+ cell with no field centres its text on that line. */
2703
+ .secret-row.is-editing > td {
2704
+ vertical-align: top;
2705
+ }
2706
+
2707
+ .secret-row.is-editing > td:not(:has(.edit-stack)) {
2708
+ padding-top: calc(0.5rem + 0.125rem);
2709
+ line-height: 1.875rem;
2710
+ }
2711
+
2712
+ /* A value being written: one field to the eye, its controls inside its
2713
+ right end -- who sees it, Generate and Show -- on its first line however
2714
+ tall a paste makes it. */
2715
+ .value-field {
2716
+ display: flex;
2717
+ align-items: flex-start;
2718
+ min-width: 0;
2719
+ border: 1px solid var(--edge);
2720
+ border-radius: var(--radius);
2721
+ background: var(--panel);
2722
+ transition:
2723
+ border-color 120ms,
2724
+ box-shadow 120ms;
2725
+ }
2726
+
2727
+ .value-field:has(> .input:focus) {
2728
+ border-color: var(--accent);
2729
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
2730
+ }
2731
+
2732
+ .value-field:has(> .input:disabled) {
2733
+ opacity: 0.55;
2734
+ }
2735
+
2736
+ .value-field > .input {
2737
+ flex: 1;
2738
+ min-width: 0;
2739
+ height: calc(1.875rem - 2px);
2740
+ padding-right: 0.25rem;
2741
+ }
2742
+
2743
+ /* The field draws the border, the ring and the dimming, focused or not. */
2744
+ .value-field > .input,
2745
+ .value-field > .input:focus,
2746
+ .value-field > .input:disabled {
2747
+ border: 0;
2748
+ background: transparent;
2749
+ box-shadow: none;
2750
+ opacity: 1;
2751
+ }
2752
+
2753
+ /* As tall as its lines, as `rows` says. */
2754
+ .value-field > .input.value-lines {
2755
+ height: auto;
2756
+ min-height: calc(1.875rem - 2px);
2757
+ }
2758
+
2759
+ .value-field-controls {
2760
+ display: flex;
2761
+ flex: none;
2762
+ align-items: center;
2763
+ height: calc(1.875rem - 2px);
2764
+ padding-right: 0.125rem;
2765
+ }
2766
+
2767
+ .value-field-controls .btn-sm.btn-icon {
2768
+ width: 1.5rem;
2769
+ height: 1.5rem;
2770
+ }
2771
+
2772
+ /* Who sees the value, chosen in its field: the level, quiet, opening its menu. */
2773
+ .value-level {
2774
+ display: inline-flex;
2775
+ align-items: center;
2776
+ gap: 0.25rem;
2777
+ height: 1.375rem;
2778
+ margin-right: 0.125rem;
2779
+ padding: 0 0.3125rem 0 0.4375rem;
2780
+ border: 0;
2781
+ border-radius: calc(var(--radius) - 2px);
2782
+ background: var(--subtle);
2783
+ color: var(--ink-2);
2784
+ font-size: 0.75rem;
2785
+ font-weight: 500;
2786
+ white-space: nowrap;
2787
+ cursor: pointer;
2788
+ }
2789
+
2790
+ .value-level:hover:not(:disabled),
2791
+ .value-level[data-popup-open] {
2792
+ color: var(--ink);
2793
+ }
2794
+
2795
+ .value-level:focus-visible {
2796
+ outline: 2px solid var(--accent);
2797
+ outline-offset: 1px;
2798
+ }
2799
+
2800
+ .value-level:disabled {
2801
+ cursor: default;
2707
2802
  }
2708
2803
 
2709
2804
  /* A plain value, listed as it is: a revealed one's type, with no timer. */
@@ -2895,20 +2990,6 @@ tr.row-failure > td:first-child {
2895
2990
  color: var(--accent);
2896
2991
  }
2897
2992
 
2898
- .pending-summary {
2899
- flex: 1 1 12rem;
2900
- min-width: 0;
2901
- overflow: hidden;
2902
- color: var(--ink-2);
2903
- font-size: 0.8125rem;
2904
- white-space: nowrap;
2905
- text-overflow: ellipsis;
2906
- }
2907
-
2908
- .pending-summary .mono {
2909
- color: var(--ink);
2910
- }
2911
-
2912
2993
  .pending-error {
2913
2994
  flex-basis: 100%;
2914
2995
  display: flex;
@@ -2931,17 +3012,18 @@ tr.row-failure > td:first-child {
2931
3012
  }
2932
3013
 
2933
3014
  /* A primary button with a chevron joined to its right, which opens a menu of
2934
- other things it could do. */
3015
+ other things it could do. By type, not by child: the open menu puts focus
3016
+ guards, spans, either side of the chevron. */
2935
3017
  .split-button {
2936
3018
  display: inline-flex;
2937
3019
  }
2938
3020
 
2939
- .split-button > .btn:first-child {
3021
+ .split-button > .btn:first-of-type {
2940
3022
  border-top-right-radius: 0;
2941
3023
  border-bottom-right-radius: 0;
2942
3024
  }
2943
3025
 
2944
- .split-button > .btn:last-child {
3026
+ .split-button > .btn:last-of-type {
2945
3027
  width: 1.875rem;
2946
3028
  border-left-color: color-mix(in oklab, var(--panel) 30%, var(--ink));
2947
3029
  border-top-left-radius: 0;
@@ -3021,6 +3103,12 @@ tr.row-failure > td:first-child {
3021
3103
  overflow-wrap: anywhere;
3022
3104
  }
3023
3105
 
3106
+ /* A fact set here, and the button that changes it, at its row's end. */
3107
+ .fact-with-action {
3108
+ grid-template-columns: 11rem minmax(0, 1fr) auto;
3109
+ align-items: center;
3110
+ }
3111
+
3024
3112
  /* A tag keeps its own width rather than stretching down the column. */
3025
3113
  .fact dd > .tag {
3026
3114
  align-self: flex-start;
@@ -4656,70 +4744,174 @@ a.menu-item:hover {
4656
4744
  /* Roles */
4657
4745
  /* ========================================================================== */
4658
4746
 
4659
- /* Settings › Roles: a row per role, its two columns in words, and its editor. */
4660
- .role-list {
4747
+ /* Settings › Roles: a card per role, every permission on each, which opens its editor. */
4748
+ .role-cards {
4749
+ display: grid;
4750
+ grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
4751
+ gap: 0.75rem;
4752
+ max-width: var(--card-max);
4661
4753
  margin: 0;
4662
4754
  padding: 0;
4663
4755
  list-style: none;
4664
4756
  }
4665
4757
 
4666
- .role-row {
4667
- align-items: flex-start;
4668
- flex-wrap: nowrap;
4669
- }
4670
-
4671
- .role-row-text {
4758
+ .role-card {
4672
4759
  display: flex;
4673
4760
  flex-direction: column;
4674
- gap: 0.25rem;
4761
+ gap: 0.75rem;
4675
4762
  min-width: 0;
4763
+ padding: 0.875rem 1rem 0.75rem;
4764
+ border: 1px solid var(--border);
4765
+ border-radius: var(--radius-lg);
4766
+ background: var(--panel);
4676
4767
  }
4677
4768
 
4678
- .role-row-title {
4769
+ .role-card-title {
4679
4770
  display: flex;
4680
4771
  align-items: center;
4681
4772
  flex-wrap: wrap;
4682
4773
  gap: 0.375rem;
4774
+ min-height: 1.375rem;
4775
+ font-weight: 600;
4683
4776
  }
4684
4777
 
4685
- .role-columns {
4686
- display: grid;
4687
- grid-template-columns: max-content minmax(0, 1fr);
4688
- gap: 0.125rem 0.75rem;
4689
- margin: 0.25rem 0 0;
4778
+ .role-card-desc {
4779
+ margin-top: -0.375rem;
4780
+ color: var(--ink-3);
4690
4781
  font-size: 0.8125rem;
4691
4782
  }
4692
4783
 
4693
- .role-columns > div {
4694
- display: contents;
4784
+ /* A row per kind of permission, its name in a column of its own, so that
4785
+ every card's chips line up: a held one solid, one not held a dashed
4786
+ outline, which says it without the colour. */
4787
+ .role-reach {
4788
+ display: grid;
4789
+ grid-template-columns: auto 1fr;
4790
+ gap: 0.375rem 0.75rem;
4791
+ margin: 0;
4792
+ font-size: 0.75rem;
4695
4793
  }
4696
4794
 
4697
- .role-columns dt {
4698
- display: inline-flex;
4699
- align-items: center;
4700
- gap: 0.3rem;
4795
+ .role-reach > div {
4796
+ display: grid;
4797
+ grid-column: 1 / -1;
4798
+ grid-template-columns: subgrid;
4799
+ align-items: start;
4800
+ }
4801
+
4802
+ /* As tall as a chip, so that it reads on the line of the first. */
4803
+ .role-reach dt {
4804
+ line-height: 1.375rem;
4701
4805
  color: var(--ink-3);
4702
4806
  font-weight: 550;
4703
4807
  }
4704
4808
 
4705
- .role-columns dd {
4809
+ .role-reach dd {
4706
4810
  margin: 0;
4707
- color: var(--ink-2);
4708
4811
  }
4709
4812
 
4710
- .role-row-side {
4813
+ .role-reach ul {
4814
+ display: flex;
4815
+ flex-wrap: wrap;
4816
+ gap: 0.25rem;
4817
+ margin: 0;
4818
+ padding: 0;
4819
+ list-style: none;
4820
+ }
4821
+
4822
+ /* What it shows and its widest look, held and locked, share one cell, so
4823
+ that its width never depends on what the role holds. */
4824
+ .role-perm {
4825
+ display: inline-grid;
4826
+ place-items: center;
4827
+ height: 1.375rem;
4828
+ padding: 0 0.45rem;
4829
+ border: 1px dashed var(--border);
4830
+ border-radius: var(--radius-sm);
4831
+ color: var(--ink-3);
4832
+ line-height: 1;
4833
+ white-space: nowrap;
4834
+ cursor: default;
4835
+ }
4836
+
4837
+ .role-perm-everywhere,
4838
+ .role-perm-unprotected {
4839
+ border-color: transparent;
4840
+ background: light-dark(color-mix(in oklab, var(--ink) 8%, var(--panel)), color-mix(in oklab, var(--ink) 12%, var(--panel)));
4841
+ color: var(--ink);
4842
+ font-weight: 550;
4843
+ }
4844
+
4845
+ .role-perm-shown,
4846
+ .role-perm-widest {
4847
+ display: inline-flex;
4848
+ grid-area: 1 / 1;
4849
+ align-items: center;
4850
+ gap: 0.25rem;
4851
+ }
4852
+
4853
+ .role-perm-widest {
4854
+ visibility: hidden;
4855
+ font-weight: 550;
4856
+ }
4857
+
4858
+ /* Held, but not in a protected environment: the lock protection wears everywhere. */
4859
+ .role-perm svg {
4860
+ color: var(--amber);
4861
+ }
4862
+
4863
+ /* Who holds the role, and what opens it. */
4864
+ .role-card-foot {
4711
4865
  display: flex;
4712
- flex: none;
4713
4866
  align-items: center;
4867
+ justify-content: space-between;
4714
4868
  gap: 0.75rem;
4869
+ margin-top: auto;
4870
+ padding-top: 0.75rem;
4871
+ border-top: 1px solid var(--border);
4715
4872
  }
4716
4873
 
4717
- .role-row-count {
4874
+ .role-card-count {
4718
4875
  color: var(--ink-3);
4719
4876
  font-size: 0.8125rem;
4720
4877
  white-space: nowrap;
4721
4878
  }
4722
4879
 
4880
+ /* Above a page's cards: what switches which they are, and what adds to them, at its end. */
4881
+ .section-actions {
4882
+ display: flex;
4883
+ align-items: center;
4884
+ justify-content: space-between;
4885
+ gap: 0.75rem;
4886
+ min-height: 2.125rem;
4887
+ max-width: var(--card-max);
4888
+ margin-bottom: 0.75rem;
4889
+ }
4890
+
4891
+ /* Under the view switch: what the view is, in a line, and what a lock on a card says. */
4892
+ .roles-desc {
4893
+ display: flex;
4894
+ align-items: baseline;
4895
+ justify-content: space-between;
4896
+ flex-wrap: wrap;
4897
+ gap: 0.25rem 1rem;
4898
+ max-width: var(--card-max);
4899
+ margin: -0.25rem 0 0.75rem;
4900
+ color: var(--ink-3);
4901
+ font-size: 0.875rem;
4902
+ }
4903
+
4904
+ .role-legend {
4905
+ display: inline-flex;
4906
+ align-items: center;
4907
+ gap: 0.3rem;
4908
+ font-size: 0.8125rem;
4909
+ }
4910
+
4911
+ .role-legend svg {
4912
+ color: var(--amber);
4913
+ }
4914
+
4723
4915
  /* The grid: a row per permission, its two columns of boxes centred under their heads. */
4724
4916
  .role-grid-wrap {
4725
4917
  position: relative;
@@ -4906,6 +5098,14 @@ a.menu-item:hover {
4906
5098
  grid-template-columns: minmax(0, 1fr);
4907
5099
  }
4908
5100
 
5101
+ .fact-with-action {
5102
+ grid-template-columns: minmax(0, 1fr) auto;
5103
+ }
5104
+
5105
+ .fact-with-action dt {
5106
+ grid-column: 1 / -1;
5107
+ }
5108
+
4909
5109
  .tabs svg {
4910
5110
  display: none;
4911
5111
  }
@@ -4937,19 +5137,6 @@ a.menu-item:hover {
4937
5137
  padding-left: 0;
4938
5138
  }
4939
5139
 
4940
- /* A role's row stacks, its count and button under its words. */
4941
- .role-row {
4942
- flex-wrap: wrap;
4943
- }
4944
-
4945
- .role-columns {
4946
- grid-template-columns: minmax(0, 1fr);
4947
- }
4948
-
4949
- .role-columns > div + div dt {
4950
- margin-top: 0.25rem;
4951
- }
4952
-
4953
5140
  .role-grid th,
4954
5141
  .role-grid td {
4955
5142
  padding: 0.5rem 0.375rem;
@@ -5274,8 +5461,7 @@ a.menu-item:hover {
5274
5461
  grid-template-areas: 'key version actions';
5275
5462
  }
5276
5463
 
5277
- .dt.secrets.stacks .secret-row.is-draft,
5278
- .dt.secrets.stacks .secret-row.is-changed {
5464
+ .dt.secrets.stacks .secret-row.is-editing {
5279
5465
  grid-template-areas:
5280
5466
  'key key actions'
5281
5467
  'value value version';
@@ -5382,10 +5568,6 @@ a.menu-item:hover {
5382
5568
  flex-basis: 100%;
5383
5569
  }
5384
5570
 
5385
- .pending-summary {
5386
- display: none;
5387
- }
5388
-
5389
5571
  .signin-form {
5390
5572
  flex-direction: column;
5391
5573
  align-items: stretch;
@@ -1 +0,0 @@
1
- {"version":3,"file":"audit-sentence-JgJEwQEC.js","names":[],"sources":["../../src/lib/audit-sentences.ts","../../src/components/audit-sentence.tsx"],"sourcesContent":["/**\n * The audit log in sentences: who did what, to what. One entry is one\n * human action, named for it (`secret.read`, `access.grant`, …); a batch of\n * them, one reveal of twelve secrets, shares an operation and reads as one\n * line, \"ran market/prod: 12 secrets\".\n *\n * A sentence is parts rather than a string, so the page can make the people\n * and places in it links. `plain` flattens it, for tests and titles.\n */\nimport { shownMember, type AuditEntryView } from '@coffre/client';\nimport { INSTANCE_ROLES, isBuiltinRole, isInstanceRole, isScope, ROLES, scopeInWords, type Scope } from '@coffre/core/access';\n\n/** What a sentence is made from: an entry of the log, as `GET /api/audit` gives it. */\nexport type AuditEntry = Pick<\n AuditEntryView,\n | 'seq'\n | 'author'\n | 'actorType'\n | 'actorId'\n | 'action'\n | 'decision'\n | 'reason'\n | 'detail'\n | 'subject'\n | 'project'\n | 'environment'\n | 'key'\n | 'version'\n | 'secrets'\n | 'operationId'\n | 'metadata'\n>;\n\n/**\n * Text, a place (`market`, `market/prod`, `market/prod/KEY`), or a member,\n * as the log stores it (`user:…`, `token:…`): `shownMember` says it as people\n * read it, `service:…`, where it is shown.\n */\nexport type Part = string | { place: string } | { member: string };\n\nexport type Sentence = { parts: Part[]; refused: boolean };\n\n/** What one template needs: the line's leading entry, its batch, and how it was decided. */\ntype Facts = {\n entry: AuditEntry;\n /** Every entry of the batch, the lead included, a read of several once per secret (`perSecret`). */\n batch: AuditEntry[];\n /** Secrets the batch was about. */\n count: number;\n refused: boolean;\n};\n\ntype Template = {\n /** What they did: \"revealed\". */\n did: string | ((facts: Facts) => string);\n /** What they tried, after \"tried to\": \"reveal\". */\n tried: string | ((facts: Facts) => string);\n /** To what: \"market/prod/API_KEY\". */\n what: (facts: Facts) => Part[];\n /** Said only of what happened: \", now version 5\". */\n then?: (facts: Facts) => Part[];\n};\n\n// --- the pieces of a sentence ---------------------------------------------------\n\nconst text = (value: unknown): string | null => (typeof value === 'string' && value !== '' ? value : null);\nconst number = (value: unknown): number | null => (typeof value === 'number' ? value : null);\n\n/** The entry's place, as deep as it goes. */\nfunction place({ project, environment, key }: AuditEntry): Part[] {\n const path = [project, environment, key].filter((part): part is string => part !== null);\n return path.length === 0 ? ['coffre'] : [{ place: path.join('/') }];\n}\n\nfunction environmentOf({ project, environment }: AuditEntry): Part[] {\n return place({ project, environment, key: null } as AuditEntry);\n}\n\n/** The member an entry is about: its subject, or the principal a token entry names. */\nfunction subject(entry: AuditEntry): Part[] {\n if (entry.subject !== null) return [{ member: entry.subject }];\n const id = text(entry.metadata.principalId);\n if (id === null) return ['someone'];\n return [{ member: `${entry.metadata.principalType === 'service' ? 'token' : 'user'}:${id}` }];\n}\n\n/** Whether a token entry is about a personal token, which acts as its person, rather than a service account's. */\nfunction personal(entry: AuditEntry): boolean {\n return entry.metadata.kind === 'personal';\n}\n\n/** A personal token's label, as it was made: ` \"cursor-agent\"`. */\nfunction labelled(entry: AuditEntry): Part[] {\n const label = text(entry.metadata.label);\n return label === null ? [] : [` “${label}”`];\n}\n\n/** Why the vault made someone an Owner itself, said after it. */\nfunction owned(entry: AuditEntry): Part[] {\n return entry.metadata.reason === 'owners' ? [': the deployment names them one'] : [];\n}\n\n/** An MCP client, by the name it connected under. */\nfunction app(entry: AuditEntry): Part[] {\n return [text(entry.metadata.clientName) ?? 'an app'];\n}\n\n/** A tool's call: its name, and what it named. */\nfunction tool(entry: AuditEntry): Part[] {\n const names = Array.isArray(entry.metadata.names) ? entry.metadata.names.filter((name): name is string => typeof name === 'string') : [];\n return [text(entry.metadata.tool) ?? 'a tool', ...(names.length === 0 ? [] : [` on ${names.join(', ')}`])];\n}\n\n/** The client a request came through, said after what it did: \"via Claude\". */\nfunction via(entry: AuditEntry): Part[] {\n const client = (entry.metadata.via as { clientName?: unknown } | undefined)?.clientName;\n return typeof client === 'string' ? [` via ${client}`] : [];\n}\n\n/** Why coffre itself ended a connection, said after it. */\nconst DISCONNECTED: Record<string, string> = {\n code_reused: ': its sign-in code was used twice',\n refresh_reused: ': a refresh token it had replaced was used again',\n revocation_endpoint: ', at its own request',\n superseded: ': a connection with more scopes replaced it',\n};\n\nfunction plural(count: number, one: string, many = `${one}s`): string {\n return `${count} ${count === 1 ? one : many}`;\n}\n\n/** A batch reads as its environment and a count; one entry as its secret. */\n/**\n * The secrets a read or write was about. A read through a reference is a\n * read of its source, \"market/prod/DATABASE_URL through\n * billing/prod/DATABASE_URL\"; a run that read some that way is a run of\n * the environment that holds them. A value a fork inherits is its parent's,\n * read in the fork: \"market/prod/STRIPE_KEY in market/prod-eu\".\n */\nfunction secrets(facts: Facts): Part[] {\n const through = (entry: AuditEntry) => text((entry.metadata.via as { path?: unknown } | undefined)?.path);\n // The fork a value was inherited in, by path: in its parent's project, which holds the reference a read went through.\n const forkOf = (entry: AuditEntry) => {\n const slug = text((entry.metadata.through as { slug?: unknown } | undefined)?.slug);\n const project = through(entry)?.split('/')[0] ?? entry.project;\n return slug === null || project === null ? null : `${project}/${slug}`;\n };\n if (facts.batch.length === 1) {\n const [held, fork] = [through(facts.entry), forkOf(facts.entry)];\n return [...place(facts.entry), ...(held === null ? [] : [' through ', { place: held }]), ...(fork === null ? [] : [' in ', { place: fork }])];\n }\n const fork = facts.batch.map(forkOf).find((path) => path !== null);\n const own = facts.batch.find((entry) => through(entry) === null && forkOf(entry) === null);\n const held = facts.batch.map(through).filter((path): path is string => path !== null);\n const inherited = facts.batch.filter((entry) => forkOf(entry) !== null).length;\n const where = fork !== undefined && fork !== null\n ? [{ place: fork }]\n : own !== undefined ? environmentOf(own) : [{ place: held[0]!.split('/').slice(0, 2).join('/') }];\n return [\n ...where,\n facts.refused ? ', ' : ': ',\n plural(facts.count, 'secret'),\n ...(held.length === 0 ? [] : [`, ${held.length} through ${held.length === 1 ? 'a reference' : 'references'}`]),\n ...(inherited === 0 ? [] : [`, ${inherited} inherited`]),\n ];\n}\n\n/** \"market/prod/OLD\", or \"OLD and STALE in market/prod\" for an archive of several keys refused. */\nfunction archivedKeys(entry: AuditEntry): Part[] {\n const keys = Array.isArray(entry.metadata.keys) ? entry.metadata.keys.filter((key): key is string => text(key) !== null) : [];\n if (entry.key !== null || keys.length === 0) return place(entry);\n return [keys.length === 1 ? keys[0]! : `${keys.slice(0, -1).join(', ')} and ${keys.at(-1)!}`, ' in ', ...environmentOf(entry)];\n}\n\n/** \"SENTRY_DSN in market/dev\", or \"3 keys in market/dev\" for a Dismiss all. */\nfunction missingKeys(facts: Facts): Part[] {\n const key = text(facts.entry.metadata.key);\n return [facts.batch.length === 1 && key !== null ? key : plural(facts.count, 'key'), ' in ', ...environmentOf(facts.entry)];\n}\n\n/** \"billing/prod/DATABASE_URL a reference to market/prod/DATABASE_URL\", from either author's entry. */\nfunction referenceTo(entry: AuditEntry): Part[] {\n const holder = text(entry.metadata.subject);\n const key = text(entry.metadata.key);\n const source = text(entry.metadata.source) ?? text((entry.metadata.source as { path?: unknown } | undefined)?.path);\n return [\n ...(holder !== null ? [{ place: holder }] : key !== null ? place(entry) : environmentOf(entry)),\n ...(source === null ? [] : [' a reference to ', { place: source }]),\n ];\n}\n\nconst READ_VERBS: Record<string, [did: string, tried: string]> = {\n reveal: ['revealed', 'reveal'],\n run: ['ran', 'run'],\n compare: ['compared', 'compare'],\n copy: ['copied', 'copy'],\n // The credential proxy's: a value injected into a request for its person, or one handed to their app.\n use: ['used', 'use'],\n expose: ['was given', 'be given'],\n};\n\nfunction readVerb({ entry }: Facts): [string, string] {\n return READ_VERBS[text(entry.metadata.purpose) ?? 'reveal'] ?? READ_VERBS.reveal!;\n}\n\nconst placeTemplates = (kind: 'project' | 'environment'): Record<string, Template> => {\n // A personal config by what it is a config of, `market/dev`: its own slug is generated, and shown nowhere else.\n const of = (entry: AuditEntry): string | null => {\n const parent = text(entry.metadata.personal) ?? text(entry.metadata.with);\n return parent === null || entry.project === null ? null : `${entry.project}/${parent}`;\n };\n const what = (facts: Facts): Part[] => {\n const personal = kind === 'environment' ? of(facts.entry) : null;\n if (personal !== null) return ['a personal config of ', { place: personal }];\n if (kind === 'environment' && facts.entry.metadata.personal === true) return [`a personal config, ${text(facts.entry.metadata.path) ?? ''}`];\n return [`${kind} `, ...(kind === 'project' ? place({ ...facts.entry, environment: null, key: null }) : environmentOf(facts.entry))];\n };\n return {\n [`${kind}.create`]: {\n did: 'created',\n tried: 'create',\n what,\n // A fork names the environment it copied.\n then: ({ entry }) =>\n text(entry.metadata.inherits) !== null\n ? [`, inheriting from ${text(entry.metadata.inherits)}`]\n : text(entry.metadata.from) === null\n ? []\n : [`, a fork of ${text(entry.metadata.from)}`],\n },\n [`${kind}.update`]: { did: 'changed', tried: 'change', what },\n [`${kind}.archive`]: { did: 'archived', tried: 'archive', what },\n [`${kind}.restore`]: { did: 'restored', tried: 'restore', what },\n // Named by its tombstone from then on, `market~deleted-2026-10-05`, as every entry about it is.\n [`${kind}.delete`]: { did: 'deleted', tried: 'delete', what },\n };\n};\n\n// --- one template per action ----------------------------------------------------\n\nconst TEMPLATES: Record<string, Template> = {\n 'secret.read': {\n did: (facts) => readVerb(facts)[0],\n tried: (facts) => readVerb(facts)[1],\n what: secrets,\n },\n 'secret.write': {\n // New secrets are added, others changed; a batch of both is written. One whose level changed is made that.\n did: ({ entry, batch }) => {\n if (batch.length === 1 && text(entry.metadata.was) !== null) return 'made';\n const firsts = batch.filter((entry) => entry.version === 1).length;\n return firsts === batch.length ? 'added' : firsts === 0 ? 'changed' : 'wrote';\n },\n tried: 'change',\n what: secrets,\n // Who sees the value, where it is not a secret's or it changed: a mark keeps the value, a write gives a new one.\n then: ({ entry, batch }) => {\n const version = batch.length > 1 || entry.version === null || entry.version === 1 ? [] : [`, now version ${entry.version}`];\n if (batch.length > 1) return version;\n const level = entry.metadata.sensitive === true ? 'sensitive' : entry.metadata.plain === true ? 'plain' : 'secret';\n if (text(entry.metadata.was) !== null) return [` ${level}`, ...(number(entry.metadata.kept) === null ? [' with a new value'] : []), ...version];\n return [...version, ...(level === 'plain' ? [', as a plain value, no secret'] : level === 'sensitive' ? [', as a sensitive value, shown to nobody'] : [])];\n },\n },\n // The credential proxy's record beside the vault's read, the vault's own since 0.14.5: which credential the keys went into, where, and by which road.\n // Like the read, it records the release: a `credential_ended` refusal of the same operation after it says the value was withheld,\n // as a 409 for a policy changed meanwhile withholds it too, logging nothing more.\n 'credential.use': {\n did: ({ entry }) => (entry.metadata.purpose === 'expose' ? 'was given the values of' : 'used the credential'),\n tried: ({ entry }) => (entry.metadata.purpose === 'expose' ? 'be given the values of' : 'use the credential'),\n what: ({ entry }) => [\n text(entry.metadata.credential) ?? '',\n ...(text(entry.metadata.host) === null ? [] : [` on ${text(entry.metadata.host)}`]),\n ...(entry.metadata.egress === true ? [\", through the deployment's egress\"] : []),\n ],\n },\n 'secret.restore': {\n did: 'restored',\n tried: 'restore',\n what: ({ entry }) => [...place(entry), ...(number(entry.metadata.from) === null ? [] : [` to version ${number(entry.metadata.from)}`])],\n then: ({ entry }) => (entry.version === null ? [] : [`, now ${entry.version}`]),\n },\n // A sensitive value made a secret in place, by an Owner of its project: its value kept, shown to its readers from then on.\n 'secret.loosen': {\n did: 'made',\n tried: 'make',\n what: ({ entry }) => place(entry),\n then: ({ entry }) => [\n ` ${text(entry.metadata.to) ?? 'secret'}, from ${text(entry.metadata.from) ?? 'sensitive'}, its value kept`,\n ...(entry.version === null ? [] : [`, now version ${entry.version}`]),\n ],\n },\n 'secret.rename': {\n did: 'renamed',\n tried: 'rename',\n what: ({ entry }) => [...place(entry), ...(text(entry.metadata.nextKey) === null ? [] : [` to ${text(entry.metadata.nextKey)}`])],\n // In a fork, carried down from a rename in its parent.\n then: ({ entry }) => (text(entry.metadata.parent) === null ? [] : [`, as ${text(entry.metadata.parent)} did`]),\n },\n 'secret.archive': { did: 'archived', tried: 'archive', what: ({ entry }) => archivedKeys(entry) },\n // In a fork: its own value set aside, kept, for its parent's.\n 'secret.reset': {\n did: 'reset',\n tried: 'reset',\n what: ({ entry }) => place(entry),\n then: ({ entry }) => (text(entry.metadata.from) === null ? [] : [` to ${text(entry.metadata.from)}'s value`]),\n },\n 'missing.dismiss': {\n did: 'dismissed',\n tried: 'dismiss',\n what: (facts) => missingKeys(facts),\n then: () => [' as not needed'],\n },\n 'missing.restore': { did: 'restored', tried: 'restore', what: (facts) => missingKeys(facts), then: () => [' to the missing keys'] },\n 'secret.reference': { did: 'made', tried: 'make', what: ({ entry }) => referenceTo(entry) },\n 'reference.create': { did: 'made', tried: 'make', what: ({ entry }) => referenceTo(entry) },\n 'reference.end': {\n did: ({ entry }) => (entry.metadata.reason === 'replaced' ? 'gave a value of its own to' : entry.metadata.reason === 'abandoned' ? 'abandoned' : 'broke'),\n tried: ({ entry }) => (entry.metadata.reason === 'replaced' ? 'replace' : entry.metadata.reason === 'abandoned' ? 'abandon' : 'break'),\n what: ({ entry }) => {\n const source = text((entry.metadata.source as { path?: unknown } | undefined)?.path);\n const holder = text(entry.metadata.subject);\n if (entry.metadata.reason === 'replaced') return [...(holder === null ? ['a reference'] : [{ place: holder }]), ...(source === null ? [] : [', no longer a reference to ', { place: source }])];\n return ['the reference ', ...(holder === null ? [] : [{ place: holder }]), ...(source === null ? [] : [' to ', { place: source }])];\n },\n then: ({ entry }) => (entry.metadata.reason === 'abandoned' ? [', which its write never stored'] : []),\n },\n 'secret.unarchive': { did: 'brought back', tried: 'bring back', what: (facts) => place(facts.entry) },\n 'secret.move': { did: 'moved', tried: 'move', what: (facts) => place(facts.entry), then: ({ entry }) => intoFolder(entry) },\n ...placeTemplates('project'),\n 'project.move': {\n did: 'moved',\n tried: 'move',\n what: ({ entry }) => ['project ', ...place({ ...entry, environment: null, key: null })],\n then: ({ entry }) => intoFolder(entry),\n },\n ...placeTemplates('environment'),\n 'environment.fork': {\n did: 'forked',\n tried: 'fork',\n what: ({ entry }) => [...environmentOf(entry), ...(text(entry.metadata.slug) === null ? [] : [` into ${text(entry.metadata.slug)}`])],\n },\n 'access.grant': {\n did: 'gave',\n tried: 'give',\n what: ({ entry }) => [...subject(entry), ` ${text(entry.metadata.role) ?? 'a role'} on `, ...placeOnly(entry)],\n then: ({ entry }) => [\n ...(text(entry.metadata.previousRole) === null ? [] : [`, was ${text(entry.metadata.previousRole)}`]),\n ...(text(entry.metadata.expiresAt) === null ? [] : [`, until ${text(entry.metadata.expiresAt)!.slice(0, 10)}`]),\n ...(entry.metadata.reason === 'every-project' ? [', for a grant on every project'] : []),\n ],\n },\n 'access.revoke': {\n did: 'took',\n tried: 'take',\n what: ({ entry }) => [\n ...(text(entry.metadata.previousRole ?? entry.metadata.role) === null ? ['access to '] : [`${text(entry.metadata.previousRole ?? entry.metadata.role)} on `]),\n ...placeOnly(entry),\n ' from ',\n ...subject(entry),\n ],\n // The vault replacing a grant on every project of 0.4: by what, an instance role or project grants.\n then: ({ entry }) => {\n const by = entry.metadata.replacedBy as { role?: unknown } | undefined;\n if (by === undefined) return [];\n const role = typeof by.role === 'string' ? roleName(by.role) : null;\n return [role === null || role === 'Member' ? ', replaced by project grants' : `, replaced by the instance role ${role}`];\n },\n },\n 'member.add': {\n did: 'added',\n tried: 'add',\n what: ({ entry }) => [\n ...subject(entry),\n ...(entry.metadata.rootAdmin === true ? [' as a root admin'] : entry.metadata.owner === true ? [' as an owner'] : asRole(entry)),\n ],\n then: ({ entry }) => owned(entry),\n },\n 'member.remove': {\n did: 'removed',\n tried: 'remove',\n what: (facts) => subject(facts.entry),\n then: ({ entry }) => (number(entry.metadata.revoked) === null ? [] : [`, who held ${plural(number(entry.metadata.revoked)!, 'grant')}`]),\n },\n 'member.restore': {\n did: 'brought back',\n tried: 'bring back',\n what: ({ entry }) => [...subject(entry), ...asRole(entry)],\n then: ({ entry }) => owned(entry),\n },\n 'member.role': {\n did: 'made',\n tried: 'make',\n what: ({ entry }) => [...subject(entry), ` ${article(roleName(text(entry.metadata.role) ?? 'member') ?? 'Member')}`, ...scoped(entry)],\n then: ({ entry }) => {\n const before = roleName(text(entry.metadata.previousRole) ?? '');\n return [\n ...(before === null ? [] : [`, was ${before}`]),\n ...(entry.metadata.reason === 'every-project' ? [', for their grants on every project'] : []),\n ...owned(entry),\n ];\n },\n },\n 'member.owner': {\n did: ({ entry }) => (entry.metadata.owner === false ? 'took owner from' : 'made'),\n tried: ({ entry }) => (entry.metadata.owner === false ? 'take owner from' : 'make'),\n what: ({ entry }) => [...subject(entry), ...(entry.metadata.owner === false ? [] : [' an owner'])],\n },\n // Where people set up service accounts themselves, which those who run the instance set.\n 'settings.change': {\n did: 'set',\n tried: 'set',\n what: ({ entry }) => ['where people set up service accounts', ...setting(entry.metadata.serviceAccounts).map((words) => `: ${words}`)],\n then: ({ entry }) => {\n const previous = (entry.metadata.previous as { serviceAccounts?: unknown } | undefined)?.serviceAccounts;\n return setting(previous).map((words) => `, was ${words}`);\n },\n },\n // The roles an Owner edits and which environments are protected (docs/design/roles.md), the vault's to change.\n 'policy.change': {\n did: ({ entry }) => POLICY_VERBS[policyOf(entry).verb][0],\n tried: ({ entry }) => POLICY_VERBS[policyOf(entry).verb][1],\n what: ({ entry }) => policyOf(entry).what,\n },\n // A binding trusts CI runs to sign in as a service; removing one is its tombstone.\n 'token.bind': {\n did: 'trusted CI runs to sign in as',\n tried: 'trust CI runs to sign in as',\n what: (facts) => subject(facts.entry),\n then: ({ entry }) => [...inGitHubEnvironment(entry), ...reaching(entry)],\n },\n // The tokens and bindings 0.4 made, given their own scope when 0.5 first checked a credential: what their account held then.\n 'token.seal': {\n did: 'sealed',\n tried: 'seal',\n what: ({ entry }) => [`${sealedOf(entry)} of `, ...subject(entry)],\n then: ({ entry }) => reaching(entry, ', reaching nothing'),\n },\n 'token.unbind': {\n did: 'stopped trusting CI runs to sign in as',\n tried: 'stop trusting CI runs to sign in as',\n what: (facts) => subject(facts.entry),\n },\n 'vault.tampered': {\n did: 'found',\n tried: 'check',\n what: ({ entry }) => [\n ...(entry.subject === null ? ['an entry'] : [...subject(entry), \"'s record\"]),\n ` tampered with: ${TAMPERING[entry.reason ?? ''] ?? 'it fails its seal'}`,\n ],\n },\n // The vault's rotation to a new vault key, or the app's to a new app key, which names the key it moved from.\n 'key.rotate': {\n did: ({ entry }) => (entry.author === 'app' ? 'moved to its new app key' : 'rotated its key'),\n tried: ({ entry }) => (entry.author === 'app' ? 'move to its new app key' : 'rotate its key'),\n what: () => [],\n },\n // An MCP client a person connected, such as Claude: named as the consent page showed it.\n 'mcp.connect': { did: 'connected', tried: 'connect', what: ({ entry }) => app(entry) },\n // A tool an MCP client called, by its name, and the places it named.\n 'mcp.call': { did: 'used', tried: 'use', what: ({ entry }) => tool(entry), then: ({ entry }) => via(entry) },\n // A person's decision, on coffre's page, on a change an MCP client asked for; the change's own entries follow, via the client.\n 'mcp.approve': { did: 'approved', tried: 'approve', what: ({ entry }) => tool(entry), then: ({ entry }) => [` for ${text(entry.metadata.clientName) ?? 'an app'}`] },\n 'mcp.deny': { did: 'turned down', tried: 'turn down', what: ({ entry }) => tool(entry), then: ({ entry }) => [` for ${text(entry.metadata.clientName) ?? 'an app'}`] },\n 'mcp.view': { did: 'opened an approval', tried: 'open an approval', what: () => [] },\n // The app's prompt declined, which cancels the approval it would have opened.\n 'mcp.cancel': { did: 'cancelled', tried: 'cancel', what: ({ entry }) => tool(entry), then: ({ entry }) => via(entry) },\n 'mcp.disconnect': {\n did: 'disconnected',\n tried: 'disconnect',\n what: ({ entry }) => [...app(entry), ...(entry.metadata.principalId === undefined ? [] : [' of ', ...subject(entry)])],\n then: ({ entry }) => [DISCONNECTED[text(entry.metadata.reason) ?? ''] ?? ''],\n },\n\n // Detail, hidden unless asked for.\n sign_in: {\n did: ({ entry }) => (entry.metadata.kind === 'cli' ? 'signed in to the CLI' : 'signed in'),\n tried: 'sign in',\n what: ({ entry }) => (text(entry.metadata.provider) === null ? [] : [`with ${text(entry.metadata.provider)}`]),\n },\n sign_out: { did: 'signed out', tried: 'sign out', what: () => [] },\n // A personal token is its person's own, and named by its label; a bearer token is a service account's.\n 'token.create': {\n did: ({ entry }) => (entry.metadata.kind === 'handle' ? 'made a handle' : personal(entry) ? 'made a personal token' : 'issued a bearer token to'),\n tried: ({ entry }) => (entry.metadata.kind === 'handle' ? 'make a handle' : personal(entry) ? 'make a personal token' : 'issue a bearer token to'),\n what: ({ entry }) => (personal(entry) ? labelled(entry) : subject(entry)),\n then: ({ entry }) => reaching(entry),\n },\n 'token.revoke': {\n did: ({ entry }) => (personal(entry) ? 'revoked a personal token of' : 'revoked a bearer token of'),\n tried: ({ entry }) => (personal(entry) ? 'revoke a personal token of' : 'revoke a bearer token of'),\n what: (facts) => subject(facts.entry),\n },\n // A personal token refused a route only its person reaches: the route, as the API names it.\n 'token.use': {\n did: 'used a personal token for',\n tried: 'use a personal token for',\n what: ({ entry }) => [text(entry.metadata.route) ?? 'something'],\n },\n 'device.approve': { did: 'approved a CLI sign-in', tried: 'approve a CLI sign-in', what: () => [] },\n 'device.deny': { did: 'turned down a CLI sign-in', tried: 'turn down a CLI sign-in', what: () => [] },\n 'mcp.read': { did: 'used', tried: 'use', what: ({ entry }) => tool(entry), then: ({ entry }) => via(entry) },\n 'mcp.token': {\n did: ({ entry }) => (entry.metadata.grant === 'refresh_token' ? 'refreshed the tokens of' : 'gave its first tokens to'),\n tried: 'give tokens to',\n what: ({ entry }) => app(entry),\n },\n 'account.link': {\n did: 'linked',\n tried: 'link',\n what: ({ entry }) => [`a ${text(entry.metadata.provider) ?? 'sign-in'} account`],\n },\n 'account.unlink': {\n did: 'unlinked',\n tried: 'unlink',\n what: ({ entry }) => [`a ${text(entry.metadata.provider) ?? 'sign-in'} account`],\n },\n 'key.wrap': { did: 'sealed the key of', tried: 'seal the key of', what: (facts) => versioned(facts.entry) },\n 'key.rewrap': { did: 'resealed the key of', tried: 'reseal the key of', what: (facts) => versioned(facts.entry) },\n 'key.intent': { did: 'asked KMS about', tried: 'ask KMS about', what: (facts) => secrets(facts) },\n 'key.check': {\n did: 'recorded the check value of',\n tried: 'check',\n what: ({ entry }) => [['the', text(entry.metadata.kekProvider) === 'local' ? null : text(entry.metadata.kekProvider), 'vault key', text(entry.metadata.kekId)].filter((word) => word !== null).join(' ')],\n },\n 'audit.heartbeat': { did: 'checked in', tried: 'check in', what: () => [] },\n // A step of the app key's rotation: the rows it signed again under the new key, the sessions it signed out, any it could not sign.\n 'key.reseal': {\n did: 'signed rows again under its new app key:',\n tried: 'sign rows again under its new app key',\n what: ({ entry }) => {\n const count = (name: string) => (typeof entry.metadata[name] === 'number' ? (entry.metadata[name] as number) : 0);\n const [unsigned, later] = [count('unsignedCount'), count('later')];\n return [`${count('resealed')}, and ${count('signedOut')} signed out${later === 0 ? '' : `; ${later} another listed key signed, for its own rotation`}${unsigned === 0 ? '' : `; ${unsigned} no key listed had signed, left as they were`}`];\n },\n },\n // The audit watch's (server plugins/audit-watch.ts): what it found, what cleared it, and an Owner's acceptance.\n 'audit.finding': {\n did: 'found the log changed',\n tried: 'find the log changed',\n what: ({ entry }) => [number(entry.metadata.seq) === null ? text(entry.metadata.reason) ?? 'where it walked' : `at entry ${number(entry.metadata.seq)}`],\n },\n 'audit.finding_cleared': { did: 'found the log whole again', tried: 'find the log whole again', what: () => [] },\n 'audit.reanchor': {\n did: 're-anchored the log',\n tried: 're-anchor the log',\n what: ({ entry }) => (number(entry.metadata.at) === null ? [] : [`at entry ${number(entry.metadata.at)}`]),\n },\n 'audit.loss_accepted': {\n did: 'accepted as lost',\n tried: 'accept as lost',\n what: ({ entry }) => [`entries ${number(entry.metadata.from) ?? '?'} to ${number(entry.metadata.to) ?? '?'}`],\n },\n 'audit.loss_unapplied': {\n did: 'could not apply the acceptance of',\n tried: 'apply the acceptance of',\n what: ({ entry }) => [`entries ${number(entry.metadata.from) ?? '?'} to ${number(entry.metadata.to) ?? '?'} as lost`],\n },\n 'audit.checkpoint': {\n did: 'signed the log',\n tried: 'sign the log',\n what: ({ entry }) => (number(entry.metadata.seq) === null ? [] : [`through entry ${number(entry.metadata.seq)}`]),\n },\n\n // Only ever refused: a read of a list, which is not logged when allowed.\n 'secret.list': { did: 'listed', tried: 'list', what: ({ entry }) => environmentOf(entry) },\n 'secret.history': { did: 'read the history of', tried: 'read the history of', what: (facts) => place(facts.entry) },\n 'secret.update': { did: 'changed', tried: 'change', what: (facts) => place(facts.entry) },\n};\n\n/** \" to the folder stripe\", or \" out of its folder\". */\nfunction intoFolder(entry: AuditEntry): Part[] {\n const folder = text(entry.metadata.to);\n return [folder === null ? ' out of its folder' : ` to the folder ${folder}`];\n}\n\n/** An instance role's name, from its slug; null for none it knows. */\nfunction roleName(role: string): string | null {\n return isInstanceRole(role) ? INSTANCE_ROLES[role].name : null;\n}\n\n/** What a policy change did, and what it did it to, as `did` and `tried` say it. */\nconst POLICY_VERBS = {\n protect: ['protected', 'protect'],\n unprotect: ['unprotected', 'unprotect'],\n edit: ['edited', 'edit'],\n reset: ['reset', 'reset'],\n make: ['made', 'make'],\n delete: ['deleted', 'delete'],\n} as const;\n\n/**\n * A `policy.change` entry, from what it names: its `change`, an\n * environment's protection or a role's definition, and the role `before`\n * it. A built-in role's definition dropped is a reset; one an Owner made, a\n * deletion; one that was not there, made. A refusal the app wrote names the\n * role alone.\n *\n * protected market/prod edited the Developer role\n * made the Release manager role reset the Auditor instance role\n */\nfunction policyOf(entry: AuditEntry): { verb: keyof typeof POLICY_VERBS; what: Part[] } {\n const change = record(entry.metadata.change);\n if (change.kind === 'protect') {\n const count = Array.isArray(change.environmentIds) ? change.environmentIds.length : 1;\n // A fork's, protected before its row is written, names its project alone.\n const what: Part[] = entry.environment !== null\n ? place({ ...entry, key: null })\n : entry.project === null\n ? [count === 1 ? 'an environment' : plural(count, 'environment')]\n : [count === 1 ? 'a new environment of ' : `${plural(count, 'environment')} of `, { place: entry.project }];\n return { verb: change.protected === false ? 'unprotect' : 'protect', what };\n }\n const instance = (change.kind ?? entry.metadata.kind) === 'instance-role';\n const id = text(change.role) ?? text(entry.metadata.role);\n const shipped = id !== null && (instance ? isInstanceRole(id) : isBuiltinRole(id));\n const definition = change.definition === null ? null : record(change.definition);\n const before = record(entry.metadata.before);\n const name = text(definition?.name) ?? text(record(before.definition).name)\n ?? (id === null ? null : shipped ? (instance ? INSTANCE_ROLES[id as keyof typeof INSTANCE_ROLES] : ROLES[id as keyof typeof ROLES]).name : id);\n // A reset or deletion: the vault's entry says so in its change, a refusal of the app's in its own metadata.\n const verb = change.definition === null || entry.metadata.definition === null || entry.reason === 'role_granted'\n ? (shipped ? 'reset' : 'delete')\n : before.definition === null ? 'make' : 'edit';\n return { verb, what: [name === null ? 'a role' : `the ${name} ${instance ? 'instance role' : 'role'}`] };\n}\n\n/** An object of the metadata's, or an empty one for anything else. */\nfunction record(value: unknown): Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value) ? (value as Record<string, unknown>) : {};\n}\n\nfunction article(name: string): string {\n return `${/^[AEIOU]/.test(name) ? 'an' : 'a'} ${name}`;\n}\n\n/** Whether an entry's scope narrows the role; its projects are ids, which a sentence cannot name. */\nfunction scoped(entry: AuditEntry): Part[] {\n const scope = entry.metadata.scope as { projects?: unknown; environments?: unknown } | undefined;\n return scope === undefined || (scope.projects === 'all' && scope.environments === 'all') ? [] : [', with a scope'];\n}\n\n/**\n * What a token or binding reaches, its scope, each role with the places it\n * holds, counted, as the log names them by id: `, reaching developer on 2 places`.\n */\nfunction reaching(entry: AuditEntry, none = ''): Part[] {\n const scope = entry.metadata.scope;\n if (!Array.isArray(scope)) return [];\n if (scope.length === 0) return none === '' ? [] : [none];\n const byRole = new Map<string, number>();\n for (const grant of scope as { role?: unknown }[]) {\n const role = text(grant.role);\n if (role !== null) byRole.set(role, (byRole.get(role) ?? 0) + 1);\n }\n return [`, reaching ${[...byRole].map(([role, count]) => `${role} on ${plural(count, 'place')}`).join(', ')}`];\n}\n\n/** The GitHub environment a binding takes its runs from, when it names one. */\nfunction inGitHubEnvironment(entry: AuditEntry): Part[] {\n const environment = text((entry.metadata.claims as Record<string, unknown> | undefined)?.environment);\n return environment === null || !String(entry.metadata.profile).startsWith('github') ? [] : [`, in GitHub environment ${environment}`];\n}\n\n/** The tokens and trust bindings a `token.seal` names, counted: `2 tokens and a trust binding`. */\nfunction sealedOf(entry: AuditEntry): string {\n const count = (key: string) => (Array.isArray(entry.metadata[key]) ? (entry.metadata[key] as unknown[]).length : 0);\n const parts = [[count('tokens'), 'token'], [count('bindings'), 'trust binding']] as const;\n return parts.filter(([n]) => n > 0).map(([n, one]) => plural(n, one)).join(' and ') || 'nothing';\n}\n\n/**\n * The setting of where people set up service accounts, in words: its\n * projects counted, as the log names them by id, its environments by name.\n *\n * All projects · all but prod 2 projects · dev only\n */\nfunction setting(scope: unknown): string[] {\n if (!isScope(scope)) return [];\n const { projects } = scope;\n const counted: Scope = projects === 'all'\n ? scope\n : { ...scope, projects: 'only' in projects ? { only: [plural(projects.only.length, 'project')] } : { except: [plural(projects.except.length, 'project')] } };\n return [scopeInWords(counted)];\n}\n\n/** The role a member is added or brought back with, said when it is more than Member. */\nfunction asRole(entry: AuditEntry): Part[] {\n const role = roleName(text(entry.metadata.role) ?? '');\n return role === null || role === 'Member' ? [] : [` as ${article(role)}`, ...scoped(entry)];\n}\n\nfunction placeOnly(entry: AuditEntry): Part[] {\n // A grant on every project names no project: its place is a path in its payload, `*` or `*/dev`.\n const everywhere = entry.project === null ? text(entry.metadata.place) : null;\n if (everywhere !== null) return [everywhere === '*' ? 'every project' : `${everywhere.slice('*/'.length)} in every project`];\n return place({ ...entry, key: null });\n}\n\nfunction versioned(entry: AuditEntry): Part[] {\n return [...place(entry), ...(entry.version === null ? [] : [`, version ${entry.version}`])];\n}\n\nconst TAMPERING: Record<string, string> = {\n mac: \"it does not carry the vault's seal\",\n stale: 'an older copy was put back',\n forged_entry: 'the vault did not write it',\n};\n\n/** Why something was refused, in words. Codes from the vault and the app. */\nconst REASONS: Record<string, string> = {\n no_grant: 'no grant',\n bulk_limit: 'bulk limit',\n // 0.9's `people: 'stand-ins'`, in entries written before 0.10.\n stand_ins: 'people get placeholders',\n sensitive: 'the value is sensitive',\n looser: 'making it visible takes a new value',\n // A sensitive value made a secret in place by anyone but an Owner of its project.\n not_owner: 'only an Owner of the project does it in place',\n inherited: 'it is inherited',\n expired: 'grant expired',\n removed: 'removed from coffre',\n not_a_member: 'not a member',\n not_registered: 'not invited',\n tampered: 'their record was tampered with',\n bad_claim: 'the key did not match the secret',\n deleted: 'the place was deleted',\n not_allowed: 'not allowed',\n root_admin: 'root admins are set by the deployment',\n last_owner: 'they are the last Owner of the whole instance',\n requires_instance_admin: 'requires an admin or owner of the whole instance',\n requires_instance_owner: 'requires an instance owner',\n own_role: 'nobody changes their own role',\n own_grant: 'nobody grants themselves a role',\n service_cannot_hold_role: 'service accounts hold project grants only',\n not_service_manager: 'they hold less than the service account, or than they gave it',\n unknown_environment: 'no such environment',\n unknown_secret: 'no such secret',\n no_value: 'it holds no value',\n unknown_project: 'no such project',\n not_archived: 'it was not archived',\n referenced: 'references read it',\n kms_unavailable: 'KMS did not answer',\n wrong_kek: \"the vault's key is not the one that wrapped the data\",\n person_denied: 'they said no',\n too_many_connections: 'too many connected apps',\n unknown_connection: 'no such connected app',\n not_yours: \"it was someone else's\",\n too_many_approvals: 'too many changes waiting for approval',\n request_state: 'its retry did not match its call',\n changed: 'the change was not the one shown',\n replaced: 'what it replaces changed since it was shown',\n unconfirmed: 'what it replaces could not be read',\n disconnected: 'the app was disconnected',\n personal_token: 'only its person can, signed in as themselves',\n beyond_holder: 'more than they hold',\n role_granted: 'grants still name it',\n};\n\n/** What a missing permission meant, from the app's `missing_<permission>`. */\nconst MISSING: Record<string, string> = {\n secret_read: 'no grant to read it',\n secret_write: 'no grant to write',\n secret_archive: 'no grant to archive',\n audit_read: 'no grant to read the audit log',\n environment_manage: 'no grant to manage environments',\n grant_manage: 'no grant to manage access',\n project_manage: 'no grant to manage the project',\n};\n\nexport function reasonInWords(reason: string | null): string {\n if (reason === null) return 'refused';\n if (reason.startsWith('missing_')) return MISSING[reason.slice('missing_'.length)] ?? 'no grant';\n return REASONS[reason] ?? reason.replace(/_/g, ' ');\n}\n\n// --- lines ----------------------------------------------------------------------\n\n/** In a batch of mixed actions, the one the line is named for: a write, not its reads. */\nconst LEAD = ['secret.write', 'secret.read'];\n\nexport function leadOf(batch: AuditEntry[]): AuditEntry {\n for (const action of LEAD) {\n const found = batch.find((entry) => entry.action === action);\n if (found !== undefined) return found;\n }\n return batch[0]!;\n}\n\n/**\n * A read of several secrets, logged once for its place, as the entries it\n * would be about one secret each: its key and version, and what its own\n * part of the metadata says, such as the reference it went through. Any\n * other entry as it is.\n */\nexport function perSecret<T extends AuditEntry>(entry: T): T[] {\n const listed = entry.metadata.secrets;\n // One whose list was emptied or mangled, which verification would flag, still reads as itself.\n if (entry.secrets === null || entry.secrets.length === 0 || !Array.isArray(listed)) return [entry];\n return entry.secrets.map(({ key, version }, i) => {\n const own = listed[i];\n return {\n ...entry,\n key,\n version,\n secrets: null,\n metadata: { ...entry.metadata, secrets: undefined, ...(typeof own === 'object' && own !== null && !Array.isArray(own) ? own : {}) },\n };\n });\n}\n\n/** What a line says: one entry, or a batch that shares an operation. */\nexport function describe(batch: AuditEntry[]): Sentence {\n const entry = perSecret(leadOf(batch))[0]!;\n const same = batch.filter((other) => other.action === entry.action).flatMap(perSecret);\n const denied = same.filter((other) => other.decision === 'deny');\n const refused = denied.length === same.length;\n const facts: Facts = {\n entry,\n batch: same,\n count: new Set(same.map((other) => `${other.project}/${other.environment}/${other.key}`)).size,\n refused,\n };\n const template = TEMPLATES[entry.action];\n if (template === undefined) return { parts: [entry.action, ' ', ...place(entry)], refused };\n const say = (verb: Template['did']) => (typeof verb === 'string' ? verb : verb(facts));\n const what = template.what(facts);\n const gap = what.length === 0 ? [] : [' '];\n if (refused) {\n const reason = reasonInWords((denied[0] ?? entry).reason);\n return { parts: ['tried to ', say(template.tried), ...gap, ...what, `: ${reason}`], refused };\n }\n const partly = denied.length === 0 ? [] : [`, ${denied.length} refused: ${reasonInWords(denied[0]!.reason)}`];\n return { parts: [say(template.did), ...gap, ...what, ...(template.then?.(facts) ?? []), ...partly], refused };\n}\n\n/** Who acted, as a part: a member links to their page; coffre itself is text. */\nexport function who(entry: Pick<AuditEntry, 'actorType' | 'actorId'>): string | { member: string } {\n if (entry.actorType === 'user') return { member: `user:${entry.actorId}` };\n if (entry.actorType === 'service') return { member: `token:${entry.actorId}` };\n return SYSTEM[entry.actorId] ?? entry.actorId;\n}\n\nconst SYSTEM: Record<string, string> = {\n scheduler: 'the scheduler',\n cron: 'the scheduler',\n vault: 'the vault',\n app: 'coffre',\n 'coffre-key-rotation': 'coffre',\n};\n\n/** Which components wrote the line, the vault first: \"vault\", \"app\", \"vault, app\". */\nexport function decidedBy(batch: Pick<AuditEntry, 'author'>[]): string {\n return (['vault', 'app'] as const).filter((author) => batch.some((entry) => entry.author === author)).join(', ');\n}\n\n/**\n * Entries in the order the page shows them, newest first, each batch as one\n * line at its newest entry. The server leaves detail out unless asked.\n */\nexport function lines<T extends AuditEntry>(entries: T[]): T[][] {\n const shown: T[][] = [];\n const batches = new Map<string, T[]>();\n for (const entry of entries) {\n const batch = entry.operationId === null ? undefined : batches.get(entry.operationId);\n if (batch !== undefined) {\n batch.push(entry);\n continue;\n }\n const fresh = [entry];\n if (entry.operationId !== null) batches.set(entry.operationId, fresh);\n shown.push(fresh);\n }\n return shown;\n}\n\n/** A sentence as text. */\nexport function plain(parts: Part[]): string {\n return parts\n .map((part) =>\n typeof part === 'string' ? part : 'place' in part ? part.place : part.member.startsWith('user:') ? part.member.slice(5) : shownMember(part.member),\n )\n .join('');\n}\n\n/**\n * The CI run an entry was written for, as its issuer stated it at the\n * exchange: `acme/api run 7001 at 3f2a9c1`, a GitLab pipeline, or the\n * token's subject. Null for an entry no trust binding's credential wrote.\n */\nexport function runLabel(run: { claims: Record<string, string | number> } | null): string | null {\n if (run === null) return null;\n const { claims } = run;\n const text = (name: string) => (typeof claims[name] === 'string' || typeof claims[name] === 'number' ? String(claims[name]) : null);\n const at = text('sha') === null ? '' : ` at ${text('sha')!.slice(0, 7)}`;\n if (text('repository') !== null && text('run_id') !== null) return `${text('repository')} run ${text('run_id')}${at}`;\n if (text('project_path') !== null && text('pipeline_id') !== null) return `${text('project_path')} pipeline ${text('pipeline_id')}${at}`;\n return text('sub') === null ? 'a CI run' : `CI run ${text('sub')}`;\n}\n","import { serviceName, shownMember } from '@coffre/client';\nimport { Fragment } from 'react';\nimport { Link } from '@tanstack/react-router';\nimport type { Part } from '../lib/audit-sentences';\nimport { breakAfterUnderscores } from './ui';\n\n/** A sentence, its people and places links to their pages. */\nexport function Sentence({ parts }: { parts: Part[] }) {\n return (\n <>\n {parts.map((part, index) => (\n <Fragment key={index}>\n {typeof part === 'string' ? (\n part\n ) : 'place' in part ? (\n <PlaceLink path={part.place} />\n ) : (\n <MemberLink member={part.member} />\n )}\n </Fragment>\n ))}\n </>\n );\n}\n\nfunction PlaceLink({ path }: { path: string }) {\n const [project, environment] = path.split('/') as [string, string | undefined];\n const text = <span className=\"mono\">{breakAfterUnderscores(path)}</span>;\n return environment === undefined ? (\n <Link to=\"/projects/$project\" params={{ project }}>\n {text}\n </Link>\n ) : (\n <Link to=\"/projects/$project/$environment\" params={{ project, environment }}>\n {text}\n </Link>\n );\n}\n\n/** A member from the log, which keeps `token:<name>`, shown as people read it: `service:<name>`, to its page. */\nfunction MemberLink({ member }: { member: string }) {\n return member.startsWith('token:') ? (\n <Link to=\"/service-accounts/$account\" params={{ account: serviceName(member) }}>\n {shownMember(member)}\n </Link>\n ) : (\n <Link to=\"/users/$user\" params={{ user: memberName(member) }}>\n {memberName(member)}\n </Link>\n );\n}\n\nexport function memberName(member: string): string {\n return member.startsWith('user:') ? member.slice('user:'.length) : shownMember(member);\n}\n"],"mappings":";;;;;;;AAiEA,IAAM,QAAQ,UAAmC,OAAO,UAAU,YAAY,UAAU,KAAK,QAAQ;AACrG,IAAM,UAAU,UAAmC,OAAO,UAAU,WAAW,QAAQ;;AAGvF,SAAS,MAAM,EAAE,SAAS,aAAa,OAA2B;CAChE,MAAM,OAAO;EAAC;EAAS;EAAa;CAAG,CAAC,CAAC,QAAQ,SAAyB,SAAS,IAAI;CACvF,OAAO,KAAK,WAAW,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,OAAO,KAAK,KAAK,GAAG,EAAE,CAAC;AACpE;AAEA,SAAS,cAAc,EAAE,SAAS,eAAmC;CACnE,OAAO,MAAM;EAAE;EAAS;EAAa,KAAK;CAAK,CAAe;AAChE;;AAGA,SAAS,QAAQ,OAA2B;CAC1C,IAAI,MAAM,YAAY,MAAM,OAAO,CAAC,EAAE,QAAQ,MAAM,QAAQ,CAAC;CAC7D,MAAM,KAAK,KAAK,MAAM,SAAS,WAAW;CAC1C,IAAI,OAAO,MAAM,OAAO,CAAC,SAAS;CAClC,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,SAAS,kBAAkB,YAAY,UAAU,OAAO,GAAG,KAAK,CAAC;AAC9F;;AAGA,SAAS,SAAS,OAA4B;CAC5C,OAAO,MAAM,SAAS,SAAS;AACjC;;AAGA,SAAS,SAAS,OAA2B;CAC3C,MAAM,QAAQ,KAAK,MAAM,SAAS,KAAK;CACvC,OAAO,UAAU,OAAO,CAAC,IAAI,CAAC,KAAK,MAAM,EAAE;AAC7C;;AAGA,SAAS,MAAM,OAA2B;CACxC,OAAO,MAAM,SAAS,WAAW,WAAW,CAAC,iCAAiC,IAAI,CAAC;AACrF;;AAGA,SAAS,IAAI,OAA2B;CACtC,OAAO,CAAC,KAAK,MAAM,SAAS,UAAU,KAAK,QAAQ;AACrD;;AAGA,SAAS,KAAK,OAA2B;CACv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