@sfdxy/anypoint-connect 0.4.0 → 0.5.0
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/README.md +70 -41
- package/dist/auth/FileStore.d.ts +2 -2
- package/dist/auth/FileStore.d.ts.map +1 -1
- package/dist/auth/FileStore.js +8 -7
- package/dist/auth/FileStore.js.map +1 -1
- package/dist/auth/TokenManager.d.ts +1 -0
- package/dist/auth/TokenManager.d.ts.map +1 -1
- package/dist/auth/TokenManager.js +1 -1
- package/dist/auth/TokenManager.js.map +1 -1
- package/dist/cli.js +7 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/AnypointClient.d.ts +1 -0
- package/dist/client/AnypointClient.d.ts.map +1 -1
- package/dist/client/AnypointClient.js +1 -0
- package/dist/client/AnypointClient.js.map +1 -1
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +18 -9
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/config.d.ts +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +76 -24
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/shared.d.ts +2 -2
- package/dist/commands/shared.d.ts.map +1 -1
- package/dist/commands/shared.js +6 -4
- package/dist/commands/shared.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +1 -0
- package/dist/mcp/tools/index.d.ts.map +1 -1
- package/dist/mcp/tools/index.js +1 -0
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/profile.d.ts +7 -0
- package/dist/mcp/tools/profile.d.ts.map +1 -0
- package/dist/mcp/tools/profile.js +82 -0
- package/dist/mcp/tools/profile.js.map +1 -0
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +7 -3
- package/dist/mcp.js.map +1 -1
- package/dist/utils/config.d.ts +79 -16
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +172 -35
- package/dist/utils/config.js.map +1 -1
- package/package.json +1 -1
package/dist/commands/config.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Config CLI Commands
|
|
3
|
-
* anc config init | show | set <key> <value> | path
|
|
3
|
+
* anc config init | show | set <key> <value> | path | profiles | use <profile>
|
|
4
4
|
*/
|
|
5
5
|
import { Command } from 'commander';
|
|
6
6
|
import * as readline from 'readline';
|
|
7
7
|
import chalk from 'chalk';
|
|
8
8
|
import { log } from '../utils/logger.js';
|
|
9
9
|
import { errorMessage } from '../utils/errors.js';
|
|
10
|
-
import { readSavedConfig, writeSavedConfig, updateSavedConfig, hasSavedConfig, getConfigDir, DEFAULT_CALLBACK_URL, } from '../utils/config.js';
|
|
10
|
+
import { readSavedConfig, writeSavedConfig, updateSavedConfig, hasSavedConfig, getConfigDir, getProfileDir, listProfiles, resolveProfile, writeProjectConfig, DEFAULT_CALLBACK_URL, } from '../utils/config.js';
|
|
11
11
|
function ask(rl, prompt, defaultValue) {
|
|
12
12
|
const display = defaultValue ? `${prompt} ${chalk.dim(`(${defaultValue})`)} ` : `${prompt} `;
|
|
13
13
|
return new Promise((resolve) => {
|
|
@@ -21,12 +21,14 @@ export function createConfigCommand() {
|
|
|
21
21
|
// ── config init ──────────────────────────────────
|
|
22
22
|
config
|
|
23
23
|
.command('init')
|
|
24
|
-
.description('Interactive setup — saves credentials to
|
|
25
|
-
.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
.description('Interactive setup — saves credentials to a profile')
|
|
25
|
+
.option('-p, --profile <name>', 'Profile name to configure')
|
|
26
|
+
.action(async (options) => {
|
|
27
|
+
const { name: profileName } = resolveProfile(options.profile);
|
|
28
|
+
const existing = readSavedConfig(profileName);
|
|
29
|
+
if (existing && hasSavedConfig(profileName)) {
|
|
30
|
+
log.info(`Existing configuration found for profile "${profileName}". Values will be used as defaults.`);
|
|
31
|
+
log.dim(` Config file: ${getProfileDir(profileName)}/config.json`);
|
|
30
32
|
console.log();
|
|
31
33
|
}
|
|
32
34
|
const rl = readline.createInterface({
|
|
@@ -34,9 +36,9 @@ export function createConfigCommand() {
|
|
|
34
36
|
output: process.stdout,
|
|
35
37
|
});
|
|
36
38
|
try {
|
|
37
|
-
log.header(
|
|
38
|
-
log.dim(
|
|
39
|
-
log.dim(
|
|
39
|
+
log.header(`Anypoint Connect Setup — Profile: ${chalk.cyan(profileName)}`);
|
|
40
|
+
log.dim(` Credentials saved to: ~/.anypoint-connect/profiles/${profileName}/config.json`);
|
|
41
|
+
log.dim(` Tokens saved to: ~/.anypoint-connect/profiles/${profileName}/tokens.enc (AES-256-GCM)`);
|
|
40
42
|
console.log();
|
|
41
43
|
const clientId = await ask(rl, ' Client ID:', existing?.clientId);
|
|
42
44
|
const clientSecret = await ask(rl, ' Client Secret:', existing?.clientSecret ? '••••••' + existing.clientSecret.slice(-4) : undefined);
|
|
@@ -57,13 +59,13 @@ export function createConfigCommand() {
|
|
|
57
59
|
baseUrl,
|
|
58
60
|
...(defaultEnv ? { defaultEnv } : {}),
|
|
59
61
|
};
|
|
60
|
-
writeSavedConfig(saved);
|
|
62
|
+
writeSavedConfig(saved, profileName);
|
|
61
63
|
console.log();
|
|
62
|
-
log.success(
|
|
63
|
-
log.kv('Location', `${
|
|
64
|
+
log.success(`Configuration saved for profile "${profileName}"!`);
|
|
65
|
+
log.kv('Location', `${getProfileDir(profileName)}/config.json`);
|
|
64
66
|
console.log();
|
|
65
67
|
log.info('Next step: authenticate with Anypoint Platform');
|
|
66
|
-
log.dim(
|
|
68
|
+
log.dim(` anc auth login${profileName !== 'default' ? ` --profile ${profileName}` : ''}`);
|
|
67
69
|
}
|
|
68
70
|
catch (error) {
|
|
69
71
|
rl.close();
|
|
@@ -75,14 +77,17 @@ export function createConfigCommand() {
|
|
|
75
77
|
config
|
|
76
78
|
.command('show')
|
|
77
79
|
.description('Display current configuration (secrets masked)')
|
|
78
|
-
.
|
|
79
|
-
|
|
80
|
+
.option('-p, --profile <name>', 'Profile to show')
|
|
81
|
+
.action((options) => {
|
|
82
|
+
const { name: profileName, source } = resolveProfile(options.profile);
|
|
83
|
+
const saved = readSavedConfig(profileName);
|
|
80
84
|
if (!saved) {
|
|
81
|
-
log.warn(
|
|
85
|
+
log.warn(`No configuration found for profile "${profileName}". Run: anc config init --profile ${profileName}`);
|
|
82
86
|
return;
|
|
83
87
|
}
|
|
84
|
-
log.header(
|
|
85
|
-
log.kv('
|
|
88
|
+
log.header(`Anypoint Connect Configuration — Profile: ${chalk.cyan(profileName)}`);
|
|
89
|
+
log.kv('Profile', `${profileName} (resolved via ${source})`);
|
|
90
|
+
log.kv('Config File', `${getProfileDir(profileName)}/config.json`);
|
|
86
91
|
console.log();
|
|
87
92
|
log.kv('Client ID', saved.clientId);
|
|
88
93
|
log.kv('Client Secret', '••••••' + (saved.clientSecret?.slice(-4) || ''));
|
|
@@ -98,7 +103,9 @@ export function createConfigCommand() {
|
|
|
98
103
|
.description('Set a single config value')
|
|
99
104
|
.argument('<key>', 'Config key: clientId, clientSecret, callbackUrl, baseUrl, defaultEnv')
|
|
100
105
|
.argument('<value>', 'Value to set')
|
|
101
|
-
.
|
|
106
|
+
.option('-p, --profile <name>', 'Profile to update')
|
|
107
|
+
.action((key, value, options) => {
|
|
108
|
+
const { name: profileName } = resolveProfile(options.profile);
|
|
102
109
|
const validKeys = [
|
|
103
110
|
'clientId',
|
|
104
111
|
'clientSecret',
|
|
@@ -110,16 +117,61 @@ export function createConfigCommand() {
|
|
|
110
117
|
log.error(`Invalid key "${key}". Valid keys: ${validKeys.join(', ')}`);
|
|
111
118
|
process.exit(1);
|
|
112
119
|
}
|
|
113
|
-
updateSavedConfig({ [key]: value });
|
|
120
|
+
updateSavedConfig({ [key]: value }, profileName);
|
|
114
121
|
const display = key === 'clientSecret' ? '••••••' + value.slice(-4) : value;
|
|
115
|
-
log.success(`Set ${key} = ${display}`);
|
|
122
|
+
log.success(`[${profileName}] Set ${key} = ${display}`);
|
|
116
123
|
});
|
|
117
124
|
// ── config path ──────────────────────────────────
|
|
118
125
|
config
|
|
119
126
|
.command('path')
|
|
120
127
|
.description('Print the config directory path')
|
|
128
|
+
.option('-p, --profile <name>', 'Profile to show path for')
|
|
129
|
+
.action((options) => {
|
|
130
|
+
if (options.profile) {
|
|
131
|
+
console.log(getProfileDir(options.profile));
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
console.log(getConfigDir());
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
// ── config profiles ──────────────────────────────
|
|
138
|
+
config
|
|
139
|
+
.command('profiles')
|
|
140
|
+
.description('List all configured profiles')
|
|
121
141
|
.action(() => {
|
|
122
|
-
|
|
142
|
+
const profiles = listProfiles();
|
|
143
|
+
const { name: activeProfile, source } = resolveProfile();
|
|
144
|
+
if (profiles.length === 0) {
|
|
145
|
+
log.warn('No profiles configured. Run: anc config init');
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
log.header('Configured Profiles');
|
|
149
|
+
for (const p of profiles) {
|
|
150
|
+
const isActive = p === activeProfile;
|
|
151
|
+
const hasConfig = hasSavedConfig(p);
|
|
152
|
+
const marker = isActive ? chalk.green('▸ ') : ' ';
|
|
153
|
+
const status = hasConfig ? chalk.green('✓') : chalk.dim('○');
|
|
154
|
+
const label = isActive ? chalk.bold(p) + chalk.dim(` (active — ${source})`) : p;
|
|
155
|
+
console.log(`${marker}${status} ${label}`);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
// ── config use ───────────────────────────────────
|
|
159
|
+
config
|
|
160
|
+
.command('use')
|
|
161
|
+
.description('Bind current directory to a profile (writes .anypoint-connect.json)')
|
|
162
|
+
.argument('<profile>', 'Profile name to use in this directory')
|
|
163
|
+
.action((profile) => {
|
|
164
|
+
const profiles = listProfiles();
|
|
165
|
+
if (profiles.length > 0 && !profiles.includes(profile)) {
|
|
166
|
+
log.warn(`Profile "${profile}" does not exist yet.`);
|
|
167
|
+
log.dim(` Available profiles: ${profiles.join(', ')}`);
|
|
168
|
+
log.dim(` Run: anc config init --profile ${profile}`);
|
|
169
|
+
console.log();
|
|
170
|
+
}
|
|
171
|
+
const filePath = writeProjectConfig(profile);
|
|
172
|
+
log.success(`Directory bound to profile "${profile}"`);
|
|
173
|
+
log.kv('File', filePath);
|
|
174
|
+
log.dim(' All commands in this directory will now use this profile.');
|
|
123
175
|
});
|
|
124
176
|
return config;
|
|
125
177
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACH,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,oBAAoB,GAEvB,MAAM,oBAAoB,CAAC;AAE5B,SAAS,GAAG,CAAC,EAAsB,EAAE,MAAc,EAAE,YAAqB;IACtE,MAAM,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,YAAY,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC;IAC7F,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE;YAC5B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,YAAY,IAAI,EAAE,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,mBAAmB;IAC/B,MAAM,MAAM,GAA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QAAQ,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC7C,GAAG,CAAC,OAAO,CAAC,+BAA+B,OAAO,GAAG,CAAC,CAAC;QACvD,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACzB,GAAG,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;IAEP,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { AnypointClient } from '../client/AnypointClient.js';
|
|
6
6
|
/**
|
|
7
7
|
* Creates an authenticated AnypointClient from the saved configuration.
|
|
8
|
-
*
|
|
8
|
+
* If no profile is specified, auto-resolves from env / project config / default.
|
|
9
9
|
*/
|
|
10
|
-
export declare function createClient(): AnypointClient;
|
|
10
|
+
export declare function createClient(profile?: string): AnypointClient;
|
|
11
11
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/commands/shared.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/commands/shared.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,CAU7D"}
|
package/dist/commands/shared.js
CHANGED
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
* Shared command utilities
|
|
3
3
|
* Common helpers used across all CLI command modules
|
|
4
4
|
*/
|
|
5
|
-
import { getConfig } from '../utils/config.js';
|
|
5
|
+
import { getConfig, resolveProfile } from '../utils/config.js';
|
|
6
6
|
import { AnypointClient } from '../client/AnypointClient.js';
|
|
7
7
|
/**
|
|
8
8
|
* Creates an authenticated AnypointClient from the saved configuration.
|
|
9
|
-
*
|
|
9
|
+
* If no profile is specified, auto-resolves from env / project config / default.
|
|
10
10
|
*/
|
|
11
|
-
export function createClient() {
|
|
12
|
-
const
|
|
11
|
+
export function createClient(profile) {
|
|
12
|
+
const resolved = resolveProfile(profile);
|
|
13
|
+
const config = getConfig({ profile: resolved.name });
|
|
13
14
|
return new AnypointClient({
|
|
14
15
|
clientId: config.clientId,
|
|
15
16
|
clientSecret: config.clientSecret,
|
|
16
17
|
redirectUri: config.callbackUrl,
|
|
17
18
|
baseUrl: config.baseUrl,
|
|
19
|
+
profileName: config.profile,
|
|
18
20
|
});
|
|
19
21
|
}
|
|
20
22
|
//# sourceMappingURL=shared.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/commands/shared.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/commands/shared.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,OAAgB;IACzC,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACrD,OAAO,IAAI,cAAc,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,WAAW,EAAE,MAAM,CAAC,OAAO;KAC9B,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -9,4 +9,5 @@ export { registerMonitoringTools } from './monitoring.js';
|
|
|
9
9
|
export { registerExchangeTools } from './exchange.js';
|
|
10
10
|
export { registerApiManagerTools } from './api-manager.js';
|
|
11
11
|
export { registerDesignCenterTools } from './design-center.js';
|
|
12
|
+
export { registerProfileTools } from './profile.js';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/mcp/tools/index.js
CHANGED
|
@@ -9,4 +9,5 @@ export { registerMonitoringTools } from './monitoring.js';
|
|
|
9
9
|
export { registerExchangeTools } from './exchange.js';
|
|
10
10
|
export { registerApiManagerTools } from './api-manager.js';
|
|
11
11
|
export { registerDesignCenterTools } from './design-center.js';
|
|
12
|
+
export { registerProfileTools } from './profile.js';
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool Registrar — Profile management tools
|
|
3
|
+
* set_project_profile, get_project_profile
|
|
4
|
+
*/
|
|
5
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
|
+
export declare function registerProfileTools(server: McpServer): void;
|
|
7
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/profile.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAUzE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,QA2FrD"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool Registrar — Profile management tools
|
|
3
|
+
* set_project_profile, get_project_profile
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { resolveProfile, listProfiles, writeProjectConfig, discoverProjectConfig, hasSavedConfig, } from '../../utils/config.js';
|
|
7
|
+
export function registerProfileTools(server) {
|
|
8
|
+
server.registerTool('get_project_profile', {
|
|
9
|
+
title: 'Get Project Profile',
|
|
10
|
+
description: 'Returns the currently active Anypoint profile for this project, how it was resolved (flag, env, project-file, or default), and lists all available profiles. Use this to understand which Anypoint org/credentials are in use.',
|
|
11
|
+
annotations: { readOnlyHint: true },
|
|
12
|
+
}, async () => {
|
|
13
|
+
const resolved = resolveProfile();
|
|
14
|
+
const profiles = listProfiles();
|
|
15
|
+
const projectConfig = discoverProjectConfig();
|
|
16
|
+
return {
|
|
17
|
+
content: [
|
|
18
|
+
{
|
|
19
|
+
type: 'text',
|
|
20
|
+
text: JSON.stringify({
|
|
21
|
+
activeProfile: resolved.name,
|
|
22
|
+
resolvedVia: resolved.source,
|
|
23
|
+
projectBinding: projectConfig?.profile || null,
|
|
24
|
+
availableProfiles: profiles.map((p) => ({
|
|
25
|
+
name: p,
|
|
26
|
+
hasCredentials: hasSavedConfig(p),
|
|
27
|
+
isActive: p === resolved.name,
|
|
28
|
+
})),
|
|
29
|
+
}, null, 2),
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
server.registerTool('set_project_profile', {
|
|
35
|
+
title: 'Set Project Profile',
|
|
36
|
+
description: 'Binds the current project directory to a named Anypoint profile by writing .anypoint-connect.json. After this, all CLI commands and MCP tools run from this directory will automatically use the specified profile.',
|
|
37
|
+
annotations: { readOnlyHint: false },
|
|
38
|
+
inputSchema: {
|
|
39
|
+
profile: z.string().describe('The profile name to bind to this project directory'),
|
|
40
|
+
directory: z
|
|
41
|
+
.string()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('Directory to write .anypoint-connect.json in (defaults to cwd)'),
|
|
44
|
+
},
|
|
45
|
+
}, async ({ profile, directory }) => {
|
|
46
|
+
try {
|
|
47
|
+
// Validate profile exists
|
|
48
|
+
const profiles = listProfiles();
|
|
49
|
+
if (profiles.length > 0 && !profiles.includes(profile)) {
|
|
50
|
+
return {
|
|
51
|
+
content: [
|
|
52
|
+
{
|
|
53
|
+
type: 'text',
|
|
54
|
+
text: `Warning: Profile "${profile}" does not exist yet. Available profiles: ${profiles.join(', ')}. The binding was created but you'll need to run "anc config init --profile ${profile}" to set up credentials.`,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const filePath = writeProjectConfig(profile, directory);
|
|
60
|
+
return {
|
|
61
|
+
content: [
|
|
62
|
+
{
|
|
63
|
+
type: 'text',
|
|
64
|
+
text: `Project bound to profile "${profile}". Config written to: ${filePath}\n\nAll CLI commands and MCP tools in this directory will now use the "${profile}" profile.`,
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
return {
|
|
71
|
+
content: [
|
|
72
|
+
{
|
|
73
|
+
type: 'text',
|
|
74
|
+
text: `Failed to set project profile: ${error instanceof Error ? error.message : String(error)}`,
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
isError: true,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../../src/mcp/tools/profile.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACH,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,GACjB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IAClD,MAAM,CAAC,YAAY,CACf,qBAAqB,EACrB;QACI,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACP,gOAAgO;QACpO,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;KACtC,EACD,KAAK,IAAI,EAAE;QACP,MAAM,QAAQ,GAAG,cAAc,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;QAChC,MAAM,aAAa,GAAG,qBAAqB,EAAE,CAAC;QAE9C,OAAO;YACH,OAAO,EAAE;gBACL;oBAC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AAO,0BAA0B;yBACrN;qBACJ;iBACJ,CAAC;YACN,CAAC;YAED,MAAM,QAAQ,GAAG,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAExD,OAAO;gBACH,OAAO,EAAE;oBACL;wBACI,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,6BAA6B,OAAO,yBAAyB,QAAQ,0EAA0E,OAAO,YAAY;qBAC3K;iBACJ;aACJ,CAAC;QACN,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO;gBACH,OAAO,EAAE;oBACL;wBACI,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,kCAAkC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBACnG;iBACJ;gBACD,OAAO,EAAE,IAAI;aAChB,CAAC;QACN,CAAC;IACL,CAAC,CACJ,CAAC;AACN,CAAC"}
|
package/dist/mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAsBH,qBAAa,wBAAwB;IACjC,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,MAAM,CAAiB;;IAqCzB,KAAK;CAKd"}
|
package/dist/mcp.js
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
10
10
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
11
|
-
import { getConfig } from './utils/config.js';
|
|
11
|
+
import { getConfig, resolveProfile } from './utils/config.js';
|
|
12
12
|
import { AnypointClient } from './client/AnypointClient.js';
|
|
13
13
|
import { VERSION } from './version.js';
|
|
14
|
-
import { registerIdentityTools, registerApplicationTools, registerLogTools, registerAnalysisTools, registerMonitoringTools, registerExchangeTools, registerApiManagerTools, registerDesignCenterTools, } from './mcp/tools/index.js';
|
|
14
|
+
import { registerIdentityTools, registerApplicationTools, registerLogTools, registerAnalysisTools, registerMonitoringTools, registerExchangeTools, registerApiManagerTools, registerDesignCenterTools, registerProfileTools, } from './mcp/tools/index.js';
|
|
15
15
|
import { registerResources } from './mcp/resources.js';
|
|
16
16
|
import { registerPrompts } from './mcp/prompts.js';
|
|
17
17
|
export class AnypointConnectMcpServer {
|
|
@@ -22,12 +22,15 @@ export class AnypointConnectMcpServer {
|
|
|
22
22
|
name: 'anypoint-connect',
|
|
23
23
|
version: VERSION,
|
|
24
24
|
});
|
|
25
|
-
const
|
|
25
|
+
const resolved = resolveProfile();
|
|
26
|
+
const config = getConfig({ profile: resolved.name });
|
|
27
|
+
console.error(`Profile: "${resolved.name}" (source: ${resolved.source})`);
|
|
26
28
|
this.client = new AnypointClient({
|
|
27
29
|
clientId: config.clientId,
|
|
28
30
|
clientSecret: config.clientSecret,
|
|
29
31
|
redirectUri: config.callbackUrl,
|
|
30
32
|
baseUrl: config.baseUrl,
|
|
33
|
+
profileName: config.profile,
|
|
31
34
|
});
|
|
32
35
|
// Register tools by domain
|
|
33
36
|
registerIdentityTools(this.server, this.client);
|
|
@@ -38,6 +41,7 @@ export class AnypointConnectMcpServer {
|
|
|
38
41
|
registerExchangeTools(this.server, this.client);
|
|
39
42
|
registerApiManagerTools(this.server, this.client);
|
|
40
43
|
registerDesignCenterTools(this.server, this.client);
|
|
44
|
+
registerProfileTools(this.server);
|
|
41
45
|
// Register resources and prompts
|
|
42
46
|
registerResources(this.server, this.client, this.client.getCache());
|
|
43
47
|
registerPrompts(this.server);
|
package/dist/mcp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../src/m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,OAAO,CAAC,SAAS,CAAC,CAAC;QACrC,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;CACJ;AAED,0EAA0E;AAC1E,MAAM,WAAW,GACb,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAE1G,IAAI,WAAW,EAAE,CAAC;IACd,MAAM,MAAM,GAAG,IAAI,wBAAwB,EAAE,CAAC;IAC9C,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC"}
|
package/dist/utils/config.d.ts
CHANGED
|
@@ -1,20 +1,75 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Config utility
|
|
2
|
+
* Config utility — Profile-based multi-project configuration
|
|
3
3
|
*
|
|
4
|
-
* Resolution chain (highest priority wins):
|
|
4
|
+
* Resolution chain for profile name (highest priority wins):
|
|
5
|
+
* 1. Explicit `profile` parameter (from --profile CLI flag)
|
|
6
|
+
* 2. ANYPOINT_PROFILE environment variable
|
|
7
|
+
* 3. Project-local .anypoint-connect.json (walks up from cwd)
|
|
8
|
+
* 4. "default" fallback
|
|
9
|
+
*
|
|
10
|
+
* Within a resolved profile, config resolution (highest priority wins):
|
|
5
11
|
* 1. Environment variables (ANYPOINT_CLIENT_ID, etc.)
|
|
6
|
-
* 2.
|
|
12
|
+
* 2. Profile config (~/.anypoint-connect/profiles/<name>/config.json)
|
|
7
13
|
* 3. Project-local .env (cwd fallback)
|
|
8
14
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
15
|
+
* Storage layout:
|
|
16
|
+
* ~/.anypoint-connect/
|
|
17
|
+
* ├── profiles/
|
|
18
|
+
* │ ├── default/
|
|
19
|
+
* │ │ ├── config.json
|
|
20
|
+
* │ │ └── tokens.enc
|
|
21
|
+
* │ └── <profile-name>/
|
|
22
|
+
* │ ├── config.json
|
|
23
|
+
* │ └── tokens.enc
|
|
24
|
+
* └── config.json ← legacy (auto-migrated to profiles/default/)
|
|
11
25
|
*/
|
|
12
26
|
/** Default OAuth callback URL for local CLI authentication. */
|
|
13
27
|
export declare const DEFAULT_CALLBACK_URL = "http://localhost:3000/api/callback";
|
|
14
28
|
/**
|
|
15
|
-
* Get config directory path (~/.anypoint-connect/)
|
|
29
|
+
* Get root config directory path (~/.anypoint-connect/)
|
|
16
30
|
*/
|
|
17
31
|
export declare function getConfigDir(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get profile directory path (~/.anypoint-connect/profiles/<name>/)
|
|
34
|
+
*/
|
|
35
|
+
export declare function getProfileDir(profile?: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Auto-migrate legacy root config.json + tokens.enc into profiles/default/.
|
|
38
|
+
* Safe to call multiple times — only migrates if legacy files exist and
|
|
39
|
+
* the default profile directory does not yet have a config.json.
|
|
40
|
+
*/
|
|
41
|
+
export declare function migrateIfNeeded(): void;
|
|
42
|
+
export interface ProjectConfig {
|
|
43
|
+
profile: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Walk up from startDir to find .anypoint-connect.json.
|
|
47
|
+
* Returns the parsed content or null if not found.
|
|
48
|
+
*/
|
|
49
|
+
export declare function discoverProjectConfig(startDir?: string): ProjectConfig | null;
|
|
50
|
+
/**
|
|
51
|
+
* Write a .anypoint-connect.json file in the given directory
|
|
52
|
+
* to bind it to a profile.
|
|
53
|
+
*/
|
|
54
|
+
export declare function writeProjectConfig(profile: string, dir?: string): string;
|
|
55
|
+
export interface ResolvedProfile {
|
|
56
|
+
/** The resolved profile name. */
|
|
57
|
+
name: string;
|
|
58
|
+
/** How the profile was resolved. */
|
|
59
|
+
source: 'flag' | 'env' | 'project-file' | 'default';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Resolve which profile to use, following the priority chain:
|
|
63
|
+
* 1. Explicit profile parameter (--profile flag)
|
|
64
|
+
* 2. ANYPOINT_PROFILE env var
|
|
65
|
+
* 3. .anypoint-connect.json in cwd (or startDir)
|
|
66
|
+
* 4. "default" fallback
|
|
67
|
+
*/
|
|
68
|
+
export declare function resolveProfile(explicitProfile?: string, startDir?: string): ResolvedProfile;
|
|
69
|
+
/**
|
|
70
|
+
* List all configured profile names.
|
|
71
|
+
*/
|
|
72
|
+
export declare function listProfiles(): string[];
|
|
18
73
|
export interface SavedConfig {
|
|
19
74
|
clientId: string;
|
|
20
75
|
clientSecret: string;
|
|
@@ -23,35 +78,43 @@ export interface SavedConfig {
|
|
|
23
78
|
defaultEnv?: string;
|
|
24
79
|
}
|
|
25
80
|
/**
|
|
26
|
-
* Read the saved
|
|
81
|
+
* Read the saved config for a profile.
|
|
27
82
|
*/
|
|
28
|
-
export declare function readSavedConfig(): SavedConfig | null;
|
|
83
|
+
export declare function readSavedConfig(profile?: string): SavedConfig | null;
|
|
29
84
|
/**
|
|
30
|
-
* Write config to
|
|
85
|
+
* Write config to a profile's config file.
|
|
31
86
|
*/
|
|
32
|
-
export declare function writeSavedConfig(config: SavedConfig): void;
|
|
87
|
+
export declare function writeSavedConfig(config: SavedConfig, profile?: string): void;
|
|
33
88
|
/**
|
|
34
|
-
* Update specific fields in
|
|
89
|
+
* Update specific fields in a profile's config.
|
|
35
90
|
*/
|
|
36
|
-
export declare function updateSavedConfig(updates: Partial<SavedConfig
|
|
91
|
+
export declare function updateSavedConfig(updates: Partial<SavedConfig>, profile?: string): SavedConfig;
|
|
37
92
|
/**
|
|
38
|
-
* Check if a
|
|
93
|
+
* Check if a profile has saved credentials.
|
|
39
94
|
*/
|
|
40
|
-
export declare function hasSavedConfig(): boolean;
|
|
95
|
+
export declare function hasSavedConfig(profile?: string): boolean;
|
|
41
96
|
export interface Config {
|
|
42
97
|
clientId: string;
|
|
43
98
|
clientSecret: string;
|
|
44
99
|
callbackUrl: string;
|
|
45
100
|
baseUrl: string;
|
|
46
101
|
defaultEnv?: string;
|
|
102
|
+
/** The profile name this config was resolved from. */
|
|
103
|
+
profile: string;
|
|
104
|
+
}
|
|
105
|
+
export interface GetConfigOptions {
|
|
106
|
+
/** Explicit profile name (overrides all other resolution). */
|
|
107
|
+
profile?: string;
|
|
108
|
+
/** Directory to search for .anypoint-connect.json (defaults to cwd). */
|
|
109
|
+
cwd?: string;
|
|
47
110
|
}
|
|
48
111
|
/**
|
|
49
112
|
* Resolve config using the priority chain:
|
|
50
113
|
* 1. Environment variables
|
|
51
|
-
* 2.
|
|
114
|
+
* 2. Profile config (~/.anypoint-connect/profiles/<name>/config.json)
|
|
52
115
|
* 3. Project-local .env
|
|
53
116
|
*/
|
|
54
|
-
export declare function getConfig(): Config;
|
|
117
|
+
export declare function getConfig(options?: GetConfigOptions): Config;
|
|
55
118
|
/**
|
|
56
119
|
* Clear the cached config (for testing or after config changes)
|
|
57
120
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAcH,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,uCAAuC,CAAC;AAIzE;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAMrC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,MAAwB,GAAG,MAAM,CAMvE;AAQD;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAwBtC;AAID,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CA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