@meltstudio/meltctl 4.107.0 → 4.109.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 +77 -1
- 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.109.0";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -979,6 +979,30 @@ function createPmResource(config) {
|
|
|
979
979
|
const status = opts?.status ?? "open";
|
|
980
980
|
const res = await apiFetch(config, `/pm/risks?status=${status}`);
|
|
981
981
|
return unwrap("list risks", res);
|
|
982
|
+
},
|
|
983
|
+
// ─── Portfolio status ──────────────────────────────────────────────────
|
|
984
|
+
/**
|
|
985
|
+
* Cross-project ranked answer to "where do I focus next?". Returns a
|
|
986
|
+
* sorted-by-urgency list where each entry surfaces the project's open
|
|
987
|
+
* flags grouped by severity, the top reasons it needs attention, the
|
|
988
|
+
* latest plan score, and the same composite health score the dashboard
|
|
989
|
+
* cards use.
|
|
990
|
+
*
|
|
991
|
+
* - Default (no opts) → caller's own portfolio. Non-managers always see
|
|
992
|
+
* only this regardless of `pmEmail`; the API enforces that.
|
|
993
|
+
* - `pmEmail` (managers only) → another PM's portfolio.
|
|
994
|
+
* - `limit` → caps the all-org manager view; ignored when `pmEmail` is
|
|
995
|
+
* set since a single PM rarely owns more than a handful of projects.
|
|
996
|
+
*/
|
|
997
|
+
async getMyPortfolioStatus(opts) {
|
|
998
|
+
const params = new URLSearchParams();
|
|
999
|
+
if (opts?.pmEmail)
|
|
1000
|
+
params.set("pmEmail", opts.pmEmail);
|
|
1001
|
+
if (opts?.limit !== void 0)
|
|
1002
|
+
params.set("limit", String(opts.limit));
|
|
1003
|
+
const qs = params.toString();
|
|
1004
|
+
const res = await apiFetch(config, `/pm/portfolio-status${qs ? `?${qs}` : ""}`);
|
|
1005
|
+
return unwrap("get my portfolio status", res);
|
|
982
1006
|
}
|
|
983
1007
|
};
|
|
984
1008
|
}
|
|
@@ -2633,6 +2657,7 @@ import { z as z5 } from "zod";
|
|
|
2633
2657
|
import { z as z6 } from "zod";
|
|
2634
2658
|
import { z as z7 } from "zod";
|
|
2635
2659
|
import { z as z8 } from "zod";
|
|
2660
|
+
import { z as z9 } from "zod";
|
|
2636
2661
|
function createAuditsResource2(config) {
|
|
2637
2662
|
return {
|
|
2638
2663
|
async submit(input3) {
|
|
@@ -3320,6 +3345,30 @@ function createPmResource2(config) {
|
|
|
3320
3345
|
const status = opts?.status ?? "open";
|
|
3321
3346
|
const res = await apiFetch2(config, `/pm/risks?status=${status}`);
|
|
3322
3347
|
return unwrap2("list risks", res);
|
|
3348
|
+
},
|
|
3349
|
+
// ─── Portfolio status ──────────────────────────────────────────────────
|
|
3350
|
+
/**
|
|
3351
|
+
* Cross-project ranked answer to "where do I focus next?". Returns a
|
|
3352
|
+
* sorted-by-urgency list where each entry surfaces the project's open
|
|
3353
|
+
* flags grouped by severity, the top reasons it needs attention, the
|
|
3354
|
+
* latest plan score, and the same composite health score the dashboard
|
|
3355
|
+
* cards use.
|
|
3356
|
+
*
|
|
3357
|
+
* - Default (no opts) → caller's own portfolio. Non-managers always see
|
|
3358
|
+
* only this regardless of `pmEmail`; the API enforces that.
|
|
3359
|
+
* - `pmEmail` (managers only) → another PM's portfolio.
|
|
3360
|
+
* - `limit` → caps the all-org manager view; ignored when `pmEmail` is
|
|
3361
|
+
* set since a single PM rarely owns more than a handful of projects.
|
|
3362
|
+
*/
|
|
3363
|
+
async getMyPortfolioStatus(opts) {
|
|
3364
|
+
const params = new URLSearchParams();
|
|
3365
|
+
if (opts?.pmEmail)
|
|
3366
|
+
params.set("pmEmail", opts.pmEmail);
|
|
3367
|
+
if (opts?.limit !== void 0)
|
|
3368
|
+
params.set("limit", String(opts.limit));
|
|
3369
|
+
const qs = params.toString();
|
|
3370
|
+
const res = await apiFetch2(config, `/pm/portfolio-status${qs ? `?${qs}` : ""}`);
|
|
3371
|
+
return unwrap2("get my portfolio status", res);
|
|
3323
3372
|
}
|
|
3324
3373
|
};
|
|
3325
3374
|
}
|
|
@@ -3821,6 +3870,32 @@ function registerProjectHealthTools(server, client) {
|
|
|
3821
3870
|
(args) => getProjectHealth(client, args)
|
|
3822
3871
|
);
|
|
3823
3872
|
}
|
|
3873
|
+
async function getMyPortfolioStatus(client, input3) {
|
|
3874
|
+
return safe(
|
|
3875
|
+
() => client.pm.getMyPortfolioStatus({
|
|
3876
|
+
pmEmail: input3.pmEmail,
|
|
3877
|
+
limit: input3.limit
|
|
3878
|
+
})
|
|
3879
|
+
);
|
|
3880
|
+
}
|
|
3881
|
+
function registerPortfolioStatusTools(server, client) {
|
|
3882
|
+
server.registerTool(
|
|
3883
|
+
"get_my_portfolio_status",
|
|
3884
|
+
{
|
|
3885
|
+
title: "Get my portfolio status",
|
|
3886
|
+
description: "Cross-project ranked answer to 'where do I focus next?'. Returns one entry per project the caller can see, sorted by urgency desc. Each entry includes: 0\u2013100 health score (same formula as the dashboard cards), open audit-flag counts grouped by severity (critical/high/medium/low), up to 3 short topAttentionReasons derived from the highest-severity open flags, latest plan score across the project's repos, and the most recent audit timestamp. Default scope is the caller's own projects; managers can pass `pmEmail` to view another PM's portfolio or omit it to see the org-wide top `limit` projects (default 10). Use this for 'how is my portfolio doing?' and 'which project of <person>'s needs help?' questions \u2014 it pulls in one tool call what would otherwise be `list_projects` + N \xD7 `get_project_health` + N \xD7 `list_audit_flags`.",
|
|
3887
|
+
inputSchema: {
|
|
3888
|
+
pmEmail: z9.string().email().optional().describe(
|
|
3889
|
+
"Manager-only override. When set, scopes the response to that PM's projects. Non-managers may only set this to their own email; any other value returns 403."
|
|
3890
|
+
),
|
|
3891
|
+
limit: z9.number().int().positive().max(100).optional().describe(
|
|
3892
|
+
"Max entries to return when called by a manager without `pmEmail` (top-N by urgency). Ignored for PM-scoped calls \u2014 those return every project the PM owns. Default 10, max 100."
|
|
3893
|
+
)
|
|
3894
|
+
}
|
|
3895
|
+
},
|
|
3896
|
+
(args) => getMyPortfolioStatus(client, args)
|
|
3897
|
+
);
|
|
3898
|
+
}
|
|
3824
3899
|
var VERSION = "0.0.0";
|
|
3825
3900
|
function createMcpServer(client) {
|
|
3826
3901
|
const server = new McpServer(
|
|
@@ -3834,6 +3909,7 @@ function createMcpServer(client) {
|
|
|
3834
3909
|
registerPlanTools(server, client);
|
|
3835
3910
|
registerBoardAuditTools(server, client);
|
|
3836
3911
|
registerProjectHealthTools(server, client);
|
|
3912
|
+
registerPortfolioStatusTools(server, client);
|
|
3837
3913
|
return server;
|
|
3838
3914
|
}
|
|
3839
3915
|
async function startServer() {
|
package/package.json
CHANGED