@meltstudio/meltctl 4.115.0 → 4.115.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.
Files changed (2) hide show
  1. package/dist/index.js +29 -5
  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.115.0";
17
+ CLI_VERSION = "4.115.1";
18
18
  }
19
19
  });
20
20
 
@@ -1048,11 +1048,23 @@ function createPmResource(config) {
1048
1048
  // ../sdk/dist/resources/slack.js
1049
1049
  function createSlackResource(config) {
1050
1050
  return {
1051
- /** Returns the URL the manager should follow to install the Slack App.
1052
- * Just exposes `/slack/install` Slack's auth UI lives upstream. */
1051
+ /** Static URL of the API's redirect endpoint. Useful for callers that can
1052
+ * attach the bearer token themselves; the dashboard proxies via
1053
+ * `startInstall()` instead because the browser can't attach the JWT on a
1054
+ * cross-origin top-level navigation. */
1053
1055
  installUrl() {
1054
1056
  return `${config.baseUrl}/slack/install`;
1055
1057
  },
1058
+ /** Returns the upstream Slack OAuth URL the user should be redirected to
1059
+ * next. Used by the dashboard's `/api/slack/install` proxy route. */
1060
+ async startInstall() {
1061
+ const { data, status } = await apiFetch(config, "/slack/install/start");
1062
+ if (status === 403)
1063
+ throw new Error("Access denied. Only Team Managers can install Slack.");
1064
+ if (status >= 400)
1065
+ throw new Error(`Failed to start Slack install (${status}): ${data.error ?? ""}`);
1066
+ return data;
1067
+ },
1056
1068
  async getInstallStatus() {
1057
1069
  const { data, status } = await apiFetch(config, "/slack/install/status");
1058
1070
  if (status === 403)
@@ -3505,11 +3517,23 @@ function createPmResource2(config) {
3505
3517
  }
3506
3518
  function createSlackResource2(config) {
3507
3519
  return {
3508
- /** Returns the URL the manager should follow to install the Slack App.
3509
- * Just exposes `/slack/install` Slack's auth UI lives upstream. */
3520
+ /** Static URL of the API's redirect endpoint. Useful for callers that can
3521
+ * attach the bearer token themselves; the dashboard proxies via
3522
+ * `startInstall()` instead because the browser can't attach the JWT on a
3523
+ * cross-origin top-level navigation. */
3510
3524
  installUrl() {
3511
3525
  return `${config.baseUrl}/slack/install`;
3512
3526
  },
3527
+ /** Returns the upstream Slack OAuth URL the user should be redirected to
3528
+ * next. Used by the dashboard's `/api/slack/install` proxy route. */
3529
+ async startInstall() {
3530
+ const { data, status } = await apiFetch2(config, "/slack/install/start");
3531
+ if (status === 403)
3532
+ throw new Error("Access denied. Only Team Managers can install Slack.");
3533
+ if (status >= 400)
3534
+ throw new Error(`Failed to start Slack install (${status}): ${data.error ?? ""}`);
3535
+ return data;
3536
+ },
3513
3537
  async getInstallStatus() {
3514
3538
  const { data, status } = await apiFetch2(config, "/slack/install/status");
3515
3539
  if (status === 403)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.115.0",
3
+ "version": "4.115.1",
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",