@ever-works/oidc-identity 1.0.3 → 1.0.5

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.
package/dist/index.cjs CHANGED
@@ -324,10 +324,14 @@ var USER_SELECTABLE_WORK_KINDS = [
324
324
  "repo",
325
325
  "app"
326
326
  ];
327
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
327
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
328
328
  var WORK_KIND_SET = new Set(WORK_KINDS);
329
329
  var GOAL_KINDS = ["metric", "delivery"];
330
330
  var GOAL_KIND_SET = new Set(GOAL_KINDS);
331
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
332
+ var RECORD_VISIBILITY_SET = new Set(RECORD_VISIBILITIES);
333
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
334
+ var RECORD_LIST_VIEW_SET = new Set(RECORD_LIST_VIEWS);
331
335
  var APP_DEPENDENCY_BACKUP_OVERDUE_MS = 26 * 36e5;
332
336
  var APP_DEPENDENCY_MANAGED = {
333
337
  pgRoleConnectionLimit: 20,
@@ -1120,6 +1124,7 @@ var FLEET_AGENT_TASK_TIMELINE_MAX_BYTES = 48 * 1024;
1120
1124
  var FLEET_AGENT_TASK_TRANSCRIPT_MAX_BYTES = 64 * 1024;
1121
1125
  var FLEET_AGENT_TASK_QUESTION_MAX_FILE_BYTES = 64 * 1024;
1122
1126
  var FLEET_AGENT_TASK_QUESTION_MAX_CONTEXT_BYTES = 6 * 1024;
1127
+ var FLEET_NODE_MAX_MEMORY_MB = 1024 * 1024;
1123
1128
  var FLEET_MAX_DAILY_COST_CEILING_CENTS = 1e5 * 100;
1124
1129
  var FLEET_MAX_DISK_FREE_BYTES = 2 ** 60;
1125
1130
  var FLEET_DEFAULT_ENROLLMENT_TOKEN_TTL_MS = 15 * 6e4;
@@ -1528,6 +1533,152 @@ var EVER_STATS_SIGNATURE_HEADER = CONSTANTS.stats_headers.signature;
1528
1533
  var EVER_STATS_KEY_ID_HEADER = CONSTANTS.stats_headers.key_id;
1529
1534
  var EVER_STATS_SIGNATURE_PREFIX = CONSTANTS.stats_signature_prefix;
1530
1535
  var EVER_STATS_MAX_BODY_BYTES = CONSTANTS.stats.max_bytes;
1536
+ var DOMAIN_EVENT_CATALOG = [
1537
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
1538
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
1539
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
1540
+ {
1541
+ type: "organization.member.added",
1542
+ domain: "organization",
1543
+ aggregateType: "organization",
1544
+ phase: "P1",
1545
+ child: "member"
1546
+ },
1547
+ {
1548
+ type: "organization.member.updated",
1549
+ domain: "organization",
1550
+ aggregateType: "organization",
1551
+ phase: "P1",
1552
+ child: "member"
1553
+ },
1554
+ {
1555
+ type: "organization.member.removed",
1556
+ domain: "organization",
1557
+ aggregateType: "organization",
1558
+ phase: "P1",
1559
+ child: "member"
1560
+ },
1561
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
1562
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
1563
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
1564
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
1565
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
1566
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
1567
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
1568
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
1569
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1570
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1571
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1572
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1573
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1574
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
1575
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
1576
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
1577
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
1578
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1579
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1580
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1581
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
1582
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
1583
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
1584
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
1585
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1586
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1587
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1588
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1589
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
1590
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
1591
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1592
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
1593
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
1594
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
1595
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1596
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
1597
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
1598
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
1599
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
1600
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
1601
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
1602
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
1603
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
1604
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1605
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1606
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1607
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1608
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1609
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1610
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1611
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1612
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1613
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1614
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1615
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1616
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1617
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
1618
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1619
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1620
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1621
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1622
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1623
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1624
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1625
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1626
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1627
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1628
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1629
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1630
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1631
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1632
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
1633
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
1634
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
1635
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
1636
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
1637
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
1638
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
1639
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
1640
+ ];
1641
+ var DOMAIN_EVENT_TYPES = DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
1642
+ var CATALOG_BY_TYPE = new Map(
1643
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
1644
+ );
1645
+ var RECIPIENT_SCOPED_EVENT_DOMAINS = {
1646
+ inbox: "inbox:read",
1647
+ email: "email:read"
1648
+ };
1649
+ var RECIPIENT_EVENT_SCOPES = Object.values(RECIPIENT_SCOPED_EVENT_DOMAINS);
1650
+ var INTEGRATION_SCOPES = [
1651
+ "org:read",
1652
+ "org:write",
1653
+ "members:read",
1654
+ "members:write",
1655
+ "agents:read",
1656
+ "teams:read",
1657
+ "teams:write",
1658
+ "works:read",
1659
+ "works:write",
1660
+ "missions:read",
1661
+ "missions:write",
1662
+ "goals:read",
1663
+ "goals:write",
1664
+ "ideas:read",
1665
+ "ideas:write",
1666
+ "tasks:read",
1667
+ "tasks:write",
1668
+ "inbox:read",
1669
+ "inbox:write",
1670
+ "kb:read",
1671
+ "kb:write",
1672
+ "email:read",
1673
+ "email:write",
1674
+ "events:read",
1675
+ "webhooks:manage",
1676
+ "links:write"
1677
+ ];
1678
+ var INTEGRATION_OPT_IN_SCOPES = ["org:write", "email:write"];
1679
+ var EVER_GAUZY_PRESET_SCOPES = INTEGRATION_SCOPES.filter(
1680
+ (scope) => !INTEGRATION_OPT_IN_SCOPES.includes(scope)
1681
+ );
1531
1682
 
1532
1683
  // ../../plugin/dist/index.js
1533
1684
  var DEFAULT_DIFF_MAX_BYTES = 256 * 1024;
@@ -1674,7 +1825,14 @@ var PLUGIN_CAPABILITIES = {
1674
1825
  // new category: the tier's plugin is a `deployment` plugin, so
1675
1826
  // `PLUGIN_CATEGORIES` is untouched and every exhaustive map over it in
1676
1827
  // `apps/web` stays total.
1677
- APPS_TIER: "apps-tier"
1828
+ APPS_TIER: "apps-tier",
1829
+ // Domain events (EW-P1-1) — plugins that follow the durable domain event
1830
+ // outbox (`task.updated`, `team.member.added`, …) through the relay, at
1831
+ // least once, with a per-plugin cursor. See
1832
+ // `capabilities/domain-event-subscriber.interface.ts`. Appended last, so
1833
+ // every existing constant keeps its value and its position; no category is
1834
+ // added (a subscriber plugin keeps the category of what it otherwise is).
1835
+ DOMAIN_EVENT_SUBSCRIBER: "domain-event-subscriber"
1678
1836
  };
1679
1837
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
1680
1838
  var IdentityTokenRejectedError = class extends Error {
package/dist/index.js CHANGED
@@ -259,10 +259,14 @@ var USER_SELECTABLE_WORK_KINDS = [
259
259
  "repo",
260
260
  "app"
261
261
  ];
262
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
262
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
263
263
  var WORK_KIND_SET = new Set(WORK_KINDS);
264
264
  var GOAL_KINDS = ["metric", "delivery"];
265
265
  var GOAL_KIND_SET = new Set(GOAL_KINDS);
266
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
267
+ var RECORD_VISIBILITY_SET = new Set(RECORD_VISIBILITIES);
268
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
269
+ var RECORD_LIST_VIEW_SET = new Set(RECORD_LIST_VIEWS);
266
270
  var APP_DEPENDENCY_BACKUP_OVERDUE_MS = 26 * 36e5;
267
271
  var APP_DEPENDENCY_MANAGED = {
268
272
  pgRoleConnectionLimit: 20,
@@ -1055,6 +1059,7 @@ var FLEET_AGENT_TASK_TIMELINE_MAX_BYTES = 48 * 1024;
1055
1059
  var FLEET_AGENT_TASK_TRANSCRIPT_MAX_BYTES = 64 * 1024;
1056
1060
  var FLEET_AGENT_TASK_QUESTION_MAX_FILE_BYTES = 64 * 1024;
1057
1061
  var FLEET_AGENT_TASK_QUESTION_MAX_CONTEXT_BYTES = 6 * 1024;
1062
+ var FLEET_NODE_MAX_MEMORY_MB = 1024 * 1024;
1058
1063
  var FLEET_MAX_DAILY_COST_CEILING_CENTS = 1e5 * 100;
1059
1064
  var FLEET_MAX_DISK_FREE_BYTES = 2 ** 60;
1060
1065
  var FLEET_DEFAULT_ENROLLMENT_TOKEN_TTL_MS = 15 * 6e4;
@@ -1463,6 +1468,152 @@ var EVER_STATS_SIGNATURE_HEADER = CONSTANTS.stats_headers.signature;
1463
1468
  var EVER_STATS_KEY_ID_HEADER = CONSTANTS.stats_headers.key_id;
1464
1469
  var EVER_STATS_SIGNATURE_PREFIX = CONSTANTS.stats_signature_prefix;
1465
1470
  var EVER_STATS_MAX_BODY_BYTES = CONSTANTS.stats.max_bytes;
1471
+ var DOMAIN_EVENT_CATALOG = [
1472
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
1473
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
1474
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
1475
+ {
1476
+ type: "organization.member.added",
1477
+ domain: "organization",
1478
+ aggregateType: "organization",
1479
+ phase: "P1",
1480
+ child: "member"
1481
+ },
1482
+ {
1483
+ type: "organization.member.updated",
1484
+ domain: "organization",
1485
+ aggregateType: "organization",
1486
+ phase: "P1",
1487
+ child: "member"
1488
+ },
1489
+ {
1490
+ type: "organization.member.removed",
1491
+ domain: "organization",
1492
+ aggregateType: "organization",
1493
+ phase: "P1",
1494
+ child: "member"
1495
+ },
1496
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
1497
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
1498
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
1499
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
1500
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
1501
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
1502
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
1503
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
1504
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1505
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1506
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1507
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1508
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1509
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
1510
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
1511
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
1512
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
1513
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1514
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1515
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1516
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
1517
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
1518
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
1519
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
1520
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1521
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1522
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1523
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1524
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
1525
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
1526
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1527
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
1528
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
1529
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
1530
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1531
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
1532
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
1533
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
1534
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
1535
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
1536
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
1537
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
1538
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
1539
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1540
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1541
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1542
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1543
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1544
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1545
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1546
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1547
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1548
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1549
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1550
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1551
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1552
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
1553
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1554
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1555
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1556
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1557
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1558
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1559
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1560
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1561
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1562
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1563
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1564
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1565
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1566
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1567
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
1568
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
1569
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
1570
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
1571
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
1572
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
1573
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
1574
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
1575
+ ];
1576
+ var DOMAIN_EVENT_TYPES = DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
1577
+ var CATALOG_BY_TYPE = new Map(
1578
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
1579
+ );
1580
+ var RECIPIENT_SCOPED_EVENT_DOMAINS = {
1581
+ inbox: "inbox:read",
1582
+ email: "email:read"
1583
+ };
1584
+ var RECIPIENT_EVENT_SCOPES = Object.values(RECIPIENT_SCOPED_EVENT_DOMAINS);
1585
+ var INTEGRATION_SCOPES = [
1586
+ "org:read",
1587
+ "org:write",
1588
+ "members:read",
1589
+ "members:write",
1590
+ "agents:read",
1591
+ "teams:read",
1592
+ "teams:write",
1593
+ "works:read",
1594
+ "works:write",
1595
+ "missions:read",
1596
+ "missions:write",
1597
+ "goals:read",
1598
+ "goals:write",
1599
+ "ideas:read",
1600
+ "ideas:write",
1601
+ "tasks:read",
1602
+ "tasks:write",
1603
+ "inbox:read",
1604
+ "inbox:write",
1605
+ "kb:read",
1606
+ "kb:write",
1607
+ "email:read",
1608
+ "email:write",
1609
+ "events:read",
1610
+ "webhooks:manage",
1611
+ "links:write"
1612
+ ];
1613
+ var INTEGRATION_OPT_IN_SCOPES = ["org:write", "email:write"];
1614
+ var EVER_GAUZY_PRESET_SCOPES = INTEGRATION_SCOPES.filter(
1615
+ (scope) => !INTEGRATION_OPT_IN_SCOPES.includes(scope)
1616
+ );
1466
1617
 
1467
1618
  // ../../plugin/dist/index.js
1468
1619
  var DEFAULT_DIFF_MAX_BYTES = 256 * 1024;
@@ -1609,7 +1760,14 @@ var PLUGIN_CAPABILITIES = {
1609
1760
  // new category: the tier's plugin is a `deployment` plugin, so
1610
1761
  // `PLUGIN_CATEGORIES` is untouched and every exhaustive map over it in
1611
1762
  // `apps/web` stays total.
1612
- APPS_TIER: "apps-tier"
1763
+ APPS_TIER: "apps-tier",
1764
+ // Domain events (EW-P1-1) — plugins that follow the durable domain event
1765
+ // outbox (`task.updated`, `team.member.added`, …) through the relay, at
1766
+ // least once, with a per-plugin cursor. See
1767
+ // `capabilities/domain-event-subscriber.interface.ts`. Appended last, so
1768
+ // every existing constant keeps its value and its position; no category is
1769
+ // added (a subscriber plugin keeps the category of what it otherwise is).
1770
+ DOMAIN_EVENT_SUBSCRIBER: "domain-event-subscriber"
1613
1771
  };
1614
1772
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
1615
1773
  var IdentityTokenRejectedError = class extends Error {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/oidc-identity",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "OpenID Connect identity provider plugin (Ever ID) for Ever Works",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -38,20 +38,20 @@
38
38
  "test:coverage": "vitest run --coverage"
39
39
  },
40
40
  "peerDependencies": {
41
- "@ever-works/plugin": "^1.2.4"
41
+ "@ever-works/plugin": "^1.2.5"
42
42
  },
43
43
  "dependencies": {
44
44
  "jose": "^6",
45
45
  "openid-client": "^6"
46
46
  },
47
47
  "devDependencies": {
48
- "@ever-works/plugin": "^1.2.4",
48
+ "@ever-works/plugin": "^1.2.5",
49
49
  "@types/node": "^26.6.4",
50
50
  "ajv": "^8.18.0",
51
51
  "ajv-formats": "^3.0.1",
52
52
  "tsup": "^8.0.0",
53
53
  "typescript": "^5.9.3",
54
- "vitest": "^4.1.0"
54
+ "vitest": "^5.0.5"
55
55
  },
56
56
  "everworks": {
57
57
  "plugin": {
@@ -81,8 +81,8 @@
81
81
  "url": "https://github.com/ever-works/ever-works/issues"
82
82
  },
83
83
  "everworksRelease": {
84
- "contentHash": "sha256:fd87fb87b04782650a8a9657fc6ba13145f151c17a18cc55664085b6b31c03e7",
85
- "commit": "5afea18479322951b23246dd492a05dc332e90ca",
86
- "source": "https://github.com/ever-works/ever-works/tree/5afea18479322951b23246dd492a05dc332e90ca/packages/plugins/oidc-identity"
84
+ "contentHash": "sha256:e690c54ebf960af314c1ae4978df4f50c0fd81358ac0a96abaa274ebbbe2acdb",
85
+ "commit": "19905c70cf05be3bc523db030597046067cd322a",
86
+ "source": "https://github.com/ever-works/ever-works/tree/19905c70cf05be3bc523db030597046067cd322a/packages/plugins/oidc-identity"
87
87
  }
88
88
  }