@ever-works/opencode-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;
@@ -7664,7 +7701,14 @@ var PLUGIN_CAPABILITIES = {
7664
7701
  // `capabilities/machine-provider.interface.ts`. Appended **last**, so every
7665
7702
  // existing constant keeps its value and its position, and landed in the same
7666
7703
  // change as the `machine-provider` category in `plugin-manifest.types.ts`.
7667
- MACHINE_PROVIDER: "machine-provider"
7704
+ MACHINE_PROVIDER: "machine-provider",
7705
+ // Actions runners on computers (FL-18, CONTRACTS R-14) — GitHub's self-hosted
7706
+ // runner API through the Ever Works GitHub App (`github-actions-runners`),
7707
+ // consumed only through `ActionsRunnersFacadeService`; see
7708
+ // `capabilities/actions-runners.interface.ts`. Appended last, so every
7709
+ // existing constant keeps its value and its position; no category is added
7710
+ // (the plugin is an `integration`, which exists).
7711
+ ACTIONS_RUNNERS: "actions-runners"
7668
7712
  };
7669
7713
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
7670
7714
  function initializePipelineState(stepDefinitions) {
package/dist/index.js CHANGED
@@ -1240,7 +1240,18 @@ var FLEET_JOB_DEFAULT_QUEUED_MAX_AGE_SEC = Object.freeze({
1240
1240
  // fails closed to), so an older reader's "unknown kind" answer is unchanged.
1241
1241
  // A control the owner no longer wants is cancelled with its child's row.
1242
1242
  "vm-create": 2 * 60 * 60,
1243
- "vm-control": 2 * 60 * 60
1243
+ "vm-control": 2 * 60 * 60,
1244
+ // Usage scan (FL-20). The plan proposed 15 minutes (one scan interval); like
1245
+ // the kinds above it does NOT undercut the shortest existing default (the
1246
+ // fallback an unknown kind fails closed to). A scan nobody leased is simply
1247
+ // superseded: the dispatcher never enqueues a second while one is queued.
1248
+ "usage-scan": 2 * 60 * 60,
1249
+ // Actions runners on computers (FL-18). The plan proposed an hour for an
1250
+ // install and ten minutes for a control; like FL-16's kinds they do NOT
1251
+ // undercut the shortest existing default (the fallback an unknown kind fails
1252
+ // closed to), so an older reader's answer for an unknown kind is unchanged.
1253
+ "runner-install": 2 * 60 * 60,
1254
+ "runner-control": 2 * 60 * 60
1244
1255
  });
1245
1256
  var FLEET_JOB_MAX_QUEUED_MAX_AGE_SEC = 7 * 24 * 60 * 60;
1246
1257
  var FLEET_AGENT_EXECUTION_MAX_INSTRUCTIONS_BYTES = 160 * 1024;
@@ -1936,9 +1947,9 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
1936
1947
  waitable: true,
1937
1948
  alwaysHeld: true
1938
1949
  }),
1939
- // ── cloud (FL-17) ── P1 shipped: providers, create, power, destroy, usage. A create, a power
1940
- // change and a destroy are held for the owner's approval by the Agent tools
1941
- // (`agent-fleet-cloud-tools.ts`); the idle policy arrives with P2.
1950
+ // ── cloud (FL-17) ── P1 shipped providers, create, power, destroy, usage; P2 the idle policy
1951
+ // (`PUT` answers the same as `PATCH`). A create, a power change and a destroy are held for the
1952
+ // owner's approval by the Agent tools (`agent-fleet-cloud-tools.ts`).
1942
1953
  read("fleet_cloud_list", "view", "FL-17", "FLEET_CLOUD_ENABLED", "live", {
1943
1954
  phase: "P3",
1944
1955
  route: GET("/api/fleet/cloud"),
@@ -1977,13 +1988,15 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
1977
1988
  waitable: true,
1978
1989
  alwaysHeld: true
1979
1990
  }),
1980
- act("fleet_cloud_idle_policy", "machines", "FL-17", "FLEET_CLOUD_ENABLED", "planned", plain("machine.admin"), {
1991
+ act("fleet_cloud_idle_policy", "machines", "FL-17", "FLEET_CLOUD_ENABLED", "live", plain("machine.admin"), {
1981
1992
  phase: "P3",
1982
1993
  route: PATCH("/api/fleet/cloud/{id}/idle-policy"),
1983
1994
  cli: "fleet cloud idle-policy"
1984
1995
  }),
1985
- // ── runners (FL-18) ──
1986
- read("fleet_runners_list", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "planned", {
1996
+ // ── runners (FL-18) ── P1 shipped: list, install, start / stop / restart, remove. An install, a
1997
+ // stop, a restart and a remove asked by an Agent are held for the owner's approval
1998
+ // (`agent-fleet-runners-tools.ts`). The Actions jobs read and Cancel workflow run arrive with P2.
1999
+ read("fleet_runners_list", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "live", {
1987
2000
  phase: "P3",
1988
2001
  route: GET("/api/fleet/nodes/{id}/runners"),
1989
2002
  cli: "fleet runners list"
@@ -1998,23 +2011,29 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
1998
2011
  "machines",
1999
2012
  "FL-18",
2000
2013
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2001
- "planned",
2014
+ "live",
2002
2015
  confirm("machine.admin"),
2003
- { phase: "P3", route: POST("/api/fleet/nodes/{id}/runners"), cli: "fleet runners install", waitable: true }
2016
+ {
2017
+ phase: "P3",
2018
+ route: POST("/api/fleet/nodes/{id}/runners"),
2019
+ cli: "fleet runners install",
2020
+ waitable: true,
2021
+ alwaysHeld: true
2022
+ }
2004
2023
  ),
2005
2024
  act(
2006
2025
  "fleet_runners_action",
2007
2026
  "machines",
2008
2027
  "FL-18",
2009
2028
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2010
- "planned",
2029
+ "live",
2011
2030
  confirm("machine.admin"),
2012
2031
  {
2013
2032
  phase: "P3",
2014
2033
  route: POST("/api/fleet/nodes/{id}/runners/{runnerId}/{action}"),
2015
2034
  cli: "fleet runners action",
2016
2035
  waitable: true,
2017
- confirmationNote: "plain to start; confirm to stop and restart"
2036
+ confirmationNote: "plain to start; confirm to stop and restart (an Agent's stop or restart is held for the owner)"
2018
2037
  }
2019
2038
  ),
2020
2039
  act(
@@ -2022,9 +2041,15 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
2022
2041
  "machines",
2023
2042
  "FL-18",
2024
2043
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2025
- "planned",
2044
+ "live",
2026
2045
  typed("write.destructive"),
2027
- { phase: "P3", route: DELETE("/api/fleet/nodes/{id}/runners/{runnerId}"), cli: "fleet runners remove" }
2046
+ {
2047
+ phase: "P3",
2048
+ route: POST("/api/fleet/nodes/{id}/runners/{runnerId}/remove"),
2049
+ cli: "fleet runners remove",
2050
+ waitable: true,
2051
+ alwaysHeld: true
2052
+ }
2028
2053
  ),
2029
2054
  act(
2030
2055
  "fleet_runners_cancel_run",
@@ -2033,10 +2058,12 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
2033
2058
  "FLEET_ACTIONS_RUNNERS_ENABLED",
2034
2059
  "planned",
2035
2060
  confirm("machine.admin"),
2036
- { phase: "P3", route: POST("/api/fleet/runners/jobs/{jobId}/cancel"), cli: "fleet runners cancel-run" }
2061
+ { phase: "P3", route: POST("/api/fleet/runners/jobs/cancel"), cli: "fleet runners cancel-run" }
2037
2062
  ),
2038
- // ── usage (FL-20) ──
2039
- read("fleet_usage_get", "view", "FL-20", "FLEET_USAGE_SCAN_ENABLED", "planned", {
2063
+ // ── usage (FL-20) ── P1 shipped: the Usage object (totals, by model, by computer, busiest
2064
+ // checkouts, sessions) every surface renders, read-only, with the payer sentence in `note`.
2065
+ read("fleet_usage_get", "view", "FL-20", "FLEET_USAGE_SCAN_ENABLED", "live", {
2066
+ phase: "P3",
2040
2067
  route: GET("/api/fleet/usage"),
2041
2068
  cli: "fleet usage"
2042
2069
  }),
@@ -2211,6 +2238,16 @@ var FLEET_VIRTUAL_SYSTEM_IDS = FLEET_VIRTUAL_SYSTEMS.map((system) => system.id);
2211
2238
  var FLEET_VIRTUAL_ENROLL_TIMEOUT_MS = 20 * 60 * 1e3;
2212
2239
  var FLEET_CLOUD_OPTIONS_CACHE_MS = 10 * 60 * 1e3;
2213
2240
  var HOUR_MS2 = 60 * 60 * 1e3;
2241
+ var FLEET_CLOUD_USAGE_FRESH_MS = 5 * 60 * 1e3;
2242
+ var FLEET_USAGE_SCAN_INTERVAL_MS = 15 * 60 * 1e3;
2243
+ var FLEET_USAGE_REPORT_MAX_BYTES = 192 * 1024;
2244
+ var FLEET_USAGE_ZERO_TOKENS = Object.freeze({
2245
+ in: 0,
2246
+ out: 0,
2247
+ cacheRead: 0,
2248
+ cacheWrite: 0
2249
+ });
2250
+ var FLEET_ACTIONS_RUNNERS_CLOSED_REFRESH_MS = 5 * 6e4;
2214
2251
  var EMAIL_INBOX_DEFAULT_DAILY_CAP = 100;
2215
2252
  var EMAIL_INBOX_BURST_SENDS = 10;
2216
2253
  var EMAIL_INBOX_BURST_RECIPIENTS = 20;
@@ -7631,7 +7668,14 @@ var PLUGIN_CAPABILITIES = {
7631
7668
  // `capabilities/machine-provider.interface.ts`. Appended **last**, so every
7632
7669
  // existing constant keeps its value and its position, and landed in the same
7633
7670
  // change as the `machine-provider` category in `plugin-manifest.types.ts`.
7634
- MACHINE_PROVIDER: "machine-provider"
7671
+ MACHINE_PROVIDER: "machine-provider",
7672
+ // Actions runners on computers (FL-18, CONTRACTS R-14) — GitHub's self-hosted
7673
+ // runner API through the Ever Works GitHub App (`github-actions-runners`),
7674
+ // consumed only through `ActionsRunnersFacadeService`; see
7675
+ // `capabilities/actions-runners.interface.ts`. Appended last, so every
7676
+ // existing constant keeps its value and its position; no category is added
7677
+ // (the plugin is an `integration`, which exists).
7678
+ ACTIONS_RUNNERS: "actions-runners"
7635
7679
  };
7636
7680
  var ALL_PLUGIN_CAPABILITIES = Object.values(PLUGIN_CAPABILITIES);
7637
7681
  function initializePipelineState(stepDefinitions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/opencode-plugin",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "OpenCode Generator Plugin - Full pipeline plugin that delegates generation to OpenCode",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -33,14 +33,14 @@
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
  "dependencies": {
39
39
  "extract-zip": "^2.0.1",
40
40
  "tar": "^7.5.21"
41
41
  },
42
42
  "devDependencies": {
43
- "@ever-works/plugin": "^1.2.10",
43
+ "@ever-works/plugin": "^1.2.11",
44
44
  "@types/node": "^26.6.4",
45
45
  "tsup": "^8.0.0",
46
46
  "typescript": "^5.9.3",
@@ -78,8 +78,8 @@
78
78
  "url": "https://github.com/ever-works/ever-works/issues"
79
79
  },
80
80
  "everworksRelease": {
81
- "contentHash": "sha256:fb183b8cb859331600d18a1035daf9057b81a9221eff992e94ecfcf9e0c14850",
82
- "commit": "f5cb0350637a564ce68449b6607a6f8f83ccce9c",
83
- "source": "https://github.com/ever-works/ever-works/tree/f5cb0350637a564ce68449b6607a6f8f83ccce9c/packages/plugins/opencode"
81
+ "contentHash": "sha256:0c929b8812da03e471023a06a2fe927cbc056b3f9189d8ed1cc2cc727fa95e89",
82
+ "commit": "67e286ed0d4c3dcc0d66d2f628215ab966cc26e1",
83
+ "source": "https://github.com/ever-works/ever-works/tree/67e286ed0d4c3dcc0d66d2f628215ab966cc26e1/packages/plugins/opencode"
84
84
  }
85
85
  }