@ever-works/everworks-skills-plugin 1.0.7 → 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.
Files changed (3) hide show
  1. package/dist/index.cjs +774 -15
  2. package/dist/index.js +774 -15
  3. package/package.json +6 -6
package/dist/index.cjs CHANGED
@@ -720,6 +720,44 @@ var FLEET_LINK_CONTROL_TYPES = [
720
720
  "operation.done",
721
721
  "operation.cancel"
722
722
  ];
723
+ var FLEET_CREDENTIAL_FILE_PATTERNS = [
724
+ ".env",
725
+ ".env.*",
726
+ "*.pem",
727
+ "*.key",
728
+ "*.p12",
729
+ "*.pfx",
730
+ "*.jks",
731
+ "*.keystore",
732
+ "*.kdbx",
733
+ "id_rsa*",
734
+ "id_dsa*",
735
+ "id_ecdsa*",
736
+ "id_ed25519*",
737
+ "*.ppk",
738
+ ".netrc",
739
+ ".npmrc",
740
+ ".pypirc",
741
+ "credentials",
742
+ "credentials.json",
743
+ "service-account*.json",
744
+ ".aws/credentials",
745
+ "*.gpg",
746
+ "*.asc",
747
+ ".docker/config.json",
748
+ "kubeconfig",
749
+ ".kube/config"
750
+ ];
751
+ function globToRegExp(glob) {
752
+ const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
753
+ return new RegExp(`^${escaped}$`, "i");
754
+ }
755
+ FLEET_CREDENTIAL_FILE_PATTERNS.filter((pattern) => !pattern.includes("/")).map(
756
+ globToRegExp
757
+ );
758
+ FLEET_CREDENTIAL_FILE_PATTERNS.filter((pattern) => pattern.includes("/")).map(
759
+ (pattern) => ({ segments: pattern.split("/").length, matcher: globToRegExp(pattern) })
760
+ );
723
761
  new Set(FLEET_LINK_CONTROL_TYPES);
724
762
  new TextEncoder();
725
763
  var FLEET_RUN_TOKEN_ROUTES = Object.freeze([
@@ -805,6 +843,12 @@ var FLEET_RUN_TOKEN_ROUTES = Object.freeze([
805
843
  { method: "GET", pathPattern: "/api/fleet/runner-status" },
806
844
  { method: "GET", pathPattern: "/api/fleet/execution-preferences" },
807
845
  { method: "GET", pathPattern: "/api/fleet/agents/{agentId}/node-affinity" },
846
+ // Session git & actions (FL-06 FR-18): an Agent session asks the platform to
847
+ // open or update the pull request of ITS OWN checkout. The route refuses a
848
+ // checkout that is not the token's session's, and the Agent's "may open pull
849
+ // requests" permission applies; it never merges anything.
850
+ { method: "GET", pathPattern: "/api/fleet/checkouts/{id}/pull-request" },
851
+ { method: "POST", pathPattern: "/api/fleet/checkouts/{id}/pull-request" },
808
852
  // Agents — reads, plus cancel and pause (the safe direction).
809
853
  { method: "GET", pathPattern: "/api/agents" },
810
854
  { method: "GET", pathPattern: "/api/agents/{id}" },
@@ -826,6 +870,721 @@ FLEET_RUN_TOKEN_ROUTES.map((route) => ({
826
870
  method: route.method.toUpperCase(),
827
871
  shape: splitSegments(route.pathPattern).map((part) => /^\{[^}]+\}$/.test(part) ? "*" : part.toLowerCase())
828
872
  }));
873
+ function row(input) {
874
+ const rest = input.name.slice("fleet_".length);
875
+ const cut = rest.indexOf("_");
876
+ const family = cut === -1 ? rest : rest.slice(0, cut);
877
+ const verb = cut === -1 ? "" : rest.slice(cut + 1);
878
+ return Object.freeze({ ...input, family, verb });
879
+ }
880
+ function read(name, permissionFamily, owner, flag, status, extra = {}) {
881
+ return row({
882
+ name,
883
+ readOnly: true,
884
+ category: "read.internal",
885
+ permissionFamily,
886
+ owner,
887
+ phase: "P1",
888
+ flag,
889
+ status,
890
+ ...extra
891
+ });
892
+ }
893
+ function act(name, permissionFamily, owner, flag, status, annotation, extra = {}) {
894
+ return row({ name, permissionFamily, owner, phase: "P2", flag, status, ...annotation, ...extra });
895
+ }
896
+ var plain = (category, destructive = false) => ({
897
+ destructive,
898
+ confirmationClass: "plain",
899
+ category
900
+ });
901
+ var confirm = (category, destructive = true) => ({
902
+ destructive,
903
+ confirmationClass: "confirm",
904
+ category
905
+ });
906
+ var typed = (category) => ({
907
+ destructive: true,
908
+ confirmationClass: "confirm-destructive",
909
+ category
910
+ });
911
+ var GET = (path) => ({ method: "GET", path });
912
+ var POST = (path) => ({ method: "POST", path });
913
+ var PATCH = (path) => ({ method: "PATCH", path });
914
+ var DELETE = (path) => ({ method: "DELETE", path });
915
+ var FLEET_TOOL_CATALOGUE = Object.freeze([
916
+ // ── status (FL-19) ──
917
+ read("fleet_status", "view", "FL-19", "FLEET_ENABLED", "live", {
918
+ route: GET("/api/fleet/status"),
919
+ cli: "fleet status"
920
+ }),
921
+ // ── nodes (FL-19, FL-03, FL-15) ──
922
+ read("fleet_nodes_list", "view", "FL-19", "FLEET_ENABLED", "live", {
923
+ route: GET("/api/fleet/nodes"),
924
+ cli: "fleet nodes list"
925
+ }),
926
+ read("fleet_nodes_get", "view", "FL-19", "FLEET_ENABLED", "live", {
927
+ route: GET("/api/fleet/nodes/{id}"),
928
+ cli: "fleet nodes get"
929
+ }),
930
+ read("fleet_nodes_health", "view", "FL-03", "FLEET_ENABLED", "live", {
931
+ route: GET("/api/fleet/nodes/{id}/health"),
932
+ cli: "fleet nodes health"
933
+ }),
934
+ read("fleet_nodes_needs_a_look", "view", "FL-03", "FLEET_ENABLED", "live", {
935
+ route: GET("/api/fleet/nodes/{id}/needs-a-look"),
936
+ cli: "fleet nodes needs-a-look"
937
+ }),
938
+ read("fleet_nodes_git_identity_get", "view", "FL-15", "FLEET_CHECKOUTS_ENABLED", "live", {
939
+ route: GET("/api/fleet/nodes/{id}/git/identity"),
940
+ cli: "fleet nodes git-identity"
941
+ }),
942
+ act("fleet_nodes_wake", "machines", "FL-03", "FLEET_ENABLED", "live", plain("machine.admin"), {
943
+ route: POST("/api/fleet/nodes/{id}/wake"),
944
+ cli: "fleet nodes wake"
945
+ }),
946
+ act(
947
+ "fleet_nodes_git_identity_set",
948
+ "commands",
949
+ "FL-15",
950
+ "FLEET_CHECKOUTS_ENABLED",
951
+ "live",
952
+ confirm("machine.admin", false),
953
+ { route: POST("/api/fleet/nodes/{id}/git/identity"), cli: "fleet nodes git-identity --set" }
954
+ ),
955
+ // ── sessions (FL-04, FL-05, FL-06) ──
956
+ read("fleet_sessions_list", "sessions", "FL-04", "FLEET_SESSIONS_ENABLED", "live", {
957
+ route: GET("/api/fleet/sessions"),
958
+ cli: "fleet sessions list"
959
+ }),
960
+ read("fleet_sessions_read", "sessions", "FL-04", "FLEET_SESSIONS_ENABLED", "live", {
961
+ route: GET("/api/fleet/sessions/{id}"),
962
+ cli: "fleet sessions read"
963
+ }),
964
+ read("fleet_sessions_question", "sessions", "FL-05", "FLEET_SESSIONS_ENABLED", "live", {
965
+ route: GET("/api/fleet/sessions/{id}"),
966
+ cli: "fleet sessions question"
967
+ }),
968
+ read("fleet_sessions_actions_list", "sessions", "FL-06", "FLEET_SESSIONS_ENABLED", "planned", {
969
+ route: GET("/api/fleet/sessions/{id}/actions"),
970
+ cli: "fleet sessions actions"
971
+ }),
972
+ act("fleet_sessions_start", "sessions", "FL-04", "FLEET_SESSIONS_ENABLED", "live", plain("machine.run"), {
973
+ route: POST("/api/fleet/nodes/{id}/sessions"),
974
+ cli: "fleet sessions start"
975
+ }),
976
+ act("fleet_sessions_send", "sessions", "FL-04", "FLEET_SESSIONS_ENABLED", "live", plain("machine.run")),
977
+ act("fleet_sessions_answer", "sessions", "FL-05", "FLEET_SESSIONS_ENABLED", "live", confirm("machine.run", false), {
978
+ route: POST("/api/fleet/sessions/{id}/answer"),
979
+ cli: "fleet sessions answer",
980
+ confirmationNote: "questions only; a permission prompt is answered by a person (CONTRACTS R-32)"
981
+ }),
982
+ act("fleet_sessions_rename", "sessions", "FL-04", "FLEET_SESSIONS_ENABLED", "live", plain("write.internal"), {
983
+ route: PATCH("/api/fleet/sessions/{id}"),
984
+ cli: "fleet sessions rename"
985
+ }),
986
+ act("fleet_sessions_end", "sessions", "FL-04", "FLEET_SESSIONS_ENABLED", "live", confirm("machine.run"), {
987
+ route: POST("/api/fleet/sessions/{id}/end"),
988
+ cli: "fleet sessions end"
989
+ }),
990
+ act("fleet_sessions_action", "sessions", "FL-06", "FLEET_SESSIONS_ENABLED", "planned", plain("machine.run"), {
991
+ route: POST("/api/fleet/sessions/{id}/actions"),
992
+ cli: "fleet sessions action"
993
+ }),
994
+ // ── desktop (FL-07, FL-11 paste) ──
995
+ read("fleet_desktop_screenshot", "desktop", "FL-07", "FLEET_DESKTOP_ENABLED", "planned", {
996
+ route: GET("/api/fleet/nodes/{id}/desktop/screenshot"),
997
+ cli: "fleet desktop screenshot"
998
+ }),
999
+ read("fleet_desktop_displays", "desktop", "FL-07", "FLEET_DESKTOP_ENABLED", "planned", {
1000
+ route: GET("/api/fleet/nodes/{id}/desktop/displays"),
1001
+ cli: "fleet desktop displays"
1002
+ }),
1003
+ read("fleet_desktop_recordings_list", "desktop", "FL-07", "FLEET_DESKTOP_ENABLED", "planned", {
1004
+ route: GET("/api/fleet/nodes/{id}/desktop/recordings"),
1005
+ cli: "fleet desktop recordings"
1006
+ }),
1007
+ act("fleet_desktop_input", "desktop", "FL-07", "FLEET_DESKTOP_ENABLED", "planned", plain("machine.admin", true), {
1008
+ route: POST("/api/fleet/nodes/{id}/desktop/input"),
1009
+ cli: "fleet desktop input"
1010
+ }),
1011
+ act("fleet_desktop_set_display", "desktop", "FL-07", "FLEET_DESKTOP_ENABLED", "planned", plain("machine.admin"), {
1012
+ route: POST("/api/fleet/nodes/{id}/desktop/displays"),
1013
+ cli: "fleet desktop set-display"
1014
+ }),
1015
+ act("fleet_desktop_display_add", "desktop", "FL-07", "FLEET_DESKTOP_ENABLED", "planned", confirm("machine.admin"), {
1016
+ phase: "P3",
1017
+ route: POST("/api/fleet/nodes/{id}/desktop/displays/virtual"),
1018
+ cli: "fleet desktop display-add"
1019
+ }),
1020
+ act(
1021
+ "fleet_desktop_display_remove",
1022
+ "desktop",
1023
+ "FL-07",
1024
+ "FLEET_DESKTOP_ENABLED",
1025
+ "planned",
1026
+ confirm("machine.admin"),
1027
+ {
1028
+ phase: "P3",
1029
+ route: DELETE("/api/fleet/nodes/{id}/desktop/displays/virtual/{displayId}"),
1030
+ cli: "fleet desktop display-remove"
1031
+ }
1032
+ ),
1033
+ act(
1034
+ "fleet_desktop_paste",
1035
+ "desktop",
1036
+ "FL-11",
1037
+ "FLEET_MACHINE_FACTS_ENABLED",
1038
+ "planned",
1039
+ plain("machine.admin", true),
1040
+ {
1041
+ route: POST("/api/fleet/nodes/{id}/desktop/paste"),
1042
+ cli: "fleet desktop paste",
1043
+ confirmationNote: "denied unless a tool grant allows it (AW-15)"
1044
+ }
1045
+ ),
1046
+ // ── logs (FL-08) ──
1047
+ read("fleet_logs_sources", "logs", "FL-08", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1048
+ route: GET("/api/fleet/nodes/{id}/logs/sources"),
1049
+ cli: "fleet logs sources"
1050
+ }),
1051
+ read("fleet_logs_read", "logs", "FL-08", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1052
+ route: POST("/api/fleet/nodes/{id}/logs/read"),
1053
+ cli: "fleet logs read"
1054
+ }),
1055
+ // ── services (FL-09) ──
1056
+ read("fleet_services_list", "services", "FL-09", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1057
+ route: GET("/api/fleet/nodes/{id}/services"),
1058
+ cli: "fleet services list"
1059
+ }),
1060
+ act("fleet_services_action", "services", "FL-09", "FLEET_MACHINE_FACTS_ENABLED", "live", confirm("machine.admin"), {
1061
+ route: POST("/api/fleet/nodes/{id}/services/{name}/{action}"),
1062
+ cli: "fleet services action",
1063
+ waitable: true,
1064
+ confirmationNote: "confirm; blast-radius when the node warns it could cut the machine off"
1065
+ }),
1066
+ // ── processes (FL-09) ──
1067
+ read("fleet_processes_list", "processes", "FL-09", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1068
+ route: GET("/api/fleet/nodes/{id}/processes"),
1069
+ cli: "fleet processes list"
1070
+ }),
1071
+ act(
1072
+ "fleet_processes_signal",
1073
+ "processes",
1074
+ "FL-09",
1075
+ "FLEET_MACHINE_FACTS_ENABLED",
1076
+ "live",
1077
+ confirm("machine.admin"),
1078
+ { route: POST("/api/fleet/nodes/{id}/processes/{pid}/signal"), cli: "fleet processes signal" }
1079
+ ),
1080
+ // ── docker (FL-09) ──
1081
+ read("fleet_docker_containers_list", "docker", "FL-09", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1082
+ route: GET("/api/fleet/nodes/{id}/docker/containers"),
1083
+ cli: "fleet docker containers"
1084
+ }),
1085
+ read("fleet_docker_images_list", "docker", "FL-09", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1086
+ route: GET("/api/fleet/nodes/{id}/docker/images"),
1087
+ cli: "fleet docker images"
1088
+ }),
1089
+ read("fleet_docker_compose_list", "docker", "FL-09", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1090
+ route: GET("/api/fleet/nodes/{id}/docker/compose"),
1091
+ cli: "fleet docker compose"
1092
+ }),
1093
+ read("fleet_docker_compose_describe", "docker", "FL-09", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1094
+ cli: "fleet docker compose-describe"
1095
+ }),
1096
+ act(
1097
+ "fleet_docker_container_action",
1098
+ "docker",
1099
+ "FL-09",
1100
+ "FLEET_MACHINE_FACTS_ENABLED",
1101
+ "live",
1102
+ confirm("machine.admin"),
1103
+ {
1104
+ route: POST("/api/fleet/nodes/{id}/docker/containers/{cid}/{action}"),
1105
+ cli: "fleet docker container",
1106
+ waitable: true,
1107
+ confirmationNote: "confirm; remove is confirm-destructive"
1108
+ }
1109
+ ),
1110
+ act("fleet_docker_run", "docker", "FL-09", "FLEET_MACHINE_FACTS_ENABLED", "live", confirm("machine.admin", false), {
1111
+ route: POST("/api/fleet/nodes/{id}/docker/containers"),
1112
+ cli: "fleet docker run",
1113
+ waitable: true,
1114
+ alwaysHeld: true,
1115
+ confirmationNote: "an Agent proposes a run; a person types any secret values"
1116
+ }),
1117
+ act(
1118
+ "fleet_docker_image_action",
1119
+ "docker",
1120
+ "FL-09",
1121
+ "FLEET_MACHINE_FACTS_ENABLED",
1122
+ "live",
1123
+ confirm("machine.admin"),
1124
+ {
1125
+ route: POST("/api/fleet/nodes/{id}/docker/images/{iid}/{action}"),
1126
+ cli: "fleet docker image",
1127
+ waitable: true,
1128
+ confirmationNote: "pull is plain and not destructive; remove and prune confirm"
1129
+ }
1130
+ ),
1131
+ act(
1132
+ "fleet_docker_compose_action",
1133
+ "docker",
1134
+ "FL-09",
1135
+ "FLEET_MACHINE_FACTS_ENABLED",
1136
+ "live",
1137
+ confirm("machine.admin"),
1138
+ {
1139
+ route: POST("/api/fleet/nodes/{id}/docker/compose/{project}/{action}"),
1140
+ cli: "fleet docker compose-action",
1141
+ waitable: true,
1142
+ confirmationNote: "destructive for down"
1143
+ }
1144
+ ),
1145
+ act("fleet_docker_exec", "docker", "FL-09", "FLEET_MACHINE_FACTS_ENABLED", "planned", plain("machine.run"), {
1146
+ phase: "P3",
1147
+ cli: "fleet docker exec"
1148
+ }),
1149
+ // ── ports (FL-10) ──
1150
+ read("fleet_ports_list", "view", "FL-10", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1151
+ route: GET("/api/fleet/nodes/{id}/ports"),
1152
+ cli: "fleet ports list"
1153
+ }),
1154
+ act("fleet_ports_open", "ports", "FL-10", "FLEET_MACHINE_FACTS_ENABLED", "live", plain("machine.run"), {
1155
+ route: POST("/api/fleet/nodes/{id}/ports/{port}/open"),
1156
+ cli: "fleet ports open"
1157
+ }),
1158
+ act("fleet_ports_preview_open", "ports", "FL-10", "FLEET_PORT_TUNNEL_ENABLED", "live", plain("machine.run"), {
1159
+ route: POST("/api/fleet/nodes/{id}/ports/{port}/preview"),
1160
+ cli: "fleet ports preview"
1161
+ }),
1162
+ act("fleet_ports_preview_close", "ports", "FL-10", "FLEET_PORT_TUNNEL_ENABLED", "live", plain("machine.run"), {
1163
+ route: DELETE("/api/fleet/nodes/{id}/ports/{port}/preview"),
1164
+ cli: "fleet ports preview-close"
1165
+ }),
1166
+ // ── files (FL-11) ──
1167
+ // P1 (FL-11 lane log decision 15): the roots read joins the family, and the list's route is the
1168
+ // one FL-11 built (`…/files/list` — `…/files` is the family's prefix, not a route).
1169
+ read("fleet_files_roots", "files", "FL-11", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1170
+ route: GET("/api/fleet/nodes/{id}/files/roots"),
1171
+ cli: "fleet files roots"
1172
+ }),
1173
+ read("fleet_files_list", "files", "FL-11", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1174
+ route: GET("/api/fleet/nodes/{id}/files/list"),
1175
+ cli: "fleet files list"
1176
+ }),
1177
+ read("fleet_files_stat", "files", "FL-11", "FLEET_MACHINE_FACTS_ENABLED", "live", {
1178
+ route: GET("/api/fleet/nodes/{id}/files/stat"),
1179
+ cli: "fleet files stat"
1180
+ }),
1181
+ read("fleet_files_read", "files", "FL-11", "FLEET_MACHINE_FACTS_ENABLED", "planned", {
1182
+ route: GET("/api/fleet/nodes/{id}/files/download"),
1183
+ cli: "fleet files get"
1184
+ }),
1185
+ act("fleet_files_write", "files", "FL-11", "FLEET_MACHINE_FACTS_ENABLED", "planned", confirm("machine.admin"), {
1186
+ route: POST("/api/fleet/nodes/{id}/files/upload"),
1187
+ cli: "fleet files put"
1188
+ }),
1189
+ act("fleet_files_copy", "files", "FL-11", "FLEET_MACHINE_FACTS_ENABLED", "live", confirm("machine.admin"), {
1190
+ route: POST("/api/fleet/nodes/{id}/files/copy"),
1191
+ cli: "fleet files cp",
1192
+ // FL-11 P2 (lane log decision 18): an Agent's copy is held for a person, like its delete.
1193
+ alwaysHeld: true
1194
+ }),
1195
+ act("fleet_files_delete", "files", "FL-11", "FLEET_MACHINE_FACTS_ENABLED", "live", typed("write.destructive"), {
1196
+ route: POST("/api/fleet/nodes/{id}/files/delete"),
1197
+ cli: "fleet files rm",
1198
+ alwaysHeld: true
1199
+ }),
1200
+ // ── commands (FL-12) ──
1201
+ read("fleet_commands_list", "commands", "FL-12", "FLEET_COMMANDS_ENABLED", "live", {
1202
+ route: GET("/api/fleet/commands"),
1203
+ cli: "fleet commands list"
1204
+ }),
1205
+ read("fleet_commands_get", "commands", "FL-12", "FLEET_COMMANDS_ENABLED", "live", {
1206
+ route: GET("/api/fleet/commands/{id}"),
1207
+ cli: "fleet commands get"
1208
+ }),
1209
+ act("fleet_commands_run", "commands", "FL-12", "FLEET_COMMANDS_ENABLED", "live", confirm("machine.run"), {
1210
+ route: POST("/api/fleet/commands"),
1211
+ cli: "fleet commands run",
1212
+ alwaysHeld: true
1213
+ }),
1214
+ act("fleet_commands_cancel", "commands", "FL-12", "FLEET_COMMANDS_ENABLED", "live", plain("machine.run"), {
1215
+ route: POST("/api/fleet/commands/{id}/cancel"),
1216
+ cli: "fleet commands cancel"
1217
+ }),
1218
+ // ── schedules (FL-13 P2: live — `apps/api/src/fleet/schedules/fleet-schedules.controller.ts`) ──
1219
+ read("fleet_schedules_list", "schedules", "FL-13", "FLEET_COMMANDS_ENABLED", "live", {
1220
+ route: GET("/api/fleet/schedules"),
1221
+ cli: "fleet schedules list"
1222
+ }),
1223
+ read("fleet_schedules_get", "schedules", "FL-13", "FLEET_COMMANDS_ENABLED", "live", {
1224
+ route: GET("/api/fleet/schedules/{id}"),
1225
+ cli: "fleet schedules get"
1226
+ }),
1227
+ read("fleet_schedules_runs", "schedules", "FL-13", "FLEET_COMMANDS_ENABLED", "live", {
1228
+ route: GET("/api/fleet/schedules/{id}/runs"),
1229
+ cli: "fleet schedules runs"
1230
+ }),
1231
+ act("fleet_schedules_create", "schedules", "FL-13", "FLEET_COMMANDS_ENABLED", "live", confirm("agent.fanout"), {
1232
+ route: POST("/api/fleet/schedules"),
1233
+ cli: "fleet schedules create"
1234
+ }),
1235
+ act("fleet_schedules_update", "schedules", "FL-13", "FLEET_COMMANDS_ENABLED", "live", confirm("agent.fanout"), {
1236
+ route: PATCH("/api/fleet/schedules/{id}"),
1237
+ cli: "fleet schedules update"
1238
+ }),
1239
+ act(
1240
+ "fleet_schedules_delete",
1241
+ "schedules",
1242
+ "FL-13",
1243
+ "FLEET_COMMANDS_ENABLED",
1244
+ "live",
1245
+ confirm("write.destructive"),
1246
+ { route: DELETE("/api/fleet/schedules/{id}"), cli: "fleet schedules delete" }
1247
+ ),
1248
+ act("fleet_schedules_run", "schedules", "FL-13", "FLEET_COMMANDS_ENABLED", "live", confirm("machine.run"), {
1249
+ route: POST("/api/fleet/schedules/{id}/run"),
1250
+ cli: "fleet schedules run"
1251
+ }),
1252
+ act("fleet_schedules_pause", "schedules", "FL-13", "FLEET_COMMANDS_ENABLED", "live", plain("agent.fanout"), {
1253
+ route: POST("/api/fleet/schedules/{id}/pause"),
1254
+ cli: "fleet schedules pause"
1255
+ }),
1256
+ act("fleet_schedules_resume", "schedules", "FL-13", "FLEET_COMMANDS_ENABLED", "live", plain("agent.fanout"), {
1257
+ route: POST("/api/fleet/schedules/{id}/resume"),
1258
+ cli: "fleet schedules resume"
1259
+ }),
1260
+ // ── checkouts (FL-14, FL-06) ──
1261
+ read("fleet_checkouts_list", "checkouts", "FL-14", "FLEET_CHECKOUTS_ENABLED", "live", {
1262
+ route: GET("/api/fleet/checkouts"),
1263
+ cli: "fleet checkouts list"
1264
+ }),
1265
+ read("fleet_checkouts_get", "checkouts", "FL-14", "FLEET_CHECKOUTS_ENABLED", "live", {
1266
+ route: GET("/api/fleet/checkouts/{id}"),
1267
+ cli: "fleet checkouts get"
1268
+ }),
1269
+ read("fleet_checkouts_changes", "checkouts", "FL-06", "FLEET_CHECKOUTS_ENABLED", "planned", {
1270
+ route: GET("/api/fleet/checkouts/{id}/changes"),
1271
+ cli: "fleet checkouts changes"
1272
+ }),
1273
+ act("fleet_checkouts_create", "checkouts", "FL-14", "FLEET_CHECKOUTS_ENABLED", "live", plain("machine.run"), {
1274
+ route: POST("/api/fleet/checkouts"),
1275
+ cli: "fleet checkouts create",
1276
+ waitable: true
1277
+ }),
1278
+ act("fleet_checkouts_sync", "checkouts", "FL-14", "FLEET_CHECKOUTS_ENABLED", "live", plain("machine.run"), {
1279
+ route: POST("/api/fleet/checkouts/{id}/sync"),
1280
+ cli: "fleet checkouts sync",
1281
+ waitable: true,
1282
+ confirmationNote: "plain for fetch; confirm for pull and push"
1283
+ }),
1284
+ act(
1285
+ "fleet_checkouts_archive",
1286
+ "checkouts",
1287
+ "FL-14",
1288
+ "FLEET_CHECKOUTS_ENABLED",
1289
+ "live",
1290
+ confirm("machine.run", false),
1291
+ { route: POST("/api/fleet/checkouts/{id}/archive"), cli: "fleet checkouts archive" }
1292
+ ),
1293
+ act(
1294
+ "fleet_checkouts_delete",
1295
+ "checkouts",
1296
+ "FL-14",
1297
+ "FLEET_CHECKOUTS_ENABLED",
1298
+ "live",
1299
+ confirm("write.destructive"),
1300
+ {
1301
+ route: DELETE("/api/fleet/checkouts/{id}"),
1302
+ cli: "fleet checkouts delete",
1303
+ confirmationNote: "confirm; confirm-destructive when it has uncommitted changes"
1304
+ }
1305
+ ),
1306
+ act(
1307
+ "fleet_checkouts_open_pull_request",
1308
+ "checkouts",
1309
+ "FL-06",
1310
+ "FLEET_CHECKOUTS_ENABLED",
1311
+ "planned",
1312
+ plain("publish.external"),
1313
+ { route: POST("/api/fleet/checkouts/{id}/pull-request"), cli: "fleet checkouts pull-request" }
1314
+ ),
1315
+ // ── tasks (FL-15) ── the hand-off itself is `fleet_sessions_start` with `taskId`
1316
+ read("fleet_tasks_handoff_options", "sessions", "FL-15", "FLEET_CHECKOUTS_ENABLED", "live", {
1317
+ route: GET("/api/fleet/tasks/{taskId}/handoff-options"),
1318
+ cli: "fleet tasks handoff-options"
1319
+ }),
1320
+ // ── virtual (FL-16) ── P1 shipped: Containers. A create, a stop and a destroy are held for
1321
+ // the owner's approval by the Agent tools (`agent-fleet-virtual-tools.ts`).
1322
+ read("fleet_virtual_list", "view", "FL-16", "FLEET_VIRTUAL_ENABLED", "live", {
1323
+ phase: "P3",
1324
+ route: GET("/api/fleet/nodes/{id}/virtual"),
1325
+ cli: "fleet virtual list"
1326
+ }),
1327
+ read("fleet_virtual_options", "view", "FL-16", "FLEET_VIRTUAL_ENABLED", "live", {
1328
+ phase: "P3",
1329
+ route: GET("/api/fleet/nodes/{id}/virtual/options"),
1330
+ cli: "fleet virtual options"
1331
+ }),
1332
+ act("fleet_virtual_create", "machines", "FL-16", "FLEET_VIRTUAL_ENABLED", "live", confirm("machine.admin"), {
1333
+ phase: "P3",
1334
+ route: POST("/api/fleet/nodes/{id}/virtual"),
1335
+ cli: "fleet virtual create",
1336
+ waitable: true,
1337
+ alwaysHeld: true
1338
+ }),
1339
+ act("fleet_virtual_power", "machines", "FL-16", "FLEET_VIRTUAL_ENABLED", "live", confirm("machine.admin"), {
1340
+ phase: "P3",
1341
+ route: POST("/api/fleet/nodes/{id}/virtual/{childId}/power"),
1342
+ cli: "fleet virtual power",
1343
+ waitable: true,
1344
+ confirmationNote: "plain to start; confirm to stop (an Agent's stop is held for the owner)"
1345
+ }),
1346
+ act("fleet_virtual_destroy", "machines", "FL-16", "FLEET_VIRTUAL_ENABLED", "live", typed("write.destructive"), {
1347
+ phase: "P3",
1348
+ route: POST("/api/fleet/nodes/{id}/virtual/{childId}/destroy"),
1349
+ cli: "fleet virtual destroy",
1350
+ waitable: true,
1351
+ alwaysHeld: true
1352
+ }),
1353
+ // ── cloud (FL-17) ── P1 shipped providers, create, power, destroy, usage; P2 the idle policy
1354
+ // (`PUT` answers the same as `PATCH`). A create, a power change and a destroy are held for the
1355
+ // owner's approval by the Agent tools (`agent-fleet-cloud-tools.ts`).
1356
+ read("fleet_cloud_list", "view", "FL-17", "FLEET_CLOUD_ENABLED", "live", {
1357
+ phase: "P3",
1358
+ route: GET("/api/fleet/cloud"),
1359
+ cli: "fleet cloud list"
1360
+ }),
1361
+ read("fleet_cloud_options", "view", "FL-17", "FLEET_CLOUD_ENABLED", "live", {
1362
+ phase: "P3",
1363
+ route: GET("/api/fleet/providers/{plugin}/options"),
1364
+ cli: "fleet cloud options"
1365
+ }),
1366
+ read("fleet_cloud_usage", "view", "FL-17", "FLEET_CLOUD_ENABLED", "live", {
1367
+ phase: "P3",
1368
+ route: GET("/api/fleet/cloud/usage"),
1369
+ cli: "fleet cloud usage"
1370
+ }),
1371
+ act("fleet_cloud_create", "machines", "FL-17", "FLEET_CLOUD_ENABLED", "live", confirm("spend.metered"), {
1372
+ phase: "P3",
1373
+ route: POST("/api/fleet/cloud"),
1374
+ cli: "fleet cloud create",
1375
+ waitable: true,
1376
+ alwaysHeld: true,
1377
+ confirmationNote: "confirm with the price (acknowledgedPriceCents); also machine.admin"
1378
+ }),
1379
+ act("fleet_cloud_power", "machines", "FL-17", "FLEET_CLOUD_ENABLED", "live", confirm("machine.admin"), {
1380
+ phase: "P3",
1381
+ route: POST("/api/fleet/cloud/{id}/power"),
1382
+ cli: "fleet cloud power",
1383
+ waitable: true,
1384
+ alwaysHeld: true
1385
+ }),
1386
+ act("fleet_cloud_destroy", "machines", "FL-17", "FLEET_CLOUD_ENABLED", "live", typed("write.destructive"), {
1387
+ phase: "P3",
1388
+ // FL-17 plan §5 — `DELETE /api/fleet/cloud/{id}` answers the same (an alias).
1389
+ route: POST("/api/fleet/cloud/{id}/destroy"),
1390
+ cli: "fleet cloud destroy",
1391
+ waitable: true,
1392
+ alwaysHeld: true
1393
+ }),
1394
+ act("fleet_cloud_idle_policy", "machines", "FL-17", "FLEET_CLOUD_ENABLED", "live", plain("machine.admin"), {
1395
+ phase: "P3",
1396
+ route: PATCH("/api/fleet/cloud/{id}/idle-policy"),
1397
+ cli: "fleet cloud idle-policy"
1398
+ }),
1399
+ // ── runners (FL-18) ── P1 shipped: list, install, start / stop / restart, remove. An install, a
1400
+ // stop, a restart and a remove asked by an Agent are held for the owner's approval
1401
+ // (`agent-fleet-runners-tools.ts`). The Actions jobs read and Cancel workflow run arrive with P2.
1402
+ read("fleet_runners_list", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "live", {
1403
+ phase: "P3",
1404
+ route: GET("/api/fleet/nodes/{id}/runners"),
1405
+ cli: "fleet runners list"
1406
+ }),
1407
+ read("fleet_runners_jobs", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "planned", {
1408
+ phase: "P3",
1409
+ route: GET("/api/fleet/runners/jobs"),
1410
+ cli: "fleet runners jobs"
1411
+ }),
1412
+ act(
1413
+ "fleet_runners_install",
1414
+ "machines",
1415
+ "FL-18",
1416
+ "FLEET_ACTIONS_RUNNERS_ENABLED",
1417
+ "live",
1418
+ confirm("machine.admin"),
1419
+ {
1420
+ phase: "P3",
1421
+ route: POST("/api/fleet/nodes/{id}/runners"),
1422
+ cli: "fleet runners install",
1423
+ waitable: true,
1424
+ alwaysHeld: true
1425
+ }
1426
+ ),
1427
+ act(
1428
+ "fleet_runners_action",
1429
+ "machines",
1430
+ "FL-18",
1431
+ "FLEET_ACTIONS_RUNNERS_ENABLED",
1432
+ "live",
1433
+ confirm("machine.admin"),
1434
+ {
1435
+ phase: "P3",
1436
+ route: POST("/api/fleet/nodes/{id}/runners/{runnerId}/{action}"),
1437
+ cli: "fleet runners action",
1438
+ waitable: true,
1439
+ confirmationNote: "plain to start; confirm to stop and restart (an Agent's stop or restart is held for the owner)"
1440
+ }
1441
+ ),
1442
+ act(
1443
+ "fleet_runners_remove",
1444
+ "machines",
1445
+ "FL-18",
1446
+ "FLEET_ACTIONS_RUNNERS_ENABLED",
1447
+ "live",
1448
+ typed("write.destructive"),
1449
+ {
1450
+ phase: "P3",
1451
+ route: POST("/api/fleet/nodes/{id}/runners/{runnerId}/remove"),
1452
+ cli: "fleet runners remove",
1453
+ waitable: true,
1454
+ alwaysHeld: true
1455
+ }
1456
+ ),
1457
+ act(
1458
+ "fleet_runners_cancel_run",
1459
+ "machines",
1460
+ "FL-18",
1461
+ "FLEET_ACTIONS_RUNNERS_ENABLED",
1462
+ "planned",
1463
+ confirm("machine.admin"),
1464
+ { phase: "P3", route: POST("/api/fleet/runners/jobs/cancel"), cli: "fleet runners cancel-run" }
1465
+ ),
1466
+ // ── usage (FL-20) ── P1 shipped: the Usage object (totals, by model, by computer, busiest
1467
+ // checkouts, sessions) every surface renders, read-only, with the payer sentence in `note`.
1468
+ read("fleet_usage_get", "view", "FL-20", "FLEET_USAGE_SCAN_ENABLED", "live", {
1469
+ phase: "P3",
1470
+ route: GET("/api/fleet/usage"),
1471
+ cli: "fleet usage"
1472
+ }),
1473
+ // ── operations (FL-02, FL-19) ──
1474
+ read("fleet_operations_get", "view", "FL-02", "FLEET_NODE_LINK_ENABLED", "live", {
1475
+ route: GET("/api/fleet/operations/{id}"),
1476
+ cli: "fleet operations get"
1477
+ }),
1478
+ read("fleet_operations_list", "view", "FL-19", "FLEET_NODE_LINK_ENABLED", "live", {
1479
+ route: GET("/api/fleet/operations"),
1480
+ cli: "fleet operations list"
1481
+ }),
1482
+ act("fleet_operations_cancel", "view", "FL-02", "FLEET_NODE_LINK_ENABLED", "live", plain("machine.run"), {
1483
+ route: DELETE("/api/fleet/operations/{id}"),
1484
+ cli: "fleet operations cancel"
1485
+ })
1486
+ ]);
1487
+ new Map(
1488
+ FLEET_TOOL_CATALOGUE.map((entry) => [entry.name, entry])
1489
+ );
1490
+ var FLEET_VIRTUAL_SYSTEMS = [
1491
+ {
1492
+ id: "windows-11",
1493
+ kind: "vm",
1494
+ label: "Windows 11",
1495
+ family: "windows",
1496
+ arch: ["x64"],
1497
+ windowsEdition: "11",
1498
+ approxDiskGiB: 64,
1499
+ approxDownloadGiB: 6
1500
+ },
1501
+ {
1502
+ id: "windows-10",
1503
+ kind: "vm",
1504
+ label: "Windows 10",
1505
+ family: "windows",
1506
+ arch: ["x64"],
1507
+ windowsEdition: "10",
1508
+ approxDiskGiB: 64,
1509
+ approxDownloadGiB: 6
1510
+ },
1511
+ {
1512
+ id: "windows-server-2025",
1513
+ kind: "vm",
1514
+ label: "Windows Server 2025",
1515
+ family: "windows",
1516
+ arch: ["x64"],
1517
+ windowsEdition: "2025",
1518
+ approxDiskGiB: 64,
1519
+ approxDownloadGiB: 6
1520
+ },
1521
+ {
1522
+ id: "windows-server-2022",
1523
+ kind: "vm",
1524
+ label: "Windows Server 2022",
1525
+ family: "windows",
1526
+ arch: ["x64"],
1527
+ windowsEdition: "2022",
1528
+ approxDiskGiB: 64,
1529
+ approxDownloadGiB: 6
1530
+ },
1531
+ {
1532
+ id: "ubuntu-26.04",
1533
+ kind: "container",
1534
+ label: "Ubuntu 26.04",
1535
+ family: "ubuntu",
1536
+ arch: ["x64", "arm64"],
1537
+ approxDiskGiB: 3,
1538
+ approxDownloadGiB: 0.5
1539
+ },
1540
+ {
1541
+ id: "ubuntu-24.04",
1542
+ kind: "container",
1543
+ label: "Ubuntu 24.04",
1544
+ family: "ubuntu",
1545
+ arch: ["x64", "arm64"],
1546
+ approxDiskGiB: 3,
1547
+ approxDownloadGiB: 0.5
1548
+ },
1549
+ {
1550
+ id: "debian-13",
1551
+ kind: "container",
1552
+ label: "Debian 13",
1553
+ family: "debian",
1554
+ arch: ["x64", "arm64"],
1555
+ approxDiskGiB: 3,
1556
+ approxDownloadGiB: 0.5
1557
+ },
1558
+ {
1559
+ id: "fedora",
1560
+ kind: "container",
1561
+ label: "Fedora",
1562
+ family: "fedora",
1563
+ arch: ["x64", "arm64"],
1564
+ approxDiskGiB: 3,
1565
+ approxDownloadGiB: 0.6
1566
+ },
1567
+ {
1568
+ id: "alpine",
1569
+ kind: "container",
1570
+ label: "Alpine",
1571
+ family: "alpine",
1572
+ arch: ["x64", "arm64"],
1573
+ approxDiskGiB: 1,
1574
+ approxDownloadGiB: 0.2
1575
+ },
1576
+ {
1577
+ // Arch Linux publishes no official arm64 image (FR-6).
1578
+ id: "arch",
1579
+ kind: "container",
1580
+ label: "Arch Linux",
1581
+ family: "arch",
1582
+ arch: ["x64"],
1583
+ approxDiskGiB: 3,
1584
+ approxDownloadGiB: 0.7
1585
+ }
1586
+ ];
1587
+ FLEET_VIRTUAL_SYSTEMS.map((system) => system.id);
829
1588
  var EMAIL_INBOX_CAP_FIELDS = [
830
1589
  "inboxDailySends",
831
1590
  "inboxBurstSends",
@@ -1088,7 +1847,7 @@ function ioTable(heading, rows) {
1088
1847
  "",
1089
1848
  "| Key | Meaning |",
1090
1849
  "| --- | --- |",
1091
- ...rows.map((row) => `| \`${row.key}\` | ${row.description} |`)
1850
+ ...rows.map((row2) => `| \`${row2.key}\` | ${row2.description} |`)
1092
1851
  ];
1093
1852
  }
1094
1853
  function buildGtmSkillBody(skill) {
@@ -1290,27 +2049,27 @@ var EverWorksSkillsPlugin = class {
1290
2049
  const manifestUrl = `${RAW_CONTENT_BASE}/${repo}/${branch}/manifest.json`;
1291
2050
  const manifestText = await fetchText(manifestUrl);
1292
2051
  const rows = extractManifestRows(JSON.parse(manifestText));
1293
- return Promise.all(rows.map((row) => this.fetchEntry(repo, branch, row)));
2052
+ return Promise.all(rows.map((row2) => this.fetchEntry(repo, branch, row2)));
1294
2053
  }
1295
- async fetchEntry(repo, branch, row) {
1296
- const slug = typeof row.slug === "string" ? row.slug.trim() : "";
1297
- const skillPath = typeof row.skillPath === "string" ? row.skillPath.trim() : "";
2054
+ async fetchEntry(repo, branch, row2) {
2055
+ const slug = typeof row2.slug === "string" ? row2.slug.trim() : "";
2056
+ const skillPath = typeof row2.skillPath === "string" ? row2.skillPath.trim() : "";
1298
2057
  if (!slug || !skillPath) {
1299
- throw new Error(`invalid manifest row (missing slug/skillPath): ${JSON.stringify(row)}`);
2058
+ throw new Error(`invalid manifest row (missing slug/skillPath): ${JSON.stringify(row2)}`);
1300
2059
  }
1301
2060
  const skillUrl = `${RAW_CONTENT_BASE}/${repo}/${branch}/${skillPath.replace(/^\/+/, "")}`;
1302
2061
  const markdown = await fetchText(skillUrl);
1303
2062
  const parsed = matter__default.default(markdown);
1304
- const frontmatter = normalizeFrontmatter(parsed.data, slug, row);
2063
+ const frontmatter = normalizeFrontmatter(parsed.data, slug, row2);
1305
2064
  return {
1306
2065
  slug,
1307
- title: firstNonEmpty(row.name, frontmatter.name, slug),
1308
- description: firstNonEmpty(row.summary, frontmatter.description, ""),
2066
+ title: firstNonEmpty(row2.name, frontmatter.name, slug),
2067
+ description: firstNonEmpty(row2.summary, frontmatter.description, ""),
1309
2068
  frontmatter,
1310
2069
  body: parsed.content.trim(),
1311
- version: firstNonEmpty(row.version, asString(parsed.data.version), "1.0.0"),
1312
- tags: normalizeTags(row.tags, frontmatter.tags),
1313
- ...typeof row.sourceUrl === "string" && row.sourceUrl ? { sourceUrl: row.sourceUrl } : {}
2070
+ version: firstNonEmpty(row2.version, asString(parsed.data.version), "1.0.0"),
2071
+ tags: normalizeTags(row2.tags, frontmatter.tags),
2072
+ ...typeof row2.sourceUrl === "string" && row2.sourceUrl ? { sourceUrl: row2.sourceUrl } : {}
1314
2073
  };
1315
2074
  }
1316
2075
  };
@@ -1339,9 +2098,9 @@ function extractManifestRows(parsed) {
1339
2098
  }
1340
2099
  throw new Error("manifest.json does not contain a skills array");
1341
2100
  }
1342
- function normalizeFrontmatter(data, slug, row) {
1343
- const name = firstNonEmpty(asString(data.name), row.name, slug);
1344
- const description = firstNonEmpty(asString(data.description), row.summary, "");
2101
+ function normalizeFrontmatter(data, slug, row2) {
2102
+ const name = firstNonEmpty(asString(data.name), row2.name, slug);
2103
+ const description = firstNonEmpty(asString(data.description), row2.summary, "");
1345
2104
  return { ...data, name, description };
1346
2105
  }
1347
2106
  function normalizeTags(rowTags, frontmatterTags) {