@appaflytech/zeyrek-ai-mcp 0.0.6 → 0.0.7

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 (91) hide show
  1. package/.env.example +2 -2
  2. package/.env.production.example +8 -0
  3. package/README.md +9 -8
  4. package/dist/config.js +18 -3
  5. package/dist/knowledge/backendConstraints.js +85 -0
  6. package/dist/knowledge/componentCatalog.js +357 -54
  7. package/dist/knowledge/componentEvents.js +120 -25
  8. package/dist/knowledge/functionGuards.js +134 -0
  9. package/dist/knowledge/normalize.js +53 -2
  10. package/dist/knowledge/outlines.js +31 -0
  11. package/dist/knowledge/policy.js +14 -5
  12. package/dist/knowledge/rules.js +343 -1
  13. package/dist/platform/csv.js +123 -0
  14. package/dist/platform/errors.js +62 -3
  15. package/dist/platform/http.js +1 -0
  16. package/dist/platform/responses.js +16 -4
  17. package/dist/platform/screenshot.js +18 -1
  18. package/dist/resources/examples/flow-call-function.json +66 -0
  19. package/dist/resources/examples/function-total.json +70 -0
  20. package/dist/resources/examples/microfunction-node-sum.json +56 -0
  21. package/dist/resources/examples/page-dynamic-form.json +1 -1
  22. package/dist/resources/examples/page-sign-in.json +1 -1
  23. package/dist/resources/guides/component.md +13 -1
  24. package/dist/resources/guides/entity.md +321 -17
  25. package/dist/resources/guides/expressions.md +3 -0
  26. package/dist/resources/guides/functions.md +262 -0
  27. package/dist/resources/guides/getting-started.md +5 -0
  28. package/dist/resources/guides/merge.md +231 -0
  29. package/dist/resources/guides/microfunction.md +166 -0
  30. package/dist/resources/guides/microservice.md +61 -2
  31. package/dist/resources/guides/modify-existing.md +23 -0
  32. package/dist/resources/guides/page.md +20 -4
  33. package/dist/resources/guides/translation.md +24 -0
  34. package/dist/resources/guides/workflow.md +1 -1
  35. package/dist/resources/schema-fingerprint.json +4 -4
  36. package/dist/resources/schemas/AnalyzeImportQuery.json +51 -0
  37. package/dist/resources/schemas/ApplyMergePlanCommand.json +19 -0
  38. package/dist/resources/schemas/CreateBulkRowCommand.json +3 -0
  39. package/dist/resources/schemas/CreateEnvironmentCommand.json +31 -0
  40. package/dist/resources/schemas/CreateGlobalFunctionCommand.json +95 -0
  41. package/dist/resources/schemas/CreateImportPlanCommand.json +278 -0
  42. package/dist/resources/schemas/CreateMergePlanCommand.json +34 -0
  43. package/dist/resources/schemas/CreateMicrofunctionCommand.json +117 -0
  44. package/dist/resources/schemas/CreateMicrofunctionRuntimeCommand.json +51 -0
  45. package/dist/resources/schemas/CreateMicroserviceCommand.json +119 -1
  46. package/dist/resources/schemas/CreateWorkflowCommand.json +13 -2
  47. package/dist/resources/schemas/DataJobDto.json +267 -0
  48. package/dist/resources/schemas/ExportRowsCommand.json +172 -0
  49. package/dist/resources/schemas/Filter.json +3 -1
  50. package/dist/resources/schemas/GetRowsQuery.json +3 -1
  51. package/dist/resources/schemas/GlobalFunctionDto.json +89 -0
  52. package/dist/resources/schemas/GlobalFunctionUpdateResultDto.json +249 -0
  53. package/dist/resources/schemas/ImportAnalysisDto.json +401 -0
  54. package/dist/resources/schemas/ImportPlanDto.json +260 -0
  55. package/dist/resources/schemas/ImportSampleDto.json +90 -0
  56. package/dist/resources/schemas/InvokeMicrofunctionCommand.json +25 -0
  57. package/dist/resources/schemas/PreviewMicroserviceCommand.json +119 -1
  58. package/dist/resources/schemas/PreviewWorkflowCommand.json +13 -2
  59. package/dist/resources/schemas/ResolveMergeConflictsCommand.json +58 -0
  60. package/dist/resources/schemas/RevertMergePlanCommand.json +19 -0
  61. package/dist/resources/schemas/RunImportCommand.json +62 -0
  62. package/dist/resources/schemas/StepDto.json +13 -2
  63. package/dist/resources/schemas/UpdateBulkRowCommand.json +3 -0
  64. package/dist/resources/schemas/UpdateEntityCommand.json +3 -1
  65. package/dist/resources/schemas/UpdateGlobalFunctionCommand.json +66 -0
  66. package/dist/resources/schemas/UpdateMicrofunctionCommand.json +121 -0
  67. package/dist/resources/schemas/UpdateMicrofunctionRuntimeCommand.json +54 -0
  68. package/dist/resources/schemas/UpdateMicroserviceCommand.json +119 -1
  69. package/dist/resources/schemas/UpdateWorkflowCommand.json +13 -2
  70. package/dist/server.js +15 -3
  71. package/dist/tools/activities.js +40 -0
  72. package/dist/tools/automations.js +14 -5
  73. package/dist/tools/common.js +16 -0
  74. package/dist/tools/dependencies.js +1 -1
  75. package/dist/tools/environments.js +52 -0
  76. package/dist/tools/files.js +51 -50
  77. package/dist/tools/flows.js +95 -2
  78. package/dist/tools/functions.js +331 -0
  79. package/dist/tools/importSchemas.js +79 -0
  80. package/dist/tools/imports.js +241 -0
  81. package/dist/tools/merges.js +113 -0
  82. package/dist/tools/microfunctions.js +155 -0
  83. package/dist/tools/microservices.js +42 -3
  84. package/dist/tools/pages.js +62 -10
  85. package/dist/tools/platformInfo.js +4 -1
  86. package/dist/tools/revisions.js +94 -0
  87. package/dist/tools/rows.js +342 -22
  88. package/dist/tools/screenWrite.js +11 -2
  89. package/dist/tools/templates.js +32 -5
  90. package/dist/tools/workflows.js +24 -6
  91. package/package.json +3 -1
@@ -0,0 +1,62 @@
1
+ {
2
+ "schema": {
3
+ "required": [
4
+ "planId"
5
+ ],
6
+ "type": "object",
7
+ "properties": {
8
+ "datasourceId": {
9
+ "type": "string",
10
+ "format": "uuid"
11
+ },
12
+ "planId": {
13
+ "minLength": 1,
14
+ "type": "string",
15
+ "format": "uuid"
16
+ },
17
+ "errorPolicy": {
18
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Datastore.Imports.ImportErrorPolicy"
19
+ },
20
+ "rowActions": {
21
+ "type": "array",
22
+ "items": {
23
+ "$ref": "#/components/schemas/NgApps.Application.Contexts.Datastore.Imports.ImportRowActionDto"
24
+ },
25
+ "nullable": true
26
+ },
27
+ "force": {
28
+ "type": "boolean"
29
+ },
30
+ "triggerAutomations": {
31
+ "type": "boolean"
32
+ }
33
+ },
34
+ "additionalProperties": false
35
+ },
36
+ "components": {
37
+ "schemas": {
38
+ "NgApps.Domain.Contexts.Datastore.Imports.ImportErrorPolicy": {
39
+ "enum": [
40
+ "skip-rows",
41
+ "all-or-nothing"
42
+ ],
43
+ "type": "string",
44
+ "format": ""
45
+ },
46
+ "NgApps.Application.Contexts.Datastore.Imports.ImportRowActionDto": {
47
+ "type": "object",
48
+ "properties": {
49
+ "row": {
50
+ "type": "integer",
51
+ "format": "int32"
52
+ },
53
+ "action": {
54
+ "type": "string",
55
+ "nullable": true
56
+ }
57
+ },
58
+ "additionalProperties": false
59
+ }
60
+ }
61
+ }
62
+ }
@@ -71,7 +71,8 @@
71
71
  "table",
72
72
  "convert",
73
73
  "revert",
74
- "set-user"
74
+ "set-user",
75
+ "microfunction"
75
76
  ],
76
77
  "type": "string",
77
78
  "format": ""
@@ -171,6 +172,11 @@
171
172
  "type": "string",
172
173
  "nullable": true
173
174
  },
175
+ "microfunctionId": {
176
+ "type": "string",
177
+ "format": "uuid",
178
+ "nullable": true
179
+ },
174
180
  "queryId": {
175
181
  "type": "string",
176
182
  "format": "uuid",
@@ -852,6 +858,9 @@
852
858
  "isSystemField": {
853
859
  "type": "boolean"
854
860
  },
861
+ "isLocalized": {
862
+ "type": "boolean"
863
+ },
855
864
  "order": {
856
865
  "type": "integer",
857
866
  "format": "int32",
@@ -884,7 +893,9 @@
884
893
  "startswith",
885
894
  "endswith",
886
895
  "istartswith",
887
- "iendswith"
896
+ "iendswith",
897
+ "isnull",
898
+ "isnotnull"
888
899
  ],
889
900
  "type": "string",
890
901
  "format": ""
@@ -23,6 +23,9 @@
23
23
  "nullable": true
24
24
  },
25
25
  "nullable": true
26
+ },
27
+ "relationsByName": {
28
+ "type": "boolean"
26
29
  }
27
30
  },
28
31
  "additionalProperties": false
@@ -700,7 +700,9 @@
700
700
  "startswith",
701
701
  "endswith",
702
702
  "istartswith",
703
- "iendswith"
703
+ "iendswith",
704
+ "isnull",
705
+ "isnotnull"
704
706
  ],
705
707
  "type": "string",
706
708
  "format": ""
@@ -0,0 +1,66 @@
1
+ {
2
+ "schema": {
3
+ "required": [
4
+ "body",
5
+ "name"
6
+ ],
7
+ "type": "object",
8
+ "properties": {
9
+ "id": {
10
+ "type": "string",
11
+ "format": "uuid"
12
+ },
13
+ "name": {
14
+ "minLength": 1,
15
+ "type": "string"
16
+ },
17
+ "description": {
18
+ "type": "string",
19
+ "nullable": true
20
+ },
21
+ "isAsync": {
22
+ "type": "boolean"
23
+ },
24
+ "parameters": {
25
+ "type": "array",
26
+ "items": {
27
+ "$ref": "#/components/schemas/NgApps.Application.Contexts.Studio.GlobalFunctions.GlobalFunctionParameterDto"
28
+ },
29
+ "nullable": true
30
+ },
31
+ "body": {
32
+ "minLength": 1,
33
+ "type": "string"
34
+ }
35
+ },
36
+ "additionalProperties": false
37
+ },
38
+ "components": {
39
+ "schemas": {
40
+ "NgApps.Application.Contexts.Studio.GlobalFunctions.GlobalFunctionParameterDto": {
41
+ "type": "object",
42
+ "properties": {
43
+ "name": {
44
+ "type": "string",
45
+ "nullable": true
46
+ },
47
+ "type": {
48
+ "type": "string",
49
+ "nullable": true
50
+ },
51
+ "required": {
52
+ "type": "boolean"
53
+ },
54
+ "defaultValue": {
55
+ "nullable": true
56
+ },
57
+ "description": {
58
+ "type": "string",
59
+ "nullable": true
60
+ }
61
+ },
62
+ "additionalProperties": false
63
+ }
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "schema": {
3
+ "required": [
4
+ "name"
5
+ ],
6
+ "type": "object",
7
+ "properties": {
8
+ "id": {
9
+ "type": "string",
10
+ "format": "uuid"
11
+ },
12
+ "name": {
13
+ "maxLength": 255,
14
+ "minLength": 1,
15
+ "type": "string"
16
+ },
17
+ "description": {
18
+ "type": "string",
19
+ "nullable": true
20
+ },
21
+ "language": {
22
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Studio.Microfunctions.MicrofunctionLanguage"
23
+ },
24
+ "provider": {
25
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Studio.Microfunctions.MicrofunctionProvider"
26
+ },
27
+ "runtimeId": {
28
+ "type": "string",
29
+ "format": "uuid",
30
+ "nullable": true
31
+ },
32
+ "sourceKind": {
33
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Studio.Microfunctions.MicrofunctionSourceKind"
34
+ },
35
+ "code": {
36
+ "type": "string",
37
+ "nullable": true
38
+ },
39
+ "entrypoint": {
40
+ "type": "string",
41
+ "nullable": true
42
+ },
43
+ "parameterDtoId": {
44
+ "type": "string",
45
+ "format": "uuid",
46
+ "nullable": true
47
+ },
48
+ "parameterBehavior": {
49
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Shared.DataTransferObjects.DataTransferObjectBehavior"
50
+ },
51
+ "returnDtoId": {
52
+ "type": "string",
53
+ "format": "uuid",
54
+ "nullable": true
55
+ },
56
+ "returnBehavior": {
57
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Shared.DataTransferObjects.DataTransferObjectBehavior"
58
+ },
59
+ "timeoutSeconds": {
60
+ "type": "integer",
61
+ "format": "int32"
62
+ },
63
+ "memoryMb": {
64
+ "maximum": 3008,
65
+ "minimum": 128,
66
+ "type": "integer",
67
+ "format": "int32"
68
+ },
69
+ "environmentVariables": {
70
+ "type": "object",
71
+ "additionalProperties": {
72
+ "type": "string",
73
+ "nullable": true
74
+ },
75
+ "nullable": true
76
+ },
77
+ "publish": {
78
+ "type": "boolean"
79
+ }
80
+ },
81
+ "additionalProperties": false
82
+ },
83
+ "components": {
84
+ "schemas": {
85
+ "NgApps.Domain.Contexts.Studio.Microfunctions.MicrofunctionLanguage": {
86
+ "enum": [
87
+ "node",
88
+ "python"
89
+ ],
90
+ "type": "string",
91
+ "format": ""
92
+ },
93
+ "NgApps.Domain.Contexts.Studio.Microfunctions.MicrofunctionProvider": {
94
+ "enum": [
95
+ "built-in",
96
+ "aws-lambda",
97
+ "azure-functions"
98
+ ],
99
+ "type": "string",
100
+ "format": ""
101
+ },
102
+ "NgApps.Domain.Contexts.Studio.Microfunctions.MicrofunctionSourceKind": {
103
+ "enum": [
104
+ "inline",
105
+ "archive"
106
+ ],
107
+ "type": "string",
108
+ "format": ""
109
+ },
110
+ "NgApps.Domain.Contexts.Shared.DataTransferObjects.DataTransferObjectBehavior": {
111
+ "enum": [
112
+ "primitive",
113
+ "object",
114
+ "array"
115
+ ],
116
+ "type": "string",
117
+ "format": ""
118
+ }
119
+ }
120
+ }
121
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "schema": {
3
+ "required": [
4
+ "accessKeyId",
5
+ "name",
6
+ "region"
7
+ ],
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "type": "string",
12
+ "format": "uuid"
13
+ },
14
+ "name": {
15
+ "maxLength": 255,
16
+ "minLength": 1,
17
+ "type": "string"
18
+ },
19
+ "provider": {
20
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Studio.Microfunctions.MicrofunctionProvider"
21
+ },
22
+ "region": {
23
+ "minLength": 1,
24
+ "type": "string"
25
+ },
26
+ "accessKeyId": {
27
+ "minLength": 1,
28
+ "type": "string"
29
+ },
30
+ "secretAccessKey": {
31
+ "type": "string",
32
+ "nullable": true
33
+ },
34
+ "roleArn": {
35
+ "type": "string",
36
+ "nullable": true
37
+ }
38
+ },
39
+ "additionalProperties": false
40
+ },
41
+ "components": {
42
+ "schemas": {
43
+ "NgApps.Domain.Contexts.Studio.Microfunctions.MicrofunctionProvider": {
44
+ "enum": [
45
+ "built-in",
46
+ "aws-lambda",
47
+ "azure-functions"
48
+ ],
49
+ "type": "string",
50
+ "format": ""
51
+ }
52
+ }
53
+ }
54
+ }
@@ -123,6 +123,9 @@
123
123
  "cronExpression": {
124
124
  "type": "string",
125
125
  "nullable": true
126
+ },
127
+ "schedule": {
128
+ "$ref": "#/components/schemas/NgApps.Infrastructure.Scheduler.ScheduleDefinition"
126
129
  }
127
130
  },
128
131
  "additionalProperties": false
@@ -245,6 +248,58 @@
245
248
  },
246
249
  "additionalProperties": false
247
250
  },
251
+ "NgApps.Infrastructure.Scheduler.ScheduleDefinition": {
252
+ "type": "object",
253
+ "properties": {
254
+ "mode": {
255
+ "$ref": "#/components/schemas/NgApps.Infrastructure.Scheduler.ScheduleMode"
256
+ },
257
+ "timeZoneId": {
258
+ "type": "string",
259
+ "nullable": true
260
+ },
261
+ "startAt": {
262
+ "type": "string",
263
+ "format": "date-time",
264
+ "nullable": true
265
+ },
266
+ "every": {
267
+ "type": "integer",
268
+ "format": "int32",
269
+ "nullable": true
270
+ },
271
+ "unit": {
272
+ "$ref": "#/components/schemas/NgApps.Infrastructure.Scheduler.ScheduleIntervalUnit"
273
+ },
274
+ "timeOfDay": {
275
+ "type": "string",
276
+ "nullable": true
277
+ },
278
+ "daysOfWeek": {
279
+ "type": "array",
280
+ "items": {
281
+ "$ref": "#/components/schemas/NgApps.Infrastructure.Scheduler.ScheduleWeekday"
282
+ },
283
+ "nullable": true
284
+ },
285
+ "daysOfMonth": {
286
+ "type": "array",
287
+ "items": {
288
+ "type": "integer",
289
+ "format": "int32"
290
+ },
291
+ "nullable": true
292
+ },
293
+ "cronExpression": {
294
+ "type": "string",
295
+ "nullable": true
296
+ },
297
+ "end": {
298
+ "$ref": "#/components/schemas/NgApps.Infrastructure.Scheduler.ScheduleEnd"
299
+ }
300
+ },
301
+ "additionalProperties": false
302
+ },
248
303
  "NgApps.Domain.Contexts.Studio.Microservices.MicroserviceTableOperation": {
249
304
  "enum": [
250
305
  "create",
@@ -476,6 +531,58 @@
476
531
  "type": "string",
477
532
  "format": ""
478
533
  },
534
+ "NgApps.Infrastructure.Scheduler.ScheduleMode": {
535
+ "enum": [
536
+ "cron",
537
+ "interval",
538
+ "once"
539
+ ],
540
+ "type": "string",
541
+ "format": ""
542
+ },
543
+ "NgApps.Infrastructure.Scheduler.ScheduleIntervalUnit": {
544
+ "enum": [
545
+ "minute",
546
+ "hour",
547
+ "day",
548
+ "week",
549
+ "month"
550
+ ],
551
+ "type": "string",
552
+ "format": ""
553
+ },
554
+ "NgApps.Infrastructure.Scheduler.ScheduleWeekday": {
555
+ "enum": [
556
+ "monday",
557
+ "tuesday",
558
+ "wednesday",
559
+ "thursday",
560
+ "friday",
561
+ "saturday",
562
+ "sunday"
563
+ ],
564
+ "type": "string",
565
+ "format": ""
566
+ },
567
+ "NgApps.Infrastructure.Scheduler.ScheduleEnd": {
568
+ "type": "object",
569
+ "properties": {
570
+ "type": {
571
+ "$ref": "#/components/schemas/NgApps.Infrastructure.Scheduler.ScheduleEndType"
572
+ },
573
+ "at": {
574
+ "type": "string",
575
+ "format": "date-time",
576
+ "nullable": true
577
+ },
578
+ "count": {
579
+ "type": "integer",
580
+ "format": "int32",
581
+ "nullable": true
582
+ }
583
+ },
584
+ "additionalProperties": false
585
+ },
479
586
  "NgApps.Domain.Contexts.Datastore.Entities.OperatorType": {
480
587
  "enum": [
481
588
  "eq",
@@ -491,7 +598,9 @@
491
598
  "startswith",
492
599
  "endswith",
493
600
  "istartswith",
494
- "iendswith"
601
+ "iendswith",
602
+ "isnull",
603
+ "isnotnull"
495
604
  ],
496
605
  "type": "string",
497
606
  "format": ""
@@ -531,6 +640,15 @@
531
640
  ],
532
641
  "type": "string",
533
642
  "format": ""
643
+ },
644
+ "NgApps.Infrastructure.Scheduler.ScheduleEndType": {
645
+ "enum": [
646
+ "never",
647
+ "on",
648
+ "after"
649
+ ],
650
+ "type": "string",
651
+ "format": ""
534
652
  }
535
653
  }
536
654
  }
@@ -216,7 +216,8 @@
216
216
  "table",
217
217
  "convert",
218
218
  "revert",
219
- "set-user"
219
+ "set-user",
220
+ "microfunction"
220
221
  ],
221
222
  "type": "string",
222
223
  "format": ""
@@ -316,6 +317,11 @@
316
317
  "type": "string",
317
318
  "nullable": true
318
319
  },
320
+ "microfunctionId": {
321
+ "type": "string",
322
+ "format": "uuid",
323
+ "nullable": true
324
+ },
319
325
  "queryId": {
320
326
  "type": "string",
321
327
  "format": "uuid",
@@ -1093,6 +1099,9 @@
1093
1099
  "isSystemField": {
1094
1100
  "type": "boolean"
1095
1101
  },
1102
+ "isLocalized": {
1103
+ "type": "boolean"
1104
+ },
1096
1105
  "order": {
1097
1106
  "type": "integer",
1098
1107
  "format": "int32",
@@ -1371,7 +1380,9 @@
1371
1380
  "startswith",
1372
1381
  "endswith",
1373
1382
  "istartswith",
1374
- "iendswith"
1383
+ "iendswith",
1384
+ "isnull",
1385
+ "isnotnull"
1375
1386
  ],
1376
1387
  "type": "string",
1377
1388
  "format": ""
package/dist/server.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { registerMicroserviceTools } from './tools/microservices.js';
3
+ import { registerMicrofunctionTools } from './tools/microfunctions.js';
3
4
  import { registerApplicationTools } from './tools/applications.js';
4
5
  import { registerDeploymentTools } from './tools/deployments.js';
5
6
  import { registerDatasourceTools } from './tools/datasources.js';
@@ -21,14 +22,19 @@ import { instrumentServer } from './observability/trace.js';
21
22
  import { registerProjectTools } from './tools/projects.js';
22
23
  import { registerEntityTools } from './tools/entities.js';
23
24
  import { registerDependencyTools } from './tools/dependencies.js';
24
- import { registerGlobalFunctionTools } from './tools/globalFunctions.js';
25
25
  import { registerVariableTools } from './tools/variables.js';
26
+ import { registerFunctionTools } from './tools/functions.js';
26
27
  import { registerFolderTools } from './tools/folders.js';
27
28
  import { registerQueryTools } from './tools/queries.js';
28
29
  import { registerViewTools } from './tools/views.js';
29
30
  import { registerPageTools } from './tools/pages.js';
30
31
  import { registerFileTools } from './tools/files.js';
31
32
  import { registerRowTools } from './tools/rows.js';
33
+ import { registerImportTools } from './tools/imports.js';
34
+ import { registerEnvironmentTools } from './tools/environments.js';
35
+ import { registerMergeTools } from './tools/merges.js';
36
+ import { registerRevisionTools } from './tools/revisions.js';
37
+ import { registerActivityTools } from './tools/activities.js';
32
38
  import { registerDtoTools } from './tools/dtos.js';
33
39
  const moduleRegistrations = {
34
40
  platform: registerPlatformTools,
@@ -37,7 +43,9 @@ const moduleRegistrations = {
37
43
  datasource: registerDatasourceTools,
38
44
  entity: registerEntityTools,
39
45
  row: registerRowTools,
46
+ import: registerImportTools,
40
47
  microservice: registerMicroserviceTools,
48
+ microfunction: registerMicrofunctionTools,
41
49
  query: registerQueryTools,
42
50
  workflow: registerWorkflowTools,
43
51
  automation: registerAutomationTools,
@@ -49,7 +57,7 @@ const moduleRegistrations = {
49
57
  flow: registerFlowTools,
50
58
  layout: registerLayoutTools,
51
59
  variable: registerVariableTools,
52
- globalFunction: registerGlobalFunctionTools,
60
+ function: registerFunctionTools,
53
61
  folder: registerFolderTools,
54
62
  file: registerFileTools,
55
63
  access: registerAccessTools,
@@ -57,7 +65,11 @@ const moduleRegistrations = {
57
65
  template: registerTemplateTools,
58
66
  organization: registerOrganizationTools,
59
67
  dependency: registerDependencyTools,
60
- deployment: registerDeploymentTools
68
+ deployment: registerDeploymentTools,
69
+ environment: registerEnvironmentTools,
70
+ merge: registerMergeTools,
71
+ activity: registerActivityTools,
72
+ revision: registerRevisionTools
61
73
  };
62
74
  export function createGatewayServer(platform) {
63
75
  const server = instrumentServer(new McpServer({ name: 'ngapps', version: '0.1.0' }), platform.config);
@@ -0,0 +1,40 @@
1
+ import { guid, pagingParams, readOnly } from './common.js';
2
+ import { handle } from '../platform/responses.js';
3
+ import { z } from 'zod';
4
+ const activityKind = z.enum([
5
+ 'environment.created',
6
+ 'environment.ready',
7
+ 'environment.failed',
8
+ 'environment.deleted',
9
+ 'environment.merged',
10
+ 'merge.planned',
11
+ 'merge.resolved',
12
+ 'merge.applied',
13
+ 'merge.applied_with_drift',
14
+ 'merge.discarded',
15
+ 'merge.failed',
16
+ 'deployment.started',
17
+ 'deployment.completed',
18
+ 'deployment.failed',
19
+ 'merge.reverted'
20
+ ]).optional()
21
+ .describe("Tek bir olay türüne süz");
22
+ const isoDate = z.string().min(1).optional()
23
+ .describe("ISO tarih, ör. '2026-09-08T00:00:00Z'");
24
+ export function registerActivityTools(server, platform) {
25
+ const config = platform.config;
26
+ server.registerTool('activity_list', {
27
+ title: 'Proje etkinlik günlüğü',
28
+ description: "Projenin dal, merge ve dağıtım geçmişini en yeniden eskiye listeler: kim, ne zaman, ne yaptı. Her satırda kind, actor, actorSource (human|ai|system), occurredAt ve türe göre değişen bir summary vardır — merge.applied'da message ve counters, environment.created'da branchName, deployment.*'da süre ya da hata. subjectId merge satırlarında plan id'sidir; ayrıntı için merge_get ile okuyun. actorSource='ai' satırları bu gateway üzerinden yapılan işlerdir.",
29
+ inputSchema: {
30
+ projectId: guid,
31
+ kind: activityKind,
32
+ environmentId: guid.optional(),
33
+ userId: z.string().min(1).optional().describe("Aktörün kullanıcı id'si"),
34
+ from: isoDate,
35
+ to: isoDate,
36
+ ...pagingParams
37
+ },
38
+ annotations: readOnly
39
+ }, handle(config, ({ projectId, ...query }) => platform.org('GET', `/activities/${projectId}`, { query })));
40
+ }