@ever-works/gemini-plugin 1.0.5 → 1.0.7

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,
@@ -1091,6 +1095,10 @@ var FLEET_AGENT_TASK_TIMELINE_MAX_BYTES = 48 * 1024;
1091
1095
  var FLEET_AGENT_TASK_TRANSCRIPT_MAX_BYTES = 64 * 1024;
1092
1096
  var FLEET_AGENT_TASK_QUESTION_MAX_FILE_BYTES = 64 * 1024;
1093
1097
  var FLEET_AGENT_TASK_QUESTION_MAX_CONTEXT_BYTES = 6 * 1024;
1098
+ var FLEET_MODEL_USAGE_LIMIT_FALLBACK_MS = 60 * 60 * 1e3;
1099
+ var FLEET_MODEL_USAGE_LIMIT_MIN_MS = 60 * 1e3;
1100
+ var FLEET_MODEL_USAGE_LIMIT_MAX_MS = 8 * 24 * 60 * 60 * 1e3;
1101
+ var FLEET_MODEL_USAGE_LIMIT_RESET_SLACK_MS = 60 * 1e3;
1094
1102
  var FLEET_NODE_MAX_MEMORY_MB = 1024 * 1024;
1095
1103
  var FLEET_MAX_DAILY_COST_CEILING_CENTS = 1e5 * 100;
1096
1104
  var FLEET_MAX_DISK_FREE_BYTES = 2 ** 60;
@@ -1500,6 +1508,152 @@ var EVER_STATS_SIGNATURE_HEADER = CONSTANTS.stats_headers.signature;
1500
1508
  var EVER_STATS_KEY_ID_HEADER = CONSTANTS.stats_headers.key_id;
1501
1509
  var EVER_STATS_SIGNATURE_PREFIX = CONSTANTS.stats_signature_prefix;
1502
1510
  var EVER_STATS_MAX_BODY_BYTES = CONSTANTS.stats.max_bytes;
1511
+ var DOMAIN_EVENT_CATALOG = [
1512
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
1513
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
1514
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
1515
+ {
1516
+ type: "organization.member.added",
1517
+ domain: "organization",
1518
+ aggregateType: "organization",
1519
+ phase: "P1",
1520
+ child: "member"
1521
+ },
1522
+ {
1523
+ type: "organization.member.updated",
1524
+ domain: "organization",
1525
+ aggregateType: "organization",
1526
+ phase: "P1",
1527
+ child: "member"
1528
+ },
1529
+ {
1530
+ type: "organization.member.removed",
1531
+ domain: "organization",
1532
+ aggregateType: "organization",
1533
+ phase: "P1",
1534
+ child: "member"
1535
+ },
1536
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
1537
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
1538
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
1539
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
1540
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
1541
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
1542
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
1543
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
1544
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1545
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1546
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1547
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1548
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1549
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
1550
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
1551
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
1552
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
1553
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1554
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1555
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1556
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
1557
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
1558
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
1559
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
1560
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1561
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1562
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1563
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1564
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
1565
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
1566
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1567
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
1568
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
1569
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
1570
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1571
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
1572
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
1573
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
1574
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
1575
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
1576
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
1577
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
1578
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
1579
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1580
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1581
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1582
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1583
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1584
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1585
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1586
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1587
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1588
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1589
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1590
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1591
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1592
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
1593
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1594
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1595
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1596
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1597
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1598
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1599
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1600
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1601
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1602
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1603
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1604
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1605
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1606
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1607
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
1608
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
1609
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
1610
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
1611
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
1612
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
1613
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
1614
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
1615
+ ];
1616
+ var DOMAIN_EVENT_TYPES = DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
1617
+ var CATALOG_BY_TYPE = new Map(
1618
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
1619
+ );
1620
+ var RECIPIENT_SCOPED_EVENT_DOMAINS = {
1621
+ inbox: "inbox:read",
1622
+ email: "email:read"
1623
+ };
1624
+ var RECIPIENT_EVENT_SCOPES = Object.values(RECIPIENT_SCOPED_EVENT_DOMAINS);
1625
+ var INTEGRATION_SCOPES = [
1626
+ "org:read",
1627
+ "org:write",
1628
+ "members:read",
1629
+ "members:write",
1630
+ "agents:read",
1631
+ "teams:read",
1632
+ "teams:write",
1633
+ "works:read",
1634
+ "works:write",
1635
+ "missions:read",
1636
+ "missions:write",
1637
+ "goals:read",
1638
+ "goals:write",
1639
+ "ideas:read",
1640
+ "ideas:write",
1641
+ "tasks:read",
1642
+ "tasks:write",
1643
+ "inbox:read",
1644
+ "inbox:write",
1645
+ "kb:read",
1646
+ "kb:write",
1647
+ "email:read",
1648
+ "email:write",
1649
+ "events:read",
1650
+ "webhooks:manage",
1651
+ "links:write"
1652
+ ];
1653
+ var INTEGRATION_OPT_IN_SCOPES = ["org:write", "email:write"];
1654
+ var EVER_GAUZY_PRESET_SCOPES = INTEGRATION_SCOPES.filter(
1655
+ (scope) => !INTEGRATION_OPT_IN_SCOPES.includes(scope)
1656
+ );
1503
1657
 
1504
1658
  // ../../../node_modules/.pnpm/jsonrepair@3.13.2/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js
1505
1659
  var JSONRepairError = class extends Error {
@@ -6348,7 +6502,14 @@ var PLUGIN_CAPABILITIES = {
6348
6502
  // new category: the tier's plugin is a `deployment` plugin, so
6349
6503
  // `PLUGIN_CATEGORIES` is untouched and every exhaustive map over it in
6350
6504
  // `apps/web` stays total.
6351
- APPS_TIER: "apps-tier"
6505
+ APPS_TIER: "apps-tier",
6506
+ // Domain events (EW-P1-1) — plugins that follow the durable domain event
6507
+ // outbox (`task.updated`, `team.member.added`, …) through the relay, at
6508
+ // least once, with a per-plugin cursor. See
6509
+ // `capabilities/domain-event-subscriber.interface.ts`. Appended last, so
6510
+ // every existing constant keeps its value and its position; no category is
6511
+ // added (a subscriber plugin keeps the category of what it otherwise is).
6512
+ DOMAIN_EVENT_SUBSCRIBER: "domain-event-subscriber"
6352
6513
  };
6353
6514
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
6354
6515
  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,
@@ -1058,6 +1062,10 @@ var FLEET_AGENT_TASK_TIMELINE_MAX_BYTES = 48 * 1024;
1058
1062
  var FLEET_AGENT_TASK_TRANSCRIPT_MAX_BYTES = 64 * 1024;
1059
1063
  var FLEET_AGENT_TASK_QUESTION_MAX_FILE_BYTES = 64 * 1024;
1060
1064
  var FLEET_AGENT_TASK_QUESTION_MAX_CONTEXT_BYTES = 6 * 1024;
1065
+ var FLEET_MODEL_USAGE_LIMIT_FALLBACK_MS = 60 * 60 * 1e3;
1066
+ var FLEET_MODEL_USAGE_LIMIT_MIN_MS = 60 * 1e3;
1067
+ var FLEET_MODEL_USAGE_LIMIT_MAX_MS = 8 * 24 * 60 * 60 * 1e3;
1068
+ var FLEET_MODEL_USAGE_LIMIT_RESET_SLACK_MS = 60 * 1e3;
1061
1069
  var FLEET_NODE_MAX_MEMORY_MB = 1024 * 1024;
1062
1070
  var FLEET_MAX_DAILY_COST_CEILING_CENTS = 1e5 * 100;
1063
1071
  var FLEET_MAX_DISK_FREE_BYTES = 2 ** 60;
@@ -1467,6 +1475,152 @@ var EVER_STATS_SIGNATURE_HEADER = CONSTANTS.stats_headers.signature;
1467
1475
  var EVER_STATS_KEY_ID_HEADER = CONSTANTS.stats_headers.key_id;
1468
1476
  var EVER_STATS_SIGNATURE_PREFIX = CONSTANTS.stats_signature_prefix;
1469
1477
  var EVER_STATS_MAX_BODY_BYTES = CONSTANTS.stats.max_bytes;
1478
+ var DOMAIN_EVENT_CATALOG = [
1479
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
1480
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
1481
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
1482
+ {
1483
+ type: "organization.member.added",
1484
+ domain: "organization",
1485
+ aggregateType: "organization",
1486
+ phase: "P1",
1487
+ child: "member"
1488
+ },
1489
+ {
1490
+ type: "organization.member.updated",
1491
+ domain: "organization",
1492
+ aggregateType: "organization",
1493
+ phase: "P1",
1494
+ child: "member"
1495
+ },
1496
+ {
1497
+ type: "organization.member.removed",
1498
+ domain: "organization",
1499
+ aggregateType: "organization",
1500
+ phase: "P1",
1501
+ child: "member"
1502
+ },
1503
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
1504
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
1505
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
1506
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
1507
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
1508
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
1509
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
1510
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
1511
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1512
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1513
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
1514
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1515
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
1516
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
1517
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
1518
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
1519
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
1520
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1521
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1522
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
1523
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
1524
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
1525
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
1526
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
1527
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1528
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
1529
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1530
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
1531
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
1532
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
1533
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1534
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
1535
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
1536
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
1537
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
1538
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
1539
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
1540
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
1541
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
1542
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
1543
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
1544
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
1545
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
1546
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1547
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
1548
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1549
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
1550
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1551
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
1552
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1553
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
1554
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1555
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1556
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
1557
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1558
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
1559
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
1560
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1561
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1562
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1563
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1564
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1565
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1566
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1567
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1568
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1569
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1570
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1571
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1572
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1573
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
1574
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
1575
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
1576
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
1577
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
1578
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
1579
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
1580
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
1581
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
1582
+ ];
1583
+ var DOMAIN_EVENT_TYPES = DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
1584
+ var CATALOG_BY_TYPE = new Map(
1585
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
1586
+ );
1587
+ var RECIPIENT_SCOPED_EVENT_DOMAINS = {
1588
+ inbox: "inbox:read",
1589
+ email: "email:read"
1590
+ };
1591
+ var RECIPIENT_EVENT_SCOPES = Object.values(RECIPIENT_SCOPED_EVENT_DOMAINS);
1592
+ var INTEGRATION_SCOPES = [
1593
+ "org:read",
1594
+ "org:write",
1595
+ "members:read",
1596
+ "members:write",
1597
+ "agents:read",
1598
+ "teams:read",
1599
+ "teams:write",
1600
+ "works:read",
1601
+ "works:write",
1602
+ "missions:read",
1603
+ "missions:write",
1604
+ "goals:read",
1605
+ "goals:write",
1606
+ "ideas:read",
1607
+ "ideas:write",
1608
+ "tasks:read",
1609
+ "tasks:write",
1610
+ "inbox:read",
1611
+ "inbox:write",
1612
+ "kb:read",
1613
+ "kb:write",
1614
+ "email:read",
1615
+ "email:write",
1616
+ "events:read",
1617
+ "webhooks:manage",
1618
+ "links:write"
1619
+ ];
1620
+ var INTEGRATION_OPT_IN_SCOPES = ["org:write", "email:write"];
1621
+ var EVER_GAUZY_PRESET_SCOPES = INTEGRATION_SCOPES.filter(
1622
+ (scope) => !INTEGRATION_OPT_IN_SCOPES.includes(scope)
1623
+ );
1470
1624
 
1471
1625
  // ../../../node_modules/.pnpm/jsonrepair@3.13.2/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js
1472
1626
  var JSONRepairError = class extends Error {
@@ -6315,7 +6469,14 @@ var PLUGIN_CAPABILITIES = {
6315
6469
  // new category: the tier's plugin is a `deployment` plugin, so
6316
6470
  // `PLUGIN_CATEGORIES` is untouched and every exhaustive map over it in
6317
6471
  // `apps/web` stays total.
6318
- APPS_TIER: "apps-tier"
6472
+ APPS_TIER: "apps-tier",
6473
+ // Domain events (EW-P1-1) — plugins that follow the durable domain event
6474
+ // outbox (`task.updated`, `team.member.added`, …) through the relay, at
6475
+ // least once, with a per-plugin cursor. See
6476
+ // `capabilities/domain-event-subscriber.interface.ts`. Appended last, so
6477
+ // every existing constant keeps its value and its position; no category is
6478
+ // added (a subscriber plugin keeps the category of what it otherwise is).
6479
+ DOMAIN_EVENT_SUBSCRIBER: "domain-event-subscriber"
6319
6480
  };
6320
6481
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
6321
6482
  function initializePipelineState(stepDefinitions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/gemini-plugin",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Gemini Generator Plugin - Full pipeline plugin that delegates generation to Gemini CLI",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -33,14 +33,14 @@
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.6"
37
37
  },
38
38
  "devDependencies": {
39
- "@ever-works/plugin": "^1.2.4",
39
+ "@ever-works/plugin": "^1.2.6",
40
40
  "@types/node": "^26.6.4",
41
41
  "tsup": "^8.0.0",
42
42
  "typescript": "^5.9.3",
43
- "vitest": "^4.1.0"
43
+ "vitest": "^5.0.5"
44
44
  },
45
45
  "everworks": {
46
46
  "plugin": {
@@ -74,8 +74,8 @@
74
74
  "url": "https://github.com/ever-works/ever-works/issues"
75
75
  },
76
76
  "everworksRelease": {
77
- "contentHash": "sha256:ac236bf82b4ad5e3d4d232d1647f8e3d0536aa7eda91382793d5f9c1bab1946e",
78
- "commit": "61b8320b4ad7d30bf5161acf7ee13b250a6172b9",
79
- "source": "https://github.com/ever-works/ever-works/tree/61b8320b4ad7d30bf5161acf7ee13b250a6172b9/packages/plugins/gemini"
77
+ "contentHash": "sha256:eb4c2010c3e35ed418784291731d8d54cd6a501128b8529338cb2d8865cb2fc3",
78
+ "commit": "48bb7f0a20744cbdfae87675743421804e100af6",
79
+ "source": "https://github.com/ever-works/ever-works/tree/48bb7f0a20744cbdfae87675743421804e100af6/packages/plugins/gemini"
80
80
  }
81
81
  }