@ever-works/pty-local-plugin 1.0.6 → 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
@@ -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
@@ -719,6 +719,110 @@ var FLEET_LINK_CONTROL_TYPES = [
719
719
  ];
720
720
  new Set(FLEET_LINK_CONTROL_TYPES);
721
721
  new TextEncoder();
722
+ var FLEET_RUN_TOKEN_ROUTES = Object.freeze([
723
+ // Works — reads, plus the settings update (its merge / check / command
724
+ // fields are refused for run tokens by the Works controller).
725
+ { method: "GET", pathPattern: "/api/works" },
726
+ { method: "GET", pathPattern: "/api/works/{id}" },
727
+ { method: "PUT", pathPattern: "/api/works/{id}" },
728
+ { method: "GET", pathPattern: "/api/works/{id}/config" },
729
+ { method: "GET", pathPattern: "/api/works/{id}/items" },
730
+ { method: "GET", pathPattern: "/api/works/{id}/categories-tags" },
731
+ { method: "GET", pathPattern: "/api/works/{id}/history" },
732
+ { method: "GET", pathPattern: "/api/works/{id}/generator-form" },
733
+ { method: "GET", pathPattern: "/api/works/{id}/schedule" },
734
+ { method: "GET", pathPattern: "/api/works/{id}/comparisons" },
735
+ { method: "GET", pathPattern: "/api/works/{id}/comparisons/{slug}" },
736
+ // Knowledge Base (`apps/mcp/src/tools/kb`). A document a run token writes
737
+ // lands `proposed` (review-gated), see the KB controller. No unlock.
738
+ { method: "GET", pathPattern: "/api/works/{id}/kb/documents" },
739
+ { method: "POST", pathPattern: "/api/works/{id}/kb/documents" },
740
+ { method: "GET", pathPattern: "/api/works/{id}/kb/documents/{docIdOrPath}" },
741
+ { method: "PATCH", pathPattern: "/api/works/{id}/kb/documents/{docId}" },
742
+ { method: "POST", pathPattern: "/api/works/{id}/kb/documents/{docId}/lock" },
743
+ // Deploy — reads and the capability check only.
744
+ { method: "GET", pathPattern: "/api/deploy/works/{id}/domains" },
745
+ { method: "GET", pathPattern: "/api/deploy/providers" },
746
+ { method: "POST", pathPattern: "/api/deploy/works/{id}/check" },
747
+ // Plugins — read only.
748
+ { method: "GET", pathPattern: "/api/plugins" },
749
+ { method: "GET", pathPattern: "/api/plugins/{pluginId}" },
750
+ // Missions — reads, plus pause (the safe direction).
751
+ { method: "GET", pathPattern: "/api/me/missions" },
752
+ { method: "GET", pathPattern: "/api/me/missions/{id}" },
753
+ { method: "GET", pathPattern: "/api/me/missions/{id}/budget" },
754
+ { method: "GET", pathPattern: "/api/me/missions/{id}/works" },
755
+ { method: "POST", pathPattern: "/api/me/missions/{id}/pause" },
756
+ // Ideas — reads, plus filing a new Idea (a proposal a person builds).
757
+ { method: "POST", pathPattern: "/api/me/work-proposals" },
758
+ { method: "GET", pathPattern: "/api/me/work-proposals" },
759
+ { method: "GET", pathPattern: "/api/me/work-proposals/status" },
760
+ { method: "GET", pathPattern: "/api/me/work-proposals/preferences" },
761
+ { method: "GET", pathPattern: "/api/me/work-proposals/{id}" },
762
+ { method: "GET", pathPattern: "/api/me/work-proposals/{id}/budget" },
763
+ // Account-wide usage.
764
+ { method: "GET", pathPattern: "/api/me/usage/account-wide" },
765
+ // Tasks — reads and collaboration writes. Create / update / transition /
766
+ // assign / chat carry body refusals for run tokens in the Tasks
767
+ // controller (no checks, no schedule, no force, no dispatch, no @agent).
768
+ { method: "GET", pathPattern: "/api/tasks" },
769
+ { method: "POST", pathPattern: "/api/tasks" },
770
+ { method: "GET", pathPattern: "/api/tasks/{id}" },
771
+ { method: "PATCH", pathPattern: "/api/tasks/{id}" },
772
+ { method: "GET", pathPattern: "/api/tasks/{id}/subtasks" },
773
+ { method: "GET", pathPattern: "/api/tasks/{id}/activity" },
774
+ { method: "POST", pathPattern: "/api/tasks/{id}/transition" },
775
+ { method: "GET", pathPattern: "/api/tasks/{id}/run-candidates" },
776
+ { method: "GET", pathPattern: "/api/tasks/{id}/pr-status" },
777
+ { method: "GET", pathPattern: "/api/tasks/{id}/diff" },
778
+ { method: "POST", pathPattern: "/api/tasks/{id}/assignees" },
779
+ { method: "POST", pathPattern: "/api/tasks/{id}/reviewers" },
780
+ { method: "POST", pathPattern: "/api/tasks/{id}/approvers" },
781
+ { method: "POST", pathPattern: "/api/tasks/{id}/relations" },
782
+ { method: "GET", pathPattern: "/api/tasks/{id}/escalations" },
783
+ { method: "GET", pathPattern: "/api/tasks/{id}/chat" },
784
+ { method: "POST", pathPattern: "/api/tasks/{id}/chat" },
785
+ { method: "GET", pathPattern: "/api/tasks/{id}/spend" },
786
+ // Inbox — read only (no reply, no archive / delete / mark-read).
787
+ { method: "GET", pathPattern: "/api/inbox" },
788
+ { method: "GET", pathPattern: "/api/inbox/unread-count" },
789
+ { method: "GET", pathPattern: "/api/inbox/{id}" },
790
+ // Goals — reads, a draft create, field-limited update, pause, and the
791
+ // ASKING side of the definition of done (propose, never approve).
792
+ { method: "GET", pathPattern: "/api/me/goals" },
793
+ { method: "POST", pathPattern: "/api/me/goals" },
794
+ { method: "GET", pathPattern: "/api/me/goals/{id}" },
795
+ { method: "PATCH", pathPattern: "/api/me/goals/{id}" },
796
+ { method: "GET", pathPattern: "/api/me/goals/{id}/samples" },
797
+ { method: "POST", pathPattern: "/api/me/goals/{id}/pause" },
798
+ { method: "POST", pathPattern: "/api/me/goals/{id}/dod/propose" },
799
+ // Fleet — reads only.
800
+ { method: "GET", pathPattern: "/api/fleet/nodes" },
801
+ { method: "GET", pathPattern: "/api/fleet/nodes/{id}" },
802
+ { method: "GET", pathPattern: "/api/fleet/runner-status" },
803
+ { method: "GET", pathPattern: "/api/fleet/execution-preferences" },
804
+ { method: "GET", pathPattern: "/api/fleet/agents/{agentId}/node-affinity" },
805
+ // Agents — reads, plus cancel and pause (the safe direction).
806
+ { method: "GET", pathPattern: "/api/agents" },
807
+ { method: "GET", pathPattern: "/api/agents/{id}" },
808
+ { method: "GET", pathPattern: "/api/agents/{id}/runs" },
809
+ { method: "GET", pathPattern: "/api/agents/{id}/runs/{runId}" },
810
+ { method: "POST", pathPattern: "/api/agents/{id}/runs/{runId}/cancel" },
811
+ { method: "POST", pathPattern: "/api/agents/{id}/pause" },
812
+ { method: "GET", pathPattern: "/api/agents/{id}/budget" },
813
+ // Agent Plugins — read only (installing a package installs instructions).
814
+ { method: "GET", pathPattern: "/api/agent-plugins" },
815
+ { method: "GET", pathPattern: "/api/agent-plugins/findings" },
816
+ { method: "GET", pathPattern: "/api/agent-plugins/catalog" },
817
+ { method: "GET", pathPattern: "/api/agent-plugins/updates" }
818
+ ]);
819
+ function splitSegments(normalizedPath) {
820
+ return normalizedPath.split("/").filter((segment) => segment.length > 0);
821
+ }
822
+ FLEET_RUN_TOKEN_ROUTES.map((route) => ({
823
+ method: route.method.toUpperCase(),
824
+ shape: splitSegments(route.pathPattern).map((part) => /^\{[^}]+\}$/.test(part) ? "*" : part.toLowerCase())
825
+ }));
722
826
  var EMAIL_INBOX_CAP_FIELDS = [
723
827
  "inboxDailySends",
724
828
  "inboxBurstSends",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/pty-local-plugin",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Streaming-terminal session host for Ever Works — spawns the agent CLI under a real PTY inside the executing job-runtime worker (node-pty prebuilt), degrading to a child_process pipe floor when the native addon is unavailable.",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -32,14 +32,14 @@
32
32
  "test:coverage": "vitest run --coverage"
33
33
  },
34
34
  "peerDependencies": {
35
- "@ever-works/plugin": "^1.2.6"
35
+ "@ever-works/plugin": "^1.2.8"
36
36
  },
37
37
  "optionalDependencies": {
38
38
  "@homebridge/node-pty-prebuilt-multiarch": "^0.13.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@ever-works/contracts": "^1.0.11",
42
- "@ever-works/plugin": "^1.2.6",
41
+ "@ever-works/contracts": "^1.0.12",
42
+ "@ever-works/plugin": "^1.2.8",
43
43
  "@types/node": "^26.6.4",
44
44
  "tsup": "^8.4.0",
45
45
  "typescript": "^5.7.3",
@@ -70,8 +70,8 @@
70
70
  "url": "https://github.com/ever-works/ever-works/issues"
71
71
  },
72
72
  "everworksRelease": {
73
- "contentHash": "sha256:63e79d8b9a08faa7b6f768b548ea9abe5b24865d3a8e66a4d5a455bc1538cc24",
74
- "commit": "eff002871bfd7f9f8e0f984907f45265ae8b01e0",
75
- "source": "https://github.com/ever-works/ever-works/tree/eff002871bfd7f9f8e0f984907f45265ae8b01e0/packages/plugins/pty-local"
73
+ "contentHash": "sha256:a1c8c75bb652331fde8faa9ce7fcb067d0cd42a62d12adc182ad6a9c784fdc1c",
74
+ "commit": "efd11a2282ea3e514e93f754b9b008543a7cff60",
75
+ "source": "https://github.com/ever-works/ever-works/tree/efd11a2282ea3e514e93f754b9b008543a7cff60/packages/plugins/pty-local"
76
76
  }
77
77
  }