@ever-works/resend-plugin 1.0.6 → 1.0.8

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
@@ -57,6 +57,7 @@ var PROBLEM_CODES = [
57
57
  "already_connected",
58
58
  "already_linked",
59
59
  "already_claimed",
60
+ "claim_locked",
60
61
  "invalid_client",
61
62
  "public_jwk_invalid",
62
63
  "identifier_claimed",
@@ -82,6 +83,11 @@ var PROBLEM_CODES = [
82
83
  "database_absent",
83
84
  "database_unreachable",
84
85
  "topic_private",
86
+ "realtime_disabled",
87
+ "topic_forbidden",
88
+ "topic_invalid",
89
+ "realtime_busy",
90
+ "too_many_streams",
85
91
  "keys_unavailable",
86
92
  "internal_error"
87
93
  ];
@@ -711,6 +717,110 @@ var FLEET_LINK_CONTROL_TYPES = [
711
717
  ];
712
718
  new Set(FLEET_LINK_CONTROL_TYPES);
713
719
  new TextEncoder();
720
+ var FLEET_RUN_TOKEN_ROUTES = Object.freeze([
721
+ // Works — reads, plus the settings update (its merge / check / command
722
+ // fields are refused for run tokens by the Works controller).
723
+ { method: "GET", pathPattern: "/api/works" },
724
+ { method: "GET", pathPattern: "/api/works/{id}" },
725
+ { method: "PUT", pathPattern: "/api/works/{id}" },
726
+ { method: "GET", pathPattern: "/api/works/{id}/config" },
727
+ { method: "GET", pathPattern: "/api/works/{id}/items" },
728
+ { method: "GET", pathPattern: "/api/works/{id}/categories-tags" },
729
+ { method: "GET", pathPattern: "/api/works/{id}/history" },
730
+ { method: "GET", pathPattern: "/api/works/{id}/generator-form" },
731
+ { method: "GET", pathPattern: "/api/works/{id}/schedule" },
732
+ { method: "GET", pathPattern: "/api/works/{id}/comparisons" },
733
+ { method: "GET", pathPattern: "/api/works/{id}/comparisons/{slug}" },
734
+ // Knowledge Base (`apps/mcp/src/tools/kb`). A document a run token writes
735
+ // lands `proposed` (review-gated), see the KB controller. No unlock.
736
+ { method: "GET", pathPattern: "/api/works/{id}/kb/documents" },
737
+ { method: "POST", pathPattern: "/api/works/{id}/kb/documents" },
738
+ { method: "GET", pathPattern: "/api/works/{id}/kb/documents/{docIdOrPath}" },
739
+ { method: "PATCH", pathPattern: "/api/works/{id}/kb/documents/{docId}" },
740
+ { method: "POST", pathPattern: "/api/works/{id}/kb/documents/{docId}/lock" },
741
+ // Deploy — reads and the capability check only.
742
+ { method: "GET", pathPattern: "/api/deploy/works/{id}/domains" },
743
+ { method: "GET", pathPattern: "/api/deploy/providers" },
744
+ { method: "POST", pathPattern: "/api/deploy/works/{id}/check" },
745
+ // Plugins — read only.
746
+ { method: "GET", pathPattern: "/api/plugins" },
747
+ { method: "GET", pathPattern: "/api/plugins/{pluginId}" },
748
+ // Missions — reads, plus pause (the safe direction).
749
+ { method: "GET", pathPattern: "/api/me/missions" },
750
+ { method: "GET", pathPattern: "/api/me/missions/{id}" },
751
+ { method: "GET", pathPattern: "/api/me/missions/{id}/budget" },
752
+ { method: "GET", pathPattern: "/api/me/missions/{id}/works" },
753
+ { method: "POST", pathPattern: "/api/me/missions/{id}/pause" },
754
+ // Ideas — reads, plus filing a new Idea (a proposal a person builds).
755
+ { method: "POST", pathPattern: "/api/me/work-proposals" },
756
+ { method: "GET", pathPattern: "/api/me/work-proposals" },
757
+ { method: "GET", pathPattern: "/api/me/work-proposals/status" },
758
+ { method: "GET", pathPattern: "/api/me/work-proposals/preferences" },
759
+ { method: "GET", pathPattern: "/api/me/work-proposals/{id}" },
760
+ { method: "GET", pathPattern: "/api/me/work-proposals/{id}/budget" },
761
+ // Account-wide usage.
762
+ { method: "GET", pathPattern: "/api/me/usage/account-wide" },
763
+ // Tasks — reads and collaboration writes. Create / update / transition /
764
+ // assign / chat carry body refusals for run tokens in the Tasks
765
+ // controller (no checks, no schedule, no force, no dispatch, no @agent).
766
+ { method: "GET", pathPattern: "/api/tasks" },
767
+ { method: "POST", pathPattern: "/api/tasks" },
768
+ { method: "GET", pathPattern: "/api/tasks/{id}" },
769
+ { method: "PATCH", pathPattern: "/api/tasks/{id}" },
770
+ { method: "GET", pathPattern: "/api/tasks/{id}/subtasks" },
771
+ { method: "GET", pathPattern: "/api/tasks/{id}/activity" },
772
+ { method: "POST", pathPattern: "/api/tasks/{id}/transition" },
773
+ { method: "GET", pathPattern: "/api/tasks/{id}/run-candidates" },
774
+ { method: "GET", pathPattern: "/api/tasks/{id}/pr-status" },
775
+ { method: "GET", pathPattern: "/api/tasks/{id}/diff" },
776
+ { method: "POST", pathPattern: "/api/tasks/{id}/assignees" },
777
+ { method: "POST", pathPattern: "/api/tasks/{id}/reviewers" },
778
+ { method: "POST", pathPattern: "/api/tasks/{id}/approvers" },
779
+ { method: "POST", pathPattern: "/api/tasks/{id}/relations" },
780
+ { method: "GET", pathPattern: "/api/tasks/{id}/escalations" },
781
+ { method: "GET", pathPattern: "/api/tasks/{id}/chat" },
782
+ { method: "POST", pathPattern: "/api/tasks/{id}/chat" },
783
+ { method: "GET", pathPattern: "/api/tasks/{id}/spend" },
784
+ // Inbox — read only (no reply, no archive / delete / mark-read).
785
+ { method: "GET", pathPattern: "/api/inbox" },
786
+ { method: "GET", pathPattern: "/api/inbox/unread-count" },
787
+ { method: "GET", pathPattern: "/api/inbox/{id}" },
788
+ // Goals — reads, a draft create, field-limited update, pause, and the
789
+ // ASKING side of the definition of done (propose, never approve).
790
+ { method: "GET", pathPattern: "/api/me/goals" },
791
+ { method: "POST", pathPattern: "/api/me/goals" },
792
+ { method: "GET", pathPattern: "/api/me/goals/{id}" },
793
+ { method: "PATCH", pathPattern: "/api/me/goals/{id}" },
794
+ { method: "GET", pathPattern: "/api/me/goals/{id}/samples" },
795
+ { method: "POST", pathPattern: "/api/me/goals/{id}/pause" },
796
+ { method: "POST", pathPattern: "/api/me/goals/{id}/dod/propose" },
797
+ // Fleet — reads only.
798
+ { method: "GET", pathPattern: "/api/fleet/nodes" },
799
+ { method: "GET", pathPattern: "/api/fleet/nodes/{id}" },
800
+ { method: "GET", pathPattern: "/api/fleet/runner-status" },
801
+ { method: "GET", pathPattern: "/api/fleet/execution-preferences" },
802
+ { method: "GET", pathPattern: "/api/fleet/agents/{agentId}/node-affinity" },
803
+ // Agents — reads, plus cancel and pause (the safe direction).
804
+ { method: "GET", pathPattern: "/api/agents" },
805
+ { method: "GET", pathPattern: "/api/agents/{id}" },
806
+ { method: "GET", pathPattern: "/api/agents/{id}/runs" },
807
+ { method: "GET", pathPattern: "/api/agents/{id}/runs/{runId}" },
808
+ { method: "POST", pathPattern: "/api/agents/{id}/runs/{runId}/cancel" },
809
+ { method: "POST", pathPattern: "/api/agents/{id}/pause" },
810
+ { method: "GET", pathPattern: "/api/agents/{id}/budget" },
811
+ // Agent Plugins — read only (installing a package installs instructions).
812
+ { method: "GET", pathPattern: "/api/agent-plugins" },
813
+ { method: "GET", pathPattern: "/api/agent-plugins/findings" },
814
+ { method: "GET", pathPattern: "/api/agent-plugins/catalog" },
815
+ { method: "GET", pathPattern: "/api/agent-plugins/updates" }
816
+ ]);
817
+ function splitSegments(normalizedPath) {
818
+ return normalizedPath.split("/").filter((segment) => segment.length > 0);
819
+ }
820
+ FLEET_RUN_TOKEN_ROUTES.map((route) => ({
821
+ method: route.method.toUpperCase(),
822
+ shape: splitSegments(route.pathPattern).map((part) => /^\{[^}]+\}$/.test(part) ? "*" : part.toLowerCase())
823
+ }));
714
824
  var EMAIL_INBOX_CAP_FIELDS = [
715
825
  "inboxDailySends",
716
826
  "inboxBurstSends",
package/dist/index.js CHANGED
@@ -55,6 +55,7 @@ var PROBLEM_CODES = [
55
55
  "already_connected",
56
56
  "already_linked",
57
57
  "already_claimed",
58
+ "claim_locked",
58
59
  "invalid_client",
59
60
  "public_jwk_invalid",
60
61
  "identifier_claimed",
@@ -80,6 +81,11 @@ var PROBLEM_CODES = [
80
81
  "database_absent",
81
82
  "database_unreachable",
82
83
  "topic_private",
84
+ "realtime_disabled",
85
+ "topic_forbidden",
86
+ "topic_invalid",
87
+ "realtime_busy",
88
+ "too_many_streams",
83
89
  "keys_unavailable",
84
90
  "internal_error"
85
91
  ];
@@ -709,6 +715,110 @@ var FLEET_LINK_CONTROL_TYPES = [
709
715
  ];
710
716
  new Set(FLEET_LINK_CONTROL_TYPES);
711
717
  new TextEncoder();
718
+ var FLEET_RUN_TOKEN_ROUTES = Object.freeze([
719
+ // Works — reads, plus the settings update (its merge / check / command
720
+ // fields are refused for run tokens by the Works controller).
721
+ { method: "GET", pathPattern: "/api/works" },
722
+ { method: "GET", pathPattern: "/api/works/{id}" },
723
+ { method: "PUT", pathPattern: "/api/works/{id}" },
724
+ { method: "GET", pathPattern: "/api/works/{id}/config" },
725
+ { method: "GET", pathPattern: "/api/works/{id}/items" },
726
+ { method: "GET", pathPattern: "/api/works/{id}/categories-tags" },
727
+ { method: "GET", pathPattern: "/api/works/{id}/history" },
728
+ { method: "GET", pathPattern: "/api/works/{id}/generator-form" },
729
+ { method: "GET", pathPattern: "/api/works/{id}/schedule" },
730
+ { method: "GET", pathPattern: "/api/works/{id}/comparisons" },
731
+ { method: "GET", pathPattern: "/api/works/{id}/comparisons/{slug}" },
732
+ // Knowledge Base (`apps/mcp/src/tools/kb`). A document a run token writes
733
+ // lands `proposed` (review-gated), see the KB controller. No unlock.
734
+ { method: "GET", pathPattern: "/api/works/{id}/kb/documents" },
735
+ { method: "POST", pathPattern: "/api/works/{id}/kb/documents" },
736
+ { method: "GET", pathPattern: "/api/works/{id}/kb/documents/{docIdOrPath}" },
737
+ { method: "PATCH", pathPattern: "/api/works/{id}/kb/documents/{docId}" },
738
+ { method: "POST", pathPattern: "/api/works/{id}/kb/documents/{docId}/lock" },
739
+ // Deploy — reads and the capability check only.
740
+ { method: "GET", pathPattern: "/api/deploy/works/{id}/domains" },
741
+ { method: "GET", pathPattern: "/api/deploy/providers" },
742
+ { method: "POST", pathPattern: "/api/deploy/works/{id}/check" },
743
+ // Plugins — read only.
744
+ { method: "GET", pathPattern: "/api/plugins" },
745
+ { method: "GET", pathPattern: "/api/plugins/{pluginId}" },
746
+ // Missions — reads, plus pause (the safe direction).
747
+ { method: "GET", pathPattern: "/api/me/missions" },
748
+ { method: "GET", pathPattern: "/api/me/missions/{id}" },
749
+ { method: "GET", pathPattern: "/api/me/missions/{id}/budget" },
750
+ { method: "GET", pathPattern: "/api/me/missions/{id}/works" },
751
+ { method: "POST", pathPattern: "/api/me/missions/{id}/pause" },
752
+ // Ideas — reads, plus filing a new Idea (a proposal a person builds).
753
+ { method: "POST", pathPattern: "/api/me/work-proposals" },
754
+ { method: "GET", pathPattern: "/api/me/work-proposals" },
755
+ { method: "GET", pathPattern: "/api/me/work-proposals/status" },
756
+ { method: "GET", pathPattern: "/api/me/work-proposals/preferences" },
757
+ { method: "GET", pathPattern: "/api/me/work-proposals/{id}" },
758
+ { method: "GET", pathPattern: "/api/me/work-proposals/{id}/budget" },
759
+ // Account-wide usage.
760
+ { method: "GET", pathPattern: "/api/me/usage/account-wide" },
761
+ // Tasks — reads and collaboration writes. Create / update / transition /
762
+ // assign / chat carry body refusals for run tokens in the Tasks
763
+ // controller (no checks, no schedule, no force, no dispatch, no @agent).
764
+ { method: "GET", pathPattern: "/api/tasks" },
765
+ { method: "POST", pathPattern: "/api/tasks" },
766
+ { method: "GET", pathPattern: "/api/tasks/{id}" },
767
+ { method: "PATCH", pathPattern: "/api/tasks/{id}" },
768
+ { method: "GET", pathPattern: "/api/tasks/{id}/subtasks" },
769
+ { method: "GET", pathPattern: "/api/tasks/{id}/activity" },
770
+ { method: "POST", pathPattern: "/api/tasks/{id}/transition" },
771
+ { method: "GET", pathPattern: "/api/tasks/{id}/run-candidates" },
772
+ { method: "GET", pathPattern: "/api/tasks/{id}/pr-status" },
773
+ { method: "GET", pathPattern: "/api/tasks/{id}/diff" },
774
+ { method: "POST", pathPattern: "/api/tasks/{id}/assignees" },
775
+ { method: "POST", pathPattern: "/api/tasks/{id}/reviewers" },
776
+ { method: "POST", pathPattern: "/api/tasks/{id}/approvers" },
777
+ { method: "POST", pathPattern: "/api/tasks/{id}/relations" },
778
+ { method: "GET", pathPattern: "/api/tasks/{id}/escalations" },
779
+ { method: "GET", pathPattern: "/api/tasks/{id}/chat" },
780
+ { method: "POST", pathPattern: "/api/tasks/{id}/chat" },
781
+ { method: "GET", pathPattern: "/api/tasks/{id}/spend" },
782
+ // Inbox — read only (no reply, no archive / delete / mark-read).
783
+ { method: "GET", pathPattern: "/api/inbox" },
784
+ { method: "GET", pathPattern: "/api/inbox/unread-count" },
785
+ { method: "GET", pathPattern: "/api/inbox/{id}" },
786
+ // Goals — reads, a draft create, field-limited update, pause, and the
787
+ // ASKING side of the definition of done (propose, never approve).
788
+ { method: "GET", pathPattern: "/api/me/goals" },
789
+ { method: "POST", pathPattern: "/api/me/goals" },
790
+ { method: "GET", pathPattern: "/api/me/goals/{id}" },
791
+ { method: "PATCH", pathPattern: "/api/me/goals/{id}" },
792
+ { method: "GET", pathPattern: "/api/me/goals/{id}/samples" },
793
+ { method: "POST", pathPattern: "/api/me/goals/{id}/pause" },
794
+ { method: "POST", pathPattern: "/api/me/goals/{id}/dod/propose" },
795
+ // Fleet — reads only.
796
+ { method: "GET", pathPattern: "/api/fleet/nodes" },
797
+ { method: "GET", pathPattern: "/api/fleet/nodes/{id}" },
798
+ { method: "GET", pathPattern: "/api/fleet/runner-status" },
799
+ { method: "GET", pathPattern: "/api/fleet/execution-preferences" },
800
+ { method: "GET", pathPattern: "/api/fleet/agents/{agentId}/node-affinity" },
801
+ // Agents — reads, plus cancel and pause (the safe direction).
802
+ { method: "GET", pathPattern: "/api/agents" },
803
+ { method: "GET", pathPattern: "/api/agents/{id}" },
804
+ { method: "GET", pathPattern: "/api/agents/{id}/runs" },
805
+ { method: "GET", pathPattern: "/api/agents/{id}/runs/{runId}" },
806
+ { method: "POST", pathPattern: "/api/agents/{id}/runs/{runId}/cancel" },
807
+ { method: "POST", pathPattern: "/api/agents/{id}/pause" },
808
+ { method: "GET", pathPattern: "/api/agents/{id}/budget" },
809
+ // Agent Plugins — read only (installing a package installs instructions).
810
+ { method: "GET", pathPattern: "/api/agent-plugins" },
811
+ { method: "GET", pathPattern: "/api/agent-plugins/findings" },
812
+ { method: "GET", pathPattern: "/api/agent-plugins/catalog" },
813
+ { method: "GET", pathPattern: "/api/agent-plugins/updates" }
814
+ ]);
815
+ function splitSegments(normalizedPath) {
816
+ return normalizedPath.split("/").filter((segment) => segment.length > 0);
817
+ }
818
+ FLEET_RUN_TOKEN_ROUTES.map((route) => ({
819
+ method: route.method.toUpperCase(),
820
+ shape: splitSegments(route.pathPattern).map((part) => /^\{[^}]+\}$/.test(part) ? "*" : part.toLowerCase())
821
+ }));
712
822
  var EMAIL_INBOX_CAP_FIELDS = [
713
823
  "inboxDailySends",
714
824
  "inboxBurstSends",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/resend-plugin",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Resend email provider plugin (outbound only) 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
  "resend": "^4.5.1"
37
37
  },
38
38
  "devDependencies": {
@@ -82,8 +82,8 @@
82
82
  "url": "https://github.com/ever-works/ever-works/issues"
83
83
  },
84
84
  "everworksRelease": {
85
- "contentHash": "sha256:5fe74eac0cda0e7e6fac1eea00082c452a681718b0e25cdcf19a7f00248d1a1b",
86
- "commit": "54552a4d2dcb0e2d5213b0a47fd3ffcbd432f73c",
87
- "source": "https://github.com/ever-works/ever-works/tree/54552a4d2dcb0e2d5213b0a47fd3ffcbd432f73c/packages/plugins/resend"
85
+ "contentHash": "sha256:b629d653e100b8015f386c0dc6cef799504996fcc013fc1bdd38505ac417e875",
86
+ "commit": "efd11a2282ea3e514e93f754b9b008543a7cff60",
87
+ "source": "https://github.com/ever-works/ever-works/tree/efd11a2282ea3e514e93f754b9b008543a7cff60/packages/plugins/resend"
88
88
  }
89
89
  }