@ever-works/opencode-plugin 1.0.5 → 1.0.6

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
@@ -295,10 +295,14 @@ var USER_SELECTABLE_WORK_KINDS = [
295
295
  "repo",
296
296
  "app"
297
297
  ];
298
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
298
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
299
299
  var WORK_KIND_SET = new Set(WORK_KINDS);
300
300
  var GOAL_KINDS = ["metric", "delivery"];
301
301
  var GOAL_KIND_SET = new Set(GOAL_KINDS);
302
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
303
+ var RECORD_VISIBILITY_SET = new Set(RECORD_VISIBILITIES);
304
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
305
+ var RECORD_LIST_VIEW_SET = new Set(RECORD_LIST_VIEWS);
302
306
  var APP_DEPENDENCY_BACKUP_OVERDUE_MS = 26 * 36e5;
303
307
  var APP_DEPENDENCY_MANAGED = {
304
308
  pgRoleConnectionLimit: 20,
@@ -1500,6 +1504,152 @@ var EVER_STATS_SIGNATURE_HEADER = CONSTANTS.stats_headers.signature;
1500
1504
  var EVER_STATS_KEY_ID_HEADER = CONSTANTS.stats_headers.key_id;
1501
1505
  var EVER_STATS_SIGNATURE_PREFIX = CONSTANTS.stats_signature_prefix;
1502
1506
  var EVER_STATS_MAX_BODY_BYTES = CONSTANTS.stats.max_bytes;
1507
+ var DOMAIN_EVENT_CATALOG = [
1508
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
1509
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
1510
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
1511
+ {
1512
+ type: "organization.member.added",
1513
+ domain: "organization",
1514
+ aggregateType: "organization",
1515
+ phase: "P1",
1516
+ child: "member"
1517
+ },
1518
+ {
1519
+ type: "organization.member.updated",
1520
+ domain: "organization",
1521
+ aggregateType: "organization",
1522
+ phase: "P1",
1523
+ child: "member"
1524
+ },
1525
+ {
1526
+ type: "organization.member.removed",
1527
+ domain: "organization",
1528
+ aggregateType: "organization",
1529
+ phase: "P1",
1530
+ child: "member"
1531
+ },
1532
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
1533
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
1534
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
1535
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
1536
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
1537
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
1538
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
1539
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
1540
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1541
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1542
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1543
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1544
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1545
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
1546
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
1547
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
1548
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
1549
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1550
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1551
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1552
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
1553
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
1554
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
1555
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
1556
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1557
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1558
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1559
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1560
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
1561
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
1562
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1563
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
1564
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
1565
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
1566
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1567
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
1568
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
1569
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
1570
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
1571
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
1572
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
1573
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
1574
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
1575
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1576
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1577
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1578
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1579
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1580
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1581
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1582
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1583
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1584
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1585
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1586
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1587
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1588
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
1589
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1590
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1591
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1592
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1593
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1594
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1595
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1596
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1597
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1598
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1599
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1600
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1601
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1602
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1603
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
1604
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
1605
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
1606
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
1607
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
1608
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
1609
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
1610
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
1611
+ ];
1612
+ var DOMAIN_EVENT_TYPES = DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
1613
+ var CATALOG_BY_TYPE = new Map(
1614
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
1615
+ );
1616
+ var RECIPIENT_SCOPED_EVENT_DOMAINS = {
1617
+ inbox: "inbox:read",
1618
+ email: "email:read"
1619
+ };
1620
+ var RECIPIENT_EVENT_SCOPES = Object.values(RECIPIENT_SCOPED_EVENT_DOMAINS);
1621
+ var INTEGRATION_SCOPES = [
1622
+ "org:read",
1623
+ "org:write",
1624
+ "members:read",
1625
+ "members:write",
1626
+ "agents:read",
1627
+ "teams:read",
1628
+ "teams:write",
1629
+ "works:read",
1630
+ "works:write",
1631
+ "missions:read",
1632
+ "missions:write",
1633
+ "goals:read",
1634
+ "goals:write",
1635
+ "ideas:read",
1636
+ "ideas:write",
1637
+ "tasks:read",
1638
+ "tasks:write",
1639
+ "inbox:read",
1640
+ "inbox:write",
1641
+ "kb:read",
1642
+ "kb:write",
1643
+ "email:read",
1644
+ "email:write",
1645
+ "events:read",
1646
+ "webhooks:manage",
1647
+ "links:write"
1648
+ ];
1649
+ var INTEGRATION_OPT_IN_SCOPES = ["org:write", "email:write"];
1650
+ var EVER_GAUZY_PRESET_SCOPES = INTEGRATION_SCOPES.filter(
1651
+ (scope) => !INTEGRATION_OPT_IN_SCOPES.includes(scope)
1652
+ );
1503
1653
 
1504
1654
  // ../../../node_modules/.pnpm/jsonrepair@3.13.2/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js
1505
1655
  var JSONRepairError = class extends Error {
@@ -6348,7 +6498,14 @@ var PLUGIN_CAPABILITIES = {
6348
6498
  // new category: the tier's plugin is a `deployment` plugin, so
6349
6499
  // `PLUGIN_CATEGORIES` is untouched and every exhaustive map over it in
6350
6500
  // `apps/web` stays total.
6351
- APPS_TIER: "apps-tier"
6501
+ APPS_TIER: "apps-tier",
6502
+ // Domain events (EW-P1-1) — plugins that follow the durable domain event
6503
+ // outbox (`task.updated`, `team.member.added`, …) through the relay, at
6504
+ // least once, with a per-plugin cursor. See
6505
+ // `capabilities/domain-event-subscriber.interface.ts`. Appended last, so
6506
+ // every existing constant keeps its value and its position; no category is
6507
+ // added (a subscriber plugin keeps the category of what it otherwise is).
6508
+ DOMAIN_EVENT_SUBSCRIBER: "domain-event-subscriber"
6352
6509
  };
6353
6510
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
6354
6511
  function initializePipelineState(stepDefinitions) {
package/dist/index.js CHANGED
@@ -262,10 +262,14 @@ var USER_SELECTABLE_WORK_KINDS = [
262
262
  "repo",
263
263
  "app"
264
264
  ];
265
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
265
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
266
266
  var WORK_KIND_SET = new Set(WORK_KINDS);
267
267
  var GOAL_KINDS = ["metric", "delivery"];
268
268
  var GOAL_KIND_SET = new Set(GOAL_KINDS);
269
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
270
+ var RECORD_VISIBILITY_SET = new Set(RECORD_VISIBILITIES);
271
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
272
+ var RECORD_LIST_VIEW_SET = new Set(RECORD_LIST_VIEWS);
269
273
  var APP_DEPENDENCY_BACKUP_OVERDUE_MS = 26 * 36e5;
270
274
  var APP_DEPENDENCY_MANAGED = {
271
275
  pgRoleConnectionLimit: 20,
@@ -1467,6 +1471,152 @@ var EVER_STATS_SIGNATURE_HEADER = CONSTANTS.stats_headers.signature;
1467
1471
  var EVER_STATS_KEY_ID_HEADER = CONSTANTS.stats_headers.key_id;
1468
1472
  var EVER_STATS_SIGNATURE_PREFIX = CONSTANTS.stats_signature_prefix;
1469
1473
  var EVER_STATS_MAX_BODY_BYTES = CONSTANTS.stats.max_bytes;
1474
+ var DOMAIN_EVENT_CATALOG = [
1475
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
1476
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
1477
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
1478
+ {
1479
+ type: "organization.member.added",
1480
+ domain: "organization",
1481
+ aggregateType: "organization",
1482
+ phase: "P1",
1483
+ child: "member"
1484
+ },
1485
+ {
1486
+ type: "organization.member.updated",
1487
+ domain: "organization",
1488
+ aggregateType: "organization",
1489
+ phase: "P1",
1490
+ child: "member"
1491
+ },
1492
+ {
1493
+ type: "organization.member.removed",
1494
+ domain: "organization",
1495
+ aggregateType: "organization",
1496
+ phase: "P1",
1497
+ child: "member"
1498
+ },
1499
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
1500
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
1501
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
1502
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
1503
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
1504
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
1505
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
1506
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
1507
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1508
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1509
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1510
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1511
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1512
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
1513
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
1514
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
1515
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
1516
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1517
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1518
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1519
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
1520
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
1521
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
1522
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
1523
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1524
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1525
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1526
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1527
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
1528
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
1529
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1530
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
1531
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
1532
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
1533
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1534
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
1535
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
1536
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
1537
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
1538
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
1539
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
1540
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
1541
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
1542
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1543
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1544
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1545
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1546
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1547
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1548
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1549
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1550
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1551
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1552
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1553
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1554
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1555
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
1556
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1557
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1558
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1559
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1560
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1561
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1562
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1563
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1564
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1565
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1566
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1567
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1568
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1569
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1570
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
1571
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
1572
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
1573
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
1574
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
1575
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
1576
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
1577
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
1578
+ ];
1579
+ var DOMAIN_EVENT_TYPES = DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
1580
+ var CATALOG_BY_TYPE = new Map(
1581
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
1582
+ );
1583
+ var RECIPIENT_SCOPED_EVENT_DOMAINS = {
1584
+ inbox: "inbox:read",
1585
+ email: "email:read"
1586
+ };
1587
+ var RECIPIENT_EVENT_SCOPES = Object.values(RECIPIENT_SCOPED_EVENT_DOMAINS);
1588
+ var INTEGRATION_SCOPES = [
1589
+ "org:read",
1590
+ "org:write",
1591
+ "members:read",
1592
+ "members:write",
1593
+ "agents:read",
1594
+ "teams:read",
1595
+ "teams:write",
1596
+ "works:read",
1597
+ "works:write",
1598
+ "missions:read",
1599
+ "missions:write",
1600
+ "goals:read",
1601
+ "goals:write",
1602
+ "ideas:read",
1603
+ "ideas:write",
1604
+ "tasks:read",
1605
+ "tasks:write",
1606
+ "inbox:read",
1607
+ "inbox:write",
1608
+ "kb:read",
1609
+ "kb:write",
1610
+ "email:read",
1611
+ "email:write",
1612
+ "events:read",
1613
+ "webhooks:manage",
1614
+ "links:write"
1615
+ ];
1616
+ var INTEGRATION_OPT_IN_SCOPES = ["org:write", "email:write"];
1617
+ var EVER_GAUZY_PRESET_SCOPES = INTEGRATION_SCOPES.filter(
1618
+ (scope) => !INTEGRATION_OPT_IN_SCOPES.includes(scope)
1619
+ );
1470
1620
 
1471
1621
  // ../../../node_modules/.pnpm/jsonrepair@3.13.2/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js
1472
1622
  var JSONRepairError = class extends Error {
@@ -6315,7 +6465,14 @@ var PLUGIN_CAPABILITIES = {
6315
6465
  // new category: the tier's plugin is a `deployment` plugin, so
6316
6466
  // `PLUGIN_CATEGORIES` is untouched and every exhaustive map over it in
6317
6467
  // `apps/web` stays total.
6318
- APPS_TIER: "apps-tier"
6468
+ APPS_TIER: "apps-tier",
6469
+ // Domain events (EW-P1-1) — plugins that follow the durable domain event
6470
+ // outbox (`task.updated`, `team.member.added`, …) through the relay, at
6471
+ // least once, with a per-plugin cursor. See
6472
+ // `capabilities/domain-event-subscriber.interface.ts`. Appended last, so
6473
+ // every existing constant keeps its value and its position; no category is
6474
+ // added (a subscriber plugin keeps the category of what it otherwise is).
6475
+ DOMAIN_EVENT_SUBSCRIBER: "domain-event-subscriber"
6319
6476
  };
6320
6477
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
6321
6478
  function initializePipelineState(stepDefinitions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/opencode-plugin",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "OpenCode Generator Plugin - Full pipeline plugin that delegates generation to OpenCode",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -33,18 +33,18 @@
33
33
  "test:coverage": "vitest run --coverage"
34
34
  },
35
35
  "peerDependencies": {
36
- "@ever-works/plugin": "^1.2.4"
36
+ "@ever-works/plugin": "^1.2.5"
37
37
  },
38
38
  "dependencies": {
39
39
  "extract-zip": "^2.0.1",
40
40
  "tar": "^7.5.21"
41
41
  },
42
42
  "devDependencies": {
43
- "@ever-works/plugin": "^1.2.4",
43
+ "@ever-works/plugin": "^1.2.5",
44
44
  "@types/node": "^26.6.4",
45
45
  "tsup": "^8.0.0",
46
46
  "typescript": "^5.9.3",
47
- "vitest": "^4.1.0"
47
+ "vitest": "^5.0.5"
48
48
  },
49
49
  "everworks": {
50
50
  "plugin": {
@@ -78,8 +78,8 @@
78
78
  "url": "https://github.com/ever-works/ever-works/issues"
79
79
  },
80
80
  "everworksRelease": {
81
- "contentHash": "sha256:7bcacc3f3ba10267907e3dce010a719a97191d18f2197624635f6cef6bb77899",
82
- "commit": "61b8320b4ad7d30bf5161acf7ee13b250a6172b9",
83
- "source": "https://github.com/ever-works/ever-works/tree/61b8320b4ad7d30bf5161acf7ee13b250a6172b9/packages/plugins/opencode"
81
+ "contentHash": "sha256:78d44a8a77dce2895b857645c1762fe22d4e7e68d92d3162a2ba93b39c20d43f",
82
+ "commit": "19905c70cf05be3bc523db030597046067cd322a",
83
+ "source": "https://github.com/ever-works/ever-works/tree/19905c70cf05be3bc523db030597046067cd322a/packages/plugins/opencode"
84
84
  }
85
85
  }