@meltstudio/meltctl 4.185.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.
Files changed (2) hide show
  1. package/dist/index.js +140 -3
  2. 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.185.0";
17
+ CLI_VERSION = "4.186.0";
18
18
  }
19
19
  });
20
20
 
@@ -1446,6 +1446,47 @@ function createDevelopersResource(config) {
1446
1446
  };
1447
1447
  }
1448
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
+
1449
1490
  // ../sdk/dist/client.js
1450
1491
  async function apiFetch(config, path9, options = {}) {
1451
1492
  const response = await fetch(`${config.baseUrl}${path9}`, {
@@ -1479,7 +1520,8 @@ function createMeltClient(config) {
1479
1520
  jobs: createJobsResource(config),
1480
1521
  chat: createChatResource(config),
1481
1522
  me: createMeResource(config),
1482
- developers: createDevelopersResource(config)
1523
+ developers: createDevelopersResource(config),
1524
+ endpointChecks: createEndpointChecksResource(config)
1483
1525
  };
1484
1526
  }
1485
1527
 
@@ -3468,6 +3510,7 @@ import { z as z8 } from "zod";
3468
3510
  import { z as z9 } from "zod";
3469
3511
  import { z as z10 } from "zod";
3470
3512
  import { z as z11 } from "zod";
3513
+ import { z as z12 } from "zod";
3471
3514
  function createAuditsResource2(config) {
3472
3515
  return {
3473
3516
  async submit(input3) {
@@ -4603,6 +4646,45 @@ function createDevelopersResource2(config) {
4603
4646
  }
4604
4647
  };
4605
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
+ }
4606
4688
  async function apiFetch2(config, path22, options = {}) {
4607
4689
  const response = await fetch(`${config.baseUrl}${path22}`, {
4608
4690
  ...options,
@@ -4635,7 +4717,8 @@ function createMeltClient2(config) {
4635
4717
  jobs: createJobsResource2(config),
4636
4718
  chat: createChatResource2(config),
4637
4719
  me: createMeResource2(config),
4638
- developers: createDevelopersResource2(config)
4720
+ developers: createDevelopersResource2(config),
4721
+ endpointChecks: createEndpointChecksResource2(config)
4639
4722
  };
4640
4723
  }
4641
4724
  var auditFindingSchema2 = z2.object({
@@ -5843,6 +5926,59 @@ function registerDailyPlanTools(server, getClient2) {
5843
5926
  withClientArgs(getClient2, submitDailyPlan)
5844
5927
  );
5845
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
+ }
5846
5982
  var VERSION = "0.0.0";
5847
5983
  function createMcpServer(clientOrProvider) {
5848
5984
  const getClient2 = typeof clientOrProvider === "function" ? clientOrProvider : () => Promise.resolve(clientOrProvider);
@@ -5860,6 +5996,7 @@ function createMcpServer(clientOrProvider) {
5860
5996
  registerPortfolioStatusTools(server, getClient2);
5861
5997
  registerFindingsTools(server, getClient2);
5862
5998
  registerDailyPlanTools(server, getClient2);
5999
+ registerEndpointCheckTools(server, getClient2);
5863
6000
  return server;
5864
6001
  }
5865
6002
  async function startServer() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.185.0",
3
+ "version": "4.186.0",
4
4
  "description": "AI-first development tools for teams - set up AGENTS.md, Claude Code, Cursor, and OpenCode standards",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",