@ever-works/hermes-agent-plugin 1.0.14 → 1.0.15

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
@@ -1273,7 +1273,18 @@ var FLEET_JOB_DEFAULT_QUEUED_MAX_AGE_SEC = Object.freeze({
1273
1273
  // fails closed to), so an older reader's "unknown kind" answer is unchanged.
1274
1274
  // A control the owner no longer wants is cancelled with its child's row.
1275
1275
  "vm-create": 2 * 60 * 60,
1276
- "vm-control": 2 * 60 * 60
1276
+ "vm-control": 2 * 60 * 60,
1277
+ // Usage scan (FL-20). The plan proposed 15 minutes (one scan interval); like
1278
+ // the kinds above it does NOT undercut the shortest existing default (the
1279
+ // fallback an unknown kind fails closed to). A scan nobody leased is simply
1280
+ // superseded: the dispatcher never enqueues a second while one is queued.
1281
+ "usage-scan": 2 * 60 * 60,
1282
+ // Actions runners on computers (FL-18). The plan proposed an hour for an
1283
+ // install and ten minutes for a control; like FL-16's kinds they do NOT
1284
+ // undercut the shortest existing default (the fallback an unknown kind fails
1285
+ // closed to), so an older reader's answer for an unknown kind is unchanged.
1286
+ "runner-install": 2 * 60 * 60,
1287
+ "runner-control": 2 * 60 * 60
1277
1288
  });
1278
1289
  var FLEET_JOB_MAX_QUEUED_MAX_AGE_SEC = 7 * 24 * 60 * 60;
1279
1290
  var FLEET_AGENT_EXECUTION_MAX_INSTRUCTIONS_BYTES = 160 * 1024;
@@ -1969,9 +1980,9 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
1969
1980
  waitable: true,
1970
1981
  alwaysHeld: true
1971
1982
  }),
1972
- // ── cloud (FL-17) ── P1 shipped: providers, create, power, destroy, usage. A create, a power
1973
- // change and a destroy are held for the owner's approval by the Agent tools
1974
- // (`agent-fleet-cloud-tools.ts`); the idle policy arrives with P2.
1983
+ // ── cloud (FL-17) ── P1 shipped providers, create, power, destroy, usage; P2 the idle policy
1984
+ // (`PUT` answers the same as `PATCH`). A create, a power change and a destroy are held for the
1985
+ // owner's approval by the Agent tools (`agent-fleet-cloud-tools.ts`).
1975
1986
  read("fleet_cloud_list", "view", "FL-17", "FLEET_CLOUD_ENABLED", "live", {
1976
1987
  phase: "P3",
1977
1988
  route: GET("/api/fleet/cloud"),
@@ -2010,13 +2021,15 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
2010
2021
  waitable: true,
2011
2022
  alwaysHeld: true
2012
2023
  }),
2013
- act("fleet_cloud_idle_policy", "machines", "FL-17", "FLEET_CLOUD_ENABLED", "planned", plain("machine.admin"), {
2024
+ act("fleet_cloud_idle_policy", "machines", "FL-17", "FLEET_CLOUD_ENABLED", "live", plain("machine.admin"), {
2014
2025
  phase: "P3",
2015
2026
  route: PATCH("/api/fleet/cloud/{id}/idle-policy"),
2016
2027
  cli: "fleet cloud idle-policy"
2017
2028
  }),
2018
- // ── runners (FL-18) ──
2019
- read("fleet_runners_list", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "planned", {
2029
+ // ── runners (FL-18) ── P1 shipped: list, install, start / stop / restart, remove. An install, a
2030
+ // stop, a restart and a remove asked by an Agent are held for the owner's approval
2031
+ // (`agent-fleet-runners-tools.ts`). The Actions jobs read and Cancel workflow run arrive with P2.
2032
+ read("fleet_runners_list", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "live", {
2020
2033
  phase: "P3",
2021
2034
  route: GET("/api/fleet/nodes/{id}/runners"),
2022
2035
  cli: "fleet runners list"
@@ -2031,23 +2044,29 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
2031
2044
  "machines",
2032
2045
  "FL-18",
2033
2046
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2034
- "planned",
2047
+ "live",
2035
2048
  confirm("machine.admin"),
2036
- { phase: "P3", route: POST("/api/fleet/nodes/{id}/runners"), cli: "fleet runners install", waitable: true }
2049
+ {
2050
+ phase: "P3",
2051
+ route: POST("/api/fleet/nodes/{id}/runners"),
2052
+ cli: "fleet runners install",
2053
+ waitable: true,
2054
+ alwaysHeld: true
2055
+ }
2037
2056
  ),
2038
2057
  act(
2039
2058
  "fleet_runners_action",
2040
2059
  "machines",
2041
2060
  "FL-18",
2042
2061
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2043
- "planned",
2062
+ "live",
2044
2063
  confirm("machine.admin"),
2045
2064
  {
2046
2065
  phase: "P3",
2047
2066
  route: POST("/api/fleet/nodes/{id}/runners/{runnerId}/{action}"),
2048
2067
  cli: "fleet runners action",
2049
2068
  waitable: true,
2050
- confirmationNote: "plain to start; confirm to stop and restart"
2069
+ confirmationNote: "plain to start; confirm to stop and restart (an Agent's stop or restart is held for the owner)"
2051
2070
  }
2052
2071
  ),
2053
2072
  act(
@@ -2055,9 +2074,15 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
2055
2074
  "machines",
2056
2075
  "FL-18",
2057
2076
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2058
- "planned",
2077
+ "live",
2059
2078
  typed("write.destructive"),
2060
- { phase: "P3", route: DELETE("/api/fleet/nodes/{id}/runners/{runnerId}"), cli: "fleet runners remove" }
2079
+ {
2080
+ phase: "P3",
2081
+ route: POST("/api/fleet/nodes/{id}/runners/{runnerId}/remove"),
2082
+ cli: "fleet runners remove",
2083
+ waitable: true,
2084
+ alwaysHeld: true
2085
+ }
2061
2086
  ),
2062
2087
  act(
2063
2088
  "fleet_runners_cancel_run",
@@ -2066,10 +2091,12 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
2066
2091
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2067
2092
  "planned",
2068
2093
  confirm("machine.admin"),
2069
- { phase: "P3", route: POST("/api/fleet/runners/jobs/{jobId}/cancel"), cli: "fleet runners cancel-run" }
2094
+ { phase: "P3", route: POST("/api/fleet/runners/jobs/cancel"), cli: "fleet runners cancel-run" }
2070
2095
  ),
2071
- // ── usage (FL-20) ──
2072
- read("fleet_usage_get", "view", "FL-20", "FLEET_USAGE_SCAN_ENABLED", "planned", {
2096
+ // ── usage (FL-20) ── P1 shipped: the Usage object (totals, by model, by computer, busiest
2097
+ // checkouts, sessions) every surface renders, read-only, with the payer sentence in `note`.
2098
+ read("fleet_usage_get", "view", "FL-20", "FLEET_USAGE_SCAN_ENABLED", "live", {
2099
+ phase: "P3",
2073
2100
  route: GET("/api/fleet/usage"),
2074
2101
  cli: "fleet usage"
2075
2102
  }),
@@ -2244,6 +2271,16 @@ var FLEET_VIRTUAL_SYSTEM_IDS = FLEET_VIRTUAL_SYSTEMS.map((system) => system.id);
2244
2271
  var FLEET_VIRTUAL_ENROLL_TIMEOUT_MS = 20 * 60 * 1e3;
2245
2272
  var FLEET_CLOUD_OPTIONS_CACHE_MS = 10 * 60 * 1e3;
2246
2273
  var HOUR_MS2 = 60 * 60 * 1e3;
2274
+ var FLEET_CLOUD_USAGE_FRESH_MS = 5 * 60 * 1e3;
2275
+ var FLEET_USAGE_SCAN_INTERVAL_MS = 15 * 60 * 1e3;
2276
+ var FLEET_USAGE_REPORT_MAX_BYTES = 192 * 1024;
2277
+ var FLEET_USAGE_ZERO_TOKENS = Object.freeze({
2278
+ in: 0,
2279
+ out: 0,
2280
+ cacheRead: 0,
2281
+ cacheWrite: 0
2282
+ });
2283
+ var FLEET_ACTIONS_RUNNERS_CLOSED_REFRESH_MS = 5 * 6e4;
2247
2284
  var EMAIL_INBOX_DEFAULT_DAILY_CAP = 100;
2248
2285
  var EMAIL_INBOX_BURST_SENDS = 10;
2249
2286
  var EMAIL_INBOX_BURST_RECIPIENTS = 20;
@@ -3623,7 +3660,14 @@ var PLUGIN_CAPABILITIES = {
3623
3660
  // `capabilities/machine-provider.interface.ts`. Appended **last**, so every
3624
3661
  // existing constant keeps its value and its position, and landed in the same
3625
3662
  // change as the `machine-provider` category in `plugin-manifest.types.ts`.
3626
- MACHINE_PROVIDER: "machine-provider"
3663
+ MACHINE_PROVIDER: "machine-provider",
3664
+ // Actions runners on computers (FL-18, CONTRACTS R-14) — GitHub's self-hosted
3665
+ // runner API through the Ever Works GitHub App (`github-actions-runners`),
3666
+ // consumed only through `ActionsRunnersFacadeService`; see
3667
+ // `capabilities/actions-runners.interface.ts`. Appended last, so every
3668
+ // existing constant keeps its value and its position; no category is added
3669
+ // (the plugin is an `integration`, which exists).
3670
+ ACTIONS_RUNNERS: "actions-runners"
3627
3671
  };
3628
3672
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
3629
3673
  function validateRequiredItemFields(data) {
package/dist/index.js CHANGED
@@ -1234,7 +1234,18 @@ var FLEET_JOB_DEFAULT_QUEUED_MAX_AGE_SEC = Object.freeze({
1234
1234
  // fails closed to), so an older reader's "unknown kind" answer is unchanged.
1235
1235
  // A control the owner no longer wants is cancelled with its child's row.
1236
1236
  "vm-create": 2 * 60 * 60,
1237
- "vm-control": 2 * 60 * 60
1237
+ "vm-control": 2 * 60 * 60,
1238
+ // Usage scan (FL-20). The plan proposed 15 minutes (one scan interval); like
1239
+ // the kinds above it does NOT undercut the shortest existing default (the
1240
+ // fallback an unknown kind fails closed to). A scan nobody leased is simply
1241
+ // superseded: the dispatcher never enqueues a second while one is queued.
1242
+ "usage-scan": 2 * 60 * 60,
1243
+ // Actions runners on computers (FL-18). The plan proposed an hour for an
1244
+ // install and ten minutes for a control; like FL-16's kinds they do NOT
1245
+ // undercut the shortest existing default (the fallback an unknown kind fails
1246
+ // closed to), so an older reader's answer for an unknown kind is unchanged.
1247
+ "runner-install": 2 * 60 * 60,
1248
+ "runner-control": 2 * 60 * 60
1238
1249
  });
1239
1250
  var FLEET_JOB_MAX_QUEUED_MAX_AGE_SEC = 7 * 24 * 60 * 60;
1240
1251
  var FLEET_AGENT_EXECUTION_MAX_INSTRUCTIONS_BYTES = 160 * 1024;
@@ -1930,9 +1941,9 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
1930
1941
  waitable: true,
1931
1942
  alwaysHeld: true
1932
1943
  }),
1933
- // ── cloud (FL-17) ── P1 shipped: providers, create, power, destroy, usage. A create, a power
1934
- // change and a destroy are held for the owner's approval by the Agent tools
1935
- // (`agent-fleet-cloud-tools.ts`); the idle policy arrives with P2.
1944
+ // ── cloud (FL-17) ── P1 shipped providers, create, power, destroy, usage; P2 the idle policy
1945
+ // (`PUT` answers the same as `PATCH`). A create, a power change and a destroy are held for the
1946
+ // owner's approval by the Agent tools (`agent-fleet-cloud-tools.ts`).
1936
1947
  read("fleet_cloud_list", "view", "FL-17", "FLEET_CLOUD_ENABLED", "live", {
1937
1948
  phase: "P3",
1938
1949
  route: GET("/api/fleet/cloud"),
@@ -1971,13 +1982,15 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
1971
1982
  waitable: true,
1972
1983
  alwaysHeld: true
1973
1984
  }),
1974
- act("fleet_cloud_idle_policy", "machines", "FL-17", "FLEET_CLOUD_ENABLED", "planned", plain("machine.admin"), {
1985
+ act("fleet_cloud_idle_policy", "machines", "FL-17", "FLEET_CLOUD_ENABLED", "live", plain("machine.admin"), {
1975
1986
  phase: "P3",
1976
1987
  route: PATCH("/api/fleet/cloud/{id}/idle-policy"),
1977
1988
  cli: "fleet cloud idle-policy"
1978
1989
  }),
1979
- // ── runners (FL-18) ──
1980
- read("fleet_runners_list", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "planned", {
1990
+ // ── runners (FL-18) ── P1 shipped: list, install, start / stop / restart, remove. An install, a
1991
+ // stop, a restart and a remove asked by an Agent are held for the owner's approval
1992
+ // (`agent-fleet-runners-tools.ts`). The Actions jobs read and Cancel workflow run arrive with P2.
1993
+ read("fleet_runners_list", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "live", {
1981
1994
  phase: "P3",
1982
1995
  route: GET("/api/fleet/nodes/{id}/runners"),
1983
1996
  cli: "fleet runners list"
@@ -1992,23 +2005,29 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
1992
2005
  "machines",
1993
2006
  "FL-18",
1994
2007
  "FLEET_ACTIONS_RUNNERS_ENABLED",
1995
- "planned",
2008
+ "live",
1996
2009
  confirm("machine.admin"),
1997
- { phase: "P3", route: POST("/api/fleet/nodes/{id}/runners"), cli: "fleet runners install", waitable: true }
2010
+ {
2011
+ phase: "P3",
2012
+ route: POST("/api/fleet/nodes/{id}/runners"),
2013
+ cli: "fleet runners install",
2014
+ waitable: true,
2015
+ alwaysHeld: true
2016
+ }
1998
2017
  ),
1999
2018
  act(
2000
2019
  "fleet_runners_action",
2001
2020
  "machines",
2002
2021
  "FL-18",
2003
2022
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2004
- "planned",
2023
+ "live",
2005
2024
  confirm("machine.admin"),
2006
2025
  {
2007
2026
  phase: "P3",
2008
2027
  route: POST("/api/fleet/nodes/{id}/runners/{runnerId}/{action}"),
2009
2028
  cli: "fleet runners action",
2010
2029
  waitable: true,
2011
- confirmationNote: "plain to start; confirm to stop and restart"
2030
+ confirmationNote: "plain to start; confirm to stop and restart (an Agent's stop or restart is held for the owner)"
2012
2031
  }
2013
2032
  ),
2014
2033
  act(
@@ -2016,9 +2035,15 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
2016
2035
  "machines",
2017
2036
  "FL-18",
2018
2037
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2019
- "planned",
2038
+ "live",
2020
2039
  typed("write.destructive"),
2021
- { phase: "P3", route: DELETE("/api/fleet/nodes/{id}/runners/{runnerId}"), cli: "fleet runners remove" }
2040
+ {
2041
+ phase: "P3",
2042
+ route: POST("/api/fleet/nodes/{id}/runners/{runnerId}/remove"),
2043
+ cli: "fleet runners remove",
2044
+ waitable: true,
2045
+ alwaysHeld: true
2046
+ }
2022
2047
  ),
2023
2048
  act(
2024
2049
  "fleet_runners_cancel_run",
@@ -2027,10 +2052,12 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
2027
2052
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2028
2053
  "planned",
2029
2054
  confirm("machine.admin"),
2030
- { phase: "P3", route: POST("/api/fleet/runners/jobs/{jobId}/cancel"), cli: "fleet runners cancel-run" }
2055
+ { phase: "P3", route: POST("/api/fleet/runners/jobs/cancel"), cli: "fleet runners cancel-run" }
2031
2056
  ),
2032
- // ── usage (FL-20) ──
2033
- read("fleet_usage_get", "view", "FL-20", "FLEET_USAGE_SCAN_ENABLED", "planned", {
2057
+ // ── usage (FL-20) ── P1 shipped: the Usage object (totals, by model, by computer, busiest
2058
+ // checkouts, sessions) every surface renders, read-only, with the payer sentence in `note`.
2059
+ read("fleet_usage_get", "view", "FL-20", "FLEET_USAGE_SCAN_ENABLED", "live", {
2060
+ phase: "P3",
2034
2061
  route: GET("/api/fleet/usage"),
2035
2062
  cli: "fleet usage"
2036
2063
  }),
@@ -2205,6 +2232,16 @@ var FLEET_VIRTUAL_SYSTEM_IDS = FLEET_VIRTUAL_SYSTEMS.map((system) => system.id);
2205
2232
  var FLEET_VIRTUAL_ENROLL_TIMEOUT_MS = 20 * 60 * 1e3;
2206
2233
  var FLEET_CLOUD_OPTIONS_CACHE_MS = 10 * 60 * 1e3;
2207
2234
  var HOUR_MS2 = 60 * 60 * 1e3;
2235
+ var FLEET_CLOUD_USAGE_FRESH_MS = 5 * 60 * 1e3;
2236
+ var FLEET_USAGE_SCAN_INTERVAL_MS = 15 * 60 * 1e3;
2237
+ var FLEET_USAGE_REPORT_MAX_BYTES = 192 * 1024;
2238
+ var FLEET_USAGE_ZERO_TOKENS = Object.freeze({
2239
+ in: 0,
2240
+ out: 0,
2241
+ cacheRead: 0,
2242
+ cacheWrite: 0
2243
+ });
2244
+ var FLEET_ACTIONS_RUNNERS_CLOSED_REFRESH_MS = 5 * 6e4;
2208
2245
  var EMAIL_INBOX_DEFAULT_DAILY_CAP = 100;
2209
2246
  var EMAIL_INBOX_BURST_SENDS = 10;
2210
2247
  var EMAIL_INBOX_BURST_RECIPIENTS = 20;
@@ -3584,7 +3621,14 @@ var PLUGIN_CAPABILITIES = {
3584
3621
  // `capabilities/machine-provider.interface.ts`. Appended **last**, so every
3585
3622
  // existing constant keeps its value and its position, and landed in the same
3586
3623
  // change as the `machine-provider` category in `plugin-manifest.types.ts`.
3587
- MACHINE_PROVIDER: "machine-provider"
3624
+ MACHINE_PROVIDER: "machine-provider",
3625
+ // Actions runners on computers (FL-18, CONTRACTS R-14) — GitHub's self-hosted
3626
+ // runner API through the Ever Works GitHub App (`github-actions-runners`),
3627
+ // consumed only through `ActionsRunnersFacadeService`; see
3628
+ // `capabilities/actions-runners.interface.ts`. Appended last, so every
3629
+ // existing constant keeps its value and its position; no category is added
3630
+ // (the plugin is an `integration`, which exists).
3631
+ ACTIONS_RUNNERS: "actions-runners"
3588
3632
  };
3589
3633
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
3590
3634
  function validateRequiredItemFields(data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/hermes-agent-plugin",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Hermes Agent pipeline plugin for Ever Works",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -33,10 +33,10 @@
33
33
  "test:coverage": "vitest run --coverage"
34
34
  },
35
35
  "peerDependencies": {
36
- "@ever-works/plugin": "^1.2.10"
36
+ "@ever-works/plugin": "^1.2.11"
37
37
  },
38
38
  "devDependencies": {
39
- "@ever-works/plugin": "^1.2.10",
39
+ "@ever-works/plugin": "^1.2.11",
40
40
  "@types/node": "^26.6.4",
41
41
  "tsup": "^8.0.0",
42
42
  "typescript": "^5.9.3",
@@ -73,8 +73,8 @@
73
73
  "url": "https://github.com/ever-works/ever-works/issues"
74
74
  },
75
75
  "everworksRelease": {
76
- "contentHash": "sha256:872019d0bca53e76c2f46ea95ce1e1382ac0f080216339eec5a4026888f8b78a",
77
- "commit": "f5cb0350637a564ce68449b6607a6f8f83ccce9c",
78
- "source": "https://github.com/ever-works/ever-works/tree/f5cb0350637a564ce68449b6607a6f8f83ccce9c/packages/plugins/hermes-agent"
76
+ "contentHash": "sha256:8590291ac293ca9d1ddec3b91a540df4f268e3277daf506a0a6d57756e5c6a68",
77
+ "commit": "67e286ed0d4c3dcc0d66d2f628215ab966cc26e1",
78
+ "source": "https://github.com/ever-works/ever-works/tree/67e286ed0d4c3dcc0d66d2f628215ab966cc26e1/packages/plugins/hermes-agent"
79
79
  }
80
80
  }