@company-semantics/contracts 86.1.0 → 88.0.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 (47) hide show
  1. package/package.json +14 -10
  2. package/src/api/generated-spec-hash.ts +2 -2
  3. package/src/api/generated.ts +50 -262
  4. package/src/chat/README.md +8 -20
  5. package/src/chat/__tests__/compaction-boundary.test.ts +1 -0
  6. package/src/chat/__tests__/continuity.test.ts +1 -0
  7. package/src/chat/__tests__/discussion-scope.test.ts +0 -7
  8. package/src/chat/__tests__/message-mentions.test.ts +1 -12
  9. package/src/chat/__tests__/multi-party.test.ts +15 -6
  10. package/src/chat/__tests__/page-context.test.ts +3 -3
  11. package/src/chat/enums.ts +24 -11
  12. package/src/chat/index.ts +4 -16
  13. package/src/chat/schemas.ts +9 -71
  14. package/src/chat/types.ts +25 -77
  15. package/src/generated/openapi-routes.ts +1 -4
  16. package/src/guards/README.md +0 -1
  17. package/src/guards/config.ts +1 -10
  18. package/src/guards/evolution-config.ts +1 -18
  19. package/src/guards/index.ts +0 -1
  20. package/src/index.ts +15 -1279
  21. package/src/notifications/__tests__/__snapshots__/monospace-budget.test.ts.snap +4 -4
  22. package/src/notifications/__tests__/__snapshots__/render-snapshot.test.ts.snap +50 -49
  23. package/src/notifications/__tests__/fixtures.ts +7 -7
  24. package/src/notifications/__tests__/render-snapshot.test.ts +7 -7
  25. package/src/notifications/kinds/chat-shared.ts +11 -5
  26. package/src/notifications/payloads.ts +5 -5
  27. package/src/org/README.md +0 -212
  28. package/src/org/__tests__/view-scopes.test.ts +0 -2
  29. package/src/org/authority-schemas.ts +242 -0
  30. package/src/org/index.ts +26 -249
  31. package/src/org/invite-schemas.ts +596 -0
  32. package/src/org/org-governance-schemas.ts +198 -0
  33. package/src/org/org-unit-api-schemas.ts +226 -0
  34. package/src/org/org-unit-schemas.ts +223 -0
  35. package/src/org/ownership-transfer-types.ts +51 -0
  36. package/src/org/schemas.ts +18 -1658
  37. package/src/org/sso-stepper-types.ts +81 -0
  38. package/src/org/types.ts +15 -115
  39. package/src/org/view-scopes.ts +0 -1
  40. package/src/org/workspace-admin-schemas.ts +240 -0
  41. package/src/root-exports/README.md +91 -0
  42. package/src/root-exports/agent-runtime.ts +213 -0
  43. package/src/root-exports/collaboration.ts +247 -0
  44. package/src/root-exports/delivery.ts +218 -0
  45. package/src/root-exports/org-structure.ts +214 -0
  46. package/src/root-exports/org-workspace.ts +254 -0
  47. package/src/root-exports/platform.ts +205 -0
@@ -3,6 +3,10 @@
3
3
  exports[`monospace budget > overhangs only where content is atomic 1`] = `
4
4
  [
5
5
  "Device: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
6
+ "https://app.companysemantics.ai/chat/abc123",
7
+ "https://app.companysemantics.ai/chat/long456",
8
+ "https://app.companysemantics.ai/chat/preview789",
9
+ "https://app.companysemantics.ai/chat/short123",
6
10
  "https://app.companysemantics.ai/doc/handbook",
7
11
  "https://app.companysemantics.ai/doc/handbook?request=req_123",
8
12
  "https://app.companysemantics.ai/doc/handbook?request=req_456",
@@ -16,9 +20,5 @@ exports[`monospace budget > overhangs only where content is atomic 1`] = `
16
20
  "https://app.companysemantics.ai/org/unit/42",
17
21
  "https://app.companysemantics.ai/owner-transfer/accept/tok123",
18
22
  "https://app.companysemantics.ai/owner-transfer/accept/tok456",
19
- "https://app.companysemantics.ai/share/abc123",
20
- "https://app.companysemantics.ai/share/long456",
21
- "https://app.companysemantics.ai/share/preview789",
22
- "https://app.companysemantics.ai/share/short123",
23
23
  ]
24
24
  `;
@@ -1200,7 +1200,7 @@ exports[`email render > chat.shared · Default 1`] = `
1200
1200
  <body class="csr-body">
1201
1201
  <div class="csr-frame">
1202
1202
  <p class="csr-p-normal">Hi there,</p>
1203
- <p class="csr-p-normal">A chat was shared with you.</p>
1203
+ <p class="csr-p-normal">A chat was shared with you to read.</p>
1204
1204
  <hr class="cs-faint csr-chat-rule-top">
1205
1205
  <table cellpadding="0" cellspacing="0" border="0" width="100%" class="csr-chat-row-24">
1206
1206
  <tr>
@@ -1230,7 +1230,7 @@ exports[`email render > chat.shared · Default 1`] = `
1230
1230
  <td class="csr-chat-avatar-left-hidden">[c_S]</td>
1231
1231
  <td class="csr-chat-channel-left"><div class="csr-cta-stack"><div class="cs-dots csr-dots-over-cta">⋮</div><table cellpadding="0" cellspacing="0" border="0" class="cs-cta cs-cta-hover csr-cta-box-none">
1232
1232
  <tr><td class="csr-cta-cell-linked">
1233
- <a href="https://app.companysemantics.ai/share/abc123" class="cs-link csr-cta-anchor">&gt;&gt; <span class="csr-cta-label">SEE MORE</span> &lt;&lt;</a>
1233
+ <a href="https://app.companysemantics.ai/chat/abc123" class="cs-link csr-cta-anchor">&gt;&gt; <span class="csr-cta-label">OPEN CHAT</span> &lt;&lt;</a>
1234
1234
  </td></tr>
1235
1235
  </table></div></td>
1236
1236
  <td class="csr-chat-avatar-right-hidden">(•̀_ರ╮)</td>
@@ -1264,7 +1264,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1264
1264
  <body style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; color: #1a1a1a; background-color: #ffffff; margin: 0; padding: 0;">
1265
1265
  <div style="max-width: 520px;">
1266
1266
  <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">Hi there,</p>
1267
- <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">A chat was shared with you.</p>
1267
+ <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">A chat was shared with you to read.</p>
1268
1268
  <hr class="cs-faint" style="border: none; border-top: 1px solid #bbb; margin: 12px 0 24px 0;">
1269
1269
  <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 0 0 24px 0;">
1270
1270
  <tr>
@@ -1294,7 +1294,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1294
1294
  <td style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; padding-right: 8px; vertical-align: bottom; visibility: hidden; white-space: nowrap;">[c_S]</td>
1295
1295
  <td style="width: 100%; text-align: left;"><div style="display: inline-block; text-align: left;"><div class="cs-dots" style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 20px; font-weight: bold; color: #666; text-align: center; margin: 0 0 16px 0;">⋮</div><table cellpadding="0" cellspacing="0" border="0" class="cs-cta cs-cta-hover" style="display: inline-block; border: 1px solid #0047FF; border-radius: 2px; margin: 0; max-width: 220px;">
1296
1296
  <tr><td style="text-align: center; font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px;">
1297
- <a href="https://app.companysemantics.ai/share/abc123" class="cs-link" style="display: block; padding: 16px 24px; color: #0047FF; text-decoration: none;">&gt;&gt; <span style="text-decoration: underline;">SEE MORE</span> &lt;&lt;</a>
1297
+ <a href="https://app.companysemantics.ai/chat/abc123" class="cs-link" style="display: block; padding: 16px 24px; color: #0047FF; text-decoration: none;">&gt;&gt; <span style="text-decoration: underline;">OPEN CHAT</span> &lt;&lt;</a>
1298
1298
  </td></tr>
1299
1299
  </table></div></td>
1300
1300
  <td style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; padding-left: 8px; vertical-align: bottom; visibility: hidden; white-space: nowrap;">(•̀_ರ╮)</td>
@@ -1309,7 +1309,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1309
1309
  "subject": "A chat has been shared with you",
1310
1310
  "text": "Hi there,
1311
1311
 
1312
- A chat was shared with you.
1312
+ A chat was shared with you to read.
1313
1313
 
1314
1314
  ────────────────────────────────────────────────
1315
1315
 
@@ -1324,13 +1324,13 @@ A chat was shared with you.
1324
1324
  [c_S] │ authentication endpoints. │
1325
1325
  └──────────────────────────────┘
1326
1326
 
1327
- ⋮
1327
+ ⋮
1328
1328
 
1329
- *--------------------*
1330
- | >> SEE MORE << |
1331
- *--------------------*
1329
+ *---------------------*
1330
+ | >> OPEN CHAT << |
1331
+ *---------------------*
1332
1332
 
1333
- https://app.companysemantics.ai/share/abc123
1333
+ https://app.companysemantics.ai/chat/abc123
1334
1334
  ────────────────────────────────────────────────
1335
1335
 
1336
1336
  This share was sent via Company Semantics.
@@ -1395,7 +1395,7 @@ exports[`email render > chat.shared · Long preview 1`] = `
1395
1395
  <body class="csr-body">
1396
1396
  <div class="csr-frame">
1397
1397
  <p class="csr-p-normal">Hi there,</p>
1398
- <p class="csr-p-normal">A chat was shared with you.</p>
1398
+ <p class="csr-p-normal">A chat was shared with you to read.</p>
1399
1399
  <hr class="cs-faint csr-chat-rule-top">
1400
1400
  <table cellpadding="0" cellspacing="0" border="0" width="100%" class="csr-chat-row-24">
1401
1401
  <tr>
@@ -1425,7 +1425,7 @@ exports[`email render > chat.shared · Long preview 1`] = `
1425
1425
  <td class="csr-chat-avatar-left-hidden">[c_S]</td>
1426
1426
  <td class="csr-chat-channel-left"><div class="csr-cta-stack"><div class="cs-dots csr-dots-over-cta">⋮</div><table cellpadding="0" cellspacing="0" border="0" class="cs-cta cs-cta-hover csr-cta-box-none">
1427
1427
  <tr><td class="csr-cta-cell-linked">
1428
- <a href="https://app.companysemantics.ai/share/preview789" class="cs-link csr-cta-anchor">&gt;&gt; <span class="csr-cta-label">SEE MORE</span> &lt;&lt;</a>
1428
+ <a href="https://app.companysemantics.ai/chat/preview789" class="cs-link csr-cta-anchor">&gt;&gt; <span class="csr-cta-label">OPEN CHAT</span> &lt;&lt;</a>
1429
1429
  </td></tr>
1430
1430
  </table></div></td>
1431
1431
  <td class="csr-chat-avatar-right-hidden">(•̀_ರ╮)</td>
@@ -1459,7 +1459,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1459
1459
  <body style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; color: #1a1a1a; background-color: #ffffff; margin: 0; padding: 0;">
1460
1460
  <div style="max-width: 520px;">
1461
1461
  <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">Hi there,</p>
1462
- <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">A chat was shared with you.</p>
1462
+ <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">A chat was shared with you to read.</p>
1463
1463
  <hr class="cs-faint" style="border: none; border-top: 1px solid #bbb; margin: 12px 0 24px 0;">
1464
1464
  <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 0 0 24px 0;">
1465
1465
  <tr>
@@ -1489,7 +1489,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1489
1489
  <td style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; padding-right: 8px; vertical-align: bottom; visibility: hidden; white-space: nowrap;">[c_S]</td>
1490
1490
  <td style="width: 100%; text-align: left;"><div style="display: inline-block; text-align: left;"><div class="cs-dots" style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 20px; font-weight: bold; color: #666; text-align: center; margin: 0 0 16px 0;">⋮</div><table cellpadding="0" cellspacing="0" border="0" class="cs-cta cs-cta-hover" style="display: inline-block; border: 1px solid #0047FF; border-radius: 2px; margin: 0; max-width: 220px;">
1491
1491
  <tr><td style="text-align: center; font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px;">
1492
- <a href="https://app.companysemantics.ai/share/preview789" class="cs-link" style="display: block; padding: 16px 24px; color: #0047FF; text-decoration: none;">&gt;&gt; <span style="text-decoration: underline;">SEE MORE</span> &lt;&lt;</a>
1492
+ <a href="https://app.companysemantics.ai/chat/preview789" class="cs-link" style="display: block; padding: 16px 24px; color: #0047FF; text-decoration: none;">&gt;&gt; <span style="text-decoration: underline;">OPEN CHAT</span> &lt;&lt;</a>
1493
1493
  </td></tr>
1494
1494
  </table></div></td>
1495
1495
  <td style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; padding-left: 8px; vertical-align: bottom; visibility: hidden; white-space: nowrap;">(•̀_ರ╮)</td>
@@ -1504,7 +1504,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1504
1504
  "subject": "A chat has been shared with you",
1505
1505
  "text": "Hi there,
1506
1506
 
1507
- A chat was shared with you.
1507
+ A chat was shared with you to read.
1508
1508
 
1509
1509
  ────────────────────────────────────────────────
1510
1510
 
@@ -1519,13 +1519,13 @@ A chat was shared with you.
1519
1519
  [c_S] │ need improvement. The... │
1520
1520
  └──────────────────────────────┘
1521
1521
 
1522
- ⋮
1522
+ ⋮
1523
1523
 
1524
- *--------------------*
1525
- | >> SEE MORE << |
1526
- *--------------------*
1524
+ *---------------------*
1525
+ | >> OPEN CHAT << |
1526
+ *---------------------*
1527
1527
 
1528
- https://app.companysemantics.ai/share/preview789
1528
+ https://app.companysemantics.ai/chat/preview789
1529
1529
  ────────────────────────────────────────────────
1530
1530
 
1531
1531
  This share was sent via Company Semantics.
@@ -1590,7 +1590,7 @@ exports[`email render > chat.shared · Long title 1`] = `
1590
1590
  <body class="csr-body">
1591
1591
  <div class="csr-frame">
1592
1592
  <p class="csr-p-normal">Hi there,</p>
1593
- <p class="csr-p-normal">A chat was shared with you.</p>
1593
+ <p class="csr-p-normal">A chat was shared with you. You can take part in it.</p>
1594
1594
  <hr class="cs-faint csr-chat-rule-top">
1595
1595
  <table cellpadding="0" cellspacing="0" border="0" width="100%" class="csr-chat-row-24">
1596
1596
  <tr>
@@ -1620,7 +1620,7 @@ exports[`email render > chat.shared · Long title 1`] = `
1620
1620
  <td class="csr-chat-avatar-left-hidden">[c_S]</td>
1621
1621
  <td class="csr-chat-channel-left"><div class="csr-cta-stack"><div class="cs-dots csr-dots-over-cta">⋮</div><table cellpadding="0" cellspacing="0" border="0" class="cs-cta cs-cta-hover csr-cta-box-none">
1622
1622
  <tr><td class="csr-cta-cell-linked">
1623
- <a href="https://app.companysemantics.ai/share/long456" class="cs-link csr-cta-anchor">&gt;&gt; <span class="csr-cta-label">SEE MORE</span> &lt;&lt;</a>
1623
+ <a href="https://app.companysemantics.ai/chat/long456" class="cs-link csr-cta-anchor">&gt;&gt; <span class="csr-cta-label">OPEN CHAT</span> &lt;&lt;</a>
1624
1624
  </td></tr>
1625
1625
  </table></div></td>
1626
1626
  <td class="csr-chat-avatar-right-hidden">(•̀_ರ╮)</td>
@@ -1654,7 +1654,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1654
1654
  <body style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; color: #1a1a1a; background-color: #ffffff; margin: 0; padding: 0;">
1655
1655
  <div style="max-width: 520px;">
1656
1656
  <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">Hi there,</p>
1657
- <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">A chat was shared with you.</p>
1657
+ <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">A chat was shared with you. You can take part in it.</p>
1658
1658
  <hr class="cs-faint" style="border: none; border-top: 1px solid #bbb; margin: 12px 0 24px 0;">
1659
1659
  <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 0 0 24px 0;">
1660
1660
  <tr>
@@ -1684,7 +1684,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1684
1684
  <td style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; padding-right: 8px; vertical-align: bottom; visibility: hidden; white-space: nowrap;">[c_S]</td>
1685
1685
  <td style="width: 100%; text-align: left;"><div style="display: inline-block; text-align: left;"><div class="cs-dots" style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 20px; font-weight: bold; color: #666; text-align: center; margin: 0 0 16px 0;">⋮</div><table cellpadding="0" cellspacing="0" border="0" class="cs-cta cs-cta-hover" style="display: inline-block; border: 1px solid #0047FF; border-radius: 2px; margin: 0; max-width: 220px;">
1686
1686
  <tr><td style="text-align: center; font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px;">
1687
- <a href="https://app.companysemantics.ai/share/long456" class="cs-link" style="display: block; padding: 16px 24px; color: #0047FF; text-decoration: none;">&gt;&gt; <span style="text-decoration: underline;">SEE MORE</span> &lt;&lt;</a>
1687
+ <a href="https://app.companysemantics.ai/chat/long456" class="cs-link" style="display: block; padding: 16px 24px; color: #0047FF; text-decoration: none;">&gt;&gt; <span style="text-decoration: underline;">OPEN CHAT</span> &lt;&lt;</a>
1688
1688
  </td></tr>
1689
1689
  </table></div></td>
1690
1690
  <td style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; padding-left: 8px; vertical-align: bottom; visibility: hidden; white-space: nowrap;">(•̀_ರ╮)</td>
@@ -1699,7 +1699,8 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1699
1699
  "subject": "A chat has been shared with you",
1700
1700
  "text": "Hi there,
1701
1701
 
1702
- A chat was shared with you.
1702
+ A chat was shared with you. You can take part in
1703
+ it.
1703
1704
 
1704
1705
  ────────────────────────────────────────────────
1705
1706
 
@@ -1715,13 +1716,13 @@ A chat was shared with you.
1715
1716
  [c_S] │ preview text. │
1716
1717
  └──────────────────────────────┘
1717
1718
 
1718
- ⋮
1719
+ ⋮
1719
1720
 
1720
- *--------------------*
1721
- | >> SEE MORE << |
1722
- *--------------------*
1721
+ *---------------------*
1722
+ | >> OPEN CHAT << |
1723
+ *---------------------*
1723
1724
 
1724
- https://app.companysemantics.ai/share/long456
1725
+ https://app.companysemantics.ai/chat/long456
1725
1726
  ────────────────────────────────────────────────
1726
1727
 
1727
1728
  This share was sent via Company Semantics.
@@ -1786,7 +1787,7 @@ exports[`email render > chat.shared · No preview 1`] = `
1786
1787
  <body class="csr-body">
1787
1788
  <div class="csr-frame">
1788
1789
  <p class="csr-p-normal">Hi there,</p>
1789
- <p class="csr-p-normal">A chat was shared with you.</p>
1790
+ <p class="csr-p-normal">A chat was shared with you to read.</p>
1790
1791
  <hr class="cs-faint csr-chat-rule-top">
1791
1792
  <table cellpadding="0" cellspacing="0" border="0" width="100%" class="csr-chat-row-16">
1792
1793
  <tr>
@@ -1807,7 +1808,7 @@ exports[`email render > chat.shared · No preview 1`] = `
1807
1808
  <td class="csr-chat-avatar-left-hidden">[c_S]</td>
1808
1809
  <td class="csr-chat-channel-right"><div class="csr-cta-stack"><div class="cs-dots csr-dots-over-cta">⋮</div><table cellpadding="0" cellspacing="0" border="0" class="cs-cta cs-cta-hover csr-cta-box-none">
1809
1810
  <tr><td class="csr-cta-cell-linked">
1810
- <a href="https://app.companysemantics.ai/share/xyz789" class="cs-link csr-cta-anchor">&gt;&gt; <span class="csr-cta-label">SEE MORE</span> &lt;&lt;</a>
1811
+ <a href="https://app.companysemantics.ai/chat/xyz789" class="cs-link csr-cta-anchor">&gt;&gt; <span class="csr-cta-label">OPEN CHAT</span> &lt;&lt;</a>
1811
1812
  </td></tr>
1812
1813
  </table></div></td>
1813
1814
  <td class="csr-chat-avatar-right-hidden">(•̀_ರ╮)</td>
@@ -1841,7 +1842,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1841
1842
  <body style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; color: #1a1a1a; background-color: #ffffff; margin: 0; padding: 0;">
1842
1843
  <div style="max-width: 520px;">
1843
1844
  <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">Hi there,</p>
1844
- <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">A chat was shared with you.</p>
1845
+ <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">A chat was shared with you to read.</p>
1845
1846
  <hr class="cs-faint" style="border: none; border-top: 1px solid #bbb; margin: 12px 0 24px 0;">
1846
1847
  <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 0 0 16px 0;">
1847
1848
  <tr>
@@ -1862,7 +1863,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1862
1863
  <td style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; padding-right: 8px; vertical-align: bottom; visibility: hidden; white-space: nowrap;">[c_S]</td>
1863
1864
  <td style="width: 100%; text-align: right;"><div style="display: inline-block; text-align: left;"><div class="cs-dots" style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 20px; font-weight: bold; color: #666; text-align: center; margin: 0 0 16px 0;">⋮</div><table cellpadding="0" cellspacing="0" border="0" class="cs-cta cs-cta-hover" style="display: inline-block; border: 1px solid #0047FF; border-radius: 2px; margin: 0; max-width: 220px;">
1864
1865
  <tr><td style="text-align: center; font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px;">
1865
- <a href="https://app.companysemantics.ai/share/xyz789" class="cs-link" style="display: block; padding: 16px 24px; color: #0047FF; text-decoration: none;">&gt;&gt; <span style="text-decoration: underline;">SEE MORE</span> &lt;&lt;</a>
1866
+ <a href="https://app.companysemantics.ai/chat/xyz789" class="cs-link" style="display: block; padding: 16px 24px; color: #0047FF; text-decoration: none;">&gt;&gt; <span style="text-decoration: underline;">OPEN CHAT</span> &lt;&lt;</a>
1866
1867
  </td></tr>
1867
1868
  </table></div></td>
1868
1869
  <td style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; padding-left: 8px; vertical-align: bottom; visibility: hidden; white-space: nowrap;">(•̀_ರ╮)</td>
@@ -1877,7 +1878,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
1877
1878
  "subject": "A chat has been shared with you",
1878
1879
  "text": "Hi there,
1879
1880
 
1880
- A chat was shared with you.
1881
+ A chat was shared with you to read.
1881
1882
 
1882
1883
  ────────────────────────────────────────────────
1883
1884
 
@@ -1888,11 +1889,11 @@ A chat was shared with you.
1888
1889
 
1889
1890
  ⋮
1890
1891
 
1891
- *--------------------*
1892
- | >> SEE MORE << |
1893
- *--------------------*
1892
+ *---------------------*
1893
+ | >> OPEN CHAT << |
1894
+ *---------------------*
1894
1895
 
1895
- https://app.companysemantics.ai/share/xyz789
1896
+ https://app.companysemantics.ai/chat/xyz789
1896
1897
  ────────────────────────────────────────────────
1897
1898
 
1898
1899
  This share was sent via Company Semantics.
@@ -1957,7 +1958,7 @@ exports[`email render > chat.shared · Short 1`] = `
1957
1958
  <body class="csr-body">
1958
1959
  <div class="csr-frame">
1959
1960
  <p class="csr-p-normal">Hi there,</p>
1960
- <p class="csr-p-normal">A chat was shared with you.</p>
1961
+ <p class="csr-p-normal">A chat was shared with you to read.</p>
1961
1962
  <hr class="cs-faint csr-chat-rule-top">
1962
1963
  <table cellpadding="0" cellspacing="0" border="0" width="100%" class="csr-chat-row-24">
1963
1964
  <tr>
@@ -1987,7 +1988,7 @@ exports[`email render > chat.shared · Short 1`] = `
1987
1988
  <td class="csr-chat-avatar-left-hidden">[c_S]</td>
1988
1989
  <td class="csr-chat-channel-left"><div class="csr-cta-stack"><div class="cs-dots csr-dots-over-cta">⋮</div><table cellpadding="0" cellspacing="0" border="0" class="cs-cta cs-cta-hover csr-cta-box-none">
1989
1990
  <tr><td class="csr-cta-cell-linked">
1990
- <a href="https://app.companysemantics.ai/share/short123" class="cs-link csr-cta-anchor">&gt;&gt; <span class="csr-cta-label">SEE MORE</span> &lt;&lt;</a>
1991
+ <a href="https://app.companysemantics.ai/chat/short123" class="cs-link csr-cta-anchor">&gt;&gt; <span class="csr-cta-label">OPEN CHAT</span> &lt;&lt;</a>
1991
1992
  </td></tr>
1992
1993
  </table></div></td>
1993
1994
  <td class="csr-chat-avatar-right-hidden">(•̀_ರ╮)</td>
@@ -2021,7 +2022,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
2021
2022
  <body style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; color: #1a1a1a; background-color: #ffffff; margin: 0; padding: 0;">
2022
2023
  <div style="max-width: 520px;">
2023
2024
  <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">Hi there,</p>
2024
- <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">A chat was shared with you.</p>
2025
+ <p style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; margin: 0 0 20px 0;">A chat was shared with you to read.</p>
2025
2026
  <hr class="cs-faint" style="border: none; border-top: 1px solid #bbb; margin: 12px 0 24px 0;">
2026
2027
  <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 0 0 24px 0;">
2027
2028
  <tr>
@@ -2051,7 +2052,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
2051
2052
  <td style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; padding-right: 8px; vertical-align: bottom; visibility: hidden; white-space: nowrap;">[c_S]</td>
2052
2053
  <td style="width: 100%; text-align: left;"><div style="display: inline-block; text-align: left;"><div class="cs-dots" style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 20px; font-weight: bold; color: #666; text-align: center; margin: 0 0 16px 0;">⋮</div><table cellpadding="0" cellspacing="0" border="0" class="cs-cta cs-cta-hover" style="display: inline-block; border: 1px solid #0047FF; border-radius: 2px; margin: 0; max-width: 220px;">
2053
2054
  <tr><td style="text-align: center; font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px;">
2054
- <a href="https://app.companysemantics.ai/share/short123" class="cs-link" style="display: block; padding: 16px 24px; color: #0047FF; text-decoration: none;">&gt;&gt; <span style="text-decoration: underline;">SEE MORE</span> &lt;&lt;</a>
2055
+ <a href="https://app.companysemantics.ai/chat/short123" class="cs-link" style="display: block; padding: 16px 24px; color: #0047FF; text-decoration: none;">&gt;&gt; <span style="text-decoration: underline;">OPEN CHAT</span> &lt;&lt;</a>
2055
2056
  </td></tr>
2056
2057
  </table></div></td>
2057
2058
  <td style="font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; padding-left: 8px; vertical-align: bottom; visibility: hidden; white-space: nowrap;">(•̀_ರ╮)</td>
@@ -2066,7 +2067,7 @@ body { background-color: #1a1a1a !important; color: #e8e8e8 !important; }
2066
2067
  "subject": "A chat has been shared with you",
2067
2068
  "text": "Hi there,
2068
2069
 
2069
- A chat was shared with you.
2070
+ A chat was shared with you to read.
2070
2071
 
2071
2072
  ────────────────────────────────────────────────
2072
2073
 
@@ -2079,13 +2080,13 @@ A chat was shared with you.
2079
2080
  [c_S] │ Hello! │
2080
2081
  └──────────────────────────────┘
2081
2082
 
2082
- ⋮
2083
+ ⋮
2083
2084
 
2084
- *--------------------*
2085
- | >> SEE MORE << |
2086
- *--------------------*
2085
+ *---------------------*
2086
+ | >> OPEN CHAT << |
2087
+ *---------------------*
2087
2088
 
2088
- https://app.companysemantics.ai/share/short123
2089
+ https://app.companysemantics.ai/chat/short123
2089
2090
  ────────────────────────────────────────────────
2090
2091
 
2091
2092
  This share was sent via Company Semantics.
@@ -144,39 +144,39 @@ add("security.alert", "Unusual login location", {
144
144
 
145
145
  const CHAT_BASE = {
146
146
  sharedByName: "Alex Rivera",
147
- visibility: "private",
147
+ access: "read",
148
148
  } as const;
149
149
  add("chat.shared", "Default", {
150
150
  ...CHAT_BASE,
151
151
  chatTitle: "API design discussion",
152
- shareUrl: `${APP}/share/abc123`,
152
+ chatUrl: `${APP}/chat/abc123`,
153
153
  previewText:
154
154
  "Here are my thoughts on the REST API design for the new authentication endpoints.",
155
155
  });
156
156
  add("chat.shared", "No preview", {
157
157
  ...CHAT_BASE,
158
158
  chatTitle: "Quick sync notes",
159
- shareUrl: `${APP}/share/xyz789`,
159
+ chatUrl: `${APP}/chat/xyz789`,
160
160
  });
161
161
  add("chat.shared", "Long title", {
162
162
  ...CHAT_BASE,
163
- visibility: "public",
163
+ access: "collaborate",
164
164
  chatTitle:
165
165
  "This is a very long chat title that should be truncated to fit the layout properly",
166
- shareUrl: `${APP}/share/long456`,
166
+ chatUrl: `${APP}/chat/long456`,
167
167
  previewText: "The assistant response preview text.",
168
168
  });
169
169
  add("chat.shared", "Long preview", {
170
170
  ...CHAT_BASE,
171
171
  chatTitle: "Code review feedback",
172
- shareUrl: `${APP}/share/preview789`,
172
+ chatUrl: `${APP}/chat/preview789`,
173
173
  previewText:
174
174
  "I reviewed the pull request and found several areas that need improvement. The authentication logic needs better error handling, and the database queries could be optimized.",
175
175
  });
176
176
  add("chat.shared", "Short", {
177
177
  ...CHAT_BASE,
178
178
  chatTitle: "Hi",
179
- shareUrl: `${APP}/share/short123`,
179
+ chatUrl: `${APP}/chat/short123`,
180
180
  previewText: "Hello!",
181
181
  });
182
182
 
@@ -150,39 +150,39 @@ add("security.alert", "Unusual login location", {
150
150
 
151
151
  const CHAT_BASE = {
152
152
  sharedByName: "Alex Rivera",
153
- visibility: "private",
153
+ access: "read",
154
154
  } as const;
155
155
  add("chat.shared", "Default", {
156
156
  ...CHAT_BASE,
157
157
  chatTitle: "API design discussion",
158
- shareUrl: `${APP}/share/abc123`,
158
+ chatUrl: `${APP}/chat/abc123`,
159
159
  previewText:
160
160
  "Here are my thoughts on the REST API design for the new authentication endpoints.",
161
161
  });
162
162
  add("chat.shared", "No preview", {
163
163
  ...CHAT_BASE,
164
164
  chatTitle: "Quick sync notes",
165
- shareUrl: `${APP}/share/xyz789`,
165
+ chatUrl: `${APP}/chat/xyz789`,
166
166
  });
167
167
  add("chat.shared", "Long title", {
168
168
  ...CHAT_BASE,
169
- visibility: "public",
169
+ access: "collaborate",
170
170
  chatTitle:
171
171
  "This is a very long chat title that should be truncated to fit the layout properly",
172
- shareUrl: `${APP}/share/long456`,
172
+ chatUrl: `${APP}/chat/long456`,
173
173
  previewText: "The assistant response preview text.",
174
174
  });
175
175
  add("chat.shared", "Long preview", {
176
176
  ...CHAT_BASE,
177
177
  chatTitle: "Code review feedback",
178
- shareUrl: `${APP}/share/preview789`,
178
+ chatUrl: `${APP}/chat/preview789`,
179
179
  previewText:
180
180
  "I reviewed the pull request and found several areas that need improvement. The authentication logic needs better error handling, and the database queries could be optimized.",
181
181
  });
182
182
  add("chat.shared", "Short", {
183
183
  ...CHAT_BASE,
184
184
  chatTitle: "Hi",
185
- shareUrl: `${APP}/share/short123`,
185
+ chatUrl: `${APP}/chat/short123`,
186
186
  previewText: "Hello!",
187
187
  });
188
188
 
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * The only kind that reproduces a real conversation: the chat's title is shown
5
5
  * as the user's turn and the preview as the assistant's reply, elided into the
6
- * call to action. `visibility` is carried by the payload but says nothing here —
7
- * it is a fact about the share, not about what this notification tells you.
6
+ * call to action. `access` says whether the recipient can take part or only
7
+ * read (ADR-CONTRACTS-206); the link is the chat itself, never a token.
8
8
  */
9
9
 
10
10
  import type { ChatUnitItem } from "../content";
@@ -15,7 +15,7 @@ import { NOTICE } from "../text";
15
15
  export const chatSharedDefinition: NotificationDefinition<"chat.shared"> = {
16
16
  kind: "chat.shared",
17
17
  compose: (payload, context) => {
18
- const { chatTitle, shareUrl, previewText, sharedByName } = payload;
18
+ const { chatTitle, chatUrl, access, previewText, sharedByName } = payload;
19
19
 
20
20
  const items: ChatUnitItem[] = [
21
21
  { type: "message", role: "user", text: chatTitle, from: sharedByName },
@@ -29,7 +29,7 @@ export const chatSharedDefinition: NotificationDefinition<"chat.shared"> = {
29
29
  ]
30
30
  : []),
31
31
  { type: "continuation" },
32
- { type: "callToAction", label: "SEE MORE", href: shareUrl },
32
+ { type: "callToAction", label: "OPEN CHAT", href: chatUrl },
33
33
  ];
34
34
 
35
35
  return {
@@ -41,7 +41,13 @@ export const chatSharedDefinition: NotificationDefinition<"chat.shared"> = {
41
41
  {
42
42
  elements: [
43
43
  { type: "greeting" },
44
- { type: "body", text: "A chat was shared with you." },
44
+ {
45
+ type: "body",
46
+ text:
47
+ access === "collaborate"
48
+ ? "A chat was shared with you. You can take part in it."
49
+ : "A chat was shared with you to read.",
50
+ },
45
51
  { type: "chatUnit", items },
46
52
  {
47
53
  type: "notice",
@@ -108,11 +108,11 @@ export interface NotificationPayloads {
108
108
  sharedByName: string;
109
109
  /** Title of the chat being shared */
110
110
  chatTitle: string;
111
- /** Full URL to view the shared chat */
112
- shareUrl: string;
113
- /** Share visibility mode */
114
- visibility: "private" | "public";
115
- /** First ~200 chars of chat content for preview. Generated server-side from snapshot. */
111
+ /** Full URL of the chat itself — the link that opens it in the recipient's app */
112
+ chatUrl: string;
113
+ /** What the share granted: Read only or Collaborate */
114
+ access: "read" | "collaborate";
115
+ /** First ~200 chars of chat content for preview. Generated server-side. */
116
116
  previewText?: string;
117
117
  };
118
118
  "share.granted": {