@meltstudio/meltctl 4.192.0 → 4.192.1
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 +82 -96
- 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.192.
|
|
17
|
+
CLI_VERSION = "4.192.1";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -723,10 +723,6 @@ function createFindingsResource(config) {
|
|
|
723
723
|
const params = new URLSearchParams();
|
|
724
724
|
if (filters?.repository)
|
|
725
725
|
params.set("repository", filters.repository);
|
|
726
|
-
if (filters?.personEmail)
|
|
727
|
-
params.set("personEmail", filters.personEmail);
|
|
728
|
-
if (filters?.scope)
|
|
729
|
-
params.set("scope", filters.scope);
|
|
730
726
|
if (filters?.status)
|
|
731
727
|
params.set("status", filters.status);
|
|
732
728
|
if (filters?.severity)
|
|
@@ -788,20 +784,6 @@ function createFindingsResource(config) {
|
|
|
788
784
|
throw new Error(errMessage ?? `Failed to fetch findings stats (${status})`);
|
|
789
785
|
}
|
|
790
786
|
return data;
|
|
791
|
-
},
|
|
792
|
-
/**
|
|
793
|
-
* #419: per-person rollup for the /findings "By Person" tab. Manager-only;
|
|
794
|
-
* non-manager callers get an empty array (the server enforces).
|
|
795
|
-
*/
|
|
796
|
-
async getStatsByPerson() {
|
|
797
|
-
const { data, status } = await apiFetch(config, "/findings/stats/by-person");
|
|
798
|
-
if (status === 403)
|
|
799
|
-
throw new Error("Access denied. Only Team Managers can view profile-audit stats.");
|
|
800
|
-
if (status !== 200) {
|
|
801
|
-
const errMessage = data && typeof data === "object" && "error" in data ? data.error : void 0;
|
|
802
|
-
throw new Error(errMessage ?? `Failed to fetch findings-by-person stats (${status})`);
|
|
803
|
-
}
|
|
804
|
-
return data;
|
|
805
787
|
}
|
|
806
788
|
};
|
|
807
789
|
}
|
|
@@ -1531,6 +1513,43 @@ function createEndpointChecksResource(config) {
|
|
|
1531
1513
|
};
|
|
1532
1514
|
}
|
|
1533
1515
|
|
|
1516
|
+
// ../sdk/dist/resources/profile-audits.js
|
|
1517
|
+
function createProfileAuditsResource(config) {
|
|
1518
|
+
return {
|
|
1519
|
+
async list(filters) {
|
|
1520
|
+
const params = new URLSearchParams();
|
|
1521
|
+
if (filters?.personEmail)
|
|
1522
|
+
params.set("personEmail", filters.personEmail);
|
|
1523
|
+
if (filters?.status)
|
|
1524
|
+
params.set("status", filters.status);
|
|
1525
|
+
if (filters?.severity)
|
|
1526
|
+
params.set("severity", filters.severity);
|
|
1527
|
+
if (filters?.checkCode)
|
|
1528
|
+
params.set("checkCode", filters.checkCode);
|
|
1529
|
+
if (filters?.limit)
|
|
1530
|
+
params.set("limit", String(filters.limit));
|
|
1531
|
+
const query = params.toString();
|
|
1532
|
+
const path9 = `/profile-audits${query ? `?${query}` : ""}`;
|
|
1533
|
+
const { data, status } = await apiFetch(config, path9);
|
|
1534
|
+
if (status === 403)
|
|
1535
|
+
throw new Error("Access denied. Only Team Managers can list profile audits.");
|
|
1536
|
+
if (status !== 200)
|
|
1537
|
+
throw new Error(data.error ?? `Failed to list profile audits (${status})`);
|
|
1538
|
+
return data;
|
|
1539
|
+
},
|
|
1540
|
+
async getStatsByPerson() {
|
|
1541
|
+
const { data, status } = await apiFetch(config, "/profile-audits/stats/by-person");
|
|
1542
|
+
if (status === 403)
|
|
1543
|
+
throw new Error("Access denied. Only Team Managers can view profile audit stats.");
|
|
1544
|
+
if (status !== 200) {
|
|
1545
|
+
const errMessage = data && typeof data === "object" && "error" in data ? data.error : void 0;
|
|
1546
|
+
throw new Error(errMessage ?? `Failed to fetch profile audit stats (${status})`);
|
|
1547
|
+
}
|
|
1548
|
+
return data;
|
|
1549
|
+
}
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1534
1553
|
// ../sdk/dist/client.js
|
|
1535
1554
|
async function apiFetch(config, path9, options = {}) {
|
|
1536
1555
|
const response = await fetch(`${config.baseUrl}${path9}`, {
|
|
@@ -1565,7 +1584,8 @@ function createMeltClient(config) {
|
|
|
1565
1584
|
chat: createChatResource(config),
|
|
1566
1585
|
me: createMeResource(config),
|
|
1567
1586
|
developers: createDevelopersResource(config),
|
|
1568
|
-
endpointChecks: createEndpointChecksResource(config)
|
|
1587
|
+
endpointChecks: createEndpointChecksResource(config),
|
|
1588
|
+
profileAudits: createProfileAuditsResource(config)
|
|
1569
1589
|
};
|
|
1570
1590
|
}
|
|
1571
1591
|
|
|
@@ -1573,13 +1593,7 @@ function createMeltClient(config) {
|
|
|
1573
1593
|
import { z } from "zod";
|
|
1574
1594
|
var auditFindingSchema = z.object({
|
|
1575
1595
|
id: z.string(),
|
|
1576
|
-
|
|
1577
|
-
// shape — repository set, personEmail null. 'person' is the employee-profile
|
|
1578
|
-
// shape — personEmail set, repository null. Existing consumers can still
|
|
1579
|
-
// treat repository as the primary identity; the field is nullable now.
|
|
1580
|
-
scope: z.enum(["project", "person"]),
|
|
1581
|
-
repository: z.string().nullable(),
|
|
1582
|
-
personEmail: z.string().nullable(),
|
|
1596
|
+
repository: z.string(),
|
|
1583
1597
|
project: z.string(),
|
|
1584
1598
|
auditType: z.string(),
|
|
1585
1599
|
catalogCode: z.string().nullable(),
|
|
@@ -1631,12 +1645,6 @@ var findingsStatsSchema = z.object({
|
|
|
1631
1645
|
});
|
|
1632
1646
|
var findingsListFiltersSchema = z.object({
|
|
1633
1647
|
repository: z.string().optional(),
|
|
1634
|
-
// #419: filter to one employee's profile findings. Manager-only on the
|
|
1635
|
-
// server; non-manager callers passing this get an empty result.
|
|
1636
|
-
personEmail: z.string().optional(),
|
|
1637
|
-
// #419: 'project' | 'person'. Defaults to no filter when absent. Non-
|
|
1638
|
-
// managers cannot see scope='person' rows regardless of this value.
|
|
1639
|
-
scope: z.enum(["project", "person"]).optional(),
|
|
1640
1648
|
status: z.string().optional(),
|
|
1641
1649
|
severity: z.string().optional(),
|
|
1642
1650
|
effort: z.string().optional(),
|
|
@@ -1652,14 +1660,6 @@ var findingsStatsByRepositoryEntrySchema = findingsStatsSchema.extend({
|
|
|
1652
1660
|
repository: z.string()
|
|
1653
1661
|
});
|
|
1654
1662
|
var findingsStatsByRepositorySchema = z.array(findingsStatsByRepositoryEntrySchema);
|
|
1655
|
-
var findingsStatsByPersonEntrySchema = z.object({
|
|
1656
|
-
personEmail: z.string(),
|
|
1657
|
-
personName: z.string().nullable(),
|
|
1658
|
-
open: z.number(),
|
|
1659
|
-
worstSeverity: z.enum(["critical", "high", "medium", "low"]).nullable(),
|
|
1660
|
-
lastAuditedAt: z.string().nullable()
|
|
1661
|
-
});
|
|
1662
|
-
var findingsStatsByPersonSchema = z.array(findingsStatsByPersonEntrySchema);
|
|
1663
1663
|
var extractionResultSchema = z.object({
|
|
1664
1664
|
auditId: z.string(),
|
|
1665
1665
|
findingsExtracted: z.number(),
|
|
@@ -4004,10 +4004,6 @@ function createFindingsResource2(config) {
|
|
|
4004
4004
|
const params = new URLSearchParams();
|
|
4005
4005
|
if (filters?.repository)
|
|
4006
4006
|
params.set("repository", filters.repository);
|
|
4007
|
-
if (filters?.personEmail)
|
|
4008
|
-
params.set("personEmail", filters.personEmail);
|
|
4009
|
-
if (filters?.scope)
|
|
4010
|
-
params.set("scope", filters.scope);
|
|
4011
4007
|
if (filters?.status)
|
|
4012
4008
|
params.set("status", filters.status);
|
|
4013
4009
|
if (filters?.severity)
|
|
@@ -4069,20 +4065,6 @@ function createFindingsResource2(config) {
|
|
|
4069
4065
|
throw new Error(errMessage ?? `Failed to fetch findings stats (${status})`);
|
|
4070
4066
|
}
|
|
4071
4067
|
return data;
|
|
4072
|
-
},
|
|
4073
|
-
/**
|
|
4074
|
-
* #419: per-person rollup for the /findings "By Person" tab. Manager-only;
|
|
4075
|
-
* non-manager callers get an empty array (the server enforces).
|
|
4076
|
-
*/
|
|
4077
|
-
async getStatsByPerson() {
|
|
4078
|
-
const { data, status } = await apiFetch2(config, "/findings/stats/by-person");
|
|
4079
|
-
if (status === 403)
|
|
4080
|
-
throw new Error("Access denied. Only Team Managers can view profile-audit stats.");
|
|
4081
|
-
if (status !== 200) {
|
|
4082
|
-
const errMessage = data && typeof data === "object" && "error" in data ? data.error : void 0;
|
|
4083
|
-
throw new Error(errMessage ?? `Failed to fetch findings-by-person stats (${status})`);
|
|
4084
|
-
}
|
|
4085
|
-
return data;
|
|
4086
4068
|
}
|
|
4087
4069
|
};
|
|
4088
4070
|
}
|
|
@@ -4793,6 +4775,41 @@ function createEndpointChecksResource2(config) {
|
|
|
4793
4775
|
}
|
|
4794
4776
|
};
|
|
4795
4777
|
}
|
|
4778
|
+
function createProfileAuditsResource2(config) {
|
|
4779
|
+
return {
|
|
4780
|
+
async list(filters) {
|
|
4781
|
+
const params = new URLSearchParams();
|
|
4782
|
+
if (filters?.personEmail)
|
|
4783
|
+
params.set("personEmail", filters.personEmail);
|
|
4784
|
+
if (filters?.status)
|
|
4785
|
+
params.set("status", filters.status);
|
|
4786
|
+
if (filters?.severity)
|
|
4787
|
+
params.set("severity", filters.severity);
|
|
4788
|
+
if (filters?.checkCode)
|
|
4789
|
+
params.set("checkCode", filters.checkCode);
|
|
4790
|
+
if (filters?.limit)
|
|
4791
|
+
params.set("limit", String(filters.limit));
|
|
4792
|
+
const query = params.toString();
|
|
4793
|
+
const path22 = `/profile-audits${query ? `?${query}` : ""}`;
|
|
4794
|
+
const { data, status } = await apiFetch2(config, path22);
|
|
4795
|
+
if (status === 403)
|
|
4796
|
+
throw new Error("Access denied. Only Team Managers can list profile audits.");
|
|
4797
|
+
if (status !== 200)
|
|
4798
|
+
throw new Error(data.error ?? `Failed to list profile audits (${status})`);
|
|
4799
|
+
return data;
|
|
4800
|
+
},
|
|
4801
|
+
async getStatsByPerson() {
|
|
4802
|
+
const { data, status } = await apiFetch2(config, "/profile-audits/stats/by-person");
|
|
4803
|
+
if (status === 403)
|
|
4804
|
+
throw new Error("Access denied. Only Team Managers can view profile audit stats.");
|
|
4805
|
+
if (status !== 200) {
|
|
4806
|
+
const errMessage = data && typeof data === "object" && "error" in data ? data.error : void 0;
|
|
4807
|
+
throw new Error(errMessage ?? `Failed to fetch profile audit stats (${status})`);
|
|
4808
|
+
}
|
|
4809
|
+
return data;
|
|
4810
|
+
}
|
|
4811
|
+
};
|
|
4812
|
+
}
|
|
4796
4813
|
async function apiFetch2(config, path22, options = {}) {
|
|
4797
4814
|
const response = await fetch(`${config.baseUrl}${path22}`, {
|
|
4798
4815
|
...options,
|
|
@@ -4826,18 +4843,13 @@ function createMeltClient2(config) {
|
|
|
4826
4843
|
chat: createChatResource2(config),
|
|
4827
4844
|
me: createMeResource2(config),
|
|
4828
4845
|
developers: createDevelopersResource2(config),
|
|
4829
|
-
endpointChecks: createEndpointChecksResource2(config)
|
|
4846
|
+
endpointChecks: createEndpointChecksResource2(config),
|
|
4847
|
+
profileAudits: createProfileAuditsResource2(config)
|
|
4830
4848
|
};
|
|
4831
4849
|
}
|
|
4832
4850
|
var auditFindingSchema2 = z2.object({
|
|
4833
4851
|
id: z2.string(),
|
|
4834
|
-
|
|
4835
|
-
// shape — repository set, personEmail null. 'person' is the employee-profile
|
|
4836
|
-
// shape — personEmail set, repository null. Existing consumers can still
|
|
4837
|
-
// treat repository as the primary identity; the field is nullable now.
|
|
4838
|
-
scope: z2.enum(["project", "person"]),
|
|
4839
|
-
repository: z2.string().nullable(),
|
|
4840
|
-
personEmail: z2.string().nullable(),
|
|
4852
|
+
repository: z2.string(),
|
|
4841
4853
|
project: z2.string(),
|
|
4842
4854
|
auditType: z2.string(),
|
|
4843
4855
|
catalogCode: z2.string().nullable(),
|
|
@@ -4889,12 +4901,6 @@ var findingsStatsSchema2 = z2.object({
|
|
|
4889
4901
|
});
|
|
4890
4902
|
var findingsListFiltersSchema2 = z2.object({
|
|
4891
4903
|
repository: z2.string().optional(),
|
|
4892
|
-
// #419: filter to one employee's profile findings. Manager-only on the
|
|
4893
|
-
// server; non-manager callers passing this get an empty result.
|
|
4894
|
-
personEmail: z2.string().optional(),
|
|
4895
|
-
// #419: 'project' | 'person'. Defaults to no filter when absent. Non-
|
|
4896
|
-
// managers cannot see scope='person' rows regardless of this value.
|
|
4897
|
-
scope: z2.enum(["project", "person"]).optional(),
|
|
4898
4904
|
status: z2.string().optional(),
|
|
4899
4905
|
severity: z2.string().optional(),
|
|
4900
4906
|
effort: z2.string().optional(),
|
|
@@ -4910,14 +4916,6 @@ var findingsStatsByRepositoryEntrySchema2 = findingsStatsSchema2.extend({
|
|
|
4910
4916
|
repository: z2.string()
|
|
4911
4917
|
});
|
|
4912
4918
|
var findingsStatsByRepositorySchema2 = z2.array(findingsStatsByRepositoryEntrySchema2);
|
|
4913
|
-
var findingsStatsByPersonEntrySchema2 = z2.object({
|
|
4914
|
-
personEmail: z2.string(),
|
|
4915
|
-
personName: z2.string().nullable(),
|
|
4916
|
-
open: z2.number(),
|
|
4917
|
-
worstSeverity: z2.enum(["critical", "high", "medium", "low"]).nullable(),
|
|
4918
|
-
lastAuditedAt: z2.string().nullable()
|
|
4919
|
-
});
|
|
4920
|
-
var findingsStatsByPersonSchema2 = z2.array(findingsStatsByPersonEntrySchema2);
|
|
4921
4919
|
var extractionResultSchema2 = z2.object({
|
|
4922
4920
|
auditId: z2.string(),
|
|
4923
4921
|
findingsExtracted: z2.number(),
|
|
@@ -5979,14 +5977,10 @@ async function listFindings(client, input3 = {}) {
|
|
|
5979
5977
|
var listFindingsInputSchema = z10.object({
|
|
5980
5978
|
projectId: z10.number().int().positive().optional(),
|
|
5981
5979
|
repository: z10.string().optional(),
|
|
5982
|
-
// #419: filter to one employee's profile-audit findings. Manager-gated
|
|
5983
|
-
// server-side; non-manager callers get an empty result.
|
|
5984
|
-
personEmail: z10.string().email().optional(),
|
|
5985
|
-
scope: z10.enum(["project", "person"]).optional(),
|
|
5986
5980
|
status: z10.enum(["pass", "warning", "missing", "na"]).optional(),
|
|
5987
5981
|
severity: z10.enum(["critical", "high", "medium", "low"]).optional(),
|
|
5988
5982
|
effort: z10.enum(["low", "medium", "high", "unknown"]).optional(),
|
|
5989
|
-
auditType: z10.enum(["audit", "ux-audit", "security-audit"
|
|
5983
|
+
auditType: z10.enum(["audit", "ux-audit", "security-audit"]).optional(),
|
|
5990
5984
|
limit: z10.number().int().positive().max(500).optional()
|
|
5991
5985
|
});
|
|
5992
5986
|
function registerFindingsTools(server, getClient2) {
|
|
@@ -5994,24 +5988,16 @@ function registerFindingsTools(server, getClient2) {
|
|
|
5994
5988
|
"list_findings",
|
|
5995
5989
|
{
|
|
5996
5990
|
title: "List audit findings",
|
|
5997
|
-
description: "Lists code/security/UX audit findings
|
|
5991
|
+
description: "Lists code/security/UX audit findings. Each finding carries its check code, category, status (pass/warning/missing/na), severity (critical/high/medium/low), effort (low/medium/high \u2014 how much work the fix is, independent of severity), repository, and evidence (file/symbol) so you can see exactly what to fix. Filter by projectId, repository, status, severity, effort, or auditType. Results are ordered worst-first (missing > warning, then critical > high > \u2026). Use this to answer 'what's open on the app I'm working on?' \u2014 pass status='missing' or severity='critical' to focus on what matters, or effort='low' with severity='high'/'critical' to find cheap high-leverage wins. Read-only and open to any @meltstudio.co user.",
|
|
5998
5992
|
inputSchema: {
|
|
5999
5993
|
projectId: z10.number().int().positive().optional().describe("Strapi project id \u2014 scopes findings to that project\u2019s repos."),
|
|
6000
5994
|
repository: z10.string().optional().describe("Full repo slug, e.g. 'MeltStudio/atlas-api'. Scopes to a single repo."),
|
|
6001
|
-
personEmail: z10.string().email().optional().describe(
|
|
6002
|
-
"Scopes to one employee's profile-audit findings (#419). Manager-only \u2014 non-manager callers get an empty result."
|
|
6003
|
-
),
|
|
6004
|
-
scope: z10.enum(["project", "person"]).optional().describe(
|
|
6005
|
-
"Filter by scope. 'project' = repo-scoped findings; 'person' = employee profile audits (manager-only)."
|
|
6006
|
-
),
|
|
6007
5995
|
status: z10.enum(["pass", "warning", "missing", "na"]).optional().describe("Filter by check status. 'missing' = the check failed outright."),
|
|
6008
5996
|
severity: z10.enum(["critical", "high", "medium", "low"]).optional(),
|
|
6009
5997
|
effort: z10.enum(["low", "medium", "high", "unknown"]).optional().describe(
|
|
6010
5998
|
"Remediation effort. Combine effort=low with a high severity to find quick wins. 'unknown' = pass/na or not yet rated."
|
|
6011
5999
|
),
|
|
6012
|
-
auditType: z10.enum(["audit", "ux-audit", "security-audit"
|
|
6013
|
-
"'audit' = tech, 'ux-audit' = UX, 'security-audit' = security, 'profile-audit' = employee Notion profile (manager-only)."
|
|
6014
|
-
),
|
|
6000
|
+
auditType: z10.enum(["audit", "ux-audit", "security-audit"]).optional(),
|
|
6015
6001
|
limit: z10.number().int().positive().max(500).optional()
|
|
6016
6002
|
}
|
|
6017
6003
|
},
|
package/package.json
CHANGED