snow-flow 8.5.8 ā 8.6.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.
- package/.mcp.json.template +8 -0
- package/README.md +24 -82
- package/dist/cli/enterprise.d.ts +50 -0
- package/dist/cli/enterprise.d.ts.map +1 -0
- package/dist/cli/enterprise.js +253 -0
- package/dist/cli/enterprise.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +21 -1
- package/dist/cli.js.map +1 -1
- package/dist/mcp/clients/enterprise-remote-client.d.ts +78 -0
- package/dist/mcp/clients/enterprise-remote-client.d.ts.map +1 -0
- package/dist/mcp/clients/enterprise-remote-client.js +221 -0
- package/dist/mcp/clients/enterprise-remote-client.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/index.d.ts +0 -5
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/index.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/index.js +2 -18
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/index.js.map +1 -1
- package/package.json +1 -1
package/.mcp.json.template
CHANGED
|
@@ -17,6 +17,14 @@
|
|
|
17
17
|
"env": {
|
|
18
18
|
"SNOW_FLOW_ENV": "{{SNOW_FLOW_ENV}}"
|
|
19
19
|
}
|
|
20
|
+
},
|
|
21
|
+
"snow-flow-enterprise": {
|
|
22
|
+
"type": "sse",
|
|
23
|
+
"url": "https://enterprise.snow-flow.dev/mcp/sse",
|
|
24
|
+
"description": "Snow-Flow Enterprise - 26 advanced integration tools (Jira, Azure DevOps, Confluence) with bidirectional sync, AI-powered planning, analytics, and automation. Requires enterprise license.",
|
|
25
|
+
"headers": {
|
|
26
|
+
"Authorization": "Bearer {{ENTERPRISE_JWT_TOKEN}}"
|
|
27
|
+
}
|
|
20
28
|
}
|
|
21
29
|
}
|
|
22
30
|
}
|
package/README.md
CHANGED
|
@@ -759,90 +759,32 @@ See [MONETIZATION_STRATEGY.md](./MONETIZATION_STRATEGY.md) for complete business
|
|
|
759
759
|
|
|
760
760
|
---
|
|
761
761
|
|
|
762
|
-
##
|
|
762
|
+
## š Enterprise Edition
|
|
763
|
+
|
|
764
|
+
Everything in Open Source **+** external tool integrations via license key.
|
|
765
|
+
|
|
766
|
+
**Unlocks 40+ Additional MCP Tools:**
|
|
767
|
+
- š· **Azure DevOps** (10 tools) - sync work items, run pipelines, monitor builds
|
|
768
|
+
- š¦ **Jira** (8 tools) - backlog management, issue tracking, JQL queries
|
|
769
|
+
- š **Confluence** (8 tools) - documentation sync, page management
|
|
770
|
+
- š¤ **ML & Analytics** (15+ tools) - predictive intelligence, forecasting
|
|
771
|
+
|
|
772
|
+
**Additional Enterprise Features:**
|
|
773
|
+
- ā
**Fully managed SaaS** - hosted on Google Cloud Platform (europe-west4)
|
|
774
|
+
- ā
**License key activation** - same open source project, extra MCP servers unlocked
|
|
775
|
+
- ā
**Agent task automation** - agents can fetch tasks from Jira/Azure/Confluence
|
|
776
|
+
- ā
**Enterprise security** - Google Cloud KMS encryption, SOC 2/ISO 27001 ready
|
|
777
|
+
- ā
**White-label portal** - branded customer experience for service integrators
|
|
778
|
+
- ā
**Zero maintenance** - automatic updates without customer reinstalls
|
|
779
|
+
- ā
**Unlimited integrations** - no service limits
|
|
780
|
+
- ā
**24/7 priority support** - dedicated support team
|
|
763
781
|
|
|
764
|
-
**
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
Snow-Flow Enterprise adds advanced capabilities for enterprise teams:
|
|
769
|
-
|
|
770
|
-
#### š Jira Integration
|
|
771
|
-
- **Bidirectional Sync**: Keep Jira and ServiceNow in perfect sync
|
|
772
|
-
- **Automated Workflows**: Trigger actions across both platforms
|
|
773
|
-
- **Field Mapping**: Customize data transformation
|
|
774
|
-
- **Comment Sync**: Unified communication across teams
|
|
775
|
-
- **Attachment Support**: Share files seamlessly
|
|
776
|
-
|
|
777
|
-
#### š¤ Advanced ML Models
|
|
778
|
-
- **Deep Learning**: LSTM, CNN, transformer-based models
|
|
779
|
-
- **Auto-ML**: Automatic model selection and tuning
|
|
780
|
-
- **Model Versioning**: Track and manage model lifecycles
|
|
781
|
-
- **Explainable AI**: SHAP/LIME analysis for predictions
|
|
782
|
-
- **A/B Testing**: Compare models in production
|
|
783
|
-
|
|
784
|
-
#### šÆ Priority Support
|
|
785
|
-
- **4-24 hour response times** based on tier
|
|
786
|
-
- **Dedicated account manager** (Enterprise tier)
|
|
787
|
-
- **On-site training** available
|
|
788
|
-
- **Custom integration development**
|
|
789
|
-
- **SLA guarantees** (99.9% uptime)
|
|
790
|
-
|
|
791
|
-
### License Tiers
|
|
792
|
-
|
|
793
|
-
| Feature | Team<br/>$49/mo | Professional<br/>$199/mo | Enterprise<br/>$999/mo |
|
|
794
|
-
|---------|---------|--------------|------------|
|
|
795
|
-
| **Installations** | 3 | 10 | Unlimited |
|
|
796
|
-
| **Jira Integration** | Basic | Full | Full |
|
|
797
|
-
| **Advanced ML** | ā | ā
| ā
|
|
|
798
|
-
| **Priority Support** | ā | ā
| ā
|
|
|
799
|
-
| **Response Time** | 48h | 24h | 4h |
|
|
800
|
-
| **Custom Integrations** | ā | ā | ā
|
|
|
801
|
-
| **SLA Guarantees** | ā | ā | ā
|
|
|
802
|
-
|
|
803
|
-
### Quick Start
|
|
804
|
-
|
|
805
|
-
```bash
|
|
806
|
-
# Install enterprise package
|
|
807
|
-
npm install -g @snow-flow/enterprise
|
|
808
|
-
|
|
809
|
-
# Configure license
|
|
810
|
-
export SNOW_LICENSE_KEY="SNOW-ENT-XXXXX"
|
|
811
|
-
|
|
812
|
-
# Verify installation
|
|
813
|
-
snow-flow license status
|
|
814
|
-
|
|
815
|
-
# Start using enterprise features
|
|
816
|
-
snow-flow swarm "Sync Jira project PROJ to ServiceNow"
|
|
817
|
-
```
|
|
818
|
-
|
|
819
|
-
### Example: Jira Sync
|
|
820
|
-
|
|
821
|
-
```bash
|
|
822
|
-
# Sync entire backlog
|
|
823
|
-
snow-flow swarm "Sync all issues from PROJ project in Jira to ServiceNow"
|
|
824
|
-
|
|
825
|
-
# Search and sync
|
|
826
|
-
snow-flow swarm "Find all high-priority bugs in Jira and create ServiceNow incidents"
|
|
827
|
-
|
|
828
|
-
# Add comments
|
|
829
|
-
snow-flow swarm "Add comment to Jira PROJ-123: Resolved in ServiceNow INC0010001"
|
|
830
|
-
```
|
|
831
|
-
|
|
832
|
-
### Documentation
|
|
833
|
-
|
|
834
|
-
- **[Enterprise Documentation](./enterprise/ENTERPRISE.md)** - Complete guide
|
|
835
|
-
- **[Quick Start Guide](./enterprise/QUICKSTART.md)** - Get started in 5 minutes
|
|
836
|
-
- **[License Agreement](./enterprise/LICENSE-COMMERCIAL.md)** - Commercial terms
|
|
837
|
-
- **[MCP Tools Reference](./enterprise/ENTERPRISE.md#mcp-tools-reference)** - Enterprise tools
|
|
838
|
-
|
|
839
|
-
### Get Enterprise Access
|
|
840
|
-
|
|
841
|
-
**30-Day Free Trial** available for all tiers!
|
|
782
|
+
**How it works:**
|
|
783
|
+
1. Install the open source Snow-Flow (350+ ServiceNow tools)
|
|
784
|
+
2. Add enterprise license key to unlock Jira/Azure/Confluence MCP servers
|
|
785
|
+
3. Agents can now manage backlogs across ServiceNow + Jira/Azure/Confluence
|
|
842
786
|
|
|
843
|
-
|
|
844
|
-
- š¬ **Schedule Demo**: [calendly.com/snow-flow](https://calendly.com/snow-flow)
|
|
845
|
-
- š **Call**: +1 (555) 123-4567
|
|
787
|
+
**Pricing:** Custom enterprise pricing. Contact sales@snow-flow.dev
|
|
846
788
|
|
|
847
789
|
---
|
|
848
790
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enterprise authentication commands for Snow-Flow
|
|
3
|
+
* Handles license key authentication with portal.snow-flow.dev
|
|
4
|
+
*/
|
|
5
|
+
import { Command } from 'commander';
|
|
6
|
+
interface AuthData {
|
|
7
|
+
jwt: string;
|
|
8
|
+
expiresAt: string;
|
|
9
|
+
customer: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
tier: string;
|
|
13
|
+
features: string[];
|
|
14
|
+
theme?: string;
|
|
15
|
+
customTheme?: {
|
|
16
|
+
themeName: string;
|
|
17
|
+
displayName: string;
|
|
18
|
+
themeConfig: any;
|
|
19
|
+
primaryColor: string;
|
|
20
|
+
secondaryColor?: string;
|
|
21
|
+
accentColor?: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Show authentication status
|
|
27
|
+
* Exported for use in main status command
|
|
28
|
+
*/
|
|
29
|
+
export declare function showEnterpriseStatus(): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Get JWT token for MCP server authentication
|
|
32
|
+
* Called internally by MCP client
|
|
33
|
+
*/
|
|
34
|
+
export declare function getEnterpriseToken(): Promise<string | null>;
|
|
35
|
+
/**
|
|
36
|
+
* Check if user has enterprise features enabled
|
|
37
|
+
* Called internally by swarm command
|
|
38
|
+
*/
|
|
39
|
+
export declare function hasEnterpriseFeatures(): Promise<boolean>;
|
|
40
|
+
/**
|
|
41
|
+
* Get enterprise customer info
|
|
42
|
+
*/
|
|
43
|
+
export declare function getEnterpriseInfo(): Promise<AuthData['customer'] | null>;
|
|
44
|
+
/**
|
|
45
|
+
* Register enterprise commands with Commander
|
|
46
|
+
*/
|
|
47
|
+
export declare function registerEnterpriseCommands(program: Command): void;
|
|
48
|
+
export declare const ENTERPRISE_MCP_SERVER_URL = "https://enterprise.snow-flow.dev";
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=enterprise.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enterprise.d.ts","sourceRoot":"","sources":["../../src/cli/enterprise.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,UAAU,QAAQ;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE;QACR,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE;YACZ,SAAS,EAAE,MAAM,CAAC;YAClB,WAAW,EAAE,MAAM,CAAC;YACpB,WAAW,EAAE,GAAG,CAAC;YACjB,YAAY,EAAE,MAAM,CAAC;YACrB,cAAc,CAAC,EAAE,MAAM,CAAC;YACxB,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB,CAAC;KACH,CAAC;CACH;AAgHD;;;GAGG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CA2C1D;AAuCD;;;GAGG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAGjE;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC,CAG9D;AAED;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAG9E;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0BjE;AAED,eAAO,MAAM,yBAAyB,qCAAiB,CAAC"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Enterprise authentication commands for Snow-Flow
|
|
4
|
+
* Handles license key authentication with portal.snow-flow.dev
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ENTERPRISE_MCP_SERVER_URL = void 0;
|
|
11
|
+
exports.showEnterpriseStatus = showEnterpriseStatus;
|
|
12
|
+
exports.getEnterpriseToken = getEnterpriseToken;
|
|
13
|
+
exports.hasEnterpriseFeatures = hasEnterpriseFeatures;
|
|
14
|
+
exports.getEnterpriseInfo = getEnterpriseInfo;
|
|
15
|
+
exports.registerEnterpriseCommands = registerEnterpriseCommands;
|
|
16
|
+
const fs_1 = require("fs");
|
|
17
|
+
const path_1 = require("path");
|
|
18
|
+
const os_1 = require("os");
|
|
19
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
20
|
+
const open_1 = __importDefault(require("open"));
|
|
21
|
+
const SNOW_FLOW_DIR = (0, path_1.join)((0, os_1.homedir)(), '.snow-flow');
|
|
22
|
+
const AUTH_FILE = (0, path_1.join)(SNOW_FLOW_DIR, 'auth.json');
|
|
23
|
+
const PORTAL_URL = 'https://portal.snow-flow.dev';
|
|
24
|
+
const MCP_SERVER_URL = 'https://enterprise.snow-flow.dev';
|
|
25
|
+
/**
|
|
26
|
+
* Ensure .snow-flow directory exists
|
|
27
|
+
*/
|
|
28
|
+
async function ensureSnowFlowDir() {
|
|
29
|
+
try {
|
|
30
|
+
await fs_1.promises.mkdir(SNOW_FLOW_DIR, { recursive: true });
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
// Directory already exists, ignore
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Load stored authentication data
|
|
38
|
+
*/
|
|
39
|
+
async function loadAuth() {
|
|
40
|
+
try {
|
|
41
|
+
const data = await fs_1.promises.readFile(AUTH_FILE, 'utf-8');
|
|
42
|
+
const auth = JSON.parse(data);
|
|
43
|
+
// Check if token is expired
|
|
44
|
+
const expiresAt = new Date(auth.expiresAt);
|
|
45
|
+
if (expiresAt < new Date()) {
|
|
46
|
+
console.log(chalk_1.default.yellow('ā ļø Your authentication has expired. Please login again.'));
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return auth;
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Save authentication data
|
|
57
|
+
*/
|
|
58
|
+
async function saveAuth(auth) {
|
|
59
|
+
await ensureSnowFlowDir();
|
|
60
|
+
await fs_1.promises.writeFile(AUTH_FILE, JSON.stringify(auth, null, 2), 'utf-8');
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Delete authentication data
|
|
64
|
+
*/
|
|
65
|
+
async function deleteAuth() {
|
|
66
|
+
try {
|
|
67
|
+
await fs_1.promises.unlink(AUTH_FILE);
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
// File doesn't exist, ignore
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Login with license key
|
|
75
|
+
*/
|
|
76
|
+
async function loginCommand(licenseKey) {
|
|
77
|
+
console.log(chalk_1.default.blue('š Authenticating with Snow-Flow Enterprise...'));
|
|
78
|
+
try {
|
|
79
|
+
const response = await fetch(`${PORTAL_URL}/api/auth/login`, {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
headers: {
|
|
82
|
+
'Content-Type': 'application/json'
|
|
83
|
+
},
|
|
84
|
+
body: JSON.stringify({ licenseKey })
|
|
85
|
+
});
|
|
86
|
+
if (!response.ok) {
|
|
87
|
+
const error = await response.json();
|
|
88
|
+
console.error(chalk_1.default.red(`ā Authentication failed: ${error.message || 'Invalid license key'}`));
|
|
89
|
+
process.exit(1);
|
|
90
|
+
}
|
|
91
|
+
const data = await response.json();
|
|
92
|
+
const authData = {
|
|
93
|
+
jwt: data.token,
|
|
94
|
+
expiresAt: data.expiresAt || new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(), // 30 days
|
|
95
|
+
customer: data.customer
|
|
96
|
+
};
|
|
97
|
+
await saveAuth(authData);
|
|
98
|
+
console.log(chalk_1.default.green('ā
Successfully authenticated!'));
|
|
99
|
+
console.log('');
|
|
100
|
+
console.log(chalk_1.default.bold('Customer:'), authData.customer.name);
|
|
101
|
+
console.log(chalk_1.default.bold('License Tier:'), chalk_1.default.cyan(authData.customer.tier.toUpperCase()));
|
|
102
|
+
console.log(chalk_1.default.bold('Features:'), authData.customer.features.join(', '));
|
|
103
|
+
// Show theme information if available
|
|
104
|
+
if (authData.customer.customTheme) {
|
|
105
|
+
console.log(chalk_1.default.bold('Custom Theme:'), chalk_1.default.magenta(authData.customer.customTheme.displayName));
|
|
106
|
+
console.log(chalk_1.default.gray(' Theme has been synced for your SnowCode CLI'));
|
|
107
|
+
}
|
|
108
|
+
else if (authData.customer.theme) {
|
|
109
|
+
console.log(chalk_1.default.bold('Theme:'), chalk_1.default.magenta(authData.customer.theme));
|
|
110
|
+
}
|
|
111
|
+
console.log('');
|
|
112
|
+
console.log(chalk_1.default.gray('Your credentials have been saved to:'), chalk_1.default.gray(AUTH_FILE));
|
|
113
|
+
console.log('');
|
|
114
|
+
console.log(chalk_1.default.blue('š” Enterprise tools are now available!'));
|
|
115
|
+
console.log(chalk_1.default.gray(' Run'), chalk_1.default.cyan('snow-flow swarm "<task>"'), chalk_1.default.gray('to use them.'));
|
|
116
|
+
console.log(chalk_1.default.gray(' Run'), chalk_1.default.cyan('snow-flow portal'), chalk_1.default.gray('to configure integrations.'));
|
|
117
|
+
console.log(chalk_1.default.gray(' Run'), chalk_1.default.cyan('snow-flow status'), chalk_1.default.gray('to view your account details.'));
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
console.error(chalk_1.default.red('ā Network error:'), err.message);
|
|
121
|
+
console.error(chalk_1.default.gray('Please check your internet connection and try again.'));
|
|
122
|
+
process.exit(1);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Show authentication status
|
|
127
|
+
* Exported for use in main status command
|
|
128
|
+
*/
|
|
129
|
+
async function showEnterpriseStatus() {
|
|
130
|
+
const auth = await loadAuth();
|
|
131
|
+
if (!auth) {
|
|
132
|
+
console.log(chalk_1.default.blue('š Snow-Flow Enterprise'));
|
|
133
|
+
console.log(chalk_1.default.yellow(' Status: Not logged in'));
|
|
134
|
+
console.log('');
|
|
135
|
+
console.log(chalk_1.default.gray(' To login: snow-flow login <license-key>'));
|
|
136
|
+
console.log(chalk_1.default.gray(' Get key from:'), chalk_1.default.blue(PORTAL_URL));
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
console.log(chalk_1.default.blue('š Snow-Flow Enterprise'));
|
|
140
|
+
console.log(chalk_1.default.green(' Status: ā
Authenticated'));
|
|
141
|
+
console.log('');
|
|
142
|
+
console.log(chalk_1.default.bold(' Customer:'), auth.customer.name);
|
|
143
|
+
console.log(chalk_1.default.bold(' Customer ID:'), auth.customer.id);
|
|
144
|
+
console.log(chalk_1.default.bold(' License Tier:'), chalk_1.default.cyan(auth.customer.tier.toUpperCase()));
|
|
145
|
+
console.log('');
|
|
146
|
+
console.log(chalk_1.default.bold(' Features:'));
|
|
147
|
+
auth.customer.features.forEach(feature => {
|
|
148
|
+
console.log(chalk_1.default.gray(' ā¢'), feature);
|
|
149
|
+
});
|
|
150
|
+
// Show theme information if available
|
|
151
|
+
if (auth.customer.customTheme) {
|
|
152
|
+
console.log('');
|
|
153
|
+
console.log(chalk_1.default.bold(' Custom Theme:'), chalk_1.default.magenta(auth.customer.customTheme.displayName));
|
|
154
|
+
console.log(chalk_1.default.gray(' Theme ID:'), auth.customer.customTheme.themeName);
|
|
155
|
+
console.log(chalk_1.default.gray(' Primary:'), auth.customer.customTheme.primaryColor);
|
|
156
|
+
if (auth.customer.customTheme.secondaryColor) {
|
|
157
|
+
console.log(chalk_1.default.gray(' Secondary:'), auth.customer.customTheme.secondaryColor);
|
|
158
|
+
}
|
|
159
|
+
if (auth.customer.customTheme.accentColor) {
|
|
160
|
+
console.log(chalk_1.default.gray(' Accent:'), auth.customer.customTheme.accentColor);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else if (auth.customer.theme) {
|
|
164
|
+
console.log('');
|
|
165
|
+
console.log(chalk_1.default.bold(' Theme:'), chalk_1.default.magenta(auth.customer.theme));
|
|
166
|
+
}
|
|
167
|
+
console.log('');
|
|
168
|
+
console.log(chalk_1.default.bold(' Token Expires:'), new Date(auth.expiresAt).toLocaleString());
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Open portal in browser
|
|
172
|
+
*/
|
|
173
|
+
async function portalCommand() {
|
|
174
|
+
console.log(chalk_1.default.blue('š Opening Snow-Flow Enterprise Portal...'));
|
|
175
|
+
try {
|
|
176
|
+
await (0, open_1.default)(PORTAL_URL);
|
|
177
|
+
console.log(chalk_1.default.green('ā
Portal opened in your default browser'));
|
|
178
|
+
console.log('');
|
|
179
|
+
console.log(chalk_1.default.gray('Portal URL:'), chalk_1.default.blue(PORTAL_URL));
|
|
180
|
+
}
|
|
181
|
+
catch (err) {
|
|
182
|
+
console.error(chalk_1.default.red('ā Failed to open browser:'), err.message);
|
|
183
|
+
console.log('');
|
|
184
|
+
console.log(chalk_1.default.gray('Please open this URL manually:'), chalk_1.default.blue(PORTAL_URL));
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Logout and remove credentials
|
|
189
|
+
*/
|
|
190
|
+
async function logoutCommand() {
|
|
191
|
+
const auth = await loadAuth();
|
|
192
|
+
if (!auth) {
|
|
193
|
+
console.log(chalk_1.default.yellow('ā ļø You are not logged in.'));
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
await deleteAuth();
|
|
197
|
+
console.log(chalk_1.default.green('ā
Successfully logged out'));
|
|
198
|
+
console.log('');
|
|
199
|
+
console.log(chalk_1.default.gray('Your authentication credentials have been removed.'));
|
|
200
|
+
console.log(chalk_1.default.gray('Enterprise tools will no longer be available until you login again.'));
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Get JWT token for MCP server authentication
|
|
204
|
+
* Called internally by MCP client
|
|
205
|
+
*/
|
|
206
|
+
async function getEnterpriseToken() {
|
|
207
|
+
const auth = await loadAuth();
|
|
208
|
+
return auth ? auth.jwt : null;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Check if user has enterprise features enabled
|
|
212
|
+
* Called internally by swarm command
|
|
213
|
+
*/
|
|
214
|
+
async function hasEnterpriseFeatures() {
|
|
215
|
+
const auth = await loadAuth();
|
|
216
|
+
return auth !== null && auth.customer.features.length > 0;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Get enterprise customer info
|
|
220
|
+
*/
|
|
221
|
+
async function getEnterpriseInfo() {
|
|
222
|
+
const auth = await loadAuth();
|
|
223
|
+
return auth ? auth.customer : null;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Register enterprise commands with Commander
|
|
227
|
+
*/
|
|
228
|
+
function registerEnterpriseCommands(program) {
|
|
229
|
+
// Login command
|
|
230
|
+
program
|
|
231
|
+
.command('login <license-key>')
|
|
232
|
+
.description('Authenticate with Snow-Flow Enterprise using your license key')
|
|
233
|
+
.action(async (licenseKey) => {
|
|
234
|
+
await loginCommand(licenseKey);
|
|
235
|
+
});
|
|
236
|
+
// Status command removed - enterprise status is now shown via getEnterpriseInfo() in main status command
|
|
237
|
+
// Portal command
|
|
238
|
+
program
|
|
239
|
+
.command('portal')
|
|
240
|
+
.description('Open Snow-Flow Enterprise Portal in browser')
|
|
241
|
+
.action(async () => {
|
|
242
|
+
await portalCommand();
|
|
243
|
+
});
|
|
244
|
+
// Logout command
|
|
245
|
+
program
|
|
246
|
+
.command('logout')
|
|
247
|
+
.description('Logout from Snow-Flow Enterprise and remove credentials')
|
|
248
|
+
.action(async () => {
|
|
249
|
+
await logoutCommand();
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
exports.ENTERPRISE_MCP_SERVER_URL = MCP_SERVER_URL;
|
|
253
|
+
//# sourceMappingURL=enterprise.js.map
|
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C,OAAgB;IACzD,gBAAgB;IAChB,OAAO;SACJ,OAAO,CAAC,qBAAqB,CAAC;SAC9B,WAAW,CAAC,+DAA+D,CAAC;SAC5E,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,EAAE;QACnC,MAAM,YAAY,CAAC,UAAU,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEL,yGAAyG;IAEzG,iBAAiB;IACjB,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,6CAA6C,CAAC;SAC1D,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,aAAa,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;IAEL,iBAAiB;IACjB,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,yDAAyD,CAAC;SACtE,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,aAAa,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC;AAEY,QAAA,yBAAyB,GAAG,cAAc,CAAC"}
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;GAEG;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;GAEG;AAsyGH,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,KAAK,GAAE,OAAe,GACrB,OAAO,CAAC,IAAI,CAAC,CA6Hf"}
|
package/dist/cli.js
CHANGED
|
@@ -68,6 +68,7 @@ if (currentCommand && commandsNeedingMCP.includes(currentCommand) && !commandsNo
|
|
|
68
68
|
// Removed provider-agnostic imports - using Claude Code directly
|
|
69
69
|
const auth_js_1 = require("./cli/auth.js");
|
|
70
70
|
const session_js_1 = require("./cli/session.js");
|
|
71
|
+
const enterprise_js_1 = require("./cli/enterprise.js");
|
|
71
72
|
// Load environment variables
|
|
72
73
|
dotenv_1.default.config();
|
|
73
74
|
// Create CLI logger instance
|
|
@@ -81,6 +82,8 @@ program
|
|
|
81
82
|
(0, auth_js_1.registerAuthCommands)(program);
|
|
82
83
|
// Register session inspection commands
|
|
83
84
|
(0, session_js_1.registerSessionCommands)(program);
|
|
85
|
+
// Register enterprise commands (login, status, portal, logout)
|
|
86
|
+
(0, enterprise_js_1.registerEnterpriseCommands)(program);
|
|
84
87
|
// Flow deprecation handler - check for flow-related commands
|
|
85
88
|
function checkFlowDeprecation(command, objective) {
|
|
86
89
|
const flowKeywords = ['flow', 'create-flow', 'xml-flow', 'flow-designer'];
|
|
@@ -307,6 +310,19 @@ program
|
|
|
307
310
|
cliLogger.info('š” Run "snow-flow auth login" to enable live ServiceNow integration');
|
|
308
311
|
}
|
|
309
312
|
}
|
|
313
|
+
// Check Enterprise features
|
|
314
|
+
const { hasEnterpriseFeatures, getEnterpriseInfo } = await Promise.resolve().then(() => __importStar(require('./cli/enterprise.js')));
|
|
315
|
+
const enterpriseEnabled = await hasEnterpriseFeatures();
|
|
316
|
+
const enterpriseInfo = enterpriseEnabled ? await getEnterpriseInfo() : null;
|
|
317
|
+
if (options.verbose && enterpriseEnabled && enterpriseInfo) {
|
|
318
|
+
cliLogger.info(`\nš Snow-Flow Enterprise: ā
Active (${enterpriseInfo.tier.toUpperCase()})`);
|
|
319
|
+
cliLogger.info(` Organization: ${enterpriseInfo.name}`);
|
|
320
|
+
cliLogger.info(` Features: ${enterpriseInfo.features.join(', ')}`);
|
|
321
|
+
}
|
|
322
|
+
else if (options.verbose) {
|
|
323
|
+
cliLogger.info('\nš Snow-Flow Enterprise: ā Not active');
|
|
324
|
+
cliLogger.info('š” Run "snow-flow login <license-key>" to enable enterprise features');
|
|
325
|
+
}
|
|
310
326
|
// Initialize Queen Agent memory system
|
|
311
327
|
if (options.verbose) {
|
|
312
328
|
cliLogger.info('\nš¾ Initializing swarm memory system...');
|
|
@@ -1428,7 +1444,7 @@ program
|
|
|
1428
1444
|
// Status command
|
|
1429
1445
|
program
|
|
1430
1446
|
.command('status')
|
|
1431
|
-
.description('Show orchestrator
|
|
1447
|
+
.description('Show Snow-Flow status (orchestrator + enterprise)')
|
|
1432
1448
|
.action(async () => {
|
|
1433
1449
|
cliLogger.info('\nš ServiceNow Multi-Agent Orchestrator Status');
|
|
1434
1450
|
cliLogger.info('=============================================');
|
|
@@ -1448,6 +1464,10 @@ program
|
|
|
1448
1464
|
cliLogger.info(' āāā Instance: Not set');
|
|
1449
1465
|
cliLogger.info(' āāā Authentication: Not configured');
|
|
1450
1466
|
cliLogger.info(' āāā Mode: Development');
|
|
1467
|
+
// Show enterprise status if available
|
|
1468
|
+
cliLogger.info('\n');
|
|
1469
|
+
const { showEnterpriseStatus } = await Promise.resolve().then(() => __importStar(require('./cli/enterprise.js')));
|
|
1470
|
+
await showEnterpriseStatus();
|
|
1451
1471
|
});
|
|
1452
1472
|
// Monitor command - real-time dashboard
|
|
1453
1473
|
program
|