@meltstudio/meltctl 4.184.0 → 4.186.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 +212 -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.186.0";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -1410,6 +1410,83 @@ function createChatResource(config) {
|
|
|
1410
1410
|
};
|
|
1411
1411
|
}
|
|
1412
1412
|
|
|
1413
|
+
// ../sdk/dist/resources/me.js
|
|
1414
|
+
function createMeResource(config) {
|
|
1415
|
+
return {
|
|
1416
|
+
/**
|
|
1417
|
+
* The authenticated developer's own self-service overview (#499). The API
|
|
1418
|
+
* derives identity from the JWT — there is no way to request another
|
|
1419
|
+
* person's data through this call.
|
|
1420
|
+
*/
|
|
1421
|
+
async overview() {
|
|
1422
|
+
const { data, status } = await apiFetch(config, "/me/overview");
|
|
1423
|
+
if (status !== 200)
|
|
1424
|
+
throw new Error(data.error ?? `Failed to fetch overview (${status})`);
|
|
1425
|
+
return data;
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
// ../sdk/dist/resources/developers.js
|
|
1431
|
+
function createDevelopersResource(config) {
|
|
1432
|
+
return {
|
|
1433
|
+
/**
|
|
1434
|
+
* Manager-only: the same self-service overview as `me.overview()`, but for
|
|
1435
|
+
* an arbitrary developer (#499). Backed by GET /pm/developers/:email/overview,
|
|
1436
|
+
* which calls `checkManagerRole` before building. Non-managers get a 403.
|
|
1437
|
+
*/
|
|
1438
|
+
async overview(email) {
|
|
1439
|
+
const { data, status } = await apiFetch(config, `/pm/developers/${encodeURIComponent(email)}/overview`);
|
|
1440
|
+
if (status === 403)
|
|
1441
|
+
throw new Error("Access denied. Only Team Managers can view other developers.");
|
|
1442
|
+
if (status !== 200)
|
|
1443
|
+
throw new Error(data.error ?? `Failed to fetch overview (${status})`);
|
|
1444
|
+
return data;
|
|
1445
|
+
}
|
|
1446
|
+
};
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
// ../sdk/dist/resources/endpoint-checks.js
|
|
1450
|
+
function createEndpointChecksResource(config) {
|
|
1451
|
+
return {
|
|
1452
|
+
/**
|
|
1453
|
+
* Submit the calling person's endpoint-security self-check (#507). The API
|
|
1454
|
+
* derives `author` from the JWT — there is no target param, so a caller can
|
|
1455
|
+
* only ever write their own posture (same model as `/me`).
|
|
1456
|
+
*/
|
|
1457
|
+
async submit(input3) {
|
|
1458
|
+
const { data, status } = await apiFetch(config, "/endpoint-checks", { method: "POST", body: JSON.stringify(input3) });
|
|
1459
|
+
if (status !== 201) {
|
|
1460
|
+
throw new Error(data.error ?? `Failed to submit endpoint check (${status})`);
|
|
1461
|
+
}
|
|
1462
|
+
return data;
|
|
1463
|
+
},
|
|
1464
|
+
/**
|
|
1465
|
+
* The latest check per person — the manager posture matrix. Manager-gated.
|
|
1466
|
+
*/
|
|
1467
|
+
async listLatest() {
|
|
1468
|
+
const { data, status } = await apiFetch(config, "/endpoint-checks");
|
|
1469
|
+
if (status === 403) {
|
|
1470
|
+
throw new Error("Access denied. Only Team Managers can list endpoint checks.");
|
|
1471
|
+
}
|
|
1472
|
+
if (status !== 200) {
|
|
1473
|
+
throw new Error(data.error ?? `Failed to list endpoint checks (${status})`);
|
|
1474
|
+
}
|
|
1475
|
+
return data;
|
|
1476
|
+
},
|
|
1477
|
+
/**
|
|
1478
|
+
* The caller's own latest check (or null). Self-scoped by the JWT.
|
|
1479
|
+
*/
|
|
1480
|
+
async getMine() {
|
|
1481
|
+
const { data, status } = await apiFetch(config, "/me/endpoint-check");
|
|
1482
|
+
if (status !== 200) {
|
|
1483
|
+
throw new Error(data.error ?? `Failed to fetch endpoint check (${status})`);
|
|
1484
|
+
}
|
|
1485
|
+
return data.check;
|
|
1486
|
+
}
|
|
1487
|
+
};
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1413
1490
|
// ../sdk/dist/client.js
|
|
1414
1491
|
async function apiFetch(config, path9, options = {}) {
|
|
1415
1492
|
const response = await fetch(`${config.baseUrl}${path9}`, {
|
|
@@ -1441,7 +1518,10 @@ function createMeltClient(config) {
|
|
|
1441
1518
|
pm: createPmResource(config),
|
|
1442
1519
|
slack: createSlackResource(config),
|
|
1443
1520
|
jobs: createJobsResource(config),
|
|
1444
|
-
chat: createChatResource(config)
|
|
1521
|
+
chat: createChatResource(config),
|
|
1522
|
+
me: createMeResource(config),
|
|
1523
|
+
developers: createDevelopersResource(config),
|
|
1524
|
+
endpointChecks: createEndpointChecksResource(config)
|
|
1445
1525
|
};
|
|
1446
1526
|
}
|
|
1447
1527
|
|
|
@@ -3430,6 +3510,7 @@ import { z as z8 } from "zod";
|
|
|
3430
3510
|
import { z as z9 } from "zod";
|
|
3431
3511
|
import { z as z10 } from "zod";
|
|
3432
3512
|
import { z as z11 } from "zod";
|
|
3513
|
+
import { z as z12 } from "zod";
|
|
3433
3514
|
function createAuditsResource2(config) {
|
|
3434
3515
|
return {
|
|
3435
3516
|
async submit(input3) {
|
|
@@ -4533,6 +4614,77 @@ function createChatResource2(config) {
|
|
|
4533
4614
|
}
|
|
4534
4615
|
};
|
|
4535
4616
|
}
|
|
4617
|
+
function createMeResource2(config) {
|
|
4618
|
+
return {
|
|
4619
|
+
/**
|
|
4620
|
+
* The authenticated developer's own self-service overview (#499). The API
|
|
4621
|
+
* derives identity from the JWT — there is no way to request another
|
|
4622
|
+
* person's data through this call.
|
|
4623
|
+
*/
|
|
4624
|
+
async overview() {
|
|
4625
|
+
const { data, status } = await apiFetch2(config, "/me/overview");
|
|
4626
|
+
if (status !== 200)
|
|
4627
|
+
throw new Error(data.error ?? `Failed to fetch overview (${status})`);
|
|
4628
|
+
return data;
|
|
4629
|
+
}
|
|
4630
|
+
};
|
|
4631
|
+
}
|
|
4632
|
+
function createDevelopersResource2(config) {
|
|
4633
|
+
return {
|
|
4634
|
+
/**
|
|
4635
|
+
* Manager-only: the same self-service overview as `me.overview()`, but for
|
|
4636
|
+
* an arbitrary developer (#499). Backed by GET /pm/developers/:email/overview,
|
|
4637
|
+
* which calls `checkManagerRole` before building. Non-managers get a 403.
|
|
4638
|
+
*/
|
|
4639
|
+
async overview(email) {
|
|
4640
|
+
const { data, status } = await apiFetch2(config, `/pm/developers/${encodeURIComponent(email)}/overview`);
|
|
4641
|
+
if (status === 403)
|
|
4642
|
+
throw new Error("Access denied. Only Team Managers can view other developers.");
|
|
4643
|
+
if (status !== 200)
|
|
4644
|
+
throw new Error(data.error ?? `Failed to fetch overview (${status})`);
|
|
4645
|
+
return data;
|
|
4646
|
+
}
|
|
4647
|
+
};
|
|
4648
|
+
}
|
|
4649
|
+
function createEndpointChecksResource2(config) {
|
|
4650
|
+
return {
|
|
4651
|
+
/**
|
|
4652
|
+
* Submit the calling person's endpoint-security self-check (#507). The API
|
|
4653
|
+
* derives `author` from the JWT — there is no target param, so a caller can
|
|
4654
|
+
* only ever write their own posture (same model as `/me`).
|
|
4655
|
+
*/
|
|
4656
|
+
async submit(input3) {
|
|
4657
|
+
const { data, status } = await apiFetch2(config, "/endpoint-checks", { method: "POST", body: JSON.stringify(input3) });
|
|
4658
|
+
if (status !== 201) {
|
|
4659
|
+
throw new Error(data.error ?? `Failed to submit endpoint check (${status})`);
|
|
4660
|
+
}
|
|
4661
|
+
return data;
|
|
4662
|
+
},
|
|
4663
|
+
/**
|
|
4664
|
+
* The latest check per person — the manager posture matrix. Manager-gated.
|
|
4665
|
+
*/
|
|
4666
|
+
async listLatest() {
|
|
4667
|
+
const { data, status } = await apiFetch2(config, "/endpoint-checks");
|
|
4668
|
+
if (status === 403) {
|
|
4669
|
+
throw new Error("Access denied. Only Team Managers can list endpoint checks.");
|
|
4670
|
+
}
|
|
4671
|
+
if (status !== 200) {
|
|
4672
|
+
throw new Error(data.error ?? `Failed to list endpoint checks (${status})`);
|
|
4673
|
+
}
|
|
4674
|
+
return data;
|
|
4675
|
+
},
|
|
4676
|
+
/**
|
|
4677
|
+
* The caller's own latest check (or null). Self-scoped by the JWT.
|
|
4678
|
+
*/
|
|
4679
|
+
async getMine() {
|
|
4680
|
+
const { data, status } = await apiFetch2(config, "/me/endpoint-check");
|
|
4681
|
+
if (status !== 200) {
|
|
4682
|
+
throw new Error(data.error ?? `Failed to fetch endpoint check (${status})`);
|
|
4683
|
+
}
|
|
4684
|
+
return data.check;
|
|
4685
|
+
}
|
|
4686
|
+
};
|
|
4687
|
+
}
|
|
4536
4688
|
async function apiFetch2(config, path22, options = {}) {
|
|
4537
4689
|
const response = await fetch(`${config.baseUrl}${path22}`, {
|
|
4538
4690
|
...options,
|
|
@@ -4563,7 +4715,10 @@ function createMeltClient2(config) {
|
|
|
4563
4715
|
pm: createPmResource2(config),
|
|
4564
4716
|
slack: createSlackResource2(config),
|
|
4565
4717
|
jobs: createJobsResource2(config),
|
|
4566
|
-
chat: createChatResource2(config)
|
|
4718
|
+
chat: createChatResource2(config),
|
|
4719
|
+
me: createMeResource2(config),
|
|
4720
|
+
developers: createDevelopersResource2(config),
|
|
4721
|
+
endpointChecks: createEndpointChecksResource2(config)
|
|
4567
4722
|
};
|
|
4568
4723
|
}
|
|
4569
4724
|
var auditFindingSchema2 = z2.object({
|
|
@@ -5771,6 +5926,59 @@ function registerDailyPlanTools(server, getClient2) {
|
|
|
5771
5926
|
withClientArgs(getClient2, submitDailyPlan)
|
|
5772
5927
|
);
|
|
5773
5928
|
}
|
|
5929
|
+
var controlResult = z12.enum(["pass", "fail", "unknown"]);
|
|
5930
|
+
var verbalResult = z12.enum(["confirmed", "no", "unknown"]);
|
|
5931
|
+
var submitEndpointCheckShape = {
|
|
5932
|
+
developerName: z12.string().min(1).describe("Full name the report is filed under."),
|
|
5933
|
+
os: z12.enum(["macos", "windows", "linux"]).describe("Detected operating system."),
|
|
5934
|
+
osVersion: z12.string().min(1).describe('e.g. "macOS 26.3" or "Windows 11 23H2".'),
|
|
5935
|
+
diskEncryption: controlResult.describe("Full-disk encryption (FileVault / BitLocker)."),
|
|
5936
|
+
screenLock: controlResult.describe("Screen lock + password on idle."),
|
|
5937
|
+
osUpdates: controlResult.describe("OS current + automatic updates on."),
|
|
5938
|
+
endpointProtection: controlResult.describe("Endpoint protection (SIP/Gatekeeper / Defender)."),
|
|
5939
|
+
firewall: controlResult.describe("Host firewall enabled (post-remediation if done)."),
|
|
5940
|
+
passwordManager: controlResult.describe("A password manager is installed."),
|
|
5941
|
+
mfa: verbalResult.describe("Verbal: MFA on every work account."),
|
|
5942
|
+
dataMinimization: verbalResult.describe("Verbal: cloud-first, no customer data kept locally."),
|
|
5943
|
+
leastPrivilege: verbalResult.describe("Verbal: access scoped to what is needed."),
|
|
5944
|
+
summary: z12.string().min(1).describe("One-line summary of the result."),
|
|
5945
|
+
remediationDone: z12.string().min(1).describe('What was changed this session, e.g. "enabled host firewall" or "none".'),
|
|
5946
|
+
rawReport: z12.string().min(1).describe("The full secrets-free markdown report. NEVER include passwords, keys, or tokens."),
|
|
5947
|
+
// Hardware inventory snapshot (#507) — all optional / best-effort. Pass what
|
|
5948
|
+
// the OS reliably reports; omit anything it can't. Hardware identifiers
|
|
5949
|
+
// (serial, model, device name) ARE intended here; still NO passwords/keys/
|
|
5950
|
+
// tokens/credentials.
|
|
5951
|
+
deviceName: z12.string().optional().describe("Computer name (scutil --get ComputerName / $env:COMPUTERNAME)."),
|
|
5952
|
+
manufacturer: z12.string().optional().describe('e.g. "Apple" or Win32_ComputerSystem.Manufacturer.'),
|
|
5953
|
+
model: z12.string().optional().describe("Model name (SPHardwareDataType / Win32_ComputerSystem.Model)."),
|
|
5954
|
+
modelIdentifier: z12.string().optional().describe('e.g. "Mac15,3" (macOS Model Identifier).'),
|
|
5955
|
+
cpu: z12.string().optional().describe("Chip / processor name (SPHardwareDataType / Win32_Processor.Name)."),
|
|
5956
|
+
cpuCores: z12.number().int().optional().describe("Total number of CPU cores."),
|
|
5957
|
+
memoryGb: z12.number().int().optional().describe("Installed RAM in GB."),
|
|
5958
|
+
storageGb: z12.number().int().optional().describe("Primary disk capacity in GB."),
|
|
5959
|
+
serialNumber: z12.string().optional().describe("Hardware serial number (SPHardwareDataType / Win32_BIOS.SerialNumber)."),
|
|
5960
|
+
batteryCycleCount: z12.number().int().optional().describe("Battery cycle count (SPPowerDataType); omit on desktops."),
|
|
5961
|
+
batteryCondition: z12.string().optional().describe('Battery condition (SPPowerDataType), e.g. "Normal".'),
|
|
5962
|
+
ageHint: z12.string().optional().describe(
|
|
5963
|
+
"Free-form age proxy: model-year, BIOS/OS install date, or a user-stated acquisition date."
|
|
5964
|
+
),
|
|
5965
|
+
inventoryExtra: z12.record(z12.string(), z12.unknown()).optional().describe("Anything else reliably readable (GPU, OS build, uptime). No secrets.")
|
|
5966
|
+
};
|
|
5967
|
+
var submitEndpointCheckSchema = z12.object(submitEndpointCheckShape);
|
|
5968
|
+
async function submitEndpointCheck(client, input3) {
|
|
5969
|
+
return safe(() => client.endpointChecks.submit(input3));
|
|
5970
|
+
}
|
|
5971
|
+
function registerEndpointCheckTools(server, getClient2) {
|
|
5972
|
+
server.registerTool(
|
|
5973
|
+
"submit_endpoint_check",
|
|
5974
|
+
{
|
|
5975
|
+
title: "Submit an endpoint-security self-check",
|
|
5976
|
+
description: "Records the calling person's endpoint-security self-check against Melt's baseline (#507). melt-endpoint-check calls this once it has run the read-only checks and produced the report: pass the 9 control results (5 technical pass/fail/unknown + 3 verbal confirmed/no/unknown), the OS, the one-line summary, what was remediated, and the full secrets-free markdown report. Self-scoped \u2014 the author comes from the JWT, so a caller only ever writes their own posture. Latest-check-wins per person. NEVER pass secrets (passwords, keys, tokens, internal hostnames) in any field.",
|
|
5977
|
+
inputSchema: submitEndpointCheckShape
|
|
5978
|
+
},
|
|
5979
|
+
withClientArgs(getClient2, submitEndpointCheck)
|
|
5980
|
+
);
|
|
5981
|
+
}
|
|
5774
5982
|
var VERSION = "0.0.0";
|
|
5775
5983
|
function createMcpServer(clientOrProvider) {
|
|
5776
5984
|
const getClient2 = typeof clientOrProvider === "function" ? clientOrProvider : () => Promise.resolve(clientOrProvider);
|
|
@@ -5788,6 +5996,7 @@ function createMcpServer(clientOrProvider) {
|
|
|
5788
5996
|
registerPortfolioStatusTools(server, getClient2);
|
|
5789
5997
|
registerFindingsTools(server, getClient2);
|
|
5790
5998
|
registerDailyPlanTools(server, getClient2);
|
|
5999
|
+
registerEndpointCheckTools(server, getClient2);
|
|
5791
6000
|
return server;
|
|
5792
6001
|
}
|
|
5793
6002
|
async function startServer() {
|
package/package.json
CHANGED