@meltstudio/meltctl 4.150.0 → 4.151.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 +122 -97
- 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.151.0";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -1014,27 +1014,15 @@ function createPmResource(config) {
|
|
|
1014
1014
|
const res = await apiFetch(config, `/pm/project-settings/${projectId}`, { method: "PATCH", body: JSON.stringify(input3) });
|
|
1015
1015
|
return unwrap("update project settings", res);
|
|
1016
1016
|
},
|
|
1017
|
-
// ─── Audit flags ──────────────────────────────────────────────────────
|
|
1018
|
-
async listAuditFlags(projectId, status = "open") {
|
|
1019
|
-
const res = await apiFetch(config, `/pm/project-audit-flags?projectId=${projectId}&status=${status}`);
|
|
1020
|
-
return unwrap("list audit flags", res);
|
|
1021
|
-
},
|
|
1022
1017
|
/**
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1025
|
-
*
|
|
1018
|
+
* Read-only project context for the audit skill + other dev-callable
|
|
1019
|
+
* tools (#464). Auth-only (no manager check) so devs can call it from
|
|
1020
|
+
* their own MCP session. Returns project identity + canonical stage
|
|
1021
|
+
* without paying for the full health composition.
|
|
1026
1022
|
*/
|
|
1027
|
-
async
|
|
1028
|
-
const res = await apiFetch(config, `/pm/project-
|
|
1029
|
-
return unwrap("
|
|
1030
|
-
},
|
|
1031
|
-
async dismissAuditFlag(id, reason) {
|
|
1032
|
-
const res = await apiFetch(config, `/pm/project-audit-flags/${id}/dismiss`, { method: "POST", body: JSON.stringify({ reason }) });
|
|
1033
|
-
return unwrap("dismiss audit flag", res);
|
|
1034
|
-
},
|
|
1035
|
-
async getAuditCatalog() {
|
|
1036
|
-
const res = await apiFetch(config, `/pm/project-audit-catalog`);
|
|
1037
|
-
return unwrap("get audit catalog", res);
|
|
1023
|
+
async getProjectContext(projectId) {
|
|
1024
|
+
const res = await apiFetch(config, `/pm/project-context/${projectId}`);
|
|
1025
|
+
return unwrap("get project context", res);
|
|
1038
1026
|
},
|
|
1039
1027
|
// ─── Risk-board mappings ──────────────────────────────────────────────
|
|
1040
1028
|
/**
|
|
@@ -1391,6 +1379,15 @@ var ISSUE_RULES = [
|
|
|
1391
1379
|
howToFix: "Open the Roadmap tab and attach the phase's planned features, or close the phase if it's done",
|
|
1392
1380
|
scope: "project"
|
|
1393
1381
|
},
|
|
1382
|
+
{
|
|
1383
|
+
id: "roadmap.no-features-with-active-phase",
|
|
1384
|
+
dimension: "roadmap",
|
|
1385
|
+
severity: "high",
|
|
1386
|
+
label: "Active phase but no features",
|
|
1387
|
+
category: "sprint",
|
|
1388
|
+
howToFix: "Run a backlog-seeding session and add features to the active phase before the team starts",
|
|
1389
|
+
scope: "project"
|
|
1390
|
+
},
|
|
1394
1391
|
// Delivery — Board
|
|
1395
1392
|
{
|
|
1396
1393
|
id: "board.no-mapping",
|
|
@@ -1401,6 +1398,15 @@ var ISSUE_RULES = [
|
|
|
1401
1398
|
howToFix: "Open Project Settings and connect a Linear team or Jira project in the mappings card",
|
|
1402
1399
|
scope: "project"
|
|
1403
1400
|
},
|
|
1401
|
+
{
|
|
1402
|
+
id: "tracker.no-oauth",
|
|
1403
|
+
dimension: "board",
|
|
1404
|
+
severity: "high",
|
|
1405
|
+
label: "Tracker needs OAuth connect",
|
|
1406
|
+
category: "gaps",
|
|
1407
|
+
howToFix: "Open Project Settings \u2192 Tracker connections and click Connect for the missing provider; that switches the project off Melt's shared key onto its own OAuth grant",
|
|
1408
|
+
scope: "project"
|
|
1409
|
+
},
|
|
1404
1410
|
{
|
|
1405
1411
|
id: "board.empty",
|
|
1406
1412
|
dimension: "board",
|
|
@@ -1437,6 +1443,33 @@ var ISSUE_RULES = [
|
|
|
1437
1443
|
howToFix: "Open the project page and click 'Run board audit' to refresh the score",
|
|
1438
1444
|
scope: "project"
|
|
1439
1445
|
},
|
|
1446
|
+
{
|
|
1447
|
+
id: "board.in-progress-stale",
|
|
1448
|
+
dimension: "board",
|
|
1449
|
+
severity: "medium",
|
|
1450
|
+
label: "Stale in-progress tickets",
|
|
1451
|
+
category: "sprint",
|
|
1452
|
+
howToFix: "Open the project board, ask the assignees what's blocking, and either move the ticket forward or back to the backlog",
|
|
1453
|
+
scope: "project"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
id: "board.pm-silent-critical",
|
|
1457
|
+
dimension: "board",
|
|
1458
|
+
severity: "critical",
|
|
1459
|
+
label: "PM silent in active cycle",
|
|
1460
|
+
category: "sprint",
|
|
1461
|
+
howToFix: "Comment on the active-cycle tickets to acknowledge progress, ask questions, or flag concerns",
|
|
1462
|
+
scope: "project"
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
id: "board.pm-silent-medium",
|
|
1466
|
+
dimension: "board",
|
|
1467
|
+
severity: "medium",
|
|
1468
|
+
label: "PM commenting on under 60% of active-cycle tickets",
|
|
1469
|
+
category: "sprint",
|
|
1470
|
+
howToFix: "Comment on the active-cycle tickets to acknowledge progress, ask questions, or flag concerns",
|
|
1471
|
+
scope: "project"
|
|
1472
|
+
},
|
|
1440
1473
|
// Delivery — Risks
|
|
1441
1474
|
{
|
|
1442
1475
|
id: "risks.stale-red-zone",
|
|
@@ -3811,27 +3844,15 @@ function createPmResource2(config) {
|
|
|
3811
3844
|
const res = await apiFetch2(config, `/pm/project-settings/${projectId}`, { method: "PATCH", body: JSON.stringify(input3) });
|
|
3812
3845
|
return unwrap2("update project settings", res);
|
|
3813
3846
|
},
|
|
3814
|
-
// ─── Audit flags ──────────────────────────────────────────────────────
|
|
3815
|
-
async listAuditFlags(projectId, status = "open") {
|
|
3816
|
-
const res = await apiFetch2(config, `/pm/project-audit-flags?projectId=${projectId}&status=${status}`);
|
|
3817
|
-
return unwrap2("list audit flags", res);
|
|
3818
|
-
},
|
|
3819
3847
|
/**
|
|
3820
|
-
*
|
|
3821
|
-
*
|
|
3822
|
-
*
|
|
3848
|
+
* Read-only project context for the audit skill + other dev-callable
|
|
3849
|
+
* tools (#464). Auth-only (no manager check) so devs can call it from
|
|
3850
|
+
* their own MCP session. Returns project identity + canonical stage
|
|
3851
|
+
* without paying for the full health composition.
|
|
3823
3852
|
*/
|
|
3824
|
-
async
|
|
3825
|
-
const res = await apiFetch2(config, `/pm/project-
|
|
3826
|
-
return unwrap2("
|
|
3827
|
-
},
|
|
3828
|
-
async dismissAuditFlag(id, reason) {
|
|
3829
|
-
const res = await apiFetch2(config, `/pm/project-audit-flags/${id}/dismiss`, { method: "POST", body: JSON.stringify({ reason }) });
|
|
3830
|
-
return unwrap2("dismiss audit flag", res);
|
|
3831
|
-
},
|
|
3832
|
-
async getAuditCatalog() {
|
|
3833
|
-
const res = await apiFetch2(config, `/pm/project-audit-catalog`);
|
|
3834
|
-
return unwrap2("get audit catalog", res);
|
|
3853
|
+
async getProjectContext(projectId) {
|
|
3854
|
+
const res = await apiFetch2(config, `/pm/project-context/${projectId}`);
|
|
3855
|
+
return unwrap2("get project context", res);
|
|
3835
3856
|
},
|
|
3836
3857
|
// ─── Risk-board mappings ──────────────────────────────────────────────
|
|
3837
3858
|
/**
|
|
@@ -4175,6 +4196,15 @@ var ISSUE_RULES2 = [
|
|
|
4175
4196
|
howToFix: "Open the Roadmap tab and attach the phase's planned features, or close the phase if it's done",
|
|
4176
4197
|
scope: "project"
|
|
4177
4198
|
},
|
|
4199
|
+
{
|
|
4200
|
+
id: "roadmap.no-features-with-active-phase",
|
|
4201
|
+
dimension: "roadmap",
|
|
4202
|
+
severity: "high",
|
|
4203
|
+
label: "Active phase but no features",
|
|
4204
|
+
category: "sprint",
|
|
4205
|
+
howToFix: "Run a backlog-seeding session and add features to the active phase before the team starts",
|
|
4206
|
+
scope: "project"
|
|
4207
|
+
},
|
|
4178
4208
|
// Delivery — Board
|
|
4179
4209
|
{
|
|
4180
4210
|
id: "board.no-mapping",
|
|
@@ -4185,6 +4215,15 @@ var ISSUE_RULES2 = [
|
|
|
4185
4215
|
howToFix: "Open Project Settings and connect a Linear team or Jira project in the mappings card",
|
|
4186
4216
|
scope: "project"
|
|
4187
4217
|
},
|
|
4218
|
+
{
|
|
4219
|
+
id: "tracker.no-oauth",
|
|
4220
|
+
dimension: "board",
|
|
4221
|
+
severity: "high",
|
|
4222
|
+
label: "Tracker needs OAuth connect",
|
|
4223
|
+
category: "gaps",
|
|
4224
|
+
howToFix: "Open Project Settings \u2192 Tracker connections and click Connect for the missing provider; that switches the project off Melt's shared key onto its own OAuth grant",
|
|
4225
|
+
scope: "project"
|
|
4226
|
+
},
|
|
4188
4227
|
{
|
|
4189
4228
|
id: "board.empty",
|
|
4190
4229
|
dimension: "board",
|
|
@@ -4221,6 +4260,33 @@ var ISSUE_RULES2 = [
|
|
|
4221
4260
|
howToFix: "Open the project page and click 'Run board audit' to refresh the score",
|
|
4222
4261
|
scope: "project"
|
|
4223
4262
|
},
|
|
4263
|
+
{
|
|
4264
|
+
id: "board.in-progress-stale",
|
|
4265
|
+
dimension: "board",
|
|
4266
|
+
severity: "medium",
|
|
4267
|
+
label: "Stale in-progress tickets",
|
|
4268
|
+
category: "sprint",
|
|
4269
|
+
howToFix: "Open the project board, ask the assignees what's blocking, and either move the ticket forward or back to the backlog",
|
|
4270
|
+
scope: "project"
|
|
4271
|
+
},
|
|
4272
|
+
{
|
|
4273
|
+
id: "board.pm-silent-critical",
|
|
4274
|
+
dimension: "board",
|
|
4275
|
+
severity: "critical",
|
|
4276
|
+
label: "PM silent in active cycle",
|
|
4277
|
+
category: "sprint",
|
|
4278
|
+
howToFix: "Comment on the active-cycle tickets to acknowledge progress, ask questions, or flag concerns",
|
|
4279
|
+
scope: "project"
|
|
4280
|
+
},
|
|
4281
|
+
{
|
|
4282
|
+
id: "board.pm-silent-medium",
|
|
4283
|
+
dimension: "board",
|
|
4284
|
+
severity: "medium",
|
|
4285
|
+
label: "PM commenting on under 60% of active-cycle tickets",
|
|
4286
|
+
category: "sprint",
|
|
4287
|
+
howToFix: "Comment on the active-cycle tickets to acknowledge progress, ask questions, or flag concerns",
|
|
4288
|
+
scope: "project"
|
|
4289
|
+
},
|
|
4224
4290
|
// Delivery — Risks
|
|
4225
4291
|
{
|
|
4226
4292
|
id: "risks.stale-red-zone",
|
|
@@ -4443,6 +4509,9 @@ async function listProjects(client) {
|
|
|
4443
4509
|
async function getProjectSettings(client, input3) {
|
|
4444
4510
|
return safe(() => client.pm.getProjectSettings(input3.projectId));
|
|
4445
4511
|
}
|
|
4512
|
+
async function getProjectContext(client, input3) {
|
|
4513
|
+
return safe(() => client.pm.getProjectContext(input3.projectId));
|
|
4514
|
+
}
|
|
4446
4515
|
function registerProjectTools(server, getClient2) {
|
|
4447
4516
|
server.registerTool(
|
|
4448
4517
|
"list_projects",
|
|
@@ -4464,6 +4533,17 @@ function registerProjectTools(server, getClient2) {
|
|
|
4464
4533
|
},
|
|
4465
4534
|
withClientArgs(getClient2, getProjectSettings)
|
|
4466
4535
|
);
|
|
4536
|
+
server.registerTool(
|
|
4537
|
+
"get_project_context",
|
|
4538
|
+
{
|
|
4539
|
+
title: "Get project context",
|
|
4540
|
+
description: "Read-only project identity + the PM-owned canonical project stage. Returns: projectId, projectName, client, pmEmail, repos[], projectStage (prototype | early_revenue | growth | scale | null), projectStageSetBy, projectStageSetAt. Call this at the start of an audit run instead of trusting AGENTS.md self-declaration \u2014 the stage drives audit calibration. Auth-only (no manager check), so devs running the audit skill from their own machine can call it directly.",
|
|
4541
|
+
inputSchema: {
|
|
4542
|
+
projectId: z22.number().int().positive().describe("Strapi project id from list_projects.")
|
|
4543
|
+
}
|
|
4544
|
+
},
|
|
4545
|
+
withClientArgs(getClient2, getProjectContext)
|
|
4546
|
+
);
|
|
4467
4547
|
}
|
|
4468
4548
|
var SHAPE_DESC = "crawling | walking | running. Target shape is intent (PM sets when creating); current shape is computed from feature stages.";
|
|
4469
4549
|
async function listPhases(client, input3) {
|
|
@@ -4635,70 +4715,15 @@ function registerFeatureTools(server, getClient2) {
|
|
|
4635
4715
|
withClientArgs(getClient2, updateFeature)
|
|
4636
4716
|
);
|
|
4637
4717
|
}
|
|
4638
|
-
var FLAG_STATUS_VALUES = ["open", "resolved", "dismissed", "all"];
|
|
4639
|
-
async function listAuditFlags(client, input3) {
|
|
4640
|
-
return safe(() => client.pm.listAuditFlags(input3.projectId, input3.status ?? "open"));
|
|
4641
|
-
}
|
|
4642
|
-
async function dismissAuditFlag(client, input3) {
|
|
4643
|
-
return safe(() => client.pm.dismissAuditFlag(input3.flagId, input3.reason));
|
|
4644
|
-
}
|
|
4645
|
-
async function getAuditCatalog(client) {
|
|
4646
|
-
return safe(() => client.pm.getAuditCatalog());
|
|
4647
|
-
}
|
|
4648
4718
|
async function runProjectAudit(client, input3) {
|
|
4649
4719
|
return safe(() => client.pm.runProjectAudit(input3.projectId));
|
|
4650
4720
|
}
|
|
4651
|
-
var listAuditFlagsInputSchema = z5.object({
|
|
4652
|
-
projectId: z5.number().int().positive(),
|
|
4653
|
-
status: z5.enum(FLAG_STATUS_VALUES).optional()
|
|
4654
|
-
});
|
|
4655
|
-
var dismissAuditFlagInputSchema = z5.object({
|
|
4656
|
-
flagId: z5.string().uuid(),
|
|
4657
|
-
reason: z5.string().min(1)
|
|
4658
|
-
});
|
|
4659
4721
|
function registerAuditTools(server, getClient2) {
|
|
4660
|
-
server.registerTool(
|
|
4661
|
-
"list_audit_flags",
|
|
4662
|
-
{
|
|
4663
|
-
title: "List project audit flags",
|
|
4664
|
-
description: "Lists audit flags the nightly cron has raised for a project. Each entry pairs the flag (id, severity, evidence, entity it points at, first/last seen, occurrence count, dismissed-by/reason if applicable) with its catalog entry (human-readable title + description + rule type). Default status='open'; pass 'all' to include resolved + dismissed for context.",
|
|
4665
|
-
inputSchema: {
|
|
4666
|
-
projectId: z5.number().int().positive(),
|
|
4667
|
-
status: z5.enum(FLAG_STATUS_VALUES).optional().describe(
|
|
4668
|
-
"Default 'open'. 'resolved' = fixed (flag no longer tripping on latest run). 'dismissed' = PM marked intentionally accepted. 'all' = every flag ever raised on this project."
|
|
4669
|
-
)
|
|
4670
|
-
}
|
|
4671
|
-
},
|
|
4672
|
-
withClientArgs(getClient2, listAuditFlags)
|
|
4673
|
-
);
|
|
4674
|
-
server.registerTool(
|
|
4675
|
-
"get_audit_catalog",
|
|
4676
|
-
{
|
|
4677
|
-
title: "Get audit catalog",
|
|
4678
|
-
description: "Returns every audit rule the system knows about (code, category, title, description, severity, rubric version). Use this to explain to a PM what a specific flag means, or to enumerate what kinds of things we audit for. Catalog is read-only \u2014 new entries land via migration.",
|
|
4679
|
-
inputSchema: {}
|
|
4680
|
-
},
|
|
4681
|
-
withClient(getClient2, getAuditCatalog)
|
|
4682
|
-
);
|
|
4683
|
-
server.registerTool(
|
|
4684
|
-
"dismiss_audit_flag",
|
|
4685
|
-
{
|
|
4686
|
-
title: "Dismiss audit flag",
|
|
4687
|
-
description: "Marks an audit flag as intentionally dismissed with a reason. Use when the PM has reviewed the flag and decided it's a false positive, out of scope, or an accepted trade-off. The reason is stored on the flag + visible in the audit trail; dismissals show up again the next time the flag re-fires unless the underlying rule is retired. This is a write \u2014 confirm with the PM before calling.",
|
|
4688
|
-
inputSchema: {
|
|
4689
|
-
flagId: z5.string().uuid(),
|
|
4690
|
-
reason: z5.string().min(1).describe(
|
|
4691
|
-
"Why this flag is being dismissed. Stored verbatim and shown in the audit trail."
|
|
4692
|
-
)
|
|
4693
|
-
}
|
|
4694
|
-
},
|
|
4695
|
-
withClientArgs(getClient2, dismissAuditFlag)
|
|
4696
|
-
);
|
|
4697
4722
|
server.registerTool(
|
|
4698
4723
|
"run_project_audit",
|
|
4699
4724
|
{
|
|
4700
4725
|
title: "Run project audit now",
|
|
4701
|
-
description: "Triggers an immediate audit run for a single project
|
|
4726
|
+
description: "Triggers an immediate audit run for a single project. Refreshes the cache tables that drive the SDK rule engine (in-progress staleness, PM comment presence) and runs the inactive-codes sweep over any legacy open flag rows. Returns {fired, resolved, checkErrors}. Useful after a PM fixes something and wants the next dashboard load to reflect it without waiting for tomorrow's nightly cron.",
|
|
4702
4727
|
inputSchema: {
|
|
4703
4728
|
projectId: z5.number().int().positive()
|
|
4704
4729
|
}
|
|
@@ -4804,7 +4829,7 @@ function registerBoardAuditTools(server, getClient2) {
|
|
|
4804
4829
|
"get_board_audit_catalog",
|
|
4805
4830
|
{
|
|
4806
4831
|
title: "Get board-audit catalog",
|
|
4807
|
-
description: "Returns every board-audit rule the system knows about (code, category, title, description, severity).
|
|
4832
|
+
description: "Returns every board-audit rule the system knows about (code, category, title, description, severity). Covers ticket-tracker hygiene checks (story quality, workflow correctness); project-level health rules live in the SDK rule engine and surface via `get_project_health`.",
|
|
4808
4833
|
inputSchema: {}
|
|
4809
4834
|
},
|
|
4810
4835
|
withClient(getClient2, getBoardAuditCatalog)
|
|
@@ -4841,7 +4866,7 @@ function registerPortfolioStatusTools(server, getClient2) {
|
|
|
4841
4866
|
"get_my_portfolio_status",
|
|
4842
4867
|
{
|
|
4843
4868
|
title: "Get my portfolio status",
|
|
4844
|
-
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
|
|
4869
|
+
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-issue counts grouped by severity (critical/high/medium/low) from the SDK rule engine, up to 3 short topAttentionReasons derived from the highest-severity open issues, 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`.",
|
|
4845
4870
|
inputSchema: {
|
|
4846
4871
|
pmEmail: z9.string().email().optional().describe(
|
|
4847
4872
|
"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."
|
package/package.json
CHANGED