@meltstudio/meltctl 4.192.1 → 4.193.0

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 (2) hide show
  1. package/dist/index.js +49 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var CLI_VERSION;
14
14
  var init_version = __esm({
15
15
  "src/utils/version.ts"() {
16
16
  "use strict";
17
- CLI_VERSION = "4.192.1";
17
+ CLI_VERSION = "4.193.0";
18
18
  }
19
19
  });
20
20
 
@@ -1546,6 +1546,30 @@ function createProfileAuditsResource(config) {
1546
1546
  throw new Error(errMessage ?? `Failed to fetch profile audit stats (${status})`);
1547
1547
  }
1548
1548
  return data;
1549
+ },
1550
+ /** Read whether the on-demand "Run audit" button is currently
1551
+ * clickable, along with the last-run timestamp + cooldown window
1552
+ * the dashboard renders. Manager-only. */
1553
+ async getRunStatus() {
1554
+ const { data, status } = await apiFetch(config, "/profile-audits/status");
1555
+ if (status === 403)
1556
+ throw new Error("Access denied. Only Team Managers can read profile audit status.");
1557
+ if (status !== 200)
1558
+ throw new Error(data.error ?? `Failed to fetch profile audit status (${status})`);
1559
+ return data;
1560
+ },
1561
+ /** Enqueue a one-off profile audit run. Returns the new job id +
1562
+ * the refreshed status (so the button can flip to disabled on the
1563
+ * client without waiting for a re-fetch). Resolves with the
1564
+ * cooldown / in-flight payload on 429 so the dashboard can render
1565
+ * the same disabled-with-reason UI without a special error path. */
1566
+ async runNow() {
1567
+ const { data, status } = await apiFetch(config, "/profile-audits/run", { method: "POST" });
1568
+ if (status === 403)
1569
+ throw new Error("Access denied. Only Team Managers can run profile audits.");
1570
+ if (status !== 202 && status !== 429)
1571
+ throw new Error(data.error ?? `Failed to start profile audit (${status})`);
1572
+ return data;
1549
1573
  }
1550
1574
  };
1551
1575
  }
@@ -4807,6 +4831,30 @@ function createProfileAuditsResource2(config) {
4807
4831
  throw new Error(errMessage ?? `Failed to fetch profile audit stats (${status})`);
4808
4832
  }
4809
4833
  return data;
4834
+ },
4835
+ /** Read whether the on-demand "Run audit" button is currently
4836
+ * clickable, along with the last-run timestamp + cooldown window
4837
+ * the dashboard renders. Manager-only. */
4838
+ async getRunStatus() {
4839
+ const { data, status } = await apiFetch2(config, "/profile-audits/status");
4840
+ if (status === 403)
4841
+ throw new Error("Access denied. Only Team Managers can read profile audit status.");
4842
+ if (status !== 200)
4843
+ throw new Error(data.error ?? `Failed to fetch profile audit status (${status})`);
4844
+ return data;
4845
+ },
4846
+ /** Enqueue a one-off profile audit run. Returns the new job id +
4847
+ * the refreshed status (so the button can flip to disabled on the
4848
+ * client without waiting for a re-fetch). Resolves with the
4849
+ * cooldown / in-flight payload on 429 so the dashboard can render
4850
+ * the same disabled-with-reason UI without a special error path. */
4851
+ async runNow() {
4852
+ const { data, status } = await apiFetch2(config, "/profile-audits/run", { method: "POST" });
4853
+ if (status === 403)
4854
+ throw new Error("Access denied. Only Team Managers can run profile audits.");
4855
+ if (status !== 202 && status !== 429)
4856
+ throw new Error(data.error ?? `Failed to start profile audit (${status})`);
4857
+ return data;
4810
4858
  }
4811
4859
  };
4812
4860
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.192.1",
3
+ "version": "4.193.0",
4
4
  "description": "AI-first development tools for teams - set up AGENTS.md, Claude Code, Cursor, and OpenCode standards",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",