@meltstudio/meltctl 4.86.1 → 4.88.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 +120 -2
  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.86.1";
17
+ CLI_VERSION = "4.88.0";
18
18
  }
19
19
  });
20
20
 
@@ -804,6 +804,123 @@ function createBoardAuditsResource(config2) {
804
804
  };
805
805
  }
806
806
 
807
+ // ../sdk/dist/resources/pm.js
808
+ function unwrap(label, response, okStatus = 200) {
809
+ const okStatuses = Array.isArray(okStatus) ? okStatus : [okStatus];
810
+ if (response.status === 403)
811
+ throw new Error(`Access denied (${label})`);
812
+ if (!okStatuses.includes(response.status)) {
813
+ throw new Error(response.data.error ?? `Failed: ${label} (${response.status})`);
814
+ }
815
+ return response.data;
816
+ }
817
+ function createPmResource(config2) {
818
+ return {
819
+ // ─── Features ─────────────────────────────────────────────────────────
820
+ async listFeatures(projectId) {
821
+ const res = await apiFetch(config2, `/pm/features?projectId=${projectId}`);
822
+ return unwrap("list features", res);
823
+ },
824
+ async getFeature(id) {
825
+ const res = await apiFetch(config2, `/pm/features/${id}`);
826
+ return unwrap("get feature", res);
827
+ },
828
+ async createFeature(input3) {
829
+ const res = await apiFetch(config2, `/pm/features`, {
830
+ method: "POST",
831
+ body: JSON.stringify(input3)
832
+ });
833
+ return unwrap("create feature", res, 201);
834
+ },
835
+ async updateFeature(id, input3) {
836
+ const res = await apiFetch(config2, `/pm/features/${id}`, {
837
+ method: "PATCH",
838
+ body: JSON.stringify(input3)
839
+ });
840
+ return unwrap("update feature", res);
841
+ },
842
+ async deleteFeature(id) {
843
+ const res = await apiFetch(config2, `/pm/features/${id}`, {
844
+ method: "DELETE"
845
+ });
846
+ unwrap("delete feature", res);
847
+ },
848
+ // ─── Phases ───────────────────────────────────────────────────────────
849
+ async listPhases(projectId, includeClosed = false) {
850
+ const params = new URLSearchParams({ projectId: String(projectId) });
851
+ if (includeClosed)
852
+ params.set("includeClosed", "true");
853
+ const res = await apiFetch(config2, `/pm/phases?${params}`);
854
+ return unwrap("list phases", res);
855
+ },
856
+ async getPhase(id) {
857
+ const res = await apiFetch(config2, `/pm/phases/${id}`);
858
+ return unwrap("get phase", res);
859
+ },
860
+ async createPhase(input3) {
861
+ const res = await apiFetch(config2, `/pm/phases`, {
862
+ method: "POST",
863
+ body: JSON.stringify(input3)
864
+ });
865
+ return unwrap("create phase", res, 201);
866
+ },
867
+ async updatePhase(id, input3) {
868
+ const res = await apiFetch(config2, `/pm/phases/${id}`, {
869
+ method: "PATCH",
870
+ body: JSON.stringify(input3)
871
+ });
872
+ return unwrap("update phase", res);
873
+ },
874
+ async setPhasePrimary(id) {
875
+ const res = await apiFetch(config2, `/pm/phases/${id}/set-primary`, {
876
+ method: "POST"
877
+ });
878
+ return unwrap("set phase primary", res);
879
+ },
880
+ async closePhase(id) {
881
+ const res = await apiFetch(config2, `/pm/phases/${id}/close`, {
882
+ method: "POST"
883
+ });
884
+ return unwrap("close phase", res);
885
+ },
886
+ async assignFeature(phaseId, featureId) {
887
+ const res = await apiFetch(config2, `/pm/phases/${phaseId}/features`, { method: "POST", body: JSON.stringify({ featureId }) });
888
+ return unwrap("assign feature", res, 201);
889
+ },
890
+ async unassignFeature(phaseId, featureId) {
891
+ const res = await apiFetch(config2, `/pm/phases/${phaseId}/features/${featureId}`, { method: "DELETE" });
892
+ unwrap("unassign feature", res);
893
+ },
894
+ // ─── Roadmap ──────────────────────────────────────────────────────────
895
+ async getRoadmap(projectId) {
896
+ const res = await apiFetch(config2, `/pm/projects/${projectId}/roadmap`);
897
+ return unwrap("get roadmap", res);
898
+ },
899
+ // ─── Project settings ─────────────────────────────────────────────────
900
+ async getProjectSettings(projectId) {
901
+ const res = await apiFetch(config2, `/pm/project-settings/${projectId}`);
902
+ return unwrap("get project settings", res);
903
+ },
904
+ async updateProjectSettings(projectId, input3) {
905
+ const res = await apiFetch(config2, `/pm/project-settings/${projectId}`, { method: "PATCH", body: JSON.stringify(input3) });
906
+ return unwrap("update project settings", res);
907
+ },
908
+ // ─── Audit flags ──────────────────────────────────────────────────────
909
+ async listAuditFlags(projectId, status = "open") {
910
+ const res = await apiFetch(config2, `/pm/project-audit-flags?projectId=${projectId}&status=${status}`);
911
+ return unwrap("list audit flags", res);
912
+ },
913
+ async dismissAuditFlag(id, reason) {
914
+ const res = await apiFetch(config2, `/pm/project-audit-flags/${id}/dismiss`, { method: "POST", body: JSON.stringify({ reason }) });
915
+ return unwrap("dismiss audit flag", res);
916
+ },
917
+ async getAuditCatalog() {
918
+ const res = await apiFetch(config2, `/pm/project-audit-catalog`);
919
+ return unwrap("get audit catalog", res);
920
+ }
921
+ };
922
+ }
923
+
807
924
  // ../sdk/dist/client.js
808
925
  async function apiFetch(config2, path8, options = {}) {
809
926
  const response = await fetch(`${config2.baseUrl}${path8}`, {
@@ -831,7 +948,8 @@ function createMeltClient(config2) {
831
948
  projects: createProjectsResource(config2),
832
949
  findings: createFindingsResource(config2),
833
950
  tracker: createTrackerResource(config2),
834
- boardAudits: createBoardAuditsResource(config2)
951
+ boardAudits: createBoardAuditsResource(config2),
952
+ pm: createPmResource(config2)
835
953
  };
836
954
  }
837
955
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.86.1",
3
+ "version": "4.88.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",