snow-flow 8.31.30 → 8.31.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "8.31.30",
3
+ "version": "8.31.31",
4
4
  "description": "ServiceNow development with SnowCode - 75+ LLM providers (Claude, GPT, Gemini, Llama, Mistral, DeepSeek, Groq, Ollama) • 393 Optimized Tools • 2 MCP Servers • Multi-agent orchestration • Use ANY AI coding assistant (ML tools moved to Enterprise)",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -1,8 +1,72 @@
1
1
  diff --git a/node_modules/@groeimetai/snow-code/src/cli/cmd/auth.ts b/node_modules/@groeimetai/snow-code/src/cli/cmd/auth.ts
2
- index ce6bfbd..3d09618 100644
2
+ index ce6bfbd..f8c3e36 100644
3
3
  --- a/node_modules/@groeimetai/snow-code/src/cli/cmd/auth.ts
4
4
  +++ b/node_modules/@groeimetai/snow-code/src/cli/cmd/auth.ts
5
- @@ -1074,6 +1074,39 @@ export const AuthLoginCommand = cmd({
5
+ @@ -711,6 +711,63 @@ export const AuthLoginCommand = cmd({
6
+ if (prompts.isCancel(roleChoice)) throw new UI.CancelledError()
7
+ role = roleChoice as "developer" | "stakeholder" | "admin"
8
+
9
+ + // Check seat availability for selected role
10
+ + if (role === "developer" || role === "stakeholder") {
11
+ + const seatCheckSpinner = prompts.spinner()
12
+ + seatCheckSpinner.start(`Checking ${role} seat availability...`)
13
+ +
14
+ + try {
15
+ + const seatCheckResponse = await fetch(
16
+ + `${enterpriseUrl}/api/user-auth/check-seat-availability?licenseKey=${encodeURIComponent(
17
+ + licenseKey,
18
+ + )}&role=${role}`,
19
+ + )
20
+ + const seatCheckData = await seatCheckResponse.json()
21
+ +
22
+ + if (!seatCheckResponse.ok) {
23
+ + seatCheckSpinner.stop("Seat check failed", 1)
24
+ + prompts.log.error(seatCheckData.error || "Failed to check seat availability")
25
+ + throw new Error("Seat availability check failed")
26
+ + }
27
+ +
28
+ + seatCheckSpinner.stop("Seat availability checked")
29
+ +
30
+ + if (!seatCheckData.available) {
31
+ + prompts.log.error(`\n${seatCheckData.message}`)
32
+ + prompts.log.message("")
33
+ + prompts.log.message(`No ${role} seats are available for this license key.`)
34
+ +
35
+ + if (seatCheckData.allocatedSeats !== "unlimited") {
36
+ + prompts.log.message(
37
+ + `Allocated: ${seatCheckData.allocatedSeats}, Registered: ${seatCheckData.registeredUsers}`,
38
+ + )
39
+ + }
40
+ +
41
+ + prompts.log.message("")
42
+ + prompts.log.message("Please contact your administrator to:")
43
+ + prompts.log.message(" • Increase seat allocation for your organization")
44
+ + prompts.log.message(` • Free up ${role} seats by removing inactive users`)
45
+ + prompts.log.message("")
46
+ +
47
+ + throw new Error(`No ${role} seats available`)
48
+ + }
49
+ +
50
+ + // Show available seats info
51
+ + if (!seatCheckData.unlimited) {
52
+ + prompts.log.success(
53
+ + `${seatCheckData.availableSeats} ${role} seat(s) available (${seatCheckData.registeredUsers}/${seatCheckData.allocatedSeats} registered)`,
54
+ + )
55
+ + } else {
56
+ + prompts.log.success(`${role} seats: unlimited`)
57
+ + }
58
+ + } catch (error: any) {
59
+ + if (error.message === `No ${role} seats available`) {
60
+ + throw error
61
+ + }
62
+ + prompts.log.warn("Could not verify seat availability - proceeding with registration")
63
+ + }
64
+ + }
65
+ +
66
+ prompts.log.info(`Machine ID: ${machineId.substring(0, 16)}...`)
67
+
68
+ // Register with enterprise backend
69
+ @@ -1074,6 +1131,39 @@ export const AuthLoginCommand = cmd({
6
70
  // Silently skip enterprise MCP configuration errors
7
71
  }
8
72
 
@@ -42,7 +106,7 @@ index ce6bfbd..3d09618 100644
42
106
  prompts.log.message("")
43
107
  prompts.log.success("Enterprise configuration saved")
44
108
  prompts.log.info("Credentials saved to .env file")
45
- @@ -2067,6 +2100,39 @@ export const AuthLoginCommand = cmd({
109
+ @@ -2067,6 +2157,39 @@ export const AuthLoginCommand = cmd({
46
110
  // Silently skip enterprise MCP configuration errors
47
111
  }
48
112
 
@@ -82,7 +146,7 @@ index ce6bfbd..3d09618 100644
82
146
  prompts.log.message("")
83
147
  prompts.log.success("Enterprise configuration saved")
84
148
  prompts.log.info("Credentials saved to .env file")
85
- @@ -2479,41 +2545,104 @@ export const AuthLoginCommand = cmd({
149
+ @@ -2479,41 +2602,104 @@ export const AuthLoginCommand = cmd({
86
150
  // Silently skip enterprise MCP configuration errors
87
151
  }
88
152