@octopusdeploy/mcp-server 0.1.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.
Files changed (167) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +210 -0
  3. package/dist/helpers/getClientConfigurationFromEnvironment.d.ts +7 -0
  4. package/dist/helpers/getClientConfigurationFromEnvironment.d.ts.map +1 -0
  5. package/dist/helpers/getClientConfigurationFromEnvironment.js +31 -0
  6. package/dist/helpers/getClientConfigurationFromEnvironment.js.map +1 -0
  7. package/dist/helpers/getPublicUrl.d.ts +2 -0
  8. package/dist/helpers/getPublicUrl.d.ts.map +1 -0
  9. package/dist/helpers/getPublicUrl.js +4 -0
  10. package/dist/helpers/getPublicUrl.js.map +1 -0
  11. package/dist/helpers/vcsProjectHelpers.d.ts +4 -0
  12. package/dist/helpers/vcsProjectHelpers.d.ts.map +1 -0
  13. package/dist/helpers/vcsProjectHelpers.js +21 -0
  14. package/dist/helpers/vcsProjectHelpers.js.map +1 -0
  15. package/dist/index.d.ts +3 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +74 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/resources/index.d.ts +3 -0
  20. package/dist/resources/index.d.ts.map +1 -0
  21. package/dist/resources/index.js +4 -0
  22. package/dist/resources/index.js.map +1 -0
  23. package/dist/resources/spacesResource.d.ts +3 -0
  24. package/dist/resources/spacesResource.d.ts.map +1 -0
  25. package/dist/resources/spacesResource.js +54 -0
  26. package/dist/resources/spacesResource.js.map +1 -0
  27. package/dist/tools/getBranches.d.ts +3 -0
  28. package/dist/tools/getBranches.d.ts.map +1 -0
  29. package/dist/tools/getBranches.js +55 -0
  30. package/dist/tools/getBranches.js.map +1 -0
  31. package/dist/tools/getCurrentUser.d.ts +3 -0
  32. package/dist/tools/getCurrentUser.d.ts.map +1 -0
  33. package/dist/tools/getCurrentUser.js +40 -0
  34. package/dist/tools/getCurrentUser.js.map +1 -0
  35. package/dist/tools/getDeploymentProcess.d.ts +3 -0
  36. package/dist/tools/getDeploymentProcess.d.ts.map +1 -0
  37. package/dist/tools/getDeploymentProcess.js +91 -0
  38. package/dist/tools/getDeploymentProcess.js.map +1 -0
  39. package/dist/tools/getDeploymentTarget.d.ts +3 -0
  40. package/dist/tools/getDeploymentTarget.d.ts.map +1 -0
  41. package/dist/tools/getDeploymentTarget.js +66 -0
  42. package/dist/tools/getDeploymentTarget.js.map +1 -0
  43. package/dist/tools/getKubernetesLiveStatus.d.ts +3 -0
  44. package/dist/tools/getKubernetesLiveStatus.d.ts.map +1 -0
  45. package/dist/tools/getKubernetesLiveStatus.js +64 -0
  46. package/dist/tools/getKubernetesLiveStatus.js.map +1 -0
  47. package/dist/tools/getLatestDeployment.d.ts +3 -0
  48. package/dist/tools/getLatestDeployment.d.ts.map +1 -0
  49. package/dist/tools/getLatestDeployment.js +85 -0
  50. package/dist/tools/getLatestDeployment.js.map +1 -0
  51. package/dist/tools/getMissingTenantVariables.d.ts +3 -0
  52. package/dist/tools/getMissingTenantVariables.d.ts.map +1 -0
  53. package/dist/tools/getMissingTenantVariables.js +47 -0
  54. package/dist/tools/getMissingTenantVariables.js.map +1 -0
  55. package/dist/tools/getReleaseById.d.ts +3 -0
  56. package/dist/tools/getReleaseById.d.ts.map +1 -0
  57. package/dist/tools/getReleaseById.js +45 -0
  58. package/dist/tools/getReleaseById.js.map +1 -0
  59. package/dist/tools/getTaskById.d.ts +9 -0
  60. package/dist/tools/getTaskById.d.ts.map +1 -0
  61. package/dist/tools/getTaskById.js +44 -0
  62. package/dist/tools/getTaskById.js.map +1 -0
  63. package/dist/tools/getTaskDetails.d.ts +9 -0
  64. package/dist/tools/getTaskDetails.d.ts.map +1 -0
  65. package/dist/tools/getTaskDetails.js +44 -0
  66. package/dist/tools/getTaskDetails.js.map +1 -0
  67. package/dist/tools/getTaskRaw.d.ts +9 -0
  68. package/dist/tools/getTaskRaw.d.ts.map +1 -0
  69. package/dist/tools/getTaskRaw.js +43 -0
  70. package/dist/tools/getTaskRaw.js.map +1 -0
  71. package/dist/tools/getTenantById.d.ts +3 -0
  72. package/dist/tools/getTenantById.d.ts.map +1 -0
  73. package/dist/tools/getTenantById.js +45 -0
  74. package/dist/tools/getTenantById.js.map +1 -0
  75. package/dist/tools/getTenantVariables.d.ts +3 -0
  76. package/dist/tools/getTenantVariables.d.ts.map +1 -0
  77. package/dist/tools/getTenantVariables.js +58 -0
  78. package/dist/tools/getTenantVariables.js.map +1 -0
  79. package/dist/tools/index.d.ts +24 -0
  80. package/dist/tools/index.d.ts.map +1 -0
  81. package/dist/tools/index.js +49 -0
  82. package/dist/tools/index.js.map +1 -0
  83. package/dist/tools/listDeploymentTargets.d.ts +3 -0
  84. package/dist/tools/listDeploymentTargets.d.ts.map +1 -0
  85. package/dist/tools/listDeploymentTargets.js +98 -0
  86. package/dist/tools/listDeploymentTargets.js.map +1 -0
  87. package/dist/tools/listDeployments.d.ts +3 -0
  88. package/dist/tools/listDeployments.d.ts.map +1 -0
  89. package/dist/tools/listDeployments.js +70 -0
  90. package/dist/tools/listDeployments.js.map +1 -0
  91. package/dist/tools/listEnvironments.d.ts +3 -0
  92. package/dist/tools/listEnvironments.d.ts.map +1 -0
  93. package/dist/tools/listEnvironments.js +42 -0
  94. package/dist/tools/listEnvironments.js.map +1 -0
  95. package/dist/tools/listProjects.d.ts +3 -0
  96. package/dist/tools/listProjects.d.ts.map +1 -0
  97. package/dist/tools/listProjects.js +44 -0
  98. package/dist/tools/listProjects.js.map +1 -0
  99. package/dist/tools/listReleases.d.ts +3 -0
  100. package/dist/tools/listReleases.d.ts.map +1 -0
  101. package/dist/tools/listReleases.js +54 -0
  102. package/dist/tools/listReleases.js.map +1 -0
  103. package/dist/tools/listReleasesForProject.d.ts +3 -0
  104. package/dist/tools/listReleasesForProject.d.ts.map +1 -0
  105. package/dist/tools/listReleasesForProject.js +60 -0
  106. package/dist/tools/listReleasesForProject.js.map +1 -0
  107. package/dist/tools/listSpaces.d.ts +3 -0
  108. package/dist/tools/listSpaces.d.ts.map +1 -0
  109. package/dist/tools/listSpaces.js +38 -0
  110. package/dist/tools/listSpaces.js.map +1 -0
  111. package/dist/tools/listTenants.d.ts +3 -0
  112. package/dist/tools/listTenants.d.ts.map +1 -0
  113. package/dist/tools/listTenants.js +64 -0
  114. package/dist/tools/listTenants.js.map +1 -0
  115. package/dist/types/baseResource.d.ts +14 -0
  116. package/dist/types/baseResource.d.ts.map +1 -0
  117. package/dist/types/baseResource.js +3 -0
  118. package/dist/types/baseResource.js.map +1 -0
  119. package/dist/types/deploymentProcessTypes.d.ts +33 -0
  120. package/dist/types/deploymentProcessTypes.d.ts.map +1 -0
  121. package/dist/types/deploymentProcessTypes.js +20 -0
  122. package/dist/types/deploymentProcessTypes.js.map +1 -0
  123. package/dist/types/deploymentTargetTypes.d.ts +74 -0
  124. package/dist/types/deploymentTargetTypes.d.ts.map +1 -0
  125. package/dist/types/deploymentTargetTypes.js +32 -0
  126. package/dist/types/deploymentTargetTypes.js.map +1 -0
  127. package/dist/types/gitBranchTypes.d.ts +11 -0
  128. package/dist/types/gitBranchTypes.d.ts.map +1 -0
  129. package/dist/types/gitBranchTypes.js +2 -0
  130. package/dist/types/gitBranchTypes.js.map +1 -0
  131. package/dist/types/projectTypes.d.ts +2 -0
  132. package/dist/types/projectTypes.d.ts.map +1 -0
  133. package/dist/types/projectTypes.js +2 -0
  134. package/dist/types/projectTypes.js.map +1 -0
  135. package/dist/types/resourceCollection.d.ts +9 -0
  136. package/dist/types/resourceCollection.d.ts.map +1 -0
  137. package/dist/types/resourceCollection.js +2 -0
  138. package/dist/types/resourceCollection.js.map +1 -0
  139. package/dist/types/spaceTypes.d.ts +2 -0
  140. package/dist/types/spaceTypes.d.ts.map +1 -0
  141. package/dist/types/spaceTypes.js +2 -0
  142. package/dist/types/spaceTypes.js.map +1 -0
  143. package/dist/types/taskTypes.d.ts +2 -0
  144. package/dist/types/taskTypes.d.ts.map +1 -0
  145. package/dist/types/taskTypes.js +2 -0
  146. package/dist/types/taskTypes.js.map +1 -0
  147. package/dist/types/tenantsTypes.d.ts +2 -0
  148. package/dist/types/tenantsTypes.d.ts.map +1 -0
  149. package/dist/types/tenantsTypes.js +2 -0
  150. package/dist/types/tenantsTypes.js.map +1 -0
  151. package/dist/types/toolConfig.d.ts +19 -0
  152. package/dist/types/toolConfig.d.ts.map +1 -0
  153. package/dist/types/toolConfig.js +17 -0
  154. package/dist/types/toolConfig.js.map +1 -0
  155. package/dist/utils/clientInfo.d.ts +20 -0
  156. package/dist/utils/clientInfo.d.ts.map +1 -0
  157. package/dist/utils/clientInfo.js +23 -0
  158. package/dist/utils/clientInfo.js.map +1 -0
  159. package/dist/utils/logger.d.ts +45 -0
  160. package/dist/utils/logger.d.ts.map +1 -0
  161. package/dist/utils/logger.js +130 -0
  162. package/dist/utils/logger.js.map +1 -0
  163. package/dist/utils/parseConfig.d.ts +4 -0
  164. package/dist/utils/parseConfig.d.ts.map +1 -0
  165. package/dist/utils/parseConfig.js +21 -0
  166. package/dist/utils/parseConfig.js.map +1 -0
  167. package/package.json +50 -0
@@ -0,0 +1,3 @@
1
+ /* eslint-disable @typescript-eslint/no-empty-object-type */
2
+ export {};
3
+ //# sourceMappingURL=baseResource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseResource.js","sourceRoot":"","sources":["../../src/types/baseResource.ts"],"names":[],"mappings":"AAAA,4DAA4D"}
@@ -0,0 +1,33 @@
1
+ import { type ResourceWithId, type ResourceWithSlug } from "./baseResource.js";
2
+ export declare enum StartTrigger {
3
+ StartWithPrevious = "StartWithPrevious",
4
+ StartAfterPrevious = "StartAfterPrevious"
5
+ }
6
+ export declare enum RunCondition {
7
+ Success = "Success",
8
+ Failure = "Failure",
9
+ Always = "Always",
10
+ Variable = "Variable"
11
+ }
12
+ export declare enum PackageRequirement {
13
+ LetOctopusDecide = "LetOctopusDecide",
14
+ BeforePackageAcquisition = "BeforePackageAcquisition",
15
+ AfterPackageAcquisition = "AfterPackageAcquisition"
16
+ }
17
+ export interface DeploymentStepResource extends ResourceWithId, ResourceWithSlug {
18
+ Id: string;
19
+ Name: string;
20
+ Properties: Record<string, any>;
21
+ Condition: RunCondition;
22
+ StartTrigger: StartTrigger;
23
+ PackageRequirement: PackageRequirement;
24
+ Actions: any[];
25
+ }
26
+ export interface DeploymentProcessResource extends ResourceWithId {
27
+ ProjectId: string;
28
+ SpaceId: string;
29
+ Version: number;
30
+ Steps: DeploymentStepResource[];
31
+ LastSnapshotId?: string;
32
+ }
33
+ //# sourceMappingURL=deploymentProcessTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploymentProcessTypes.d.ts","sourceRoot":"","sources":["../../src/types/deploymentProcessTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,oBAAY,YAAY;IACtB,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;CAC1C;AAED,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,kBAAkB;IAC5B,gBAAgB,qBAAqB;IACrC,wBAAwB,6BAA6B;IACrD,uBAAuB,4BAA4B;CACpD;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc,EAAE,gBAAgB;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IAEb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,SAAS,EAAE,YAAY,CAAC;IACxB,YAAY,EAAE,YAAY,CAAC;IAC3B,kBAAkB,EAAE,kBAAkB,CAAC;IAEvC,OAAO,EAAE,GAAG,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,yBAA0B,SAAQ,cAAc;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,20 @@
1
+ import {} from "./baseResource.js";
2
+ export var StartTrigger;
3
+ (function (StartTrigger) {
4
+ StartTrigger["StartWithPrevious"] = "StartWithPrevious";
5
+ StartTrigger["StartAfterPrevious"] = "StartAfterPrevious";
6
+ })(StartTrigger || (StartTrigger = {}));
7
+ export var RunCondition;
8
+ (function (RunCondition) {
9
+ RunCondition["Success"] = "Success";
10
+ RunCondition["Failure"] = "Failure";
11
+ RunCondition["Always"] = "Always";
12
+ RunCondition["Variable"] = "Variable";
13
+ })(RunCondition || (RunCondition = {}));
14
+ export var PackageRequirement;
15
+ (function (PackageRequirement) {
16
+ PackageRequirement["LetOctopusDecide"] = "LetOctopusDecide";
17
+ PackageRequirement["BeforePackageAcquisition"] = "BeforePackageAcquisition";
18
+ PackageRequirement["AfterPackageAcquisition"] = "AfterPackageAcquisition";
19
+ })(PackageRequirement || (PackageRequirement = {}));
20
+ //# sourceMappingURL=deploymentProcessTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploymentProcessTypes.js","sourceRoot":"","sources":["../../src/types/deploymentProcessTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,MAAM,mBAAmB,CAAC;AAE/E,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,uDAAuC,CAAA;IACvC,yDAAyC,CAAA;AAC3C,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;AACvB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,2DAAqC,CAAA;IACrC,2EAAqD,CAAA;IACrD,yEAAmD,CAAA;AACrD,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B"}
@@ -0,0 +1,74 @@
1
+ import { type NamedResource, type SpaceScopedResource, type ResourceWithSlug } from "./baseResource.js";
2
+ export declare const MachineModelHealthStatusValues: {
3
+ readonly Healthy: "Healthy";
4
+ readonly Unavailable: "Unavailable";
5
+ readonly Unknown: "Unknown";
6
+ readonly HasWarnings: "HasWarnings";
7
+ readonly Unhealthy: "Unhealthy";
8
+ };
9
+ export type MachineModelHealthStatus = (typeof MachineModelHealthStatusValues)[keyof typeof MachineModelHealthStatusValues];
10
+ export interface MachineModelHealthStatusResource {
11
+ Id: MachineModelHealthStatus;
12
+ Name: string;
13
+ }
14
+ export declare const CommunicationStyleValues: {
15
+ readonly None: "None";
16
+ readonly TentaclePassive: "TentaclePassive";
17
+ readonly TentacleActive: "TentacleActive";
18
+ readonly Ssh: "Ssh";
19
+ readonly OfflineDrop: "OfflineDrop";
20
+ readonly AzureWebApp: "AzureWebApp";
21
+ readonly AzureCloudService: "AzureCloudService";
22
+ readonly AzureServiceFabricCluster: "AzureServiceFabricCluster";
23
+ readonly Kubernetes: "Kubernetes";
24
+ readonly KubernetesTentacle: "KubernetesTentacle";
25
+ readonly StepPackage: "StepPackage";
26
+ };
27
+ export type CommunicationStyle = (typeof CommunicationStyleValues)[keyof typeof CommunicationStyleValues];
28
+ export declare enum AgentCommunicationMode {
29
+ Polling = "Polling",
30
+ Listening = "Listening"
31
+ }
32
+ export interface CommunicationStyleResource {
33
+ Id: CommunicationStyle;
34
+ Name: string;
35
+ }
36
+ export interface TentacleDetailsResource {
37
+ UpgradeLocked: boolean;
38
+ Version: string;
39
+ UpgradeSuggested: boolean;
40
+ UpgradeRequired: boolean;
41
+ UpgradeAvailable: boolean;
42
+ }
43
+ export declare const TenantedDeploymentModeValues: {
44
+ readonly Untenanted: "Untenanted";
45
+ readonly TenantedOrUntenanted: "TenantedOrUntenanted";
46
+ readonly Tenanted: "Tenanted";
47
+ };
48
+ export type TenantedDeploymentMode = (typeof TenantedDeploymentModeValues)[keyof typeof TenantedDeploymentModeValues];
49
+ export interface EndpointResource {
50
+ Id: string;
51
+ CommunicationStyle: CommunicationStyle;
52
+ Fingerprint?: string;
53
+ Uri?: string;
54
+ ProxyId?: string;
55
+ TentacleVersionDetails?: TentacleDetailsResource;
56
+ }
57
+ export interface MachineResource extends NamedResource, SpaceScopedResource, ResourceWithSlug {
58
+ IsDisabled: boolean;
59
+ MachinePolicyId: string;
60
+ HealthStatus: MachineModelHealthStatus;
61
+ HasLatestCalamari: boolean;
62
+ StatusSummary: string;
63
+ IsInProcess: boolean;
64
+ Endpoint: EndpointResource;
65
+ ShellName: string;
66
+ }
67
+ export interface DeploymentTargetResource extends MachineResource {
68
+ EnvironmentIds: string[];
69
+ Roles: string[];
70
+ TenantedDeploymentParticipation: TenantedDeploymentMode;
71
+ TenantIds: string[];
72
+ TenantTags: string[];
73
+ }
74
+ //# sourceMappingURL=deploymentTargetTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploymentTargetTypes.d.ts","sourceRoot":"","sources":["../../src/types/deploymentTargetTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAExG,eAAO,MAAM,8BAA8B;;;;;;CAMjC,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,OAAO,8BAA8B,CAAC,CAAC;AAE5H,MAAM,WAAW,gCAAgC;IAC7C,EAAE,EAAE,wBAAwB,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;CAY3B,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE1G,oBAAY,sBAAsB;IAC9B,OAAO,YAAY;IACnB,SAAS,cAAc;CAC1B;AAED,MAAM,WAAW,0BAA0B;IACvC,EAAE,EAAE,kBAAkB,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,4BAA4B;;;;CAI/B,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC;AAEtH,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB,CAAC,EAAE,uBAAuB,CAAC;CACpD;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa,EAAE,mBAAmB,EAAE,gBAAgB;IACzF,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,wBAAwB,CAAC;IACvC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAyB,SAAQ,eAAe;IAC7D,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,+BAA+B,EAAE,sBAAsB,CAAC;IACxD,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB"}
@@ -0,0 +1,32 @@
1
+ import {} from "./baseResource.js";
2
+ export const MachineModelHealthStatusValues = {
3
+ Healthy: "Healthy",
4
+ Unavailable: "Unavailable",
5
+ Unknown: "Unknown",
6
+ HasWarnings: "HasWarnings",
7
+ Unhealthy: "Unhealthy",
8
+ };
9
+ export const CommunicationStyleValues = {
10
+ None: "None",
11
+ TentaclePassive: "TentaclePassive",
12
+ TentacleActive: "TentacleActive",
13
+ Ssh: "Ssh",
14
+ OfflineDrop: "OfflineDrop",
15
+ AzureWebApp: "AzureWebApp",
16
+ AzureCloudService: "AzureCloudService",
17
+ AzureServiceFabricCluster: "AzureServiceFabricCluster",
18
+ Kubernetes: "Kubernetes",
19
+ KubernetesTentacle: "KubernetesTentacle",
20
+ StepPackage: "StepPackage",
21
+ };
22
+ export var AgentCommunicationMode;
23
+ (function (AgentCommunicationMode) {
24
+ AgentCommunicationMode["Polling"] = "Polling";
25
+ AgentCommunicationMode["Listening"] = "Listening";
26
+ })(AgentCommunicationMode || (AgentCommunicationMode = {}));
27
+ export const TenantedDeploymentModeValues = {
28
+ Untenanted: "Untenanted",
29
+ TenantedOrUntenanted: "TenantedOrUntenanted",
30
+ Tenanted: "Tenanted",
31
+ };
32
+ //# sourceMappingURL=deploymentTargetTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploymentTargetTypes.js","sourceRoot":"","sources":["../../src/types/deploymentTargetTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuE,MAAM,mBAAmB,CAAC;AAExG,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC1C,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;CAChB,CAAC;AASX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,IAAI,EAAE,MAAM;IACZ,eAAe,EAAE,iBAAiB;IAClC,cAAc,EAAE,gBAAgB;IAChC,GAAG,EAAE,KAAK;IACV,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,yBAAyB,EAAE,2BAA2B;IACtD,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,WAAW,EAAE,aAAa;CACpB,CAAC;AAIX,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,6CAAmB,CAAA;IACnB,iDAAuB,CAAA;AAC3B,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC;AAeD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IACxC,UAAU,EAAE,YAAY;IACxB,oBAAoB,EAAE,sBAAsB;IAC5C,QAAQ,EAAE,UAAU;CACd,CAAC"}
@@ -0,0 +1,11 @@
1
+ export interface GitBranch {
2
+ IsProtected: boolean;
3
+ Name: string;
4
+ CanonicalName: string;
5
+ }
6
+ export interface GetProjectBranchesOptions {
7
+ searchByName?: string;
8
+ skip?: number;
9
+ take?: number;
10
+ }
11
+ //# sourceMappingURL=gitBranchTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitBranchTypes.d.ts","sourceRoot":"","sources":["../../src/types/gitBranchTypes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=gitBranchTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitBranchTypes.js","sourceRoot":"","sources":["../../src/types/gitBranchTypes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const projectsDescription = "Projects let you manage software applications and services, each with their own deployment process, lifecycles, and variables. Projects are where you define what you are deploying and how it should be deployed.";
2
+ //# sourceMappingURL=projectTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectTypes.d.ts","sourceRoot":"","sources":["../../src/types/projectTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,uNAAuN,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const projectsDescription = "Projects let you manage software applications and services, each with their own deployment process, lifecycles, and variables. Projects are where you define what you are deploying and how it should be deployed.";
2
+ //# sourceMappingURL=projectTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectTypes.js","sourceRoot":"","sources":["../../src/types/projectTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,oNAAoN,CAAC"}
@@ -0,0 +1,9 @@
1
+ export interface ResourceCollection<TResource> {
2
+ ItemType: string;
3
+ TotalResults: number;
4
+ ItemsPerPage: number;
5
+ NumberOfPages: number;
6
+ LastPageNumber: number;
7
+ Items: TResource[];
8
+ }
9
+ //# sourceMappingURL=resourceCollection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceCollection.d.ts","sourceRoot":"","sources":["../../src/types/resourceCollection.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB,CAAC,SAAS;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,SAAS,EAAE,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=resourceCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceCollection.js","sourceRoot":"","sources":["../../src/types/resourceCollection.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const spacesDescription = "Spaces is the main organizational unit in Octopus Deploy, Spaces keep the different projects, infrastructure and tenants completely separate. Spaces typically represent team or project boundary, but not customer boundary (use tenants for those).";
2
+ //# sourceMappingURL=spaceTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaceTypes.d.ts","sourceRoot":"","sources":["../../src/types/spaceTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,0PAA0P,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const spacesDescription = "Spaces is the main organizational unit in Octopus Deploy, Spaces keep the different projects, infrastructure and tenants completely separate. Spaces typically represent team or project boundary, but not customer boundary (use tenants for those).";
2
+ //# sourceMappingURL=spaceTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaceTypes.js","sourceRoot":"","sources":["../../src/types/spaceTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,uPAAuP,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const tasksDescription = "Tasks represent background operations in Octopus Deploy, such as deployments, health checks, and system maintenance. Each task has a unique ID and can be monitored for status and progress.";
2
+ //# sourceMappingURL=taskTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taskTypes.d.ts","sourceRoot":"","sources":["../../src/types/taskTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,iMAAiM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const tasksDescription = "Tasks represent background operations in Octopus Deploy, such as deployments, health checks, and system maintenance. Each task has a unique ID and can be monitored for status and progress.";
2
+ //# sourceMappingURL=taskTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taskTypes.js","sourceRoot":"","sources":["../../src/types/taskTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,8LAA8L,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const tenantsDescription = "Tenants represent customers or clients in Octopus Deploy, allowing you to manage deployments and configurations specific to each tenant. Tenants can be grouped into tenant tags for easier management and deployment targeting. Tenants can also represent geographical locations, organizational units, or any other logical grouping.";
2
+ //# sourceMappingURL=tenantsTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenantsTypes.d.ts","sourceRoot":"","sources":["../../src/types/tenantsTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,6UAA6U,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const tenantsDescription = "Tenants represent customers or clients in Octopus Deploy, allowing you to manage deployments and configurations specific to each tenant. Tenants can be grouped into tenant tags for easier management and deployment targeting. Tenants can also represent geographical locations, organizational units, or any other logical grouping.";
2
+ //# sourceMappingURL=tenantsTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenantsTypes.js","sourceRoot":"","sources":["../../src/types/tenantsTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,0UAA0U,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { type McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export type Toolset = "core" | "projects" | "deployments" | "releases" | "tasks" | "tenants" | "kubernetes" | "machines" | "context";
3
+ export interface ToolConfig {
4
+ toolset: Toolset;
5
+ readOnly: boolean;
6
+ }
7
+ export interface ToolsetConfig {
8
+ enabledToolsets?: Toolset[] | "all";
9
+ readOnlyMode?: boolean;
10
+ }
11
+ export interface ToolRegistration {
12
+ toolName: string;
13
+ config: ToolConfig;
14
+ registerFn: (server: McpServer) => void;
15
+ }
16
+ export declare const TOOL_REGISTRY: Map<string, ToolRegistration>;
17
+ export declare function registerToolDefinition(registration: ToolRegistration): void;
18
+ export declare const DEFAULT_TOOLSETS: Toolset[];
19
+ //# sourceMappingURL=toolConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolConfig.d.ts","sourceRoot":"","sources":["../../src/types/toolConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,MAAM,MAAM,OAAO,GACf,MAAM,GACN,UAAU,GACV,aAAa,GACb,UAAU,GACV,OAAO,GACP,SAAS,GACT,YAAY,GACZ,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAa,CAAC;AAEtE,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,gBAAgB,QAEpE;AAED,eAAO,MAAM,gBAAgB,EAAE,OAAO,EAUrC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import {} from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export const TOOL_REGISTRY = new Map();
3
+ export function registerToolDefinition(registration) {
4
+ TOOL_REGISTRY.set(registration.toolName, registration);
5
+ }
6
+ export const DEFAULT_TOOLSETS = [
7
+ "core",
8
+ "projects",
9
+ "deployments",
10
+ "releases",
11
+ "tasks",
12
+ "tenants",
13
+ "kubernetes",
14
+ "machines",
15
+ "context"
16
+ ];
17
+ //# sourceMappingURL=toolConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolConfig.js","sourceRoot":"","sources":["../../src/types/toolConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,MAAM,yCAAyC,CAAC;AA6BzE,MAAM,CAAC,MAAM,aAAa,GAAkC,IAAI,GAAG,EAAE,CAAC;AAEtE,MAAM,UAAU,sBAAsB,CAAC,YAA8B;IACnE,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAc;IACzC,MAAM;IACN,UAAU;IACV,aAAa;IACb,UAAU;IACV,OAAO;IACP,SAAS;IACT,YAAY;IACZ,UAAU;IACV,SAAS;CACV,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Global storage for MCP client information obtained during initialization
3
+ */
4
+ interface ClientInfo {
5
+ name?: string;
6
+ version?: string;
7
+ }
8
+ /**
9
+ * Stores the client name and version globally for use throughout the application
10
+ * @param name Client name from initialization
11
+ * @param version Client version from initialization
12
+ */
13
+ export declare function setClientInfo(name: string | undefined, version: string | undefined): void;
14
+ /**
15
+ * Gets the complete client information
16
+ * @returns Object containing client name and version
17
+ */
18
+ export declare function getClientInfo(): ClientInfo;
19
+ export {};
20
+ //# sourceMappingURL=clientInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientInfo.d.ts","sourceRoot":"","sources":["../../src/utils/clientInfo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,UAAU,UAAU;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAKzF;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAE1C"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Global storage for MCP client information obtained during initialization
3
+ */
4
+ let globalClientInfo = {};
5
+ /**
6
+ * Stores the client name and version globally for use throughout the application
7
+ * @param name Client name from initialization
8
+ * @param version Client version from initialization
9
+ */
10
+ export function setClientInfo(name, version) {
11
+ globalClientInfo = {
12
+ name,
13
+ version
14
+ };
15
+ }
16
+ /**
17
+ * Gets the complete client information
18
+ * @returns Object containing client name and version
19
+ */
20
+ export function getClientInfo() {
21
+ return { ...globalClientInfo };
22
+ }
23
+ //# sourceMappingURL=clientInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientInfo.js","sourceRoot":"","sources":["../../src/utils/clientInfo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,IAAI,gBAAgB,GAAe,EAAE,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,IAAwB,EAAE,OAA2B;IACjF,gBAAgB,GAAG;QACjB,IAAI;QACJ,OAAO;KACR,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,GAAG,gBAAgB,EAAE,CAAC;AACjC,CAAC"}
@@ -0,0 +1,45 @@
1
+ export declare enum LogLevel {
2
+ INFO = 1,
3
+ ERROR = 2
4
+ }
5
+ /**
6
+ * Set custom log file path
7
+ * @param filePath Path to the log file (can be full path or just filename)
8
+ */
9
+ declare function setLogFilePath(filePath: string): void;
10
+ /**
11
+ * Set minimum log level
12
+ * @param level Minimum log level to output
13
+ */
14
+ declare function setLogLevel(level: LogLevel): void;
15
+ /**
16
+ * Set quiet mode (disables file logging, only console.error)
17
+ * @param quiet Whether to enable quiet mode
18
+ */
19
+ declare function setQuietMode(quiet: boolean): void;
20
+ /**
21
+ * Parse string log level to enum
22
+ * @param levelStr String representation of log level
23
+ * @returns LogLevel enum value
24
+ */
25
+ declare function parseLogLevel(levelStr: string): LogLevel;
26
+ /**
27
+ * Log an info message to file only
28
+ * @param message Message to log
29
+ */
30
+ declare function info(message: string): void;
31
+ /**
32
+ * Log an error message to both file and console.error
33
+ * @param message Error message to log
34
+ */
35
+ declare function error(message: string): void;
36
+ export declare const logger: {
37
+ setLogFilePath: typeof setLogFilePath;
38
+ setLogLevel: typeof setLogLevel;
39
+ setQuietMode: typeof setQuietMode;
40
+ parseLogLevel: typeof parseLogLevel;
41
+ info: typeof info;
42
+ error: typeof error;
43
+ };
44
+ export {};
45
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAGA,oBAAY,QAAQ;IAClB,IAAI,IAAI;IACR,KAAK,IAAI;CACV;AAiBD;;;GAGG;AACH,iBAAS,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAO9C;AAED;;;GAGG;AACH,iBAAS,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAE1C;AAED;;;GAGG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAE1C;AAED;;;;GAIG;AACH,iBAAS,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAUjD;AAkDD;;;GAGG;AACH,iBAAS,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAGnC;AAED;;;GAGG;AACH,iBAAS,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIpC;AAED,eAAO,MAAM,MAAM;;;;;;;CAOlB,CAAC"}
@@ -0,0 +1,130 @@
1
+ import * as fs from "fs";
2
+ import * as path from "path";
3
+ export var LogLevel;
4
+ (function (LogLevel) {
5
+ LogLevel[LogLevel["INFO"] = 1] = "INFO";
6
+ LogLevel[LogLevel["ERROR"] = 2] = "ERROR";
7
+ })(LogLevel || (LogLevel = {}));
8
+ /**
9
+ * Default logger configuration
10
+ */
11
+ let config = {
12
+ logFilePath: "mcp-server-log.txt",
13
+ minLevel: LogLevel.INFO,
14
+ quietMode: false
15
+ };
16
+ /**
17
+ * Set custom log file path
18
+ * @param filePath Path to the log file (can be full path or just filename)
19
+ */
20
+ function setLogFilePath(filePath) {
21
+ // If it's just a filename (no path separators), use current directory
22
+ if (!filePath.includes('/') && !filePath.includes('\\')) {
23
+ config.logFilePath = path.join(process.cwd(), filePath);
24
+ }
25
+ else {
26
+ config.logFilePath = filePath;
27
+ }
28
+ }
29
+ /**
30
+ * Set minimum log level
31
+ * @param level Minimum log level to output
32
+ */
33
+ function setLogLevel(level) {
34
+ config.minLevel = level;
35
+ }
36
+ /**
37
+ * Set quiet mode (disables file logging, only console.error)
38
+ * @param quiet Whether to enable quiet mode
39
+ */
40
+ function setQuietMode(quiet) {
41
+ config.quietMode = quiet;
42
+ }
43
+ /**
44
+ * Parse string log level to enum
45
+ * @param levelStr String representation of log level
46
+ * @returns LogLevel enum value
47
+ */
48
+ function parseLogLevel(levelStr) {
49
+ const upperLevel = levelStr.toUpperCase();
50
+ switch (upperLevel) {
51
+ case 'INFO':
52
+ return LogLevel.INFO;
53
+ case 'ERROR':
54
+ return LogLevel.ERROR;
55
+ default:
56
+ return LogLevel.INFO;
57
+ }
58
+ }
59
+ /**
60
+ * Get string representation of log level
61
+ * @param level LogLevel enum value
62
+ * @returns String representation
63
+ */
64
+ function logLevelToString(level) {
65
+ switch (level) {
66
+ case LogLevel.INFO:
67
+ return 'INFO';
68
+ case LogLevel.ERROR:
69
+ return 'ERROR';
70
+ default:
71
+ return 'INFO';
72
+ }
73
+ }
74
+ /**
75
+ * Check if a log level should be output based on minimum level
76
+ * @param level Level to check
77
+ * @returns True if should log
78
+ */
79
+ function shouldLog(level) {
80
+ return level >= config.minLevel;
81
+ }
82
+ /**
83
+ * Write a log entry to file with timestamp
84
+ * @param level Log level
85
+ * @param message Message to log
86
+ */
87
+ function writeToFile(level, message) {
88
+ if (config.quietMode) {
89
+ return; // Don't write to file in quiet mode
90
+ }
91
+ const timestamp = new Date().toISOString();
92
+ const levelStr = logLevelToString(level);
93
+ const logEntry = `[${timestamp}] [${levelStr}] ${message}\n`;
94
+ try {
95
+ fs.appendFileSync(config.logFilePath, logEntry);
96
+ }
97
+ catch (error) {
98
+ // If we can't write to file, at least try to output to console
99
+ console.error(`Failed to write to log file: ${error instanceof Error ? error.message : String(error)}`);
100
+ console.error(`Original log message: ${logEntry.trim()}`);
101
+ }
102
+ }
103
+ /**
104
+ * Log an info message to file only
105
+ * @param message Message to log
106
+ */
107
+ function info(message) {
108
+ if (!shouldLog(LogLevel.INFO))
109
+ return;
110
+ writeToFile(LogLevel.INFO, message);
111
+ }
112
+ /**
113
+ * Log an error message to both file and console.error
114
+ * @param message Error message to log
115
+ */
116
+ function error(message) {
117
+ if (!shouldLog(LogLevel.ERROR))
118
+ return;
119
+ writeToFile(LogLevel.ERROR, message);
120
+ console.error(message);
121
+ }
122
+ export const logger = {
123
+ setLogFilePath,
124
+ setLogLevel,
125
+ setQuietMode,
126
+ parseLogLevel,
127
+ info,
128
+ error
129
+ };
130
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ import { type ToolsetConfig, type Toolset } from "../types/toolConfig.js";
2
+ export declare function parseToolsets(toolsetsArg: string | undefined): Toolset[] | "all";
3
+ export declare function createToolsetConfig(toolsetsArg: string | undefined, readOnlyArg: boolean | undefined): ToolsetConfig;
4
+ //# sourceMappingURL=parseConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseConfig.d.ts","sourceRoot":"","sources":["../../src/utils/parseConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,OAAO,EAAoB,MAAM,wBAAwB,CAAC;AAE5F,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,KAAK,CAgBhF;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,WAAW,EAAE,OAAO,GAAG,SAAS,GAC/B,aAAa,CAKf"}
@@ -0,0 +1,21 @@
1
+ import { DEFAULT_TOOLSETS } from "../types/toolConfig.js";
2
+ export function parseToolsets(toolsetsArg) {
3
+ if (!toolsetsArg || toolsetsArg === "all") {
4
+ return "all";
5
+ }
6
+ const toolsets = toolsetsArg.split(",").map(t => t.trim());
7
+ // Validate toolsets
8
+ const validToolsets = DEFAULT_TOOLSETS;
9
+ const invalidToolsets = toolsets.filter(t => !validToolsets.includes(t));
10
+ if (invalidToolsets.length > 0) {
11
+ throw new Error(`Invalid toolsets: ${invalidToolsets.join(", ")}. Valid toolsets are: ${validToolsets.join(", ")}`);
12
+ }
13
+ return toolsets;
14
+ }
15
+ export function createToolsetConfig(toolsetsArg, readOnlyArg) {
16
+ return {
17
+ enabledToolsets: parseToolsets(toolsetsArg),
18
+ readOnlyMode: readOnlyArg ?? true // Default to read-only mode
19
+ };
20
+ }
21
+ //# sourceMappingURL=parseConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseConfig.js","sourceRoot":"","sources":["../../src/utils/parseConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE5F,MAAM,UAAU,aAAa,CAAC,WAA+B;IAC3D,IAAI,CAAC,WAAW,IAAI,WAAW,KAAK,KAAK,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAc,CAAC;IAExE,oBAAoB;IACpB,MAAM,aAAa,GAAG,gBAAgB,CAAC;IACvC,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzE,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,qBAAqB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,WAA+B,EAC/B,WAAgC;IAEhC,OAAO;QACL,eAAe,EAAE,aAAa,CAAC,WAAW,CAAC;QAC3C,YAAY,EAAE,WAAW,IAAI,IAAI,CAAC,4BAA4B;KAC/D,CAAC;AACJ,CAAC"}