@ever-works/slack-channel-plugin 1.0.4 → 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
@@ -97,10 +97,14 @@ var USER_SELECTABLE_WORK_KINDS = [
97
97
  "repo",
98
98
  "app"
99
99
  ];
100
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
100
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
101
101
  new Set(WORK_KINDS);
102
102
  var GOAL_KINDS = ["metric", "delivery"];
103
103
  new Set(GOAL_KINDS);
104
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
105
+ new Set(RECORD_VISIBILITIES);
106
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
107
+ new Set(RECORD_LIST_VIEWS);
104
108
  var VERSION = "1.0.0";
105
109
  var GTM_SKILLS = [
106
110
  // ── research ────────────────────────────────────────────────────────
@@ -806,6 +810,115 @@ var ACTION_CATEGORIES = Object.freeze([
806
810
  Object.freeze(
807
811
  ACTION_CATEGORIES.filter((c) => c !== "read.internal")
808
812
  );
813
+ var DOMAIN_EVENT_CATALOG = [
814
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
815
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
816
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
817
+ {
818
+ type: "organization.member.added",
819
+ domain: "organization",
820
+ aggregateType: "organization",
821
+ phase: "P1",
822
+ child: "member"
823
+ },
824
+ {
825
+ type: "organization.member.updated",
826
+ domain: "organization",
827
+ aggregateType: "organization",
828
+ phase: "P1",
829
+ child: "member"
830
+ },
831
+ {
832
+ type: "organization.member.removed",
833
+ domain: "organization",
834
+ aggregateType: "organization",
835
+ phase: "P1",
836
+ child: "member"
837
+ },
838
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
839
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
840
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
841
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
842
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
843
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
844
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
845
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
846
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
847
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
848
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
849
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
850
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
851
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
852
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
853
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
854
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
855
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
856
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
857
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
858
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
859
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
860
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
861
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
862
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
863
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
864
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
865
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
866
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
867
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
868
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
869
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
870
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
871
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
872
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
873
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
874
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
875
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
876
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
877
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
878
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
879
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
880
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
881
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
882
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
883
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
884
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
885
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
886
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
887
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
888
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
889
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
890
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
891
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
892
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
893
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
894
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
895
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
896
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
897
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
898
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
899
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
900
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
901
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
902
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
903
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
904
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
905
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
906
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
907
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
908
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
909
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
910
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
911
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
912
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
913
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
914
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
915
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
916
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
917
+ ];
918
+ DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
919
+ new Map(
920
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
921
+ );
809
922
  var PLUGIN_CAPABILITIES = {
810
923
  // Notifications v2 (sibling of EW-650) — Notification Channels.
811
924
  // Plugins declare `NOTIFICATION_CHANNEL` (umbrella) plus the
package/dist/index.js CHANGED
@@ -95,10 +95,14 @@ var USER_SELECTABLE_WORK_KINDS = [
95
95
  "repo",
96
96
  "app"
97
97
  ];
98
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
98
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
99
99
  new Set(WORK_KINDS);
100
100
  var GOAL_KINDS = ["metric", "delivery"];
101
101
  new Set(GOAL_KINDS);
102
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
103
+ new Set(RECORD_VISIBILITIES);
104
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
105
+ new Set(RECORD_LIST_VIEWS);
102
106
  var VERSION = "1.0.0";
103
107
  var GTM_SKILLS = [
104
108
  // ── research ────────────────────────────────────────────────────────
@@ -804,6 +808,115 @@ var ACTION_CATEGORIES = Object.freeze([
804
808
  Object.freeze(
805
809
  ACTION_CATEGORIES.filter((c) => c !== "read.internal")
806
810
  );
811
+ var DOMAIN_EVENT_CATALOG = [
812
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
813
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
814
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
815
+ {
816
+ type: "organization.member.added",
817
+ domain: "organization",
818
+ aggregateType: "organization",
819
+ phase: "P1",
820
+ child: "member"
821
+ },
822
+ {
823
+ type: "organization.member.updated",
824
+ domain: "organization",
825
+ aggregateType: "organization",
826
+ phase: "P1",
827
+ child: "member"
828
+ },
829
+ {
830
+ type: "organization.member.removed",
831
+ domain: "organization",
832
+ aggregateType: "organization",
833
+ phase: "P1",
834
+ child: "member"
835
+ },
836
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
837
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
838
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
839
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
840
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
841
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
842
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
843
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
844
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
845
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
846
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
847
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
848
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
849
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
850
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
851
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
852
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
853
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
854
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
855
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
856
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
857
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
858
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
859
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
860
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
861
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
862
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
863
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
864
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
865
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
866
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
867
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
868
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
869
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
870
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
871
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
872
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
873
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
874
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
875
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
876
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
877
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
878
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
879
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
880
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
881
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
882
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
883
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
884
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
885
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
886
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
887
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
888
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
889
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
890
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
891
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
892
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
893
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
894
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
895
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
896
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
897
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
898
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
899
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
900
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
901
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
902
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
903
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
904
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
905
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
906
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
907
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
908
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
909
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
910
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
911
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
912
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
913
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
914
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
915
+ ];
916
+ DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
917
+ new Map(
918
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
919
+ );
807
920
  var PLUGIN_CAPABILITIES = {
808
921
  // Notifications v2 (sibling of EW-650) — Notification Channels.
809
922
  // Plugins declare `NOTIFICATION_CHANNEL` (umbrella) plus the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/slack-channel-plugin",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Slack notification-channel plugin for Ever Works platform",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -32,14 +32,14 @@
32
32
  "test:watch": "vitest"
33
33
  },
34
34
  "dependencies": {
35
- "@ever-works/plugin": "^1.2.4",
35
+ "@ever-works/plugin": "^1.2.5",
36
36
  "@slack/webhook": "^7.0.5"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^26.6.4",
40
40
  "tsup": "^8.0.0",
41
41
  "typescript": "^5.9.3",
42
- "vitest": "^4.1.0"
42
+ "vitest": "^5.0.5"
43
43
  },
44
44
  "everworks": {
45
45
  "plugin": {
@@ -78,8 +78,8 @@
78
78
  "url": "https://github.com/ever-works/ever-works/issues"
79
79
  },
80
80
  "everworksRelease": {
81
- "contentHash": "sha256:b3855701edf8459aa02027544d111b821c3d77fa2364d04f7bf9f870013d413b",
82
- "commit": "61b8320b4ad7d30bf5161acf7ee13b250a6172b9",
83
- "source": "https://github.com/ever-works/ever-works/tree/61b8320b4ad7d30bf5161acf7ee13b250a6172b9/packages/plugins/slack-channel"
81
+ "contentHash": "sha256:51d143a36e6e780c8a5a4b03c9903418a57454a74da2b9194079e9c7772ee2b0",
82
+ "commit": "19905c70cf05be3bc523db030597046067cd322a",
83
+ "source": "https://github.com/ever-works/ever-works/tree/19905c70cf05be3bc523db030597046067cd322a/packages/plugins/slack-channel"
84
84
  }
85
85
  }