@ever-works/sim-ai-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
@@ -5379,10 +5379,14 @@ var USER_SELECTABLE_WORK_KINDS = [
5379
5379
  "repo",
5380
5380
  "app"
5381
5381
  ];
5382
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
5382
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
5383
5383
  var WORK_KIND_SET = new Set(WORK_KINDS);
5384
5384
  var GOAL_KINDS = ["metric", "delivery"];
5385
5385
  var GOAL_KIND_SET = new Set(GOAL_KINDS);
5386
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
5387
+ var RECORD_VISIBILITY_SET = new Set(RECORD_VISIBILITIES);
5388
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
5389
+ var RECORD_LIST_VIEW_SET = new Set(RECORD_LIST_VIEWS);
5386
5390
  var APP_DEPENDENCY_BACKUP_OVERDUE_MS = 26 * 36e5;
5387
5391
  var APP_DEPENDENCY_MANAGED = {
5388
5392
  pgRoleConnectionLimit: 20,
@@ -6175,6 +6179,10 @@ var FLEET_AGENT_TASK_TIMELINE_MAX_BYTES = 48 * 1024;
6175
6179
  var FLEET_AGENT_TASK_TRANSCRIPT_MAX_BYTES = 64 * 1024;
6176
6180
  var FLEET_AGENT_TASK_QUESTION_MAX_FILE_BYTES = 64 * 1024;
6177
6181
  var FLEET_AGENT_TASK_QUESTION_MAX_CONTEXT_BYTES = 6 * 1024;
6182
+ var FLEET_MODEL_USAGE_LIMIT_FALLBACK_MS = 60 * 60 * 1e3;
6183
+ var FLEET_MODEL_USAGE_LIMIT_MIN_MS = 60 * 1e3;
6184
+ var FLEET_MODEL_USAGE_LIMIT_MAX_MS = 8 * 24 * 60 * 60 * 1e3;
6185
+ var FLEET_MODEL_USAGE_LIMIT_RESET_SLACK_MS = 60 * 1e3;
6178
6186
  var FLEET_NODE_MAX_MEMORY_MB = 1024 * 1024;
6179
6187
  var FLEET_MAX_DAILY_COST_CEILING_CENTS = 1e5 * 100;
6180
6188
  var FLEET_MAX_DISK_FREE_BYTES = 2 ** 60;
@@ -6584,6 +6592,152 @@ var EVER_STATS_SIGNATURE_HEADER = CONSTANTS.stats_headers.signature;
6584
6592
  var EVER_STATS_KEY_ID_HEADER = CONSTANTS.stats_headers.key_id;
6585
6593
  var EVER_STATS_SIGNATURE_PREFIX = CONSTANTS.stats_signature_prefix;
6586
6594
  var EVER_STATS_MAX_BODY_BYTES = CONSTANTS.stats.max_bytes;
6595
+ var DOMAIN_EVENT_CATALOG = [
6596
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
6597
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
6598
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
6599
+ {
6600
+ type: "organization.member.added",
6601
+ domain: "organization",
6602
+ aggregateType: "organization",
6603
+ phase: "P1",
6604
+ child: "member"
6605
+ },
6606
+ {
6607
+ type: "organization.member.updated",
6608
+ domain: "organization",
6609
+ aggregateType: "organization",
6610
+ phase: "P1",
6611
+ child: "member"
6612
+ },
6613
+ {
6614
+ type: "organization.member.removed",
6615
+ domain: "organization",
6616
+ aggregateType: "organization",
6617
+ phase: "P1",
6618
+ child: "member"
6619
+ },
6620
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
6621
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
6622
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
6623
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
6624
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
6625
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
6626
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
6627
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
6628
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
6629
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
6630
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
6631
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
6632
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
6633
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
6634
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
6635
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
6636
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
6637
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
6638
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
6639
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
6640
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
6641
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
6642
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
6643
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
6644
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
6645
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
6646
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
6647
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
6648
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
6649
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
6650
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
6651
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
6652
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
6653
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
6654
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
6655
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
6656
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
6657
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
6658
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
6659
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
6660
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
6661
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
6662
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
6663
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
6664
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
6665
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
6666
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
6667
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
6668
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
6669
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
6670
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
6671
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
6672
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
6673
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
6674
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
6675
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
6676
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
6677
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
6678
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
6679
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
6680
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
6681
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6682
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6683
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6684
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6685
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6686
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6687
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6688
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
6689
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
6690
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
6691
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
6692
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
6693
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
6694
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
6695
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
6696
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
6697
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
6698
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
6699
+ ];
6700
+ var DOMAIN_EVENT_TYPES = DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
6701
+ var CATALOG_BY_TYPE = new Map(
6702
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
6703
+ );
6704
+ var RECIPIENT_SCOPED_EVENT_DOMAINS = {
6705
+ inbox: "inbox:read",
6706
+ email: "email:read"
6707
+ };
6708
+ var RECIPIENT_EVENT_SCOPES = Object.values(RECIPIENT_SCOPED_EVENT_DOMAINS);
6709
+ var INTEGRATION_SCOPES = [
6710
+ "org:read",
6711
+ "org:write",
6712
+ "members:read",
6713
+ "members:write",
6714
+ "agents:read",
6715
+ "teams:read",
6716
+ "teams:write",
6717
+ "works:read",
6718
+ "works:write",
6719
+ "missions:read",
6720
+ "missions:write",
6721
+ "goals:read",
6722
+ "goals:write",
6723
+ "ideas:read",
6724
+ "ideas:write",
6725
+ "tasks:read",
6726
+ "tasks:write",
6727
+ "inbox:read",
6728
+ "inbox:write",
6729
+ "kb:read",
6730
+ "kb:write",
6731
+ "email:read",
6732
+ "email:write",
6733
+ "events:read",
6734
+ "webhooks:manage",
6735
+ "links:write"
6736
+ ];
6737
+ var INTEGRATION_OPT_IN_SCOPES = ["org:write", "email:write"];
6738
+ var EVER_GAUZY_PRESET_SCOPES = INTEGRATION_SCOPES.filter(
6739
+ (scope) => !INTEGRATION_OPT_IN_SCOPES.includes(scope)
6740
+ );
6587
6741
 
6588
6742
  // ../../plugin/dist/index.js
6589
6743
  var DEFAULT_DIFF_MAX_BYTES = 256 * 1024;
@@ -6730,7 +6884,14 @@ var PLUGIN_CAPABILITIES = {
6730
6884
  // new category: the tier's plugin is a `deployment` plugin, so
6731
6885
  // `PLUGIN_CATEGORIES` is untouched and every exhaustive map over it in
6732
6886
  // `apps/web` stays total.
6733
- APPS_TIER: "apps-tier"
6887
+ APPS_TIER: "apps-tier",
6888
+ // Domain events (EW-P1-1) — plugins that follow the durable domain event
6889
+ // outbox (`task.updated`, `team.member.added`, …) through the relay, at
6890
+ // least once, with a per-plugin cursor. See
6891
+ // `capabilities/domain-event-subscriber.interface.ts`. Appended last, so
6892
+ // every existing constant keeps its value and its position; no category is
6893
+ // added (a subscriber plugin keeps the category of what it otherwise is).
6894
+ DOMAIN_EVENT_SUBSCRIBER: "domain-event-subscriber"
6734
6895
  };
6735
6896
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
6736
6897
  function initializePipelineState(stepDefinitions) {
package/dist/index.js CHANGED
@@ -5375,10 +5375,14 @@ var USER_SELECTABLE_WORK_KINDS = [
5375
5375
  "repo",
5376
5376
  "app"
5377
5377
  ];
5378
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
5378
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
5379
5379
  var WORK_KIND_SET = new Set(WORK_KINDS);
5380
5380
  var GOAL_KINDS = ["metric", "delivery"];
5381
5381
  var GOAL_KIND_SET = new Set(GOAL_KINDS);
5382
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
5383
+ var RECORD_VISIBILITY_SET = new Set(RECORD_VISIBILITIES);
5384
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
5385
+ var RECORD_LIST_VIEW_SET = new Set(RECORD_LIST_VIEWS);
5382
5386
  var APP_DEPENDENCY_BACKUP_OVERDUE_MS = 26 * 36e5;
5383
5387
  var APP_DEPENDENCY_MANAGED = {
5384
5388
  pgRoleConnectionLimit: 20,
@@ -6171,6 +6175,10 @@ var FLEET_AGENT_TASK_TIMELINE_MAX_BYTES = 48 * 1024;
6171
6175
  var FLEET_AGENT_TASK_TRANSCRIPT_MAX_BYTES = 64 * 1024;
6172
6176
  var FLEET_AGENT_TASK_QUESTION_MAX_FILE_BYTES = 64 * 1024;
6173
6177
  var FLEET_AGENT_TASK_QUESTION_MAX_CONTEXT_BYTES = 6 * 1024;
6178
+ var FLEET_MODEL_USAGE_LIMIT_FALLBACK_MS = 60 * 60 * 1e3;
6179
+ var FLEET_MODEL_USAGE_LIMIT_MIN_MS = 60 * 1e3;
6180
+ var FLEET_MODEL_USAGE_LIMIT_MAX_MS = 8 * 24 * 60 * 60 * 1e3;
6181
+ var FLEET_MODEL_USAGE_LIMIT_RESET_SLACK_MS = 60 * 1e3;
6174
6182
  var FLEET_NODE_MAX_MEMORY_MB = 1024 * 1024;
6175
6183
  var FLEET_MAX_DAILY_COST_CEILING_CENTS = 1e5 * 100;
6176
6184
  var FLEET_MAX_DISK_FREE_BYTES = 2 ** 60;
@@ -6580,6 +6588,152 @@ var EVER_STATS_SIGNATURE_HEADER = CONSTANTS.stats_headers.signature;
6580
6588
  var EVER_STATS_KEY_ID_HEADER = CONSTANTS.stats_headers.key_id;
6581
6589
  var EVER_STATS_SIGNATURE_PREFIX = CONSTANTS.stats_signature_prefix;
6582
6590
  var EVER_STATS_MAX_BODY_BYTES = CONSTANTS.stats.max_bytes;
6591
+ var DOMAIN_EVENT_CATALOG = [
6592
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
6593
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
6594
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
6595
+ {
6596
+ type: "organization.member.added",
6597
+ domain: "organization",
6598
+ aggregateType: "organization",
6599
+ phase: "P1",
6600
+ child: "member"
6601
+ },
6602
+ {
6603
+ type: "organization.member.updated",
6604
+ domain: "organization",
6605
+ aggregateType: "organization",
6606
+ phase: "P1",
6607
+ child: "member"
6608
+ },
6609
+ {
6610
+ type: "organization.member.removed",
6611
+ domain: "organization",
6612
+ aggregateType: "organization",
6613
+ phase: "P1",
6614
+ child: "member"
6615
+ },
6616
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
6617
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
6618
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
6619
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
6620
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
6621
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
6622
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
6623
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
6624
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
6625
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
6626
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
6627
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
6628
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
6629
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
6630
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
6631
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
6632
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
6633
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
6634
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
6635
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
6636
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
6637
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
6638
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
6639
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
6640
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
6641
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
6642
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
6643
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
6644
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
6645
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
6646
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
6647
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
6648
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
6649
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
6650
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
6651
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
6652
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
6653
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
6654
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
6655
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
6656
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
6657
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
6658
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
6659
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
6660
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
6661
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
6662
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
6663
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
6664
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
6665
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
6666
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
6667
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
6668
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
6669
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
6670
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
6671
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
6672
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
6673
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
6674
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
6675
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
6676
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
6677
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6678
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6679
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6680
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6681
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6682
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6683
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
6684
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
6685
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
6686
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
6687
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
6688
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
6689
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
6690
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
6691
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
6692
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
6693
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
6694
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
6695
+ ];
6696
+ var DOMAIN_EVENT_TYPES = DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
6697
+ var CATALOG_BY_TYPE = new Map(
6698
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
6699
+ );
6700
+ var RECIPIENT_SCOPED_EVENT_DOMAINS = {
6701
+ inbox: "inbox:read",
6702
+ email: "email:read"
6703
+ };
6704
+ var RECIPIENT_EVENT_SCOPES = Object.values(RECIPIENT_SCOPED_EVENT_DOMAINS);
6705
+ var INTEGRATION_SCOPES = [
6706
+ "org:read",
6707
+ "org:write",
6708
+ "members:read",
6709
+ "members:write",
6710
+ "agents:read",
6711
+ "teams:read",
6712
+ "teams:write",
6713
+ "works:read",
6714
+ "works:write",
6715
+ "missions:read",
6716
+ "missions:write",
6717
+ "goals:read",
6718
+ "goals:write",
6719
+ "ideas:read",
6720
+ "ideas:write",
6721
+ "tasks:read",
6722
+ "tasks:write",
6723
+ "inbox:read",
6724
+ "inbox:write",
6725
+ "kb:read",
6726
+ "kb:write",
6727
+ "email:read",
6728
+ "email:write",
6729
+ "events:read",
6730
+ "webhooks:manage",
6731
+ "links:write"
6732
+ ];
6733
+ var INTEGRATION_OPT_IN_SCOPES = ["org:write", "email:write"];
6734
+ var EVER_GAUZY_PRESET_SCOPES = INTEGRATION_SCOPES.filter(
6735
+ (scope) => !INTEGRATION_OPT_IN_SCOPES.includes(scope)
6736
+ );
6583
6737
 
6584
6738
  // ../../plugin/dist/index.js
6585
6739
  var DEFAULT_DIFF_MAX_BYTES = 256 * 1024;
@@ -6726,7 +6880,14 @@ var PLUGIN_CAPABILITIES = {
6726
6880
  // new category: the tier's plugin is a `deployment` plugin, so
6727
6881
  // `PLUGIN_CATEGORIES` is untouched and every exhaustive map over it in
6728
6882
  // `apps/web` stays total.
6729
- APPS_TIER: "apps-tier"
6883
+ APPS_TIER: "apps-tier",
6884
+ // Domain events (EW-P1-1) — plugins that follow the durable domain event
6885
+ // outbox (`task.updated`, `team.member.added`, …) through the relay, at
6886
+ // least once, with a per-plugin cursor. See
6887
+ // `capabilities/domain-event-subscriber.interface.ts`. Appended last, so
6888
+ // every existing constant keeps its value and its position; no category is
6889
+ // added (a subscriber plugin keeps the category of what it otherwise is).
6890
+ DOMAIN_EVENT_SUBSCRIBER: "domain-event-subscriber"
6730
6891
  };
6731
6892
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
6732
6893
  function initializePipelineState(stepDefinitions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/sim-ai-plugin",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "SIM AI Workflow Pipeline Plugin - Delegates Work generation to SIM AI workflows",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -36,14 +36,14 @@
36
36
  "simstudio-ts-sdk": "^0.1.2"
37
37
  },
38
38
  "peerDependencies": {
39
- "@ever-works/plugin": "^1.2.4"
39
+ "@ever-works/plugin": "^1.2.6"
40
40
  },
41
41
  "devDependencies": {
42
- "@ever-works/plugin": "^1.2.4",
42
+ "@ever-works/plugin": "^1.2.6",
43
43
  "@types/node": "^26.6.4",
44
44
  "tsup": "^8.0.0",
45
45
  "typescript": "^5.9.3",
46
- "vitest": "^4.1.0"
46
+ "vitest": "^5.0.5"
47
47
  },
48
48
  "everworks": {
49
49
  "plugin": {
@@ -79,8 +79,8 @@
79
79
  "url": "https://github.com/ever-works/ever-works/issues"
80
80
  },
81
81
  "everworksRelease": {
82
- "contentHash": "sha256:9cdb92b7ea06d7c6ea8acc97cda79926e9dfdb30aa84380dd71abf32c600e33e",
83
- "commit": "61b8320b4ad7d30bf5161acf7ee13b250a6172b9",
84
- "source": "https://github.com/ever-works/ever-works/tree/61b8320b4ad7d30bf5161acf7ee13b250a6172b9/packages/plugins/sim-ai"
82
+ "contentHash": "sha256:f578919ecfc03b13914c2240674e97b9a3d91b7c156882607a164c1545c687d5",
83
+ "commit": "48bb7f0a20744cbdfae87675743421804e100af6",
84
+ "source": "https://github.com/ever-works/ever-works/tree/48bb7f0a20744cbdfae87675743421804e100af6/packages/plugins/sim-ai"
85
85
  }
86
86
  }