@ever-works/mailgun-plugin 1.0.8 → 1.0.9

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
@@ -723,6 +723,110 @@ var FLEET_LINK_CONTROL_TYPES = [
723
723
  ];
724
724
  new Set(FLEET_LINK_CONTROL_TYPES);
725
725
  new TextEncoder();
726
+ var FLEET_RUN_TOKEN_ROUTES = Object.freeze([
727
+ // Works — reads, plus the settings update (its merge / check / command
728
+ // fields are refused for run tokens by the Works controller).
729
+ { method: "GET", pathPattern: "/api/works" },
730
+ { method: "GET", pathPattern: "/api/works/{id}" },
731
+ { method: "PUT", pathPattern: "/api/works/{id}" },
732
+ { method: "GET", pathPattern: "/api/works/{id}/config" },
733
+ { method: "GET", pathPattern: "/api/works/{id}/items" },
734
+ { method: "GET", pathPattern: "/api/works/{id}/categories-tags" },
735
+ { method: "GET", pathPattern: "/api/works/{id}/history" },
736
+ { method: "GET", pathPattern: "/api/works/{id}/generator-form" },
737
+ { method: "GET", pathPattern: "/api/works/{id}/schedule" },
738
+ { method: "GET", pathPattern: "/api/works/{id}/comparisons" },
739
+ { method: "GET", pathPattern: "/api/works/{id}/comparisons/{slug}" },
740
+ // Knowledge Base (`apps/mcp/src/tools/kb`). A document a run token writes
741
+ // lands `proposed` (review-gated), see the KB controller. No unlock.
742
+ { method: "GET", pathPattern: "/api/works/{id}/kb/documents" },
743
+ { method: "POST", pathPattern: "/api/works/{id}/kb/documents" },
744
+ { method: "GET", pathPattern: "/api/works/{id}/kb/documents/{docIdOrPath}" },
745
+ { method: "PATCH", pathPattern: "/api/works/{id}/kb/documents/{docId}" },
746
+ { method: "POST", pathPattern: "/api/works/{id}/kb/documents/{docId}/lock" },
747
+ // Deploy — reads and the capability check only.
748
+ { method: "GET", pathPattern: "/api/deploy/works/{id}/domains" },
749
+ { method: "GET", pathPattern: "/api/deploy/providers" },
750
+ { method: "POST", pathPattern: "/api/deploy/works/{id}/check" },
751
+ // Plugins — read only.
752
+ { method: "GET", pathPattern: "/api/plugins" },
753
+ { method: "GET", pathPattern: "/api/plugins/{pluginId}" },
754
+ // Missions — reads, plus pause (the safe direction).
755
+ { method: "GET", pathPattern: "/api/me/missions" },
756
+ { method: "GET", pathPattern: "/api/me/missions/{id}" },
757
+ { method: "GET", pathPattern: "/api/me/missions/{id}/budget" },
758
+ { method: "GET", pathPattern: "/api/me/missions/{id}/works" },
759
+ { method: "POST", pathPattern: "/api/me/missions/{id}/pause" },
760
+ // Ideas — reads, plus filing a new Idea (a proposal a person builds).
761
+ { method: "POST", pathPattern: "/api/me/work-proposals" },
762
+ { method: "GET", pathPattern: "/api/me/work-proposals" },
763
+ { method: "GET", pathPattern: "/api/me/work-proposals/status" },
764
+ { method: "GET", pathPattern: "/api/me/work-proposals/preferences" },
765
+ { method: "GET", pathPattern: "/api/me/work-proposals/{id}" },
766
+ { method: "GET", pathPattern: "/api/me/work-proposals/{id}/budget" },
767
+ // Account-wide usage.
768
+ { method: "GET", pathPattern: "/api/me/usage/account-wide" },
769
+ // Tasks — reads and collaboration writes. Create / update / transition /
770
+ // assign / chat carry body refusals for run tokens in the Tasks
771
+ // controller (no checks, no schedule, no force, no dispatch, no @agent).
772
+ { method: "GET", pathPattern: "/api/tasks" },
773
+ { method: "POST", pathPattern: "/api/tasks" },
774
+ { method: "GET", pathPattern: "/api/tasks/{id}" },
775
+ { method: "PATCH", pathPattern: "/api/tasks/{id}" },
776
+ { method: "GET", pathPattern: "/api/tasks/{id}/subtasks" },
777
+ { method: "GET", pathPattern: "/api/tasks/{id}/activity" },
778
+ { method: "POST", pathPattern: "/api/tasks/{id}/transition" },
779
+ { method: "GET", pathPattern: "/api/tasks/{id}/run-candidates" },
780
+ { method: "GET", pathPattern: "/api/tasks/{id}/pr-status" },
781
+ { method: "GET", pathPattern: "/api/tasks/{id}/diff" },
782
+ { method: "POST", pathPattern: "/api/tasks/{id}/assignees" },
783
+ { method: "POST", pathPattern: "/api/tasks/{id}/reviewers" },
784
+ { method: "POST", pathPattern: "/api/tasks/{id}/approvers" },
785
+ { method: "POST", pathPattern: "/api/tasks/{id}/relations" },
786
+ { method: "GET", pathPattern: "/api/tasks/{id}/escalations" },
787
+ { method: "GET", pathPattern: "/api/tasks/{id}/chat" },
788
+ { method: "POST", pathPattern: "/api/tasks/{id}/chat" },
789
+ { method: "GET", pathPattern: "/api/tasks/{id}/spend" },
790
+ // Inbox — read only (no reply, no archive / delete / mark-read).
791
+ { method: "GET", pathPattern: "/api/inbox" },
792
+ { method: "GET", pathPattern: "/api/inbox/unread-count" },
793
+ { method: "GET", pathPattern: "/api/inbox/{id}" },
794
+ // Goals — reads, a draft create, field-limited update, pause, and the
795
+ // ASKING side of the definition of done (propose, never approve).
796
+ { method: "GET", pathPattern: "/api/me/goals" },
797
+ { method: "POST", pathPattern: "/api/me/goals" },
798
+ { method: "GET", pathPattern: "/api/me/goals/{id}" },
799
+ { method: "PATCH", pathPattern: "/api/me/goals/{id}" },
800
+ { method: "GET", pathPattern: "/api/me/goals/{id}/samples" },
801
+ { method: "POST", pathPattern: "/api/me/goals/{id}/pause" },
802
+ { method: "POST", pathPattern: "/api/me/goals/{id}/dod/propose" },
803
+ // Fleet — reads only.
804
+ { method: "GET", pathPattern: "/api/fleet/nodes" },
805
+ { method: "GET", pathPattern: "/api/fleet/nodes/{id}" },
806
+ { method: "GET", pathPattern: "/api/fleet/runner-status" },
807
+ { method: "GET", pathPattern: "/api/fleet/execution-preferences" },
808
+ { method: "GET", pathPattern: "/api/fleet/agents/{agentId}/node-affinity" },
809
+ // Agents — reads, plus cancel and pause (the safe direction).
810
+ { method: "GET", pathPattern: "/api/agents" },
811
+ { method: "GET", pathPattern: "/api/agents/{id}" },
812
+ { method: "GET", pathPattern: "/api/agents/{id}/runs" },
813
+ { method: "GET", pathPattern: "/api/agents/{id}/runs/{runId}" },
814
+ { method: "POST", pathPattern: "/api/agents/{id}/runs/{runId}/cancel" },
815
+ { method: "POST", pathPattern: "/api/agents/{id}/pause" },
816
+ { method: "GET", pathPattern: "/api/agents/{id}/budget" },
817
+ // Agent Plugins — read only (installing a package installs instructions).
818
+ { method: "GET", pathPattern: "/api/agent-plugins" },
819
+ { method: "GET", pathPattern: "/api/agent-plugins/findings" },
820
+ { method: "GET", pathPattern: "/api/agent-plugins/catalog" },
821
+ { method: "GET", pathPattern: "/api/agent-plugins/updates" }
822
+ ]);
823
+ function splitSegments(normalizedPath) {
824
+ return normalizedPath.split("/").filter((segment) => segment.length > 0);
825
+ }
826
+ FLEET_RUN_TOKEN_ROUTES.map((route) => ({
827
+ method: route.method.toUpperCase(),
828
+ shape: splitSegments(route.pathPattern).map((part) => /^\{[^}]+\}$/.test(part) ? "*" : part.toLowerCase())
829
+ }));
726
830
  var EMAIL_INBOX_CAP_FIELDS = [
727
831
  "inboxDailySends",
728
832
  "inboxBurstSends",
package/dist/index.js CHANGED
@@ -716,6 +716,110 @@ var FLEET_LINK_CONTROL_TYPES = [
716
716
  ];
717
717
  new Set(FLEET_LINK_CONTROL_TYPES);
718
718
  new TextEncoder();
719
+ var FLEET_RUN_TOKEN_ROUTES = Object.freeze([
720
+ // Works — reads, plus the settings update (its merge / check / command
721
+ // fields are refused for run tokens by the Works controller).
722
+ { method: "GET", pathPattern: "/api/works" },
723
+ { method: "GET", pathPattern: "/api/works/{id}" },
724
+ { method: "PUT", pathPattern: "/api/works/{id}" },
725
+ { method: "GET", pathPattern: "/api/works/{id}/config" },
726
+ { method: "GET", pathPattern: "/api/works/{id}/items" },
727
+ { method: "GET", pathPattern: "/api/works/{id}/categories-tags" },
728
+ { method: "GET", pathPattern: "/api/works/{id}/history" },
729
+ { method: "GET", pathPattern: "/api/works/{id}/generator-form" },
730
+ { method: "GET", pathPattern: "/api/works/{id}/schedule" },
731
+ { method: "GET", pathPattern: "/api/works/{id}/comparisons" },
732
+ { method: "GET", pathPattern: "/api/works/{id}/comparisons/{slug}" },
733
+ // Knowledge Base (`apps/mcp/src/tools/kb`). A document a run token writes
734
+ // lands `proposed` (review-gated), see the KB controller. No unlock.
735
+ { method: "GET", pathPattern: "/api/works/{id}/kb/documents" },
736
+ { method: "POST", pathPattern: "/api/works/{id}/kb/documents" },
737
+ { method: "GET", pathPattern: "/api/works/{id}/kb/documents/{docIdOrPath}" },
738
+ { method: "PATCH", pathPattern: "/api/works/{id}/kb/documents/{docId}" },
739
+ { method: "POST", pathPattern: "/api/works/{id}/kb/documents/{docId}/lock" },
740
+ // Deploy — reads and the capability check only.
741
+ { method: "GET", pathPattern: "/api/deploy/works/{id}/domains" },
742
+ { method: "GET", pathPattern: "/api/deploy/providers" },
743
+ { method: "POST", pathPattern: "/api/deploy/works/{id}/check" },
744
+ // Plugins — read only.
745
+ { method: "GET", pathPattern: "/api/plugins" },
746
+ { method: "GET", pathPattern: "/api/plugins/{pluginId}" },
747
+ // Missions — reads, plus pause (the safe direction).
748
+ { method: "GET", pathPattern: "/api/me/missions" },
749
+ { method: "GET", pathPattern: "/api/me/missions/{id}" },
750
+ { method: "GET", pathPattern: "/api/me/missions/{id}/budget" },
751
+ { method: "GET", pathPattern: "/api/me/missions/{id}/works" },
752
+ { method: "POST", pathPattern: "/api/me/missions/{id}/pause" },
753
+ // Ideas — reads, plus filing a new Idea (a proposal a person builds).
754
+ { method: "POST", pathPattern: "/api/me/work-proposals" },
755
+ { method: "GET", pathPattern: "/api/me/work-proposals" },
756
+ { method: "GET", pathPattern: "/api/me/work-proposals/status" },
757
+ { method: "GET", pathPattern: "/api/me/work-proposals/preferences" },
758
+ { method: "GET", pathPattern: "/api/me/work-proposals/{id}" },
759
+ { method: "GET", pathPattern: "/api/me/work-proposals/{id}/budget" },
760
+ // Account-wide usage.
761
+ { method: "GET", pathPattern: "/api/me/usage/account-wide" },
762
+ // Tasks — reads and collaboration writes. Create / update / transition /
763
+ // assign / chat carry body refusals for run tokens in the Tasks
764
+ // controller (no checks, no schedule, no force, no dispatch, no @agent).
765
+ { method: "GET", pathPattern: "/api/tasks" },
766
+ { method: "POST", pathPattern: "/api/tasks" },
767
+ { method: "GET", pathPattern: "/api/tasks/{id}" },
768
+ { method: "PATCH", pathPattern: "/api/tasks/{id}" },
769
+ { method: "GET", pathPattern: "/api/tasks/{id}/subtasks" },
770
+ { method: "GET", pathPattern: "/api/tasks/{id}/activity" },
771
+ { method: "POST", pathPattern: "/api/tasks/{id}/transition" },
772
+ { method: "GET", pathPattern: "/api/tasks/{id}/run-candidates" },
773
+ { method: "GET", pathPattern: "/api/tasks/{id}/pr-status" },
774
+ { method: "GET", pathPattern: "/api/tasks/{id}/diff" },
775
+ { method: "POST", pathPattern: "/api/tasks/{id}/assignees" },
776
+ { method: "POST", pathPattern: "/api/tasks/{id}/reviewers" },
777
+ { method: "POST", pathPattern: "/api/tasks/{id}/approvers" },
778
+ { method: "POST", pathPattern: "/api/tasks/{id}/relations" },
779
+ { method: "GET", pathPattern: "/api/tasks/{id}/escalations" },
780
+ { method: "GET", pathPattern: "/api/tasks/{id}/chat" },
781
+ { method: "POST", pathPattern: "/api/tasks/{id}/chat" },
782
+ { method: "GET", pathPattern: "/api/tasks/{id}/spend" },
783
+ // Inbox — read only (no reply, no archive / delete / mark-read).
784
+ { method: "GET", pathPattern: "/api/inbox" },
785
+ { method: "GET", pathPattern: "/api/inbox/unread-count" },
786
+ { method: "GET", pathPattern: "/api/inbox/{id}" },
787
+ // Goals — reads, a draft create, field-limited update, pause, and the
788
+ // ASKING side of the definition of done (propose, never approve).
789
+ { method: "GET", pathPattern: "/api/me/goals" },
790
+ { method: "POST", pathPattern: "/api/me/goals" },
791
+ { method: "GET", pathPattern: "/api/me/goals/{id}" },
792
+ { method: "PATCH", pathPattern: "/api/me/goals/{id}" },
793
+ { method: "GET", pathPattern: "/api/me/goals/{id}/samples" },
794
+ { method: "POST", pathPattern: "/api/me/goals/{id}/pause" },
795
+ { method: "POST", pathPattern: "/api/me/goals/{id}/dod/propose" },
796
+ // Fleet — reads only.
797
+ { method: "GET", pathPattern: "/api/fleet/nodes" },
798
+ { method: "GET", pathPattern: "/api/fleet/nodes/{id}" },
799
+ { method: "GET", pathPattern: "/api/fleet/runner-status" },
800
+ { method: "GET", pathPattern: "/api/fleet/execution-preferences" },
801
+ { method: "GET", pathPattern: "/api/fleet/agents/{agentId}/node-affinity" },
802
+ // Agents — reads, plus cancel and pause (the safe direction).
803
+ { method: "GET", pathPattern: "/api/agents" },
804
+ { method: "GET", pathPattern: "/api/agents/{id}" },
805
+ { method: "GET", pathPattern: "/api/agents/{id}/runs" },
806
+ { method: "GET", pathPattern: "/api/agents/{id}/runs/{runId}" },
807
+ { method: "POST", pathPattern: "/api/agents/{id}/runs/{runId}/cancel" },
808
+ { method: "POST", pathPattern: "/api/agents/{id}/pause" },
809
+ { method: "GET", pathPattern: "/api/agents/{id}/budget" },
810
+ // Agent Plugins — read only (installing a package installs instructions).
811
+ { method: "GET", pathPattern: "/api/agent-plugins" },
812
+ { method: "GET", pathPattern: "/api/agent-plugins/findings" },
813
+ { method: "GET", pathPattern: "/api/agent-plugins/catalog" },
814
+ { method: "GET", pathPattern: "/api/agent-plugins/updates" }
815
+ ]);
816
+ function splitSegments(normalizedPath) {
817
+ return normalizedPath.split("/").filter((segment) => segment.length > 0);
818
+ }
819
+ FLEET_RUN_TOKEN_ROUTES.map((route) => ({
820
+ method: route.method.toUpperCase(),
821
+ shape: splitSegments(route.pathPattern).map((part) => /^\{[^}]+\}$/.test(part) ? "*" : part.toLowerCase())
822
+ }));
719
823
  var EMAIL_INBOX_CAP_FIELDS = [
720
824
  "inboxDailySends",
721
825
  "inboxBurstSends",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/mailgun-plugin",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Mailgun email provider plugin (outbound + inbound) for Ever Works platform",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -32,7 +32,7 @@
32
32
  "test:watch": "vitest"
33
33
  },
34
34
  "dependencies": {
35
- "@ever-works/plugin": "^1.2.6",
35
+ "@ever-works/plugin": "^1.2.8",
36
36
  "form-data": "^4.0.1",
37
37
  "mailgun.js": "^10.2.3"
38
38
  },
@@ -102,8 +102,8 @@
102
102
  "url": "https://github.com/ever-works/ever-works/issues"
103
103
  },
104
104
  "everworksRelease": {
105
- "contentHash": "sha256:b79265a2c363efec27556b88b54d5eac537b52e7ae490fb7ee5d59f10bf08414",
106
- "commit": "eff002871bfd7f9f8e0f984907f45265ae8b01e0",
107
- "source": "https://github.com/ever-works/ever-works/tree/eff002871bfd7f9f8e0f984907f45265ae8b01e0/packages/plugins/mailgun"
105
+ "contentHash": "sha256:476242a6a45ad445d43d067421a984d3651649a1768cca6ee4d4a9214fbbf086",
106
+ "commit": "efd11a2282ea3e514e93f754b9b008543a7cff60",
107
+ "source": "https://github.com/ever-works/ever-works/tree/efd11a2282ea3e514e93f754b9b008543a7cff60/packages/plugins/mailgun"
108
108
  }
109
109
  }