@meltstudio/meltctl 4.142.0 → 4.143.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.
- package/dist/index.js +85 -3
- 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.
|
|
17
|
+
CLI_VERSION = "4.143.0";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -1097,6 +1097,19 @@ function createPmResource(config) {
|
|
|
1097
1097
|
* - `limit` → caps the all-org manager view; ignored when `pmEmail` is
|
|
1098
1098
|
* set since a single PM rarely owns more than a handful of projects.
|
|
1099
1099
|
*/
|
|
1100
|
+
/**
|
|
1101
|
+
* Composite snapshot of every section the dashboard SSR renders.
|
|
1102
|
+
* One round-trip from Vercel SSR; the API fans out internally. See
|
|
1103
|
+
* `DashboardSnapshot` for the response shape and #449 for the
|
|
1104
|
+
* motivation. Optional `projectId` narrows the per-project sections
|
|
1105
|
+
* (events stats, audit list, plan stats) the same way passing it
|
|
1106
|
+
* to each standalone endpoint would.
|
|
1107
|
+
*/
|
|
1108
|
+
async getDashboardSnapshot(opts) {
|
|
1109
|
+
const qs = opts?.projectId ? `?projectId=${opts.projectId}` : "";
|
|
1110
|
+
const res = await apiFetch(config, `/pm/dashboard-snapshot${qs}`);
|
|
1111
|
+
return unwrap("get dashboard snapshot", res);
|
|
1112
|
+
},
|
|
1100
1113
|
async getMyPortfolioStatus(opts) {
|
|
1101
1114
|
const params = new URLSearchParams();
|
|
1102
1115
|
if (opts?.pmEmail)
|
|
@@ -1211,6 +1224,34 @@ function createJobsResource(config) {
|
|
|
1211
1224
|
};
|
|
1212
1225
|
}
|
|
1213
1226
|
|
|
1227
|
+
// ../sdk/dist/resources/chat.js
|
|
1228
|
+
function createChatResource(config) {
|
|
1229
|
+
return {
|
|
1230
|
+
async listMessages() {
|
|
1231
|
+
const { data, status } = await apiFetch(config, "/chat/messages");
|
|
1232
|
+
if (status !== 200)
|
|
1233
|
+
throw new Error(data.error ?? `Failed to fetch chat history (${status})`);
|
|
1234
|
+
return data;
|
|
1235
|
+
},
|
|
1236
|
+
async appendMessage(body) {
|
|
1237
|
+
const { data, status } = await apiFetch(config, "/chat/messages", {
|
|
1238
|
+
method: "POST",
|
|
1239
|
+
body: JSON.stringify(body)
|
|
1240
|
+
});
|
|
1241
|
+
if (status === 400)
|
|
1242
|
+
throw new Error(data.error ?? "Invalid chat message");
|
|
1243
|
+
if (status !== 201)
|
|
1244
|
+
throw new Error(data.error ?? `Failed to append chat message (${status})`);
|
|
1245
|
+
return data;
|
|
1246
|
+
},
|
|
1247
|
+
async clearMessages() {
|
|
1248
|
+
const { status } = await apiFetch(config, "/chat/messages", { method: "DELETE" });
|
|
1249
|
+
if (status !== 200)
|
|
1250
|
+
throw new Error(`Failed to clear chat history (${status})`);
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1214
1255
|
// ../sdk/dist/client.js
|
|
1215
1256
|
async function apiFetch(config, path9, options = {}) {
|
|
1216
1257
|
const response = await fetch(`${config.baseUrl}${path9}`, {
|
|
@@ -1241,7 +1282,8 @@ function createMeltClient(config) {
|
|
|
1241
1282
|
boardAudits: createBoardAuditsResource(config),
|
|
1242
1283
|
pm: createPmResource(config),
|
|
1243
1284
|
slack: createSlackResource(config),
|
|
1244
|
-
jobs: createJobsResource(config)
|
|
1285
|
+
jobs: createJobsResource(config),
|
|
1286
|
+
chat: createChatResource(config)
|
|
1245
1287
|
};
|
|
1246
1288
|
}
|
|
1247
1289
|
|
|
@@ -3661,6 +3703,19 @@ function createPmResource2(config) {
|
|
|
3661
3703
|
* - `limit` → caps the all-org manager view; ignored when `pmEmail` is
|
|
3662
3704
|
* set since a single PM rarely owns more than a handful of projects.
|
|
3663
3705
|
*/
|
|
3706
|
+
/**
|
|
3707
|
+
* Composite snapshot of every section the dashboard SSR renders.
|
|
3708
|
+
* One round-trip from Vercel SSR; the API fans out internally. See
|
|
3709
|
+
* `DashboardSnapshot` for the response shape and #449 for the
|
|
3710
|
+
* motivation. Optional `projectId` narrows the per-project sections
|
|
3711
|
+
* (events stats, audit list, plan stats) the same way passing it
|
|
3712
|
+
* to each standalone endpoint would.
|
|
3713
|
+
*/
|
|
3714
|
+
async getDashboardSnapshot(opts) {
|
|
3715
|
+
const qs = opts?.projectId ? `?projectId=${opts.projectId}` : "";
|
|
3716
|
+
const res = await apiFetch2(config, `/pm/dashboard-snapshot${qs}`);
|
|
3717
|
+
return unwrap2("get dashboard snapshot", res);
|
|
3718
|
+
},
|
|
3664
3719
|
async getMyPortfolioStatus(opts) {
|
|
3665
3720
|
const params = new URLSearchParams();
|
|
3666
3721
|
if (opts?.pmEmail)
|
|
@@ -3770,6 +3825,32 @@ function createJobsResource2(config) {
|
|
|
3770
3825
|
}
|
|
3771
3826
|
};
|
|
3772
3827
|
}
|
|
3828
|
+
function createChatResource2(config) {
|
|
3829
|
+
return {
|
|
3830
|
+
async listMessages() {
|
|
3831
|
+
const { data, status } = await apiFetch2(config, "/chat/messages");
|
|
3832
|
+
if (status !== 200)
|
|
3833
|
+
throw new Error(data.error ?? `Failed to fetch chat history (${status})`);
|
|
3834
|
+
return data;
|
|
3835
|
+
},
|
|
3836
|
+
async appendMessage(body) {
|
|
3837
|
+
const { data, status } = await apiFetch2(config, "/chat/messages", {
|
|
3838
|
+
method: "POST",
|
|
3839
|
+
body: JSON.stringify(body)
|
|
3840
|
+
});
|
|
3841
|
+
if (status === 400)
|
|
3842
|
+
throw new Error(data.error ?? "Invalid chat message");
|
|
3843
|
+
if (status !== 201)
|
|
3844
|
+
throw new Error(data.error ?? `Failed to append chat message (${status})`);
|
|
3845
|
+
return data;
|
|
3846
|
+
},
|
|
3847
|
+
async clearMessages() {
|
|
3848
|
+
const { status } = await apiFetch2(config, "/chat/messages", { method: "DELETE" });
|
|
3849
|
+
if (status !== 200)
|
|
3850
|
+
throw new Error(`Failed to clear chat history (${status})`);
|
|
3851
|
+
}
|
|
3852
|
+
};
|
|
3853
|
+
}
|
|
3773
3854
|
async function apiFetch2(config, path22, options = {}) {
|
|
3774
3855
|
const response = await fetch(`${config.baseUrl}${path22}`, {
|
|
3775
3856
|
...options,
|
|
@@ -3799,7 +3880,8 @@ function createMeltClient2(config) {
|
|
|
3799
3880
|
boardAudits: createBoardAuditsResource2(config),
|
|
3800
3881
|
pm: createPmResource2(config),
|
|
3801
3882
|
slack: createSlackResource2(config),
|
|
3802
|
-
jobs: createJobsResource2(config)
|
|
3883
|
+
jobs: createJobsResource2(config),
|
|
3884
|
+
chat: createChatResource2(config)
|
|
3803
3885
|
};
|
|
3804
3886
|
}
|
|
3805
3887
|
var auditFindingSchema2 = z2.object({
|
package/package.json
CHANGED