@meltstudio/meltctl 4.183.0 → 4.185.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 +97 -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.183.0";
17
+ CLI_VERSION = "4.185.0";
18
18
  }
19
19
  });
20
20
 
@@ -1205,6 +1205,17 @@ function createPmResource(config) {
1205
1205
  const res = await apiFetch(config, `/pm/risks?status=${status}`);
1206
1206
  return unwrap("list risks", res);
1207
1207
  },
1208
+ /**
1209
+ * On-demand pull of one project's risks from Linear into the mirror (#503).
1210
+ * The scheduled sync runs weekly; this lets a PM who just closed/updated
1211
+ * risks refresh immediately. Manager-only on the server. Returns the sync
1212
+ * counts (upserted/deleted). Throws if the project isn't mapped to a risks
1213
+ * board (409) or the risk-board key is unconfigured (503).
1214
+ */
1215
+ async refreshProjectRisks(projectId) {
1216
+ const res = await apiFetch(config, `/pm/projects/${projectId}/risks/refresh`, { method: "POST" });
1217
+ return unwrap("refresh project risks", res);
1218
+ },
1208
1219
  // ─── Portfolio status ──────────────────────────────────────────────────
1209
1220
  /**
1210
1221
  * Cross-project ranked answer to "where do I focus next?". Returns a
@@ -1399,6 +1410,42 @@ function createChatResource(config) {
1399
1410
  };
1400
1411
  }
1401
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
+
1402
1449
  // ../sdk/dist/client.js
1403
1450
  async function apiFetch(config, path9, options = {}) {
1404
1451
  const response = await fetch(`${config.baseUrl}${path9}`, {
@@ -1430,7 +1477,9 @@ function createMeltClient(config) {
1430
1477
  pm: createPmResource(config),
1431
1478
  slack: createSlackResource(config),
1432
1479
  jobs: createJobsResource(config),
1433
- chat: createChatResource(config)
1480
+ chat: createChatResource(config),
1481
+ me: createMeResource(config),
1482
+ developers: createDevelopersResource(config)
1434
1483
  };
1435
1484
  }
1436
1485
 
@@ -4324,6 +4373,17 @@ function createPmResource2(config) {
4324
4373
  const res = await apiFetch2(config, `/pm/risks?status=${status}`);
4325
4374
  return unwrap2("list risks", res);
4326
4375
  },
4376
+ /**
4377
+ * On-demand pull of one project's risks from Linear into the mirror (#503).
4378
+ * The scheduled sync runs weekly; this lets a PM who just closed/updated
4379
+ * risks refresh immediately. Manager-only on the server. Returns the sync
4380
+ * counts (upserted/deleted). Throws if the project isn't mapped to a risks
4381
+ * board (409) or the risk-board key is unconfigured (503).
4382
+ */
4383
+ async refreshProjectRisks(projectId) {
4384
+ const res = await apiFetch2(config, `/pm/projects/${projectId}/risks/refresh`, { method: "POST" });
4385
+ return unwrap2("refresh project risks", res);
4386
+ },
4327
4387
  // ─── Portfolio status ──────────────────────────────────────────────────
4328
4388
  /**
4329
4389
  * Cross-project ranked answer to "where do I focus next?". Returns a
@@ -4511,6 +4571,38 @@ function createChatResource2(config) {
4511
4571
  }
4512
4572
  };
4513
4573
  }
4574
+ function createMeResource2(config) {
4575
+ return {
4576
+ /**
4577
+ * The authenticated developer's own self-service overview (#499). The API
4578
+ * derives identity from the JWT — there is no way to request another
4579
+ * person's data through this call.
4580
+ */
4581
+ async overview() {
4582
+ const { data, status } = await apiFetch2(config, "/me/overview");
4583
+ if (status !== 200)
4584
+ throw new Error(data.error ?? `Failed to fetch overview (${status})`);
4585
+ return data;
4586
+ }
4587
+ };
4588
+ }
4589
+ function createDevelopersResource2(config) {
4590
+ return {
4591
+ /**
4592
+ * Manager-only: the same self-service overview as `me.overview()`, but for
4593
+ * an arbitrary developer (#499). Backed by GET /pm/developers/:email/overview,
4594
+ * which calls `checkManagerRole` before building. Non-managers get a 403.
4595
+ */
4596
+ async overview(email) {
4597
+ const { data, status } = await apiFetch2(config, `/pm/developers/${encodeURIComponent(email)}/overview`);
4598
+ if (status === 403)
4599
+ throw new Error("Access denied. Only Team Managers can view other developers.");
4600
+ if (status !== 200)
4601
+ throw new Error(data.error ?? `Failed to fetch overview (${status})`);
4602
+ return data;
4603
+ }
4604
+ };
4605
+ }
4514
4606
  async function apiFetch2(config, path22, options = {}) {
4515
4607
  const response = await fetch(`${config.baseUrl}${path22}`, {
4516
4608
  ...options,
@@ -4541,7 +4633,9 @@ function createMeltClient2(config) {
4541
4633
  pm: createPmResource2(config),
4542
4634
  slack: createSlackResource2(config),
4543
4635
  jobs: createJobsResource2(config),
4544
- chat: createChatResource2(config)
4636
+ chat: createChatResource2(config),
4637
+ me: createMeResource2(config),
4638
+ developers: createDevelopersResource2(config)
4545
4639
  };
4546
4640
  }
4547
4641
  var auditFindingSchema2 = z2.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.183.0",
3
+ "version": "4.185.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",