@robinmordasiewicz/f5xc-api-mcp 1.0.82-2512312028 → 1.0.82-2601010145

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 (52) hide show
  1. package/dist/auth/credential-manager.d.ts +40 -29
  2. package/dist/auth/credential-manager.d.ts.map +1 -1
  3. package/dist/auth/credential-manager.js +132 -100
  4. package/dist/auth/credential-manager.js.map +1 -1
  5. package/dist/auth/http-client.d.ts.map +1 -1
  6. package/dist/auth/http-client.js +21 -10
  7. package/dist/auth/http-client.js.map +1 -1
  8. package/dist/auth/index.d.ts +5 -0
  9. package/dist/auth/index.d.ts.map +1 -1
  10. package/dist/auth/index.js +5 -0
  11. package/dist/auth/index.js.map +1 -1
  12. package/dist/config/paths.d.ts +34 -0
  13. package/dist/config/paths.d.ts.map +1 -0
  14. package/dist/config/paths.js +67 -0
  15. package/dist/config/paths.js.map +1 -0
  16. package/dist/index.d.ts +12 -6
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +22 -11
  19. package/dist/index.js.map +1 -1
  20. package/dist/profile/index.d.ts +9 -0
  21. package/dist/profile/index.d.ts.map +1 -0
  22. package/dist/profile/index.js +8 -0
  23. package/dist/profile/index.js.map +1 -0
  24. package/dist/profile/manager.d.ts +75 -0
  25. package/dist/profile/manager.d.ts.map +1 -0
  26. package/dist/profile/manager.js +327 -0
  27. package/dist/profile/manager.js.map +1 -0
  28. package/dist/profile/types.d.ts +51 -0
  29. package/dist/profile/types.d.ts.map +1 -0
  30. package/dist/profile/types.js +8 -0
  31. package/dist/profile/types.js.map +1 -0
  32. package/dist/server.d.ts +6 -1
  33. package/dist/server.d.ts.map +1 -1
  34. package/dist/server.js +8 -2
  35. package/dist/server.js.map +1 -1
  36. package/package.json +1 -1
  37. package/dist/config/config-manager.d.ts +0 -72
  38. package/dist/config/config-manager.d.ts.map +0 -1
  39. package/dist/config/config-manager.js +0 -247
  40. package/dist/config/config-manager.js.map +0 -1
  41. package/dist/config/index.d.ts +0 -7
  42. package/dist/config/index.d.ts.map +0 -1
  43. package/dist/config/index.js +0 -7
  44. package/dist/config/index.js.map +0 -1
  45. package/dist/config/schema.d.ts +0 -74
  46. package/dist/config/schema.d.ts.map +0 -1
  47. package/dist/config/schema.js +0 -75
  48. package/dist/config/schema.js.map +0 -1
  49. package/dist/config/types.d.ts +0 -77
  50. package/dist/config/types.d.ts.map +0 -1
  51. package/dist/config/types.js +0 -31
  52. package/dist/config/types.js.map +0 -1
@@ -1,74 +0,0 @@
1
- /**
2
- * Zod validation schemas for F5XC API MCP configuration
3
- */
4
- import { z } from "zod";
5
- import type { ConfigFile, ProfileCredentials } from "./types.js";
6
- /**
7
- * Schema for profile metadata
8
- */
9
- export declare const ProfileMetadataSchema: z.ZodObject<{
10
- description: z.ZodOptional<z.ZodString>;
11
- createdAt: z.ZodString;
12
- lastUsedAt: z.ZodOptional<z.ZodString>;
13
- lastModifiedAt: z.ZodString;
14
- }, z.core.$strict>;
15
- /**
16
- * Schema for profile credentials
17
- */
18
- export declare const ProfileCredentialsSchema: z.ZodObject<{
19
- apiUrl: z.ZodOptional<z.ZodString>;
20
- apiToken: z.ZodOptional<z.ZodString>;
21
- p12File: z.ZodOptional<z.ZodString>;
22
- p12Password: z.ZodOptional<z.ZodString>;
23
- metadata: z.ZodOptional<z.ZodObject<{
24
- description: z.ZodOptional<z.ZodString>;
25
- createdAt: z.ZodString;
26
- lastUsedAt: z.ZodOptional<z.ZodString>;
27
- lastModifiedAt: z.ZodString;
28
- }, z.core.$strict>>;
29
- }, z.core.$strict>;
30
- /**
31
- * Schema for configuration file
32
- */
33
- export declare const ConfigFileSchema: z.ZodObject<{
34
- version: z.ZodString;
35
- defaultProfile: z.ZodOptional<z.ZodString>;
36
- profiles: z.ZodRecord<z.ZodString, z.ZodObject<{
37
- apiUrl: z.ZodOptional<z.ZodString>;
38
- apiToken: z.ZodOptional<z.ZodString>;
39
- p12File: z.ZodOptional<z.ZodString>;
40
- p12Password: z.ZodOptional<z.ZodString>;
41
- metadata: z.ZodOptional<z.ZodObject<{
42
- description: z.ZodOptional<z.ZodString>;
43
- createdAt: z.ZodString;
44
- lastUsedAt: z.ZodOptional<z.ZodString>;
45
- lastModifiedAt: z.ZodString;
46
- }, z.core.$strict>>;
47
- }, z.core.$strict>>;
48
- metadata: z.ZodOptional<z.ZodObject<{
49
- lastModifiedAt: z.ZodString;
50
- }, z.core.$strict>>;
51
- }, z.core.$strict>;
52
- /**
53
- * Validate a configuration file
54
- * @param data - Data to validate
55
- * @returns Validated ConfigFile or throws ZodError
56
- */
57
- export declare function validateConfigFile(data: unknown): ConfigFile;
58
- /**
59
- * Validate profile credentials
60
- * @param data - Data to validate
61
- * @returns Validated ProfileCredentials or throws ZodError
62
- */
63
- export declare function validateProfileCredentials(data: unknown): ProfileCredentials;
64
- /**
65
- * Safely validate a configuration file
66
- * @param data - Data to validate
67
- * @returns Object with success flag and data or error
68
- */
69
- export declare function safeValidateConfigFile(data: unknown): {
70
- success: boolean;
71
- data?: ConfigFile;
72
- error?: string;
73
- };
74
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;kBAOvB,CAAC;AAEZ;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;kBAQ1B,CAAC;AAEZ;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;kBAYlB,CAAC;AAEZ;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,OAAO,GAAG,kBAAkB,CAE5E;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAQA"}
@@ -1,75 +0,0 @@
1
- /**
2
- * Zod validation schemas for F5XC API MCP configuration
3
- */
4
- import { z } from "zod";
5
- /**
6
- * Schema for profile metadata
7
- */
8
- export const ProfileMetadataSchema = z
9
- .object({
10
- description: z.string().optional(),
11
- createdAt: z.string().datetime(),
12
- lastUsedAt: z.string().datetime().optional(),
13
- lastModifiedAt: z.string().datetime(),
14
- })
15
- .strict();
16
- /**
17
- * Schema for profile credentials
18
- */
19
- export const ProfileCredentialsSchema = z
20
- .object({
21
- apiUrl: z.string().url().optional(),
22
- apiToken: z.string().optional(),
23
- p12File: z.string().optional(),
24
- p12Password: z.string().optional(),
25
- metadata: ProfileMetadataSchema.optional(),
26
- })
27
- .strict();
28
- /**
29
- * Schema for configuration file
30
- */
31
- export const ConfigFileSchema = z
32
- .object({
33
- version: z.string(),
34
- defaultProfile: z.string().optional(),
35
- profiles: z.record(z.string(), ProfileCredentialsSchema),
36
- metadata: z
37
- .object({
38
- lastModifiedAt: z.string().datetime(),
39
- })
40
- .strict()
41
- .optional(),
42
- })
43
- .strict();
44
- /**
45
- * Validate a configuration file
46
- * @param data - Data to validate
47
- * @returns Validated ConfigFile or throws ZodError
48
- */
49
- export function validateConfigFile(data) {
50
- return ConfigFileSchema.parse(data);
51
- }
52
- /**
53
- * Validate profile credentials
54
- * @param data - Data to validate
55
- * @returns Validated ProfileCredentials or throws ZodError
56
- */
57
- export function validateProfileCredentials(data) {
58
- return ProfileCredentialsSchema.parse(data);
59
- }
60
- /**
61
- * Safely validate a configuration file
62
- * @param data - Data to validate
63
- * @returns Object with success flag and data or error
64
- */
65
- export function safeValidateConfigFile(data) {
66
- try {
67
- const config = validateConfigFile(data);
68
- return { success: true, data: config };
69
- }
70
- catch (error) {
71
- const message = error instanceof Error ? error.message : "Unknown validation error";
72
- return { success: false, error: message };
73
- }
74
- }
75
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,qBAAqB,CAAC,QAAQ,EAAE;CAC3C,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,wBAAwB,CAAC;IACxD,QAAQ,EAAE,CAAC;SACR,MAAM,CAAC;QACN,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACtC,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,EAAE;CACd,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAa;IAC9C,OAAO,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,IAAa;IACtD,OAAO,wBAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAa;IAKlD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACxC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACzC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC;QACpF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAC5C,CAAC;AACH,CAAC"}
@@ -1,77 +0,0 @@
1
- /**
2
- * Configuration types for F5XC API MCP credential management
3
- * Supports multiple named profiles stored in ~/.f5xc/credentials.json
4
- */
5
- /**
6
- * Metadata about a profile
7
- */
8
- export interface ProfileMetadata {
9
- /** Optional description of the profile (e.g., "Production", "Staging") */
10
- description?: string;
11
- /** ISO timestamp when profile was created */
12
- createdAt: string;
13
- /** ISO timestamp when profile was last used */
14
- lastUsedAt?: string;
15
- /** ISO timestamp when profile was last modified */
16
- lastModifiedAt: string;
17
- }
18
- /**
19
- * Credentials for a single F5XC tenant profile
20
- */
21
- export interface ProfileCredentials {
22
- /** F5XC API URL (e.g., https://tenant.volterra.io) */
23
- apiUrl?: string;
24
- /** F5XC API Token for TOKEN auth mode */
25
- apiToken?: string;
26
- /** Path to P12 certificate file for CERTIFICATE auth mode */
27
- p12File?: string;
28
- /** Password for P12 certificate */
29
- p12Password?: string;
30
- /** Metadata about this profile */
31
- metadata?: ProfileMetadata;
32
- }
33
- /**
34
- * Complete configuration file structure
35
- * Stored at ~/.f5xc/credentials.json
36
- */
37
- export interface ConfigFile {
38
- /** Configuration schema version for migration purposes */
39
- version: string;
40
- /** Name of the default profile to use */
41
- defaultProfile?: string;
42
- /** Map of profile names to their credentials */
43
- profiles: Record<string, ProfileCredentials>;
44
- /** General metadata about the config file */
45
- metadata?: {
46
- lastModifiedAt: string;
47
- };
48
- }
49
- /**
50
- * Raw credentials as loaded from environment or config
51
- * Used internally for credential processing
52
- */
53
- export interface RawCredentials {
54
- apiUrl?: string;
55
- token?: string;
56
- p12File?: string;
57
- p12Password?: string;
58
- }
59
- /**
60
- * Configuration schema version
61
- */
62
- export declare const CONFIG_SCHEMA_VERSION = "1.0";
63
- /**
64
- * Default empty configuration
65
- */
66
- export declare const DEFAULT_CONFIG: ConfigFile;
67
- /**
68
- * File system permissions for security
69
- */
70
- export declare const CONFIG_DIR_PERMISSIONS = 448;
71
- export declare const CONFIG_FILE_PERMISSIONS = 384;
72
- /**
73
- * Configuration paths
74
- */
75
- export declare const getConfigDirPath: () => string;
76
- export declare const getConfigFilePath: () => string;
77
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAA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B,QAAO,MAGnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,MAEpC,CAAC"}
@@ -1,31 +0,0 @@
1
- /**
2
- * Configuration types for F5XC API MCP credential management
3
- * Supports multiple named profiles stored in ~/.f5xc/credentials.json
4
- */
5
- /**
6
- * Configuration schema version
7
- */
8
- export const CONFIG_SCHEMA_VERSION = "1.0";
9
- /**
10
- * Default empty configuration
11
- */
12
- export const DEFAULT_CONFIG = {
13
- version: CONFIG_SCHEMA_VERSION,
14
- profiles: {},
15
- };
16
- /**
17
- * File system permissions for security
18
- */
19
- export const CONFIG_DIR_PERMISSIONS = 0o700; // rwx------ (user only)
20
- export const CONFIG_FILE_PERMISSIONS = 0o600; // rw------- (user read/write only)
21
- /**
22
- * Configuration paths
23
- */
24
- export const getConfigDirPath = () => {
25
- const home = process.env.HOME || process.env.USERPROFILE || "";
26
- return `${home}/.f5xc`;
27
- };
28
- export const getConfigFilePath = () => {
29
- return `${getConfigDirPath()}/credentials.json`;
30
- };
31
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4DH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAe;IACxC,OAAO,EAAE,qBAAqB;IAC9B,QAAQ,EAAE,EAAE;CACb,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC,CAAC,wBAAwB;AACrE,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC,CAAC,mCAAmC;AAEjF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAW,EAAE;IAC3C,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC;IAC/D,OAAO,GAAG,IAAI,QAAQ,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAW,EAAE;IAC5C,OAAO,GAAG,gBAAgB,EAAE,mBAAmB,CAAC;AAClD,CAAC,CAAC"}