@meltstudio/meltctl 4.182.0 → 4.184.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 -37
  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.182.0";
17
+ CLI_VERSION = "4.184.0";
18
18
  }
19
19
  });
20
20
 
@@ -811,8 +811,8 @@ function createTrackerResource(config) {
811
811
  }
812
812
  return data;
813
813
  },
814
- async listConnections(projectId) {
815
- const { data, status } = await apiFetch(config, `/tracker/connections/${projectId}`);
814
+ async listConnections() {
815
+ const { data, status } = await apiFetch(config, "/tracker/connections");
816
816
  if (status === 403)
817
817
  throw new Error("Access denied. Only Team Managers can view tracker connections.");
818
818
  if (status !== 200) {
@@ -821,32 +821,27 @@ function createTrackerResource(config) {
821
821
  }
822
822
  return data;
823
823
  },
824
- async listAllConnections() {
825
- const { data, status } = await apiFetch(config, `/tracker/connections`);
826
- if (status === 403)
827
- throw new Error("Access denied. Only Team Managers can view tracker connections.");
828
- if (status !== 200) {
829
- const msg = data && typeof data === "object" && "error" in data ? data.error : void 0;
830
- throw new Error(msg ?? `Failed to list tracker connections (${status})`);
831
- }
832
- return data;
833
- },
834
- async startOAuth(projectId, provider) {
835
- const { data, status } = await apiFetch(config, `/tracker/oauth/start?provider=${provider}&projectId=${projectId}`);
824
+ async startOAuth(provider, returnTo) {
825
+ const params = new URLSearchParams({ provider });
826
+ if (returnTo)
827
+ params.set("returnTo", returnTo);
828
+ const { data, status } = await apiFetch(config, `/tracker/oauth/start?${params.toString()}`);
836
829
  if (status === 503)
837
830
  throw new Error(provider === "jira" ? "Jira OAuth is not configured for this environment." : "Linear OAuth is not configured for this environment.");
838
831
  if (status !== 200)
839
832
  throw new Error(data.error ?? `Failed to start OAuth flow (${status})`);
840
833
  return data;
841
834
  },
842
- async disconnect(projectId, provider) {
843
- const { data, status } = await apiFetch(config, `/tracker/connections/${projectId}/${provider}`, { method: "DELETE" });
835
+ async deleteConnection(id) {
836
+ const { data, status } = await apiFetch(config, `/tracker/connections/${id}`, {
837
+ method: "DELETE"
838
+ });
844
839
  if (status === 403)
845
- throw new Error("Access denied. Only Team Managers can disconnect trackers.");
840
+ throw new Error("Access denied. Only Team Managers can delete tracker connections.");
846
841
  if (status === 404)
847
842
  throw new Error("Connection not found.");
848
843
  if (status >= 400)
849
- throw new Error(data.error ?? `Failed to disconnect tracker (${status})`);
844
+ throw new Error(data.error ?? `Failed to delete connection (${status})`);
850
845
  },
851
846
  async listTeams(projectId) {
852
847
  const { data, status } = await apiFetch(config, `/tracker/teams/${projectId}`);
@@ -1210,6 +1205,17 @@ function createPmResource(config) {
1210
1205
  const res = await apiFetch(config, `/pm/risks?status=${status}`);
1211
1206
  return unwrap("list risks", res);
1212
1207
  },
1208
+ /**
1209
+ * On-demand pull of one project's risks from Linear into the mirror (#503).
1210
+ * The scheduled sync runs weekly; this lets a PM who just closed/updated
1211
+ * risks refresh immediately. Manager-only on the server. Returns the sync
1212
+ * counts (upserted/deleted). Throws if the project isn't mapped to a risks
1213
+ * board (409) or the risk-board key is unconfigured (503).
1214
+ */
1215
+ async refreshProjectRisks(projectId) {
1216
+ const res = await apiFetch(config, `/pm/projects/${projectId}/risks/refresh`, { method: "POST" });
1217
+ return unwrap("refresh project risks", res);
1218
+ },
1213
1219
  // ─── Portfolio status ──────────────────────────────────────────────────
1214
1220
  /**
1215
1221
  * Cross-project ranked answer to "where do I focus next?". Returns a
@@ -3939,8 +3945,8 @@ function createTrackerResource2(config) {
3939
3945
  }
3940
3946
  return data;
3941
3947
  },
3942
- async listConnections(projectId) {
3943
- const { data, status } = await apiFetch2(config, `/tracker/connections/${projectId}`);
3948
+ async listConnections() {
3949
+ const { data, status } = await apiFetch2(config, "/tracker/connections");
3944
3950
  if (status === 403)
3945
3951
  throw new Error("Access denied. Only Team Managers can view tracker connections.");
3946
3952
  if (status !== 200) {
@@ -3949,32 +3955,27 @@ function createTrackerResource2(config) {
3949
3955
  }
3950
3956
  return data;
3951
3957
  },
3952
- async listAllConnections() {
3953
- const { data, status } = await apiFetch2(config, `/tracker/connections`);
3954
- if (status === 403)
3955
- throw new Error("Access denied. Only Team Managers can view tracker connections.");
3956
- if (status !== 200) {
3957
- const msg = data && typeof data === "object" && "error" in data ? data.error : void 0;
3958
- throw new Error(msg ?? `Failed to list tracker connections (${status})`);
3959
- }
3960
- return data;
3961
- },
3962
- async startOAuth(projectId, provider) {
3963
- const { data, status } = await apiFetch2(config, `/tracker/oauth/start?provider=${provider}&projectId=${projectId}`);
3958
+ async startOAuth(provider, returnTo) {
3959
+ const params = new URLSearchParams({ provider });
3960
+ if (returnTo)
3961
+ params.set("returnTo", returnTo);
3962
+ const { data, status } = await apiFetch2(config, `/tracker/oauth/start?${params.toString()}`);
3964
3963
  if (status === 503)
3965
3964
  throw new Error(provider === "jira" ? "Jira OAuth is not configured for this environment." : "Linear OAuth is not configured for this environment.");
3966
3965
  if (status !== 200)
3967
3966
  throw new Error(data.error ?? `Failed to start OAuth flow (${status})`);
3968
3967
  return data;
3969
3968
  },
3970
- async disconnect(projectId, provider) {
3971
- const { data, status } = await apiFetch2(config, `/tracker/connections/${projectId}/${provider}`, { method: "DELETE" });
3969
+ async deleteConnection(id) {
3970
+ const { data, status } = await apiFetch2(config, `/tracker/connections/${id}`, {
3971
+ method: "DELETE"
3972
+ });
3972
3973
  if (status === 403)
3973
- throw new Error("Access denied. Only Team Managers can disconnect trackers.");
3974
+ throw new Error("Access denied. Only Team Managers can delete tracker connections.");
3974
3975
  if (status === 404)
3975
3976
  throw new Error("Connection not found.");
3976
3977
  if (status >= 400)
3977
- throw new Error(data.error ?? `Failed to disconnect tracker (${status})`);
3978
+ throw new Error(data.error ?? `Failed to delete connection (${status})`);
3978
3979
  },
3979
3980
  async listTeams(projectId) {
3980
3981
  const { data, status } = await apiFetch2(config, `/tracker/teams/${projectId}`);
@@ -4334,6 +4335,17 @@ function createPmResource2(config) {
4334
4335
  const res = await apiFetch2(config, `/pm/risks?status=${status}`);
4335
4336
  return unwrap2("list risks", res);
4336
4337
  },
4338
+ /**
4339
+ * On-demand pull of one project's risks from Linear into the mirror (#503).
4340
+ * The scheduled sync runs weekly; this lets a PM who just closed/updated
4341
+ * risks refresh immediately. Manager-only on the server. Returns the sync
4342
+ * counts (upserted/deleted). Throws if the project isn't mapped to a risks
4343
+ * board (409) or the risk-board key is unconfigured (503).
4344
+ */
4345
+ async refreshProjectRisks(projectId) {
4346
+ const res = await apiFetch2(config, `/pm/projects/${projectId}/risks/refresh`, { method: "POST" });
4347
+ return unwrap2("refresh project risks", res);
4348
+ },
4337
4349
  // ─── Portfolio status ──────────────────────────────────────────────────
4338
4350
  /**
4339
4351
  * Cross-project ranked answer to "where do I focus next?". Returns a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.182.0",
3
+ "version": "4.184.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",