epa-testeprojetoia 0.1.2 → 0.1.3

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 (100) hide show
  1. package/.idea/epa_mcp.iml +0 -0
  2. package/.idea/modules.xml +0 -0
  3. package/.idea/php.xml +0 -0
  4. package/.idea/vcs.xml +0 -0
  5. package/AGENTS.md +0 -0
  6. package/README.md +0 -0
  7. package/dist/agent/agentHelpers.js +0 -0
  8. package/dist/agent/openaiAgent.js +0 -0
  9. package/dist/agent/slidingWindow.js +0 -0
  10. package/dist/api/epaApiClient.js +0 -0
  11. package/dist/cli/index.js +0 -0
  12. package/dist/config/credentialStore.js +0 -0
  13. package/dist/config/ensureCliAuth.js +0 -0
  14. package/dist/config/loadConfig.js +0 -0
  15. package/dist/config/setup.js +0 -0
  16. package/dist/core/createReferenceTool.js +0 -0
  17. package/dist/core/createTool.js +0 -0
  18. package/dist/mocks/requestMocks.js +0 -0
  19. package/dist/server/server.js +0 -0
  20. package/dist/server/stdioServer.js +0 -0
  21. package/dist/services/request/requestFilters.js +0 -0
  22. package/dist/services/requestService.js +0 -0
  23. package/dist/services/teamService.js +0 -0
  24. package/dist/sql/createSqlConnection.js +0 -0
  25. package/dist/sql/fetchSchemaSummary.js +0 -0
  26. package/dist/sql/generateSqlFromQuestion.js +0 -0
  27. package/dist/sql/generateSqlPlan.js +0 -0
  28. package/dist/sql/getSqlAgentErrorMessage.js +0 -0
  29. package/dist/sql/loadSqlAgentConfig.js +0 -0
  30. package/dist/sql/loadSqlConfig.js +0 -0
  31. package/dist/sql/parseSqlQuestionHints.js +0 -0
  32. package/dist/sql/runSqlAgentCli.js +0 -0
  33. package/dist/sql/runSqlCli.js +0 -0
  34. package/dist/sql/selectRelevantTables.js +0 -0
  35. package/dist/sql/sqlGuard.js +0 -0
  36. package/dist/sql/sqlPlan.js +0 -0
  37. package/dist/tests/requestService.test.js +0 -0
  38. package/dist/tools/analytics/teamReport.draft.js +0 -0
  39. package/dist/tools/loadTools.js +0 -0
  40. package/dist/tools/requests/assignees.js +7 -7
  41. package/dist/tools/requests/clients.draft.js +0 -0
  42. package/dist/tools/requests/create.draft.js +0 -0
  43. package/dist/tools/requests/list.js +3 -3
  44. package/dist/tools/requests/priorities.js +0 -0
  45. package/dist/tools/requests/services.draft.js +0 -0
  46. package/dist/tools/requests/types.js +0 -0
  47. package/dist/tools/requests/units.draft.js +0 -0
  48. package/dist/tools/requests/view.draft.js +0 -0
  49. package/dist/utils/buildDateRange.js +0 -0
  50. package/dist/utils/findIdByDescription.js +0 -0
  51. package/dist/utils/resolveAssigneeId.js +0 -0
  52. package/dist/utils/toolNameMaps.js +0 -0
  53. package/package.json +1 -1
  54. package/src/agent/agentHelpers.ts +0 -0
  55. package/src/agent/openaiAgent.ts +0 -0
  56. package/src/agent/slidingWindow.ts +0 -0
  57. package/src/api/epaApiClient.ts +0 -0
  58. package/src/cli/index.ts +0 -0
  59. package/src/config/credentialStore.ts +0 -0
  60. package/src/config/ensureCliAuth.ts +0 -0
  61. package/src/config/loadConfig.ts +0 -0
  62. package/src/config/setup.ts +0 -0
  63. package/src/core/createReferenceTool.ts +0 -0
  64. package/src/core/createTool.ts +0 -0
  65. package/src/mocks/requestMocks.ts +0 -0
  66. package/src/server/server.ts +0 -0
  67. package/src/server/stdioServer.ts +0 -0
  68. package/src/services/request/requestFilters.ts +0 -0
  69. package/src/services/requestService.ts +0 -0
  70. package/src/services/teamService.ts +0 -0
  71. package/src/sql/createSqlConnection.ts +0 -0
  72. package/src/sql/fetchSchemaSummary.ts +0 -0
  73. package/src/sql/generateSqlFromQuestion.ts +0 -0
  74. package/src/sql/generateSqlPlan.ts +0 -0
  75. package/src/sql/getSqlAgentErrorMessage.ts +0 -0
  76. package/src/sql/loadSqlAgentConfig.ts +0 -0
  77. package/src/sql/loadSqlConfig.ts +0 -0
  78. package/src/sql/parseSqlQuestionHints.ts +0 -0
  79. package/src/sql/runSqlAgentCli.ts +0 -0
  80. package/src/sql/runSqlCli.ts +0 -0
  81. package/src/sql/selectRelevantTables.ts +0 -0
  82. package/src/sql/sqlGuard.ts +0 -0
  83. package/src/sql/sqlPlan.ts +0 -0
  84. package/src/tests/requestService.test.ts +0 -0
  85. package/src/tools/analytics/teamReport.draft.ts +0 -0
  86. package/src/tools/loadTools.ts +0 -0
  87. package/src/tools/requests/assignees.ts +0 -0
  88. package/src/tools/requests/clients.draft.ts +0 -0
  89. package/src/tools/requests/create.draft.ts +0 -0
  90. package/src/tools/requests/list.ts +0 -0
  91. package/src/tools/requests/priorities.ts +0 -0
  92. package/src/tools/requests/services.draft.ts +0 -0
  93. package/src/tools/requests/types.ts +0 -0
  94. package/src/tools/requests/units.draft.ts +0 -0
  95. package/src/tools/requests/view.draft.ts +0 -0
  96. package/src/utils/buildDateRange.ts +0 -0
  97. package/src/utils/findIdByDescription.ts +0 -0
  98. package/src/utils/resolveAssigneeId.ts +0 -0
  99. package/src/utils/toolNameMaps.ts +0 -0
  100. package/tsconfig.json +0 -0
package/.idea/epa_mcp.iml CHANGED
File without changes
package/.idea/modules.xml CHANGED
File without changes
package/.idea/php.xml CHANGED
File without changes
package/.idea/vcs.xml CHANGED
File without changes
package/AGENTS.md CHANGED
File without changes
package/README.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/cli/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -5,7 +5,7 @@ const service = new RequestService();
5
5
  export default createTool({
6
6
  name: "requests.assignees",
7
7
  description: `
8
- Busca responsáveis no EPA.
8
+ Busca responsáveis no EPA.
9
9
 
10
10
  Campos obrigatórios:
11
11
  - term: texto de pesquisa
@@ -13,8 +13,8 @@ export default createTool({
13
13
  - q: texto de pesquisa (usa term por padrão)
14
14
 
15
15
  Filtro opcional preparado:
16
- - unit_value: ID da unidade gerencial
17
- - unit_type: padrão "pertenco"
16
+ - unit_value: ID da unidade gerencial (OPICIONAL)
17
+ - unit_type: padrão "pertenco" (OPICIONAL)
18
18
  `,
19
19
  schema: {
20
20
  term: {
@@ -27,7 +27,7 @@ export default createTool({
27
27
  },
28
28
  unit_value: {
29
29
  type: "number",
30
- description: "ID da unidade gerencial para filtro opcional"
30
+ description: "ID da unidade gerencial para filtro (opcional)"
31
31
  },
32
32
  unit_type: {
33
33
  type: "string",
@@ -36,9 +36,9 @@ export default createTool({
36
36
  },
37
37
  validator: z.object({
38
38
  term: z.string().min(1),
39
- q: z.string().min(1).optional(),
40
- unit_value: z.number().int().positive().optional(),
41
- unit_type: z.string().min(1).optional()
39
+ q: z.string().min(1).nullable(),
40
+ unit_value: z.number().int().positive().nullable(),
41
+ unit_type: z.string().min(1).nullable()
42
42
  }).strict(),
43
43
  handler: async ({ term, q, unit_value, unit_type }) => {
44
44
  return service.getAssignees(term, {
File without changes
File without changes
@@ -29,9 +29,9 @@ export default createTool({
29
29
  }
30
30
  },
31
31
  validator: z.object({
32
- assignee_id: z.number().int().positive().optional(),
33
- assignee_name: z.string().min(1).optional(),
34
- period: z.enum(["current_year", "last_12_months"]).optional()
32
+ assignee_id: z.number().int().positive().nullable(),
33
+ assignee_name: z.string().min(1).nullable(),
34
+ period: z.enum(["current_year", "last_12_months"]).nullable(),
35
35
  }).strict(),
36
36
  handler: async ({ assignee_id, assignee_name, period }) => {
37
37
  if (assignee_id) {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epa-testeprojetoia",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "EPA MCP Server",
5
5
  "type": "module",
6
6
  "bin": {
File without changes
File without changes
File without changes
File without changes
package/src/cli/index.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/tsconfig.json CHANGED
File without changes