@superblocksteam/cli 2.0.105-next.0 → 2.0.105-next.2

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 (109) hide show
  1. package/README.md +7 -6
  2. package/dist/{acorn-SPLJYDYN.js → acorn-CN6JYU6C.js} +3 -3
  3. package/dist/{angular-T25DB2NK.js → angular-2PNX3NJU.js} +3 -3
  4. package/dist/{api-6GH5RQOD.js → api-WBVLJHKL.js} +4 -4
  5. package/dist/{babel-NSJKWHAB.js → babel-3RYFPIHU.js} +3 -3
  6. package/dist/{chunk-IFUC4XZ2.js → chunk-6GJILK2C.js} +3 -3
  7. package/dist/chunk-6HO5XFAA.js +202 -0
  8. package/dist/chunk-6HO5XFAA.js.map +1 -0
  9. package/dist/{chunk-D7AZ3MNH.js → chunk-73IQKEW6.js} +3 -3
  10. package/dist/{chunk-GWMV3B7E.js → chunk-7F365BAF.js} +3 -3
  11. package/dist/{chunk-MLZWCAZM.js → chunk-BMTHQVNU.js} +6 -6
  12. package/dist/{chunk-QLZERZ2C.js → chunk-DBJL76JG.js} +2 -2
  13. package/dist/{chunk-L77W7UDL.js → chunk-DJS34GDP.js} +3 -3
  14. package/dist/{chunk-BSMI6NM3.js → chunk-FBRQ5GQY.js} +3 -3
  15. package/dist/{chunk-SWTFHX2J.js → chunk-IZ6TQ7NB.js} +3 -3
  16. package/dist/{chunk-NR35G7X3.js → chunk-OXC4M25U.js} +3 -3
  17. package/dist/{chunk-SOHOJJJL.js → chunk-Q5XZN3IH.js} +2516 -895
  18. package/dist/{chunk-SOHOJJJL.js.map → chunk-Q5XZN3IH.js.map} +1 -1
  19. package/dist/{chunk-HBXTW4UL.js → chunk-SWTDPYKF.js} +4 -4
  20. package/dist/{chunk-XHOK2OVZ.js → chunk-UR32AWL5.js} +3 -3
  21. package/dist/{chunk-7Y5NQEZS.js → chunk-V6HYX527.js} +3 -3
  22. package/dist/{chunk-6LTX4MKG.js → chunk-VRPW5BO7.js} +797 -198
  23. package/dist/chunk-VRPW5BO7.js.map +1 -0
  24. package/dist/{chunk-7HJMPY3P.js → chunk-XBQQ5LE3.js} +4 -4
  25. package/dist/{chunk-TUVNDUIM.js → chunk-YHSSGIR6.js} +4 -4
  26. package/dist/{cli-truncate-XKVKQ74O.js → cli-truncate-KBCISWJV.js} +5 -5
  27. package/dist/commands/dev-parent.js +2 -2
  28. package/dist/{dd-trace-FCIYQ26X.js → dd-trace-FGSZE4GX.js} +7 -7
  29. package/dist/{dist-PJRKTNKT.js → dist-ZNOR3C4J.js} +92 -34
  30. package/dist/dist-ZNOR3C4J.js.map +1 -0
  31. package/dist/{embedded-playwright-mcp-server-NARAP7OX.js → embedded-playwright-mcp-server-V35WE5T4.js} +3 -3
  32. package/dist/{enquirer-HTDPPQVH.js → enquirer-IXV6MGEM.js} +4 -4
  33. package/dist/{estree-2DSUUTQW.js → estree-XCEZDHRY.js} +3 -3
  34. package/dist/{flow-AOBRKQNJ.js → flow-OGEDI4B4.js} +3 -3
  35. package/dist/{getMachineId-bsd-FOIKWXDF.js → getMachineId-bsd-L2HGZSI6.js} +5 -5
  36. package/dist/{getMachineId-darwin-D52IQFXV.js → getMachineId-darwin-E6XNMPMP.js} +5 -5
  37. package/dist/{getMachineId-linux-PYKZK6KJ.js → getMachineId-linux-2CTIDIMS.js} +4 -4
  38. package/dist/{getMachineId-unsupported-MFQ2NJL2.js → getMachineId-unsupported-SK7LPXEI.js} +4 -4
  39. package/dist/{getMachineId-win-ECKGLXSG.js → getMachineId-win-B5E2HZYV.js} +5 -5
  40. package/dist/{glimmer-4PG6LXDZ.js → glimmer-OKVWSALA.js} +3 -3
  41. package/dist/{graphql-YBZHJ76A.js → graphql-YKF6QG2X.js} +3 -3
  42. package/dist/{html-N6IZH7PR.js → html-WIQCGFFQ.js} +3 -3
  43. package/dist/{http-GN34UTTD.js → http-5US3EJWW.js} +22 -115
  44. package/dist/http-5US3EJWW.js.map +1 -0
  45. package/dist/index.js +76 -46
  46. package/dist/index.js.map +1 -1
  47. package/dist/{jiti-MK2H65EM.js → jiti-EQEMGT6R.js} +3 -3
  48. package/dist/{log-update-SCNS3K3A.js → log-update-N5NNRYXM.js} +6 -6
  49. package/dist/{markdown-CRX6BOVX.js → markdown-WVMNDMRR.js} +3 -3
  50. package/dist/{meriyah-SQYD2WKB.js → meriyah-EWMMQMZU.js} +3 -3
  51. package/dist/{postcss-NLXHGDM2.js → postcss-44ISHF3Y.js} +3 -3
  52. package/dist/{read-pkg-O2DIYDZG.js → read-pkg-2HVFBBQB.js} +5 -5
  53. package/dist/{spans-4KMUHQCG.js → spans-SYI7DLFQ.js} +4 -4
  54. package/dist/{src-LMPHLH56.js → src-U5FIU7HU.js} +3 -3
  55. package/dist/{token-APXEU5RC.js → token-FDI4WOAX.js} +5 -5
  56. package/dist/{token-util-7BVKQ4XI.js → token-util-4NEFLWRZ.js} +5 -5
  57. package/dist/{typescript-H7UDWRQZ.js → typescript-PW5Z5LOC.js} +3 -3
  58. package/dist/{wrap-ansi-7QR2XAUH.js → wrap-ansi-54ZJTV6S.js} +5 -5
  59. package/dist/{yaml-DVCR22BU.js → yaml-BRCVPHKB.js} +3 -3
  60. package/oclif.manifest.json +10 -4
  61. package/package.json +5 -5
  62. package/dist/chunk-6LTX4MKG.js.map +0 -1
  63. package/dist/dist-PJRKTNKT.js.map +0 -1
  64. package/dist/http-GN34UTTD.js.map +0 -1
  65. /package/dist/{acorn-SPLJYDYN.js.map → acorn-CN6JYU6C.js.map} +0 -0
  66. /package/dist/{angular-T25DB2NK.js.map → angular-2PNX3NJU.js.map} +0 -0
  67. /package/dist/{api-6GH5RQOD.js.map → api-WBVLJHKL.js.map} +0 -0
  68. /package/dist/{babel-NSJKWHAB.js.map → babel-3RYFPIHU.js.map} +0 -0
  69. /package/dist/{chunk-IFUC4XZ2.js.map → chunk-6GJILK2C.js.map} +0 -0
  70. /package/dist/{chunk-D7AZ3MNH.js.map → chunk-73IQKEW6.js.map} +0 -0
  71. /package/dist/{chunk-GWMV3B7E.js.map → chunk-7F365BAF.js.map} +0 -0
  72. /package/dist/{chunk-MLZWCAZM.js.map → chunk-BMTHQVNU.js.map} +0 -0
  73. /package/dist/{chunk-QLZERZ2C.js.map → chunk-DBJL76JG.js.map} +0 -0
  74. /package/dist/{chunk-L77W7UDL.js.map → chunk-DJS34GDP.js.map} +0 -0
  75. /package/dist/{chunk-BSMI6NM3.js.map → chunk-FBRQ5GQY.js.map} +0 -0
  76. /package/dist/{chunk-SWTFHX2J.js.map → chunk-IZ6TQ7NB.js.map} +0 -0
  77. /package/dist/{chunk-NR35G7X3.js.map → chunk-OXC4M25U.js.map} +0 -0
  78. /package/dist/{chunk-HBXTW4UL.js.map → chunk-SWTDPYKF.js.map} +0 -0
  79. /package/dist/{chunk-XHOK2OVZ.js.map → chunk-UR32AWL5.js.map} +0 -0
  80. /package/dist/{chunk-7Y5NQEZS.js.map → chunk-V6HYX527.js.map} +0 -0
  81. /package/dist/{chunk-7HJMPY3P.js.map → chunk-XBQQ5LE3.js.map} +0 -0
  82. /package/dist/{chunk-TUVNDUIM.js.map → chunk-YHSSGIR6.js.map} +0 -0
  83. /package/dist/{cli-truncate-XKVKQ74O.js.map → cli-truncate-KBCISWJV.js.map} +0 -0
  84. /package/dist/{dd-trace-FCIYQ26X.js.map → dd-trace-FGSZE4GX.js.map} +0 -0
  85. /package/dist/{embedded-playwright-mcp-server-NARAP7OX.js.map → embedded-playwright-mcp-server-V35WE5T4.js.map} +0 -0
  86. /package/dist/{enquirer-HTDPPQVH.js.map → enquirer-IXV6MGEM.js.map} +0 -0
  87. /package/dist/{estree-2DSUUTQW.js.map → estree-XCEZDHRY.js.map} +0 -0
  88. /package/dist/{flow-AOBRKQNJ.js.map → flow-OGEDI4B4.js.map} +0 -0
  89. /package/dist/{getMachineId-bsd-FOIKWXDF.js.map → getMachineId-bsd-L2HGZSI6.js.map} +0 -0
  90. /package/dist/{getMachineId-darwin-D52IQFXV.js.map → getMachineId-darwin-E6XNMPMP.js.map} +0 -0
  91. /package/dist/{getMachineId-linux-PYKZK6KJ.js.map → getMachineId-linux-2CTIDIMS.js.map} +0 -0
  92. /package/dist/{getMachineId-unsupported-MFQ2NJL2.js.map → getMachineId-unsupported-SK7LPXEI.js.map} +0 -0
  93. /package/dist/{getMachineId-win-ECKGLXSG.js.map → getMachineId-win-B5E2HZYV.js.map} +0 -0
  94. /package/dist/{glimmer-4PG6LXDZ.js.map → glimmer-OKVWSALA.js.map} +0 -0
  95. /package/dist/{graphql-YBZHJ76A.js.map → graphql-YKF6QG2X.js.map} +0 -0
  96. /package/dist/{html-N6IZH7PR.js.map → html-WIQCGFFQ.js.map} +0 -0
  97. /package/dist/{jiti-MK2H65EM.js.map → jiti-EQEMGT6R.js.map} +0 -0
  98. /package/dist/{log-update-SCNS3K3A.js.map → log-update-N5NNRYXM.js.map} +0 -0
  99. /package/dist/{markdown-CRX6BOVX.js.map → markdown-WVMNDMRR.js.map} +0 -0
  100. /package/dist/{meriyah-SQYD2WKB.js.map → meriyah-EWMMQMZU.js.map} +0 -0
  101. /package/dist/{postcss-NLXHGDM2.js.map → postcss-44ISHF3Y.js.map} +0 -0
  102. /package/dist/{read-pkg-O2DIYDZG.js.map → read-pkg-2HVFBBQB.js.map} +0 -0
  103. /package/dist/{spans-4KMUHQCG.js.map → spans-SYI7DLFQ.js.map} +0 -0
  104. /package/dist/{src-LMPHLH56.js.map → src-U5FIU7HU.js.map} +0 -0
  105. /package/dist/{token-APXEU5RC.js.map → token-FDI4WOAX.js.map} +0 -0
  106. /package/dist/{token-util-7BVKQ4XI.js.map → token-util-4NEFLWRZ.js.map} +0 -0
  107. /package/dist/{typescript-H7UDWRQZ.js.map → typescript-PW5Z5LOC.js.map} +0 -0
  108. /package/dist/{wrap-ansi-7QR2XAUH.js.map → wrap-ansi-54ZJTV6S.js.map} +0 -0
  109. /package/dist/{yaml-DVCR22BU.js.map → yaml-BRCVPHKB.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  if (typeof process === 'object' && process !== null &&
2
2
  process.env !== null && typeof process.env === 'object') {
3
3
  process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
4
- process.env.DD_GIT_COMMIT_SHA = 'd3ed004f0639aa5cf95a86a1ffc7a3e0f629c2fa';
4
+ process.env.DD_GIT_COMMIT_SHA = 'de5c3e104e3ed96f50cc0f43a6c093c0132245f9';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -14,10 +14,10 @@ import {
14
14
  ansi_styles_default,
15
15
  stringWidth,
16
16
  stripAnsi
17
- } from "./chunk-BSMI6NM3.js";
17
+ } from "./chunk-FBRQ5GQY.js";
18
18
  import {
19
19
  init_cjs_shims
20
- } from "./chunk-QLZERZ2C.js";
20
+ } from "./chunk-DBJL76JG.js";
21
21
 
22
22
  // ../../../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
23
23
  init_cjs_shims();
@@ -174,4 +174,4 @@ function wrapAnsi(string, columns, options) {
174
174
  export {
175
175
  wrapAnsi
176
176
  };
177
- //# sourceMappingURL=chunk-7HJMPY3P.js.map
177
+ //# sourceMappingURL=chunk-XBQQ5LE3.js.map
@@ -1,7 +1,7 @@
1
1
  if (typeof process === 'object' && process !== null &&
2
2
  process.env !== null && typeof process.env === 'object') {
3
3
  process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
4
- process.env.DD_GIT_COMMIT_SHA = 'd3ed004f0639aa5cf95a86a1ffc7a3e0f629c2fa';
4
+ process.env.DD_GIT_COMMIT_SHA = 'de5c3e104e3ed96f50cc0f43a6c093c0132245f9';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -12,12 +12,12 @@ globalThis.__dirname ??= $dd_dirname(globalThis.__filename);
12
12
 
13
13
  import {
14
14
  require_token_error
15
- } from "./chunk-L77W7UDL.js";
15
+ } from "./chunk-DJS34GDP.js";
16
16
  import {
17
17
  __commonJS,
18
18
  __require,
19
19
  init_cjs_shims
20
- } from "./chunk-QLZERZ2C.js";
20
+ } from "./chunk-DBJL76JG.js";
21
21
 
22
22
  // ../../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-io.js
23
23
  var require_token_io = __commonJS({
@@ -469,4 +469,4 @@ var require_token_util = __commonJS({
469
469
  export {
470
470
  require_token_util
471
471
  };
472
- //# sourceMappingURL=chunk-TUVNDUIM.js.map
472
+ //# sourceMappingURL=chunk-YHSSGIR6.js.map
@@ -1,7 +1,7 @@
1
1
  if (typeof process === 'object' && process !== null &&
2
2
  process.env !== null && typeof process.env === 'object') {
3
3
  process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
4
- process.env.DD_GIT_COMMIT_SHA = 'd3ed004f0639aa5cf95a86a1ffc7a3e0f629c2fa';
4
+ process.env.DD_GIT_COMMIT_SHA = 'de5c3e104e3ed96f50cc0f43a6c093c0132245f9';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -12,13 +12,13 @@ globalThis.__dirname ??= $dd_dirname(globalThis.__filename);
12
12
 
13
13
  import {
14
14
  sliceAnsi
15
- } from "./chunk-HBXTW4UL.js";
15
+ } from "./chunk-SWTDPYKF.js";
16
16
  import {
17
17
  stringWidth
18
- } from "./chunk-BSMI6NM3.js";
18
+ } from "./chunk-FBRQ5GQY.js";
19
19
  import {
20
20
  init_cjs_shims
21
- } from "./chunk-QLZERZ2C.js";
21
+ } from "./chunk-DBJL76JG.js";
22
22
 
23
23
  // ../../../../node_modules/.pnpm/cli-truncate@3.1.0/node_modules/cli-truncate/index.js
24
24
  init_cjs_shims();
@@ -99,4 +99,4 @@ function cliTruncate(text, columns, options) {
99
99
  export {
100
100
  cliTruncate as default
101
101
  };
102
- //# sourceMappingURL=cli-truncate-XKVKQ74O.js.map
102
+ //# sourceMappingURL=cli-truncate-KBCISWJV.js.map
@@ -1,7 +1,7 @@
1
1
  if (typeof process === 'object' && process !== null &&
2
2
  process.env !== null && typeof process.env === 'object') {
3
3
  process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
4
- process.env.DD_GIT_COMMIT_SHA = 'd3ed004f0639aa5cf95a86a1ffc7a3e0f629c2fa';
4
+ process.env.DD_GIT_COMMIT_SHA = 'de5c3e104e3ed96f50cc0f43a6c093c0132245f9';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -12,7 +12,7 @@ globalThis.__dirname ??= $dd_dirname(globalThis.__filename);
12
12
 
13
13
  import {
14
14
  init_cjs_shims
15
- } from "../chunk-QLZERZ2C.js";
15
+ } from "../chunk-DBJL76JG.js";
16
16
 
17
17
  // src/commands/dev-parent.mts
18
18
  init_cjs_shims();
@@ -1,7 +1,7 @@
1
1
  if (typeof process === 'object' && process !== null &&
2
2
  process.env !== null && typeof process.env === 'object') {
3
3
  process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
4
- process.env.DD_GIT_COMMIT_SHA = 'd3ed004f0639aa5cf95a86a1ffc7a3e0f629c2fa';
4
+ process.env.DD_GIT_COMMIT_SHA = 'de5c3e104e3ed96f50cc0f43a6c093c0132245f9';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -12,10 +12,10 @@ globalThis.__dirname ??= $dd_dirname(globalThis.__filename);
12
12
 
13
13
  import {
14
14
  require_dd_trace
15
- } from "./chunk-MLZWCAZM.js";
16
- import "./chunk-D7AZ3MNH.js";
17
- import "./chunk-NR35G7X3.js";
18
- import "./chunk-7Y5NQEZS.js";
19
- import "./chunk-QLZERZ2C.js";
15
+ } from "./chunk-BMTHQVNU.js";
16
+ import "./chunk-73IQKEW6.js";
17
+ import "./chunk-OXC4M25U.js";
18
+ import "./chunk-V6HYX527.js";
19
+ import "./chunk-DBJL76JG.js";
20
20
  export default require_dd_trace();
21
- //# sourceMappingURL=dd-trace-FCIYQ26X.js.map
21
+ //# sourceMappingURL=dd-trace-FGSZE4GX.js.map
@@ -2,7 +2,7 @@
2
2
  if (typeof process === 'object' && process !== null &&
3
3
  process.env !== null && typeof process.env === 'object') {
4
4
  process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
5
- process.env.DD_GIT_COMMIT_SHA = 'd3ed004f0639aa5cf95a86a1ffc7a3e0f629c2fa';
5
+ process.env.DD_GIT_COMMIT_SHA = 'de5c3e104e3ed96f50cc0f43a6c093c0132245f9';
6
6
  }
7
7
  import { createRequire as $dd_createRequire } from 'module';
8
8
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -56,13 +56,18 @@ import {
56
56
  assertCompleteRequestResourceTemplate,
57
57
  buildToolRegistry,
58
58
  clone,
59
+ createSdk,
59
60
  defineLazy,
60
61
  executeToolCall,
62
+ getAuthContext,
61
63
  getMcpAuthFilePath,
64
+ handleJsonRpc,
65
+ invalidRequestResponse,
62
66
  isJSONRPCErrorResponse,
63
67
  isJSONRPCNotification,
64
68
  isJSONRPCRequest,
65
69
  isJSONRPCResultResponse,
70
+ isJsonRpcRequest,
66
71
  isTaskAugmentedRequestParams,
67
72
  listStoredOrigins,
68
73
  normalizeBaseUrl,
@@ -71,29 +76,36 @@ import {
71
76
  parse,
72
77
  parseAsync,
73
78
  resolveProfile,
79
+ runWithAuthContext,
74
80
  safeParse,
75
81
  safeParseAsync,
76
82
  toJSONSchema,
77
83
  toolDefinitions,
78
84
  upsertAuthToken
79
- } from "./chunk-6LTX4MKG.js";
85
+ } from "./chunk-VRPW5BO7.js";
86
+ import {
87
+ getFlagValue,
88
+ maybeRunSetupCommand
89
+ } from "./chunk-6HO5XFAA.js";
80
90
  import {
81
91
  require_dist2 as require_dist,
82
92
  require_fast_deep_equal,
83
93
  require_json_schema_traverse
84
- } from "./chunk-SOHOJJJL.js";
85
- import "./chunk-GWMV3B7E.js";
86
- import "./chunk-XHOK2OVZ.js";
87
- import "./chunk-MLZWCAZM.js";
88
- import "./chunk-D7AZ3MNH.js";
89
- import "./chunk-NR35G7X3.js";
90
- import "./chunk-L77W7UDL.js";
91
- import "./chunk-7Y5NQEZS.js";
94
+ } from "./chunk-Q5XZN3IH.js";
95
+ import "./chunk-7F365BAF.js";
96
+ import {
97
+ require_lib
98
+ } from "./chunk-UR32AWL5.js";
99
+ import "./chunk-BMTHQVNU.js";
100
+ import "./chunk-73IQKEW6.js";
101
+ import "./chunk-OXC4M25U.js";
102
+ import "./chunk-DJS34GDP.js";
103
+ import "./chunk-V6HYX527.js";
92
104
  import {
93
105
  __commonJS,
94
106
  __toESM,
95
107
  init_cjs_shims
96
- } from "./chunk-QLZERZ2C.js";
108
+ } from "./chunk-DBJL76JG.js";
97
109
 
98
110
  // ../../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/code.js
99
111
  var require_code = __commonJS({
@@ -6786,12 +6798,12 @@ var require_dist2 = __commonJS({
6786
6798
  throw new Error(`Unknown format "${name}"`);
6787
6799
  return f;
6788
6800
  };
6789
- function addFormats(ajv, list, fs, exportName) {
6801
+ function addFormats(ajv, list, fs2, exportName) {
6790
6802
  var _a;
6791
6803
  var _b;
6792
6804
  (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
6793
6805
  for (const f of list)
6794
- ajv.addFormat(f, fs[f]);
6806
+ ajv.addFormat(f, fs2[f]);
6795
6807
  }
6796
6808
  module.exports = exports = formatsPlugin;
6797
6809
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -14947,28 +14959,14 @@ var StdioServerTransport = class {
14947
14959
  // ../mcp-server/dist/auth/commands.js
14948
14960
  init_cjs_shims();
14949
14961
  var import_util4 = __toESM(require_dist());
14950
- function getFlagValue(args, flagName) {
14951
- const flagIndex = args.findIndex((arg) => arg === flagName || arg.startsWith(`${flagName}=`));
14952
- if (flagIndex === -1) {
14953
- return void 0;
14954
- }
14955
- const matchedArg = args[flagIndex];
14956
- if (matchedArg.includes("=")) {
14957
- return matchedArg.slice(flagName.length + 1);
14958
- }
14959
- return args[flagIndex + 1];
14960
- }
14961
14962
  function getUsageText() {
14962
14963
  return [
14963
14964
  "Usage:",
14964
- " superblocks mcp serve Start the MCP server (stdio)",
14965
- " superblocks mcp serve --transport http Start the MCP server (HTTP)",
14966
- " superblocks mcp setup Generate MCP client configuration",
14967
- "",
14968
- " superblocks-mcp Start the MCP server over stdio (standalone)",
14969
- " superblocks-mcp auth add --base-url <url> --token <token>",
14970
- " superblocks-mcp auth import-current",
14971
- " superblocks-mcp auth list"
14965
+ " superblocks-mcp Start the MCP server (stdio)",
14966
+ " superblocks-mcp login --token <token> Authenticate with Superblocks",
14967
+ " superblocks-mcp setup --client cursor Write MCP config for Cursor",
14968
+ " superblocks-mcp setup --client claude Write MCP config for Claude Code",
14969
+ " superblocks-mcp setup --client cursor --dry-run Preview without writing"
14972
14970
  ].join("\n");
14973
14971
  }
14974
14972
  async function addAuth(args) {
@@ -15028,6 +15026,51 @@ function getMcpUsageText() {
15028
15026
  return getUsageText();
15029
15027
  }
15030
15028
 
15029
+ // ../mcp-server/dist/auth/login.js
15030
+ init_cjs_shims();
15031
+ var import_fs_extra = __toESM(require_lib());
15032
+ var import_util5 = __toESM(require_dist());
15033
+ import { dirname } from "node:path";
15034
+ var DEFAULT_BASE_URL = "https://app.superblocks.com";
15035
+ async function defaultValidateToken(token, baseUrl) {
15036
+ const sdk = createSdk(token, baseUrl);
15037
+ const response = await sdk.fetchCurrentUser();
15038
+ return { name: response.user.name };
15039
+ }
15040
+ async function maybeRunLoginCommand(args, options = {}) {
15041
+ if (args.length === 0 || args[0] !== "login") {
15042
+ return false;
15043
+ }
15044
+ const subArgs = args.slice(1);
15045
+ const token = getFlagValue(subArgs, "--token") ?? process.env.SUPERBLOCKS_TOKEN ?? process.env.SUPERBLOCKS_API_TOKEN;
15046
+ if (!token) {
15047
+ throw new Error("A token is required. Pass --token <token>, or set SUPERBLOCKS_TOKEN.\nYou can find your API key at https://app.superblocks.com/personal-settings#apiKey");
15048
+ }
15049
+ const baseUrl = getFlagValue(subArgs, "--base-url") ?? DEFAULT_BASE_URL;
15050
+ const validate = options.validateToken ?? defaultValidateToken;
15051
+ let user;
15052
+ try {
15053
+ user = await validate(token, baseUrl);
15054
+ } catch (err) {
15055
+ const detail = err instanceof Error ? err.message : String(err);
15056
+ throw new Error(`Login failed (${baseUrl}): ${detail}
15057
+ Verify your API key at ${baseUrl.replace(/\/$/, "")}/personal-settings#apiKey`);
15058
+ }
15059
+ const authFile = options.authFilePath ?? (0, import_util5.resolveAuthFilePath)();
15060
+ await import_fs_extra.default.ensureDir(dirname(authFile));
15061
+ await import_fs_extra.default.writeJson(authFile, { superblocksBaseUrl: baseUrl, token });
15062
+ try {
15063
+ await import_fs_extra.default.chmod(authFile, 384);
15064
+ } catch {
15065
+ }
15066
+ console.log(`Logged in as ${user.name}. Token saved to ${authFile}`);
15067
+ return true;
15068
+ }
15069
+
15070
+ // ../mcp-server/dist/version.js
15071
+ init_cjs_shims();
15072
+ var MCP_SERVER_VERSION = package_default.version;
15073
+
15031
15074
  // ../mcp-server/dist/index.js
15032
15075
  async function startServer(options = {}) {
15033
15076
  const profile = options.profile ?? resolveProfile();
@@ -15057,9 +15100,15 @@ async function main() {
15057
15100
  console.log(getMcpUsageText());
15058
15101
  return;
15059
15102
  }
15103
+ if (await maybeRunLoginCommand(args)) {
15104
+ return;
15105
+ }
15060
15106
  if (await maybeRunAuthCommand(args)) {
15061
15107
  return;
15062
15108
  }
15109
+ if (await maybeRunSetupCommand(args)) {
15110
+ return;
15111
+ }
15063
15112
  if (args.length > 0) {
15064
15113
  throw new Error(`Unknown command '${args.join(" ")}'.
15065
15114
 
@@ -15085,7 +15134,16 @@ if (isDirectRun) {
15085
15134
  });
15086
15135
  }
15087
15136
  export {
15137
+ MCP_SERVER_VERSION,
15138
+ buildToolRegistry,
15139
+ executeToolCall,
15140
+ getAuthContext,
15141
+ handleJsonRpc,
15142
+ invalidRequestResponse,
15143
+ isJsonRpcRequest,
15088
15144
  resolveProfile,
15089
- startServer
15145
+ runWithAuthContext,
15146
+ startServer,
15147
+ toolDefinitions
15090
15148
  };
15091
- //# sourceMappingURL=dist-PJRKTNKT.js.map
15149
+ //# sourceMappingURL=dist-ZNOR3C4J.js.map