@ever-works/discord-connector-plugin 1.0.2 → 1.0.4

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
@@ -3,6 +3,88 @@
3
3
  var discord_js = require('discord.js');
4
4
 
5
5
  // src/discord-connector-plugin.ts
6
+ var PROBLEM_CODES = [
7
+ "validation_failed",
8
+ "not_found",
9
+ "unauthorized",
10
+ "forbidden_role",
11
+ "forbidden_scope",
12
+ "ambiguous_credentials",
13
+ "credential_revoked",
14
+ "instance_disconnected",
15
+ "instance_pending_approval",
16
+ "not_connection_owner",
17
+ "integration_disabled",
18
+ "integration_revoked",
19
+ "denied_by_policy",
20
+ "integration_not_available",
21
+ "entitlement_required",
22
+ "tier_required",
23
+ "limit_exceeded",
24
+ "rate_limited",
25
+ "idempotency_mismatch",
26
+ "idempotency_in_progress",
27
+ "stale_version",
28
+ "module_disabled",
29
+ "handle_taken",
30
+ "handle_reserved",
31
+ "handle_retired",
32
+ "handle_invalid",
33
+ "handle_held",
34
+ "handle_held_by_you",
35
+ "code_invalid",
36
+ "code_expired",
37
+ "product_mismatch",
38
+ "product_not_supported",
39
+ "key_mismatch",
40
+ "signature_invalid",
41
+ "unlinked_org",
42
+ "schema_violation",
43
+ "mirror_owned_field",
44
+ "illegal_transition",
45
+ "already_exists",
46
+ "already_completed",
47
+ "billing_active",
48
+ "sso_required",
49
+ "reauth_required",
50
+ "session_required",
51
+ "step_up_required",
52
+ "session_bound",
53
+ "authorization_pending",
54
+ "slow_down",
55
+ "expired_token",
56
+ "already_connected",
57
+ "already_linked",
58
+ "already_claimed",
59
+ "invalid_client",
60
+ "public_jwk_invalid",
61
+ "identifier_claimed",
62
+ "salt_version_unknown",
63
+ "salt_version_retired",
64
+ "hashes_invalid",
65
+ "lookup_key_required",
66
+ "required_component",
67
+ "resync_required",
68
+ "last_owner",
69
+ "last_auth_method",
70
+ "instances_linked",
71
+ "install_in_progress",
72
+ "slug_reserved",
73
+ "checklist_incomplete",
74
+ "scope_version_outdated",
75
+ "method_not_allowed",
76
+ "payload_too_large",
77
+ "unsupported_media_type",
78
+ "gone",
79
+ "unavailable",
80
+ "upstream",
81
+ "database_absent",
82
+ "database_unreachable",
83
+ "topic_private",
84
+ "keys_unavailable",
85
+ "internal_error"
86
+ ];
87
+ new Set(PROBLEM_CODES);
6
88
 
7
89
  // ../../contracts/dist/index.js
8
90
  var USER_SELECTABLE_WORK_KINDS = [
@@ -14,10 +96,14 @@ var USER_SELECTABLE_WORK_KINDS = [
14
96
  "repo",
15
97
  "app"
16
98
  ];
17
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
99
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
18
100
  new Set(WORK_KINDS);
19
101
  var GOAL_KINDS = ["metric", "delivery"];
20
102
  new Set(GOAL_KINDS);
103
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
104
+ new Set(RECORD_VISIBILITIES);
105
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
106
+ new Set(RECORD_LIST_VIEWS);
21
107
  var VERSION = "1.0.0";
22
108
  var GTM_SKILLS = [
23
109
  // ── research ────────────────────────────────────────────────────────
@@ -723,6 +809,115 @@ var ACTION_CATEGORIES = Object.freeze([
723
809
  Object.freeze(
724
810
  ACTION_CATEGORIES.filter((c) => c !== "read.internal")
725
811
  );
812
+ var DOMAIN_EVENT_CATALOG = [
813
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
814
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
815
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
816
+ {
817
+ type: "organization.member.added",
818
+ domain: "organization",
819
+ aggregateType: "organization",
820
+ phase: "P1",
821
+ child: "member"
822
+ },
823
+ {
824
+ type: "organization.member.updated",
825
+ domain: "organization",
826
+ aggregateType: "organization",
827
+ phase: "P1",
828
+ child: "member"
829
+ },
830
+ {
831
+ type: "organization.member.removed",
832
+ domain: "organization",
833
+ aggregateType: "organization",
834
+ phase: "P1",
835
+ child: "member"
836
+ },
837
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
838
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
839
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
840
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
841
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
842
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
843
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
844
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
845
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
846
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
847
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
848
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
849
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
850
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
851
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
852
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
853
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
854
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
855
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
856
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
857
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
858
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
859
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
860
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
861
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
862
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
863
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
864
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
865
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
866
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
867
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
868
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
869
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
870
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
871
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
872
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
873
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
874
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
875
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
876
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
877
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
878
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
879
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
880
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
881
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
882
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
883
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
884
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
885
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
886
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
887
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
888
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
889
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
890
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
891
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
892
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
893
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
894
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
895
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
896
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
897
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
898
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
899
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
900
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
901
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
902
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
903
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
904
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
905
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
906
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
907
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
908
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
909
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
910
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
911
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
912
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
913
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
914
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
915
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
916
+ ];
917
+ DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
918
+ new Map(
919
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
920
+ );
726
921
  var PLUGIN_CAPABILITIES = {
727
922
  // Connectors ("Connector fabric") — first-party BIDIRECTIONAL
728
923
  // communication-channel plugins. Each connector declares `CONNECTOR`
package/dist/index.js CHANGED
@@ -1,6 +1,88 @@
1
1
  import { REST } from 'discord.js';
2
2
 
3
3
  // src/discord-connector-plugin.ts
4
+ var PROBLEM_CODES = [
5
+ "validation_failed",
6
+ "not_found",
7
+ "unauthorized",
8
+ "forbidden_role",
9
+ "forbidden_scope",
10
+ "ambiguous_credentials",
11
+ "credential_revoked",
12
+ "instance_disconnected",
13
+ "instance_pending_approval",
14
+ "not_connection_owner",
15
+ "integration_disabled",
16
+ "integration_revoked",
17
+ "denied_by_policy",
18
+ "integration_not_available",
19
+ "entitlement_required",
20
+ "tier_required",
21
+ "limit_exceeded",
22
+ "rate_limited",
23
+ "idempotency_mismatch",
24
+ "idempotency_in_progress",
25
+ "stale_version",
26
+ "module_disabled",
27
+ "handle_taken",
28
+ "handle_reserved",
29
+ "handle_retired",
30
+ "handle_invalid",
31
+ "handle_held",
32
+ "handle_held_by_you",
33
+ "code_invalid",
34
+ "code_expired",
35
+ "product_mismatch",
36
+ "product_not_supported",
37
+ "key_mismatch",
38
+ "signature_invalid",
39
+ "unlinked_org",
40
+ "schema_violation",
41
+ "mirror_owned_field",
42
+ "illegal_transition",
43
+ "already_exists",
44
+ "already_completed",
45
+ "billing_active",
46
+ "sso_required",
47
+ "reauth_required",
48
+ "session_required",
49
+ "step_up_required",
50
+ "session_bound",
51
+ "authorization_pending",
52
+ "slow_down",
53
+ "expired_token",
54
+ "already_connected",
55
+ "already_linked",
56
+ "already_claimed",
57
+ "invalid_client",
58
+ "public_jwk_invalid",
59
+ "identifier_claimed",
60
+ "salt_version_unknown",
61
+ "salt_version_retired",
62
+ "hashes_invalid",
63
+ "lookup_key_required",
64
+ "required_component",
65
+ "resync_required",
66
+ "last_owner",
67
+ "last_auth_method",
68
+ "instances_linked",
69
+ "install_in_progress",
70
+ "slug_reserved",
71
+ "checklist_incomplete",
72
+ "scope_version_outdated",
73
+ "method_not_allowed",
74
+ "payload_too_large",
75
+ "unsupported_media_type",
76
+ "gone",
77
+ "unavailable",
78
+ "upstream",
79
+ "database_absent",
80
+ "database_unreachable",
81
+ "topic_private",
82
+ "keys_unavailable",
83
+ "internal_error"
84
+ ];
85
+ new Set(PROBLEM_CODES);
4
86
 
5
87
  // ../../contracts/dist/index.js
6
88
  var USER_SELECTABLE_WORK_KINDS = [
@@ -12,10 +94,14 @@ var USER_SELECTABLE_WORK_KINDS = [
12
94
  "repo",
13
95
  "app"
14
96
  ];
15
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
97
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
16
98
  new Set(WORK_KINDS);
17
99
  var GOAL_KINDS = ["metric", "delivery"];
18
100
  new Set(GOAL_KINDS);
101
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
102
+ new Set(RECORD_VISIBILITIES);
103
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
104
+ new Set(RECORD_LIST_VIEWS);
19
105
  var VERSION = "1.0.0";
20
106
  var GTM_SKILLS = [
21
107
  // ── research ────────────────────────────────────────────────────────
@@ -721,6 +807,115 @@ var ACTION_CATEGORIES = Object.freeze([
721
807
  Object.freeze(
722
808
  ACTION_CATEGORIES.filter((c) => c !== "read.internal")
723
809
  );
810
+ var DOMAIN_EVENT_CATALOG = [
811
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
812
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
813
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
814
+ {
815
+ type: "organization.member.added",
816
+ domain: "organization",
817
+ aggregateType: "organization",
818
+ phase: "P1",
819
+ child: "member"
820
+ },
821
+ {
822
+ type: "organization.member.updated",
823
+ domain: "organization",
824
+ aggregateType: "organization",
825
+ phase: "P1",
826
+ child: "member"
827
+ },
828
+ {
829
+ type: "organization.member.removed",
830
+ domain: "organization",
831
+ aggregateType: "organization",
832
+ phase: "P1",
833
+ child: "member"
834
+ },
835
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
836
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
837
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
838
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
839
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
840
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
841
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
842
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
843
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
844
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
845
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
846
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
847
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
848
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
849
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
850
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
851
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
852
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
853
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
854
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
855
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
856
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
857
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
858
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
859
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
860
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
861
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
862
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
863
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
864
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
865
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
866
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
867
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
868
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
869
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
870
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
871
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
872
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
873
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
874
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
875
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
876
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
877
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
878
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
879
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
880
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
881
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
882
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
883
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
884
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
885
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
886
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
887
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
888
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
889
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
890
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
891
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
892
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
893
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
894
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
895
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
896
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
897
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
898
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
899
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
900
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
901
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
902
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
903
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
904
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
905
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
906
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
907
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
908
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
909
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
910
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
911
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
912
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
913
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
914
+ ];
915
+ DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
916
+ new Map(
917
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
918
+ );
724
919
  var PLUGIN_CAPABILITIES = {
725
920
  // Connectors ("Connector fabric") — first-party BIDIRECTIONAL
726
921
  // communication-channel plugins. Each connector declares `CONNECTOR`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/discord-connector-plugin",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Discord connector plugin for Ever Works platform (bidirectional; outbound channel-message posting via discord.js REST)",
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.3",
35
+ "@ever-works/plugin": "^1.2.5",
36
36
  "discord.js": "^14.16.0"
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": {
@@ -101,8 +101,8 @@
101
101
  "url": "https://github.com/ever-works/ever-works/issues"
102
102
  },
103
103
  "everworksRelease": {
104
- "contentHash": "sha256:fb4f4467f05beb9a515c4b6f6a89d0d7e749e54e16a8942a2459220c94082f1c",
105
- "commit": "481654e1181e43571ceb71e50ec465d9df360cb2",
106
- "source": "https://github.com/ever-works/ever-works/tree/481654e1181e43571ceb71e50ec465d9df360cb2/packages/plugins/discord-connector"
104
+ "contentHash": "sha256:83900d5e37c8a30d21e7992df07d10a4f39a6581408b835aa1294471fdbb8c24",
105
+ "commit": "19905c70cf05be3bc523db030597046067cd322a",
106
+ "source": "https://github.com/ever-works/ever-works/tree/19905c70cf05be3bc523db030597046067cd322a/packages/plugins/discord-connector"
107
107
  }
108
108
  }