snow-flow 8.31.30 → 8.31.32

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.32",
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..1133af8 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
 
@@ -20,7 +84,7 @@ index ce6bfbd..3d09618 100644
20
84
  + },
21
85
  + body: JSON.stringify({
22
86
  + service: "jira",
23
- + username: jiraEmail,
87
+ + email: jiraEmail,
24
88
  + apiToken: jiraApiToken,
25
89
  + instanceUrl: jiraBaseUrl
26
90
  + })
@@ -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
 
@@ -60,7 +124,7 @@ index ce6bfbd..3d09618 100644
60
124
  + },
61
125
  + body: JSON.stringify({
62
126
  + service: "jira",
63
- + username: enterpriseJiraEmail,
127
+ + email: enterpriseJiraEmail,
64
128
  + apiToken: enterpriseJiraApiToken,
65
129
  + instanceUrl: enterpriseJiraBaseUrl
66
130
  + })
@@ -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
 
@@ -99,28 +163,6 @@ index ce6bfbd..3d09618 100644
99
163
  - jira: jiraBaseUrl
100
164
  - ? {
101
165
  - baseUrl: jiraBaseUrl,
102
- - email: jiraEmail,
103
- - // API token is NOT sent - kept local for security
104
- - }
105
- - : undefined,
106
- - azure: azureOrg
107
- - ? {
108
- - organization: azureOrg,
109
- - project: azureProject,
110
- - // PAT is NOT sent - kept local for security
111
- - }
112
- - : undefined,
113
- - confluence: confluenceUrl
114
- - ? {
115
- - baseUrl: confluenceUrl,
116
- - email: confluenceEmail,
117
- - // API token is NOT sent - kept local for security
118
- - }
119
- - : undefined,
120
- - }),
121
- - })
122
- - } catch (error) {
123
- - // Silently fail - integrations are still saved locally
124
166
  + // 🔐 SYNC CREDENTIALS TO PORTAL (secure encrypted storage)
125
167
  + // Note: Credentials are encrypted with AES-256-GCM in the portal database
126
168
  + if (authData && authData.token) {
@@ -142,7 +184,20 @@ index ce6bfbd..3d09618 100644
142
184
  + },
143
185
  + body: JSON.stringify({
144
186
  + service: "jira",
145
- + username: jiraEmail,
187
+ email: jiraEmail,
188
+ - // API token is NOT sent - kept local for security
189
+ - }
190
+ - : undefined,
191
+ - azure: azureOrg
192
+ - ? {
193
+ - organization: azureOrg,
194
+ - project: azureProject,
195
+ - // PAT is NOT sent - kept local for security
196
+ - }
197
+ - : undefined,
198
+ - confluence: confluenceUrl
199
+ - ? {
200
+ - baseUrl: confluenceUrl,
146
201
  + apiToken: jiraApiToken,
147
202
  + instanceUrl: jiraBaseUrl
148
203
  + })
@@ -196,7 +251,14 @@ index ce6bfbd..3d09618 100644
196
251
  + },
197
252
  + body: JSON.stringify({
198
253
  + service: "confluence",
199
- + username: confluenceEmail,
254
+ email: confluenceEmail,
255
+ - // API token is NOT sent - kept local for security
256
+ - }
257
+ - : undefined,
258
+ - }),
259
+ - })
260
+ - } catch (error) {
261
+ - // Silently fail - integrations are still saved locally
200
262
  + apiToken: confluenceApiToken,
201
263
  + instanceUrl: confluenceUrl
202
264
  + })