@andrebuzeli/git-mcp 3.3.0 → 4.0.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 (139) hide show
  1. package/README.md +63 -283
  2. package/dist/providers/base-provider.d.ts.map +1 -1
  3. package/dist/providers/base-provider.js +3 -26
  4. package/dist/providers/base-provider.js.map +1 -1
  5. package/dist/providers/gitea-provider.d.ts +0 -2
  6. package/dist/providers/gitea-provider.d.ts.map +1 -1
  7. package/dist/providers/gitea-provider.js +0 -62
  8. package/dist/providers/gitea-provider.js.map +1 -1
  9. package/dist/providers/github-provider.d.ts +0 -2
  10. package/dist/providers/github-provider.d.ts.map +1 -1
  11. package/dist/providers/github-provider.js +48 -105
  12. package/dist/providers/github-provider.js.map +1 -1
  13. package/dist/server.d.ts +0 -27
  14. package/dist/server.d.ts.map +1 -1
  15. package/dist/server.js +130 -1215
  16. package/dist/server.js.map +1 -1
  17. package/dist/tools/{git-commits.d.ts → git-analytics.d.ts} +4 -10
  18. package/dist/tools/git-analytics.d.ts.map +1 -0
  19. package/dist/tools/git-analytics.js +18 -0
  20. package/dist/tools/git-analytics.js.map +1 -0
  21. package/dist/tools/git-archive.d.ts +3 -0
  22. package/dist/tools/git-archive.d.ts.map +1 -1
  23. package/dist/tools/git-archive.js +2 -2
  24. package/dist/tools/git-archive.js.map +1 -1
  25. package/dist/tools/git-backup.d.ts +216 -0
  26. package/dist/tools/git-backup.d.ts.map +1 -0
  27. package/dist/tools/git-backup.js +813 -0
  28. package/dist/tools/git-backup.js.map +1 -0
  29. package/dist/tools/git-branches.d.ts +159 -8
  30. package/dist/tools/git-branches.d.ts.map +1 -1
  31. package/dist/tools/git-branches.js +554 -2
  32. package/dist/tools/git-branches.js.map +1 -1
  33. package/dist/tools/git-config.d.ts +3 -0
  34. package/dist/tools/git-config.d.ts.map +1 -1
  35. package/dist/tools/git-config.js +2 -2
  36. package/dist/tools/git-config.js.map +1 -1
  37. package/dist/tools/git-files.d.ts +130 -8
  38. package/dist/tools/git-files.d.ts.map +1 -1
  39. package/dist/tools/git-files.js +426 -2
  40. package/dist/tools/git-files.js.map +1 -1
  41. package/dist/tools/git-issues.d.ts +137 -471
  42. package/dist/tools/git-issues.d.ts.map +1 -1
  43. package/dist/tools/git-issues.js +605 -613
  44. package/dist/tools/git-issues.js.map +1 -1
  45. package/dist/tools/git-monitor.d.ts +161 -0
  46. package/dist/tools/git-monitor.d.ts.map +1 -0
  47. package/dist/tools/git-monitor.js +746 -0
  48. package/dist/tools/git-monitor.js.map +1 -0
  49. package/dist/tools/git-packages.d.ts +5 -2
  50. package/dist/tools/git-packages.d.ts.map +1 -1
  51. package/dist/tools/git-packages.js +3 -3
  52. package/dist/tools/git-packages.js.map +1 -1
  53. package/dist/tools/git-pulls.d.ts +38 -646
  54. package/dist/tools/git-pulls.d.ts.map +1 -1
  55. package/dist/tools/git-pulls.js +64 -716
  56. package/dist/tools/git-pulls.js.map +1 -1
  57. package/dist/tools/git-release.d.ts +187 -0
  58. package/dist/tools/git-release.d.ts.map +1 -0
  59. package/dist/tools/git-release.js +619 -0
  60. package/dist/tools/git-release.js.map +1 -0
  61. package/dist/tools/git-remote.d.ts +112 -77
  62. package/dist/tools/git-remote.d.ts.map +1 -1
  63. package/dist/tools/git-remote.js +481 -183
  64. package/dist/tools/git-remote.js.map +1 -1
  65. package/dist/tools/git-repos.d.ts +19 -0
  66. package/dist/tools/git-repos.d.ts.map +1 -0
  67. package/dist/tools/git-repos.js +18 -0
  68. package/dist/tools/git-repos.js.map +1 -0
  69. package/dist/tools/git-reset.d.ts +121 -74
  70. package/dist/tools/git-reset.d.ts.map +1 -1
  71. package/dist/tools/git-reset.js +540 -159
  72. package/dist/tools/git-reset.js.map +1 -1
  73. package/dist/tools/git-stash.d.ts +119 -78
  74. package/dist/tools/git-stash.d.ts.map +1 -1
  75. package/dist/tools/git-stash.js +560 -209
  76. package/dist/tools/git-stash.js.map +1 -1
  77. package/dist/tools/git-sync.d.ts +3 -163
  78. package/dist/tools/git-sync.d.ts.map +1 -1
  79. package/dist/tools/git-sync.js +9 -326
  80. package/dist/tools/git-sync.js.map +1 -1
  81. package/dist/tools/git-tags.d.ts +105 -331
  82. package/dist/tools/git-tags.d.ts.map +1 -1
  83. package/dist/tools/git-tags.js +545 -416
  84. package/dist/tools/git-tags.js.map +1 -1
  85. package/dist/tools/git-workflow.d.ts +127 -0
  86. package/dist/tools/git-workflow.d.ts.map +1 -0
  87. package/dist/tools/git-workflow.js +359 -0
  88. package/dist/tools/git-workflow.js.map +1 -0
  89. package/dist/utils/auto-detection.d.ts +113 -0
  90. package/dist/utils/auto-detection.d.ts.map +1 -0
  91. package/dist/utils/auto-detection.js +235 -0
  92. package/dist/utils/auto-detection.js.map +1 -0
  93. package/dist/utils/error-handler.d.ts +107 -0
  94. package/dist/utils/error-handler.d.ts.map +1 -0
  95. package/dist/utils/error-handler.js +331 -0
  96. package/dist/utils/error-handler.js.map +1 -0
  97. package/dist/utils/git-operations.d.ts.map +1 -1
  98. package/dist/utils/git-operations.js +6 -51
  99. package/dist/utils/git-operations.js.map +1 -1
  100. package/dist/utils/user-detection.d.ts +1 -13
  101. package/dist/utils/user-detection.d.ts.map +1 -1
  102. package/dist/utils/user-detection.js +1 -26
  103. package/dist/utils/user-detection.js.map +1 -1
  104. package/package.json +60 -60
  105. package/dist/client.d.ts +0 -307
  106. package/dist/client.d.ts.map +0 -1
  107. package/dist/client.js +0 -299
  108. package/dist/client.js.map +0 -1
  109. package/dist/tools/git-branch-protection.d.ts +0 -97
  110. package/dist/tools/git-branch-protection.d.ts.map +0 -1
  111. package/dist/tools/git-branch-protection.js +0 -182
  112. package/dist/tools/git-branch-protection.js.map +0 -1
  113. package/dist/tools/git-commits.d.ts.map +0 -1
  114. package/dist/tools/git-commits.js +0 -5
  115. package/dist/tools/git-commits.js.map +0 -1
  116. package/dist/tools/git-initialize.d.ts +0 -208
  117. package/dist/tools/git-initialize.d.ts.map +0 -1
  118. package/dist/tools/git-initialize.js +0 -470
  119. package/dist/tools/git-initialize.js.map +0 -1
  120. package/dist/tools/git-projects.d.ts +0 -112
  121. package/dist/tools/git-projects.d.ts.map +0 -1
  122. package/dist/tools/git-projects.js +0 -319
  123. package/dist/tools/git-projects.js.map +0 -1
  124. package/dist/tools/git-releases.d.ts +0 -486
  125. package/dist/tools/git-releases.d.ts.map +0 -1
  126. package/dist/tools/git-releases.js +0 -561
  127. package/dist/tools/git-releases.js.map +0 -1
  128. package/dist/tools/git-repositories.d.ts +0 -469
  129. package/dist/tools/git-repositories.d.ts.map +0 -1
  130. package/dist/tools/git-repositories.js +0 -637
  131. package/dist/tools/git-repositories.js.map +0 -1
  132. package/dist/tools/git-revert.d.ts +0 -147
  133. package/dist/tools/git-revert.d.ts.map +0 -1
  134. package/dist/tools/git-revert.js +0 -199
  135. package/dist/tools/git-revert.js.map +0 -1
  136. package/dist/tools/git-update-project.d.ts +0 -309
  137. package/dist/tools/git-update-project.d.ts.map +0 -1
  138. package/dist/tools/git-update-project.js +0 -878
  139. package/dist/tools/git-update-project.js.map +0 -1
@@ -1,208 +0,0 @@
1
- import { z } from 'zod';
2
- import { VcsOperations } from '../providers/index.js';
3
- /**
4
- * Tool: git-initialize
5
- *
6
- * DESCRIÇÃO:
7
- * Inicialização completa de repositório Git - 100% AUTÔNOMO
8
- *
9
- * FUNCIONALIDADES:
10
- * - Inicialização de repositório Git local
11
- * - Configuração automática de usuário Git
12
- * - Criação de repositório remoto (GitHub/Gitea)
13
- * - Configuração de remote origin
14
- * - Criação de arquivos iniciais (.gitignore, README.md)
15
- * - Primeiro commit automático
16
- * - Configuração de branch padrão
17
- * - Suporte a GitHub e Gitea
18
- * - Não depende de outras tools
19
- *
20
- * USO:
21
- * - Para inicializar projeto do zero
22
- * - Para configurar repositório Git completo
23
- * - Para setup automático de projeto
24
- * - Para migração de projeto não-Git
25
- *
26
- * RECOMENDAÇÕES:
27
- * - Use mensagens de commit descritivas
28
- * - A tool faz todo o processo automaticamente
29
- * - Funciona mesmo sem configuração Git prévia
30
- * - Cria repositório remoto se não existir
31
- */
32
- /**
33
- * Schema de validação para entrada da tool git-initialize
34
- */
35
- declare const InitializeInputSchema: z.ZodObject<{
36
- action: z.ZodEnum<["init"]>;
37
- repo: z.ZodOptional<z.ZodString>;
38
- projectPath: z.ZodString;
39
- provider: z.ZodDefault<z.ZodOptional<z.ZodEnum<["gitea", "github"]>>>;
40
- message: z.ZodDefault<z.ZodOptional<z.ZodString>>;
41
- branch: z.ZodDefault<z.ZodOptional<z.ZodString>>;
42
- createRemote: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
43
- createReadme: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
44
- createGitignore: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
45
- userName: z.ZodOptional<z.ZodString>;
46
- userEmail: z.ZodOptional<z.ZodString>;
47
- description: z.ZodOptional<z.ZodString>;
48
- private: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
49
- }, "strip", z.ZodTypeAny, {
50
- provider: "gitea" | "github";
51
- message: string;
52
- private: boolean;
53
- action: "init";
54
- branch: string;
55
- projectPath: string;
56
- createRemote: boolean;
57
- createReadme: boolean;
58
- createGitignore: boolean;
59
- description?: string | undefined;
60
- repo?: string | undefined;
61
- userName?: string | undefined;
62
- userEmail?: string | undefined;
63
- }, {
64
- action: "init";
65
- projectPath: string;
66
- provider?: "gitea" | "github" | undefined;
67
- message?: string | undefined;
68
- description?: string | undefined;
69
- private?: boolean | undefined;
70
- repo?: string | undefined;
71
- branch?: string | undefined;
72
- createRemote?: boolean | undefined;
73
- createReadme?: boolean | undefined;
74
- createGitignore?: boolean | undefined;
75
- userName?: string | undefined;
76
- userEmail?: string | undefined;
77
- }>;
78
- export type InitializeInput = z.infer<typeof InitializeInputSchema>;
79
- /**
80
- * Schema de saída padronizado
81
- */
82
- declare const InitializeResultSchema: z.ZodObject<{
83
- success: z.ZodBoolean;
84
- action: z.ZodString;
85
- message: z.ZodString;
86
- data: z.ZodOptional<z.ZodAny>;
87
- error: z.ZodOptional<z.ZodString>;
88
- }, "strip", z.ZodTypeAny, {
89
- message: string;
90
- action: string;
91
- success: boolean;
92
- error?: string | undefined;
93
- data?: any;
94
- }, {
95
- message: string;
96
- action: string;
97
- success: boolean;
98
- error?: string | undefined;
99
- data?: any;
100
- }>;
101
- export type InitializeResult = z.infer<typeof InitializeResultSchema>;
102
- /**
103
- * Tool: git-initialize
104
- *
105
- * DESCRIÇÃO:
106
- * Inicialização completa de repositório Git - 100% AUTÔNOMO
107
- *
108
- * ACTIONS DISPONÍVEIS:
109
- *
110
- * 1. init - Inicialização completa de repositório
111
- * Parâmetros:
112
- * - projectPath (obrigatório): Caminho do projeto local
113
- * - repo (opcional): Nome do repositório remoto
114
- * - provider (opcional): Provider (gitea/github, padrão: gitea)
115
- * - message (opcional): Mensagem do commit inicial (padrão: "Initial commit")
116
- * - branch (opcional): Branch padrão (padrão: main)
117
- * - createRemote (opcional): Criar repositório remoto (padrão: false)
118
- * - createReadme (opcional): Criar README.md (padrão: true)
119
- * - createGitignore (opcional): Criar .gitignore (padrão: true)
120
- * - userName (opcional): Nome do usuário Git
121
- * - userEmail (opcional): Email do usuário Git
122
- * - description (opcional): Descrição do repositório
123
- * - private (opcional): Repositório privado (padrão: false)
124
- *
125
- * RECOMENDAÇÕES DE USO:
126
- * - Use para inicializar projetos do zero
127
- * - Configure usuário Git automaticamente
128
- * - Crie repositórios remotos quando necessário
129
- * - Personalize arquivos iniciais conforme necessário
130
- */
131
- export declare const initializeTool: {
132
- name: string;
133
- description: string;
134
- inputSchema: {
135
- type: string;
136
- properties: {
137
- action: {
138
- type: string;
139
- enum: string[];
140
- description: string;
141
- };
142
- repo: {
143
- type: string;
144
- description: string;
145
- };
146
- projectPath: {
147
- type: string;
148
- description: string;
149
- };
150
- provider: {
151
- type: string;
152
- description: string;
153
- };
154
- message: {
155
- type: string;
156
- description: string;
157
- };
158
- branch: {
159
- type: string;
160
- description: string;
161
- };
162
- createRemote: {
163
- type: string;
164
- description: string;
165
- };
166
- createReadme: {
167
- type: string;
168
- description: string;
169
- };
170
- createGitignore: {
171
- type: string;
172
- description: string;
173
- };
174
- userName: {
175
- type: string;
176
- description: string;
177
- };
178
- userEmail: {
179
- type: string;
180
- description: string;
181
- };
182
- description: {
183
- type: string;
184
- description: string;
185
- };
186
- private: {
187
- type: string;
188
- description: string;
189
- };
190
- };
191
- required: string[];
192
- };
193
- /**
194
- * Handler principal da tool git-initialize
195
- */
196
- handler(input: InitializeInput): Promise<InitializeResult>;
197
- /**
198
- * Inicializa repositório Git completo - 100% AUTÔNOMO
199
- * Processo completo: init -> config -> files -> commit -> remote -> push
200
- */
201
- initializeRepository(params: InitializeInput, provider: VcsOperations): Promise<InitializeResult>;
202
- /**
203
- * Cria arquivos iniciais do projeto
204
- */
205
- createInitialFiles(params: InitializeInput): Promise<number>;
206
- };
207
- export {};
208
- //# sourceMappingURL=git-initialize.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-initialize.d.ts","sourceRoot":"","sources":["../../src/tools/git-initialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAyB,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;GAEG;AACH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAczB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;GAEG;AACH,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAM1B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2BzB;;OAEG;mBACkB,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAiChE;;;OAGG;iCACgC,eAAe,YAAY,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA4IvG;;OAEG;+BAC8B,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;CAwJnE,CAAC"}
@@ -1,470 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.initializeTool = void 0;
37
- const zod_1 = require("zod");
38
- const index_js_1 = require("../providers/index.js");
39
- const user_detection_js_1 = require("../utils/user-detection.js");
40
- const git_operations_js_1 = require("../utils/git-operations.js");
41
- const fs = __importStar(require("fs/promises"));
42
- const path = __importStar(require("path"));
43
- /**
44
- * Tool: git-initialize
45
- *
46
- * DESCRIÇÃO:
47
- * Inicialização completa de repositório Git - 100% AUTÔNOMO
48
- *
49
- * FUNCIONALIDADES:
50
- * - Inicialização de repositório Git local
51
- * - Configuração automática de usuário Git
52
- * - Criação de repositório remoto (GitHub/Gitea)
53
- * - Configuração de remote origin
54
- * - Criação de arquivos iniciais (.gitignore, README.md)
55
- * - Primeiro commit automático
56
- * - Configuração de branch padrão
57
- * - Suporte a GitHub e Gitea
58
- * - Não depende de outras tools
59
- *
60
- * USO:
61
- * - Para inicializar projeto do zero
62
- * - Para configurar repositório Git completo
63
- * - Para setup automático de projeto
64
- * - Para migração de projeto não-Git
65
- *
66
- * RECOMENDAÇÕES:
67
- * - Use mensagens de commit descritivas
68
- * - A tool faz todo o processo automaticamente
69
- * - Funciona mesmo sem configuração Git prévia
70
- * - Cria repositório remoto se não existir
71
- */
72
- /**
73
- * Schema de validação para entrada da tool git-initialize
74
- */
75
- const InitializeInputSchema = zod_1.z.object({
76
- action: zod_1.z.enum(['init']),
77
- repo: zod_1.z.string().optional(),
78
- projectPath: zod_1.z.string().describe('Local project path for git operations'),
79
- provider: zod_1.z.enum(['gitea', 'github']).optional().default('gitea'),
80
- message: zod_1.z.string().optional().default('Initial commit'),
81
- branch: zod_1.z.string().optional().default('main'),
82
- createRemote: zod_1.z.boolean().optional().default(false),
83
- createReadme: zod_1.z.boolean().optional().default(true),
84
- createGitignore: zod_1.z.boolean().optional().default(true),
85
- userName: zod_1.z.string().optional(),
86
- userEmail: zod_1.z.string().optional(),
87
- description: zod_1.z.string().optional(),
88
- private: zod_1.z.boolean().optional().default(false),
89
- });
90
- /**
91
- * Schema de saída padronizado
92
- */
93
- const InitializeResultSchema = zod_1.z.object({
94
- success: zod_1.z.boolean(),
95
- action: zod_1.z.string(),
96
- message: zod_1.z.string(),
97
- data: zod_1.z.any().optional(),
98
- error: zod_1.z.string().optional()
99
- });
100
- /**
101
- * Tool: git-initialize
102
- *
103
- * DESCRIÇÃO:
104
- * Inicialização completa de repositório Git - 100% AUTÔNOMO
105
- *
106
- * ACTIONS DISPONÍVEIS:
107
- *
108
- * 1. init - Inicialização completa de repositório
109
- * Parâmetros:
110
- * - projectPath (obrigatório): Caminho do projeto local
111
- * - repo (opcional): Nome do repositório remoto
112
- * - provider (opcional): Provider (gitea/github, padrão: gitea)
113
- * - message (opcional): Mensagem do commit inicial (padrão: "Initial commit")
114
- * - branch (opcional): Branch padrão (padrão: main)
115
- * - createRemote (opcional): Criar repositório remoto (padrão: false)
116
- * - createReadme (opcional): Criar README.md (padrão: true)
117
- * - createGitignore (opcional): Criar .gitignore (padrão: true)
118
- * - userName (opcional): Nome do usuário Git
119
- * - userEmail (opcional): Email do usuário Git
120
- * - description (opcional): Descrição do repositório
121
- * - private (opcional): Repositório privado (padrão: false)
122
- *
123
- * RECOMENDAÇÕES DE USO:
124
- * - Use para inicializar projetos do zero
125
- * - Configure usuário Git automaticamente
126
- * - Crie repositórios remotos quando necessário
127
- * - Personalize arquivos iniciais conforme necessário
128
- */
129
- exports.initializeTool = {
130
- name: 'git-initialize',
131
- description: 'tool: Inicialização completa de repositório Git - 100% AUTÔNOMO\n──────────────\naction init: inicializa repositório Git com configuração completa\naction init requires: projectPath, repo, provider, message, branch, createRemote, createReadme, createGitignore, userName, userEmail, description, private',
132
- inputSchema: {
133
- type: 'object',
134
- properties: {
135
- action: {
136
- type: 'string',
137
- enum: ['init'],
138
- description: 'Action to perform on git initialization'
139
- },
140
- repo: { type: 'string', description: 'Repository name (optional)' },
141
- projectPath: { type: 'string', description: 'Local project path for git operations' },
142
- provider: { type: 'string', description: 'Provider to use (gitea, github, default: gitea)' },
143
- message: { type: 'string', description: 'Initial commit message (default: "Initial commit")' },
144
- branch: { type: 'string', description: 'Default branch (default: main)' },
145
- createRemote: { type: 'boolean', description: 'Create remote repository (default: false)' },
146
- createReadme: { type: 'boolean', description: 'Create README.md (default: true)' },
147
- createGitignore: { type: 'boolean', description: 'Create .gitignore (default: true)' },
148
- userName: { type: 'string', description: 'Git user name (optional)' },
149
- userEmail: { type: 'string', description: 'Git user email (optional)' },
150
- description: { type: 'string', description: 'Repository description (optional)' },
151
- private: { type: 'boolean', description: 'Private repository (default: false)' }
152
- },
153
- required: ['action', 'projectPath']
154
- },
155
- /**
156
- * Handler principal da tool git-initialize
157
- */
158
- async handler(input) {
159
- try {
160
- const validatedInput = InitializeInputSchema.parse(input);
161
- // Aplicar auto-detecção apenas para owner dentro do provider especificado
162
- const processedInput = await (0, user_detection_js_1.applyAutoUserDetection)(validatedInput, validatedInput.provider);
163
- // Usar o provider especificado pelo usuário (obrigatório)
164
- if (!processedInput.provider) {
165
- throw new Error("Parâmetro 'provider' é obrigatório e não pode ser omitido");
166
- }
167
- const provider = index_js_1.globalProviderFactory.getProvider(processedInput.provider);
168
- if (!provider) {
169
- throw new Error(`Provider '${processedInput.provider}' não encontrado`);
170
- }
171
- switch (processedInput.action) {
172
- case 'init':
173
- return await exports.initializeTool.initializeRepository(processedInput, provider);
174
- default:
175
- throw new Error(`Ação não suportada: ${processedInput.action}`);
176
- }
177
- }
178
- catch (error) {
179
- return {
180
- success: false,
181
- action: input.action,
182
- message: 'Erro na operação de inicialização Git',
183
- error: error instanceof Error ? error.message : String(error)
184
- };
185
- }
186
- },
187
- /**
188
- * Inicializa repositório Git completo - 100% AUTÔNOMO
189
- * Processo completo: init -> config -> files -> commit -> remote -> push
190
- */
191
- async initializeRepository(params, provider) {
192
- try {
193
- if (!params.projectPath) {
194
- throw new Error('projectPath é obrigatório');
195
- }
196
- // owner já foi auto-detectado em applyAutoUserDetection e está disponível via provider.getCurrentUser
197
- const currentUser = await provider.getCurrentUser();
198
- const owner = currentUser.login;
199
- const branch = params.branch || 'main';
200
- const repoName = params.repo || path.basename(params.projectPath);
201
- // Inicializar operações Git locais
202
- const gitOps = new git_operations_js_1.GitOperations(params.projectPath);
203
- // Verificar se já é um repositório Git
204
- const isGitRepo = await gitOps.isGitRepository();
205
- if (isGitRepo) {
206
- return {
207
- success: true,
208
- action: 'init',
209
- message: 'Repositório Git já existe neste diretório',
210
- data: {
211
- alreadyInitialized: true,
212
- projectPath: params.projectPath,
213
- branch: branch
214
- }
215
- };
216
- }
217
- const initResult = await gitOps.initRepository();
218
- if (!initResult.success) {
219
- throw new Error(`Falha ao inicializar repositório Git: ${initResult.error}`);
220
- }
221
- // 2. Configurar usuário Git
222
- if (params.userName) {
223
- const nameResult = await gitOps.config('user.name', params.userName, { local: true });
224
- if (!nameResult.success) {
225
- return {
226
- success: false,
227
- action: 'init',
228
- message: `Falha ao configurar user.name: ${nameResult.error}`,
229
- error: nameResult.error
230
- };
231
- }
232
- }
233
- if (params.userEmail) {
234
- const emailResult = await gitOps.config('user.email', params.userEmail, { local: true });
235
- if (!emailResult.success) {
236
- return {
237
- success: false,
238
- action: 'init',
239
- message: `Falha ao configurar user.email: ${emailResult.error}`,
240
- error: emailResult.error
241
- };
242
- }
243
- }
244
- // 3. Configurar branch padrão
245
- const branchResult = await gitOps.checkout(branch, { create: true });
246
- if (!branchResult.success) {
247
- return {
248
- success: false,
249
- action: 'init',
250
- message: `Falha ao criar branch ${branch}: ${branchResult.error}`,
251
- error: branchResult.error
252
- };
253
- }
254
- // 4. Criar arquivos iniciais
255
- const filesCreated = await this.createInitialFiles(params);
256
- // 5. Adicionar arquivos ao staging
257
- const addResult = await gitOps.addFiles(['.']);
258
- if (!addResult.success) {
259
- return {
260
- success: false,
261
- action: 'init',
262
- message: `Falha ao adicionar arquivos: ${addResult.error}`,
263
- error: addResult.error
264
- };
265
- }
266
- // 6. Fazer commit inicial
267
- const commitResult = await gitOps.commit(params.message || 'Initial commit');
268
- if (!commitResult.success) {
269
- throw new Error(`Falha ao fazer commit inicial: ${commitResult.error}`);
270
- }
271
- let remoteCreated = false;
272
- let remoteUrl = '';
273
- // 7. Criar repositório remoto se solicitado
274
- if (params.createRemote) {
275
- console.log('Criando repositório remoto...');
276
- try {
277
- await provider.createRepository(repoName, params.description || `Projeto ${repoName}`, params.private);
278
- remoteCreated = true;
279
- // Configurar remote origin
280
- remoteUrl = provider.getRepositoryUrl(owner, repoName);
281
- const addRemoteResult = await gitOps.remote('add', 'origin', remoteUrl);
282
- if (!addRemoteResult.success) {
283
- throw new Error(`Falha ao adicionar remote origin: ${addRemoteResult.error}`);
284
- }
285
- // Fazer push inicial
286
- console.log('Fazendo push inicial...');
287
- const pushResult = await gitOps.push('origin', branch, { setUpstream: true });
288
- if (!pushResult.success) {
289
- console.warn(`Aviso: Falha ao fazer push inicial: ${pushResult.error}`);
290
- }
291
- }
292
- catch (error) {
293
- console.warn(`Aviso: Falha ao criar repositório remoto: ${error instanceof Error ? error.message : String(error)}`);
294
- }
295
- }
296
- return {
297
- success: true,
298
- action: 'init',
299
- message: `Repositório Git inicializado com sucesso! ${filesCreated} arquivos criados`,
300
- data: {
301
- projectPath: params.projectPath,
302
- branch: branch,
303
- filesCreated: filesCreated,
304
- remoteCreated: remoteCreated,
305
- remoteUrl: remoteUrl,
306
- repositoryName: repoName,
307
- provider: params.provider,
308
- commitMessage: params.message || 'Initial commit'
309
- }
310
- };
311
- }
312
- catch (error) {
313
- throw new Error(`Falha ao inicializar repositório Git: ${error instanceof Error ? error.message : String(error)}`);
314
- }
315
- },
316
- /**
317
- * Cria arquivos iniciais do projeto
318
- */
319
- async createInitialFiles(params) {
320
- let filesCreated = 0;
321
- const projectPath = params.projectPath;
322
- // Criar README.md se solicitado
323
- if (params.createReadme) {
324
- const readmePath = path.join(projectPath, 'README.md');
325
- try {
326
- await fs.access(readmePath);
327
- // Arquivo já existe, não sobrescrever
328
- }
329
- catch {
330
- const readmeContent = `# ${params.repo || path.basename(projectPath)}
331
-
332
- ${params.description || 'Projeto inicializado com git-initialize'}
333
-
334
- ## Instalação
335
-
336
- \`\`\`bash
337
- # Instalar dependências
338
- npm install
339
- \`\`\`
340
-
341
- ## Uso
342
-
343
- \`\`\`bash
344
- # Executar projeto
345
- npm start
346
- \`\`\`
347
-
348
- ## Desenvolvimento
349
-
350
- \`\`\`bash
351
- # Modo desenvolvimento
352
- npm run dev
353
- \`\`\`
354
-
355
- ## Licença
356
-
357
- MIT
358
- `;
359
- await fs.writeFile(readmePath, readmeContent, 'utf-8');
360
- filesCreated++;
361
- }
362
- }
363
- // Criar .gitignore se solicitado
364
- if (params.createGitignore) {
365
- const gitignorePath = path.join(projectPath, '.gitignore');
366
- try {
367
- await fs.access(gitignorePath);
368
- // Arquivo já existe, não sobrescrever
369
- }
370
- catch {
371
- const gitignoreContent = `# Dependencies
372
- node_modules/
373
- npm-debug.log*
374
- yarn-debug.log*
375
- yarn-error.log*
376
-
377
- # Production builds
378
- dist/
379
- build/
380
- .next/
381
- out/
382
-
383
- # Environment variables
384
- .env
385
- .env.local
386
- .env.development.local
387
- .env.test.local
388
- .env.production.local
389
-
390
- # IDE
391
- .vscode/
392
- .idea/
393
- *.swp
394
- *.swo
395
-
396
- # OS
397
- .DS_Store
398
- Thumbs.db
399
-
400
- # Logs
401
- logs/
402
- *.log
403
-
404
- # Runtime data
405
- pids/
406
- *.pid
407
- *.seed
408
- *.pid.lock
409
-
410
- # Coverage directory used by tools like istanbul
411
- coverage/
412
-
413
- # Temporary folders
414
- tmp/
415
- temp/
416
-
417
- # Optional npm cache directory
418
- .npm
419
-
420
- # Optional eslint cache
421
- .eslintcache
422
-
423
- # Microbundle cache
424
- .rpt2_cache/
425
- .rts2_cache_cjs/
426
- .rts2_cache_es/
427
- .rts2_cache_umd/
428
-
429
- # Optional REPL history
430
- .node_repl_history
431
-
432
- # Output of 'npm pack'
433
- *.tgz
434
-
435
- # Yarn Integrity file
436
- .yarn-integrity
437
-
438
- # parcel-bundler cache (https://parceljs.org/)
439
- .cache
440
- .parcel-cache
441
-
442
- # next.js build output
443
- .next
444
-
445
- # nuxt.js build output
446
- .nuxt
447
-
448
- # vuepress build output
449
- .vuepress/dist
450
-
451
- # Serverless directories
452
- .serverless
453
-
454
- # FuseBox cache
455
- .fusebox/
456
-
457
- # DynamoDB Local files
458
- .dynamodb/
459
-
460
- # TernJS port file
461
- .tern-port
462
- `;
463
- await fs.writeFile(gitignorePath, gitignoreContent, 'utf-8');
464
- filesCreated++;
465
- }
466
- }
467
- return filesCreated;
468
- }
469
- };
470
- //# sourceMappingURL=git-initialize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-initialize.js","sourceRoot":"","sources":["../../src/tools/git-initialize.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAAwB;AACxB,oDAA6E;AAC7E,kEAAoE;AACpE,kEAA2D;AAC3D,gDAAkC;AAClC,2CAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;GAEG;AACH,MAAM,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;IACxB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IACzE,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IACjE,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC;IACxD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;IAC7C,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;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