@appaflytech/zeyrek-ai-mcp 0.0.5 → 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.
- package/.env.example +2 -2
- package/.env.production.example +9 -1
- package/README.md +14 -38
- package/dist/config.js +36 -3
- package/dist/knowledge/backendConstraints.js +982 -0
- package/dist/knowledge/componentCatalog.js +549 -92
- package/dist/knowledge/componentEvents.js +120 -25
- package/dist/knowledge/coverage.js +43 -0
- package/dist/knowledge/flowGuards.js +30 -0
- package/dist/knowledge/functionGuards.js +134 -0
- package/dist/knowledge/guideSections.js +49 -0
- package/dist/knowledge/hydrate.js +97 -0
- package/dist/knowledge/languageCodes.js +36 -0
- package/dist/knowledge/languages.js +105 -0
- package/dist/knowledge/layoutSummary.js +10 -0
- package/dist/knowledge/localization.js +51 -0
- package/dist/knowledge/normalize.js +500 -16
- package/dist/knowledge/outlines.js +167 -12
- package/dist/knowledge/policy.js +14 -5
- package/dist/knowledge/propTypes.js +80 -0
- package/dist/knowledge/rules.js +961 -44
- package/dist/knowledge/schemaGuard.js +199 -0
- package/dist/knowledge/styleResolve.js +63 -4
- package/dist/observability/trace.js +27 -3
- package/dist/platform/csv.js +123 -0
- package/dist/platform/errors.js +107 -6
- package/dist/platform/http.js +34 -4
- package/dist/platform/patch.js +27 -0
- package/dist/platform/refs.js +104 -0
- package/dist/platform/responses.js +25 -6
- package/dist/platform/screenshot.js +544 -16
- package/dist/platform/secrets.js +40 -0
- package/dist/platform/tokenVault.js +89 -0
- package/dist/platform/writeDiff.js +281 -0
- package/dist/resources/examples/flow-call-function.json +66 -0
- package/dist/resources/examples/function-total.json +70 -0
- package/dist/resources/examples/layout-app-shell.json +1 -1
- package/dist/resources/examples/microfunction-node-sum.json +56 -0
- package/dist/resources/examples/microservice-table-list.json +2 -4
- package/dist/resources/examples/page-dynamic-form.json +3 -3
- package/dist/resources/examples/page-flex-sections.json +99 -0
- package/dist/resources/examples/page-sign-in.json +4 -3
- package/dist/resources/guides/component.md +81 -8
- package/dist/resources/guides/entity.md +712 -20
- package/dist/resources/guides/expressions.md +47 -2
- package/dist/resources/guides/external-component.md +9 -0
- package/dist/resources/guides/functions.md +262 -0
- package/dist/resources/guides/getting-started.md +82 -7
- package/dist/resources/guides/layout.md +53 -10
- package/dist/resources/guides/merge.md +231 -0
- package/dist/resources/guides/microfunction.md +166 -0
- package/dist/resources/guides/microservice.md +287 -15
- package/dist/resources/guides/middleware.md +89 -1
- package/dist/resources/guides/modify-existing.md +23 -0
- package/dist/resources/guides/page.md +402 -49
- package/dist/resources/guides/translation.md +150 -8
- package/dist/resources/guides/view.md +16 -1
- package/dist/resources/guides/workflow.md +199 -28
- package/dist/resources/knowledge.js +5 -0
- package/dist/resources/rules.js +27 -0
- package/dist/resources/schema-fingerprint.json +8 -0
- package/dist/resources/schemas/AnalyzeImportQuery.json +51 -0
- package/dist/resources/schemas/ApplyMergePlanCommand.json +19 -0
- package/dist/resources/schemas/CreateBulkRowCommand.json +36 -0
- package/dist/resources/schemas/CreateDatasourceCommand.json +15 -6
- package/dist/resources/schemas/CreateDiscoveredEntitiesCommand.json +19 -8
- package/dist/resources/schemas/CreateEntityCommand.json +52 -12
- package/dist/resources/schemas/CreateEnvironmentCommand.json +31 -0
- package/dist/resources/schemas/CreateGlobalFunctionCommand.json +95 -0
- package/dist/resources/schemas/CreateImportPlanCommand.json +278 -0
- package/dist/resources/schemas/CreateMergePlanCommand.json +34 -0
- package/dist/resources/schemas/CreateMicrofunctionCommand.json +117 -0
- package/dist/resources/schemas/CreateMicrofunctionRuntimeCommand.json +51 -0
- package/dist/resources/schemas/CreateMicroserviceCommand.json +145 -3
- package/dist/resources/schemas/CreateQueryCommand.json +56 -3
- package/dist/resources/schemas/CreateRowCommand.json +38 -0
- package/dist/resources/schemas/CreateViewCommand.json +13 -10
- package/dist/resources/schemas/CreateWorkflowCommand.json +106 -14
- package/dist/resources/schemas/DataJobDto.json +267 -0
- package/dist/resources/schemas/ExportRowsCommand.json +172 -0
- package/dist/resources/schemas/Filter.json +3 -1
- package/dist/resources/schemas/GetRowsQuery.json +6 -1
- package/dist/resources/schemas/GlobalFunctionDto.json +89 -0
- package/dist/resources/schemas/GlobalFunctionUpdateResultDto.json +249 -0
- package/dist/resources/schemas/ImportAnalysisDto.json +401 -0
- package/dist/resources/schemas/ImportPlanDto.json +260 -0
- package/dist/resources/schemas/ImportSampleDto.json +90 -0
- package/dist/resources/schemas/InvokeMicrofunctionCommand.json +25 -0
- package/dist/resources/schemas/PreviewMicroserviceCommand.json +135 -1
- package/dist/resources/schemas/PreviewQueryCommand.json +5 -2
- package/dist/resources/schemas/PreviewWorkflowCommand.json +45 -9
- package/dist/resources/schemas/ResolveMergeConflictsCommand.json +58 -0
- package/dist/resources/schemas/RevertMergePlanCommand.json +19 -0
- package/dist/resources/schemas/RunImportCommand.json +62 -0
- package/dist/resources/schemas/StepDto.json +34 -3
- package/dist/resources/schemas/UpdateBulkRowCommand.json +36 -0
- package/dist/resources/schemas/UpdateDatasourceCommand.json +15 -6
- package/dist/resources/schemas/UpdateEntityCommand.json +52 -11
- package/dist/resources/schemas/UpdateGlobalFunctionCommand.json +66 -0
- package/dist/resources/schemas/UpdateMicrofunctionCommand.json +121 -0
- package/dist/resources/schemas/UpdateMicrofunctionRuntimeCommand.json +54 -0
- package/dist/resources/schemas/UpdateMicroserviceCommand.json +147 -4
- package/dist/resources/schemas/UpdateQueryCommand.json +13 -3
- package/dist/resources/schemas/UpdateRowCommand.json +40 -0
- package/dist/resources/schemas/UpdateViewCommand.json +15 -10
- package/dist/resources/schemas/UpdateWorkflowCommand.json +106 -14
- package/dist/server.js +17 -1
- package/dist/tools/access.js +3 -3
- package/dist/tools/activities.js +40 -0
- package/dist/tools/applications.js +1 -1
- package/dist/tools/automations.js +76 -34
- package/dist/tools/common.js +55 -0
- package/dist/tools/components.js +16 -7
- package/dist/tools/datasources.js +83 -21
- package/dist/tools/dependencies.js +1 -1
- package/dist/tools/deployments.js +34 -2
- package/dist/tools/dtos.js +25 -12
- package/dist/tools/entities.js +113 -28
- package/dist/tools/environments.js +52 -0
- package/dist/tools/externalComponents.js +9 -3
- package/dist/tools/files.js +57 -42
- package/dist/tools/flows.js +205 -13
- package/dist/tools/folders.js +7 -2
- package/dist/tools/functions.js +331 -0
- package/dist/tools/globalFunctions.js +63 -0
- package/dist/tools/importSchemas.js +79 -0
- package/dist/tools/imports.js +241 -0
- package/dist/tools/layouts.js +103 -29
- package/dist/tools/merges.js +113 -0
- package/dist/tools/microfunctions.js +155 -0
- package/dist/tools/microservices.js +270 -40
- package/dist/tools/organizations.js +5 -6
- package/dist/tools/pages.js +421 -104
- package/dist/tools/platformInfo.js +155 -11
- package/dist/tools/projects.js +183 -33
- package/dist/tools/queries.js +32 -10
- package/dist/tools/revisions.js +94 -0
- package/dist/tools/rows.js +484 -50
- package/dist/tools/screenWrite.js +68 -0
- package/dist/tools/screens.js +28 -0
- package/dist/tools/templates.js +32 -5
- package/dist/tools/translations.js +24 -8
- package/dist/tools/views.js +20 -10
- package/dist/tools/workflows.js +56 -21
- package/package.json +7 -2
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": {
|
|
3
|
+
"required": [
|
|
4
|
+
"name",
|
|
5
|
+
"slug",
|
|
6
|
+
"steps"
|
|
7
|
+
],
|
|
3
8
|
"type": "object",
|
|
4
9
|
"properties": {
|
|
5
10
|
"id": {
|
|
@@ -7,10 +12,18 @@
|
|
|
7
12
|
"format": "uuid"
|
|
8
13
|
},
|
|
9
14
|
"slug": {
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"name": {
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"description": {
|
|
10
23
|
"type": "string",
|
|
11
24
|
"nullable": true
|
|
12
25
|
},
|
|
13
|
-
"
|
|
26
|
+
"caution": {
|
|
14
27
|
"type": "string",
|
|
15
28
|
"nullable": true
|
|
16
29
|
},
|
|
@@ -31,11 +44,11 @@
|
|
|
31
44
|
"$ref": "#/components/schemas/NgApps.Domain.Contexts.Shared.DataTransferObjects.DataTransferObjectBehavior"
|
|
32
45
|
},
|
|
33
46
|
"steps": {
|
|
47
|
+
"minItems": 1,
|
|
34
48
|
"type": "array",
|
|
35
49
|
"items": {
|
|
36
50
|
"$ref": "#/components/schemas/NgApps.Application.Contexts.Flow.Workflows.StepDto"
|
|
37
|
-
}
|
|
38
|
-
"nullable": true
|
|
51
|
+
}
|
|
39
52
|
},
|
|
40
53
|
"schema": {
|
|
41
54
|
"nullable": true
|
|
@@ -86,6 +99,14 @@
|
|
|
86
99
|
"type": "string",
|
|
87
100
|
"nullable": true
|
|
88
101
|
},
|
|
102
|
+
"description": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"nullable": true
|
|
105
|
+
},
|
|
106
|
+
"caution": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"nullable": true
|
|
109
|
+
},
|
|
89
110
|
"type": {
|
|
90
111
|
"$ref": "#/components/schemas/NgApps.Domain.Contexts.Flow.Workflows.StepType"
|
|
91
112
|
},
|
|
@@ -196,7 +217,7 @@
|
|
|
196
217
|
"convert",
|
|
197
218
|
"revert",
|
|
198
219
|
"set-user",
|
|
199
|
-
"
|
|
220
|
+
"microfunction"
|
|
200
221
|
],
|
|
201
222
|
"type": "string",
|
|
202
223
|
"format": ""
|
|
@@ -296,6 +317,11 @@
|
|
|
296
317
|
"type": "string",
|
|
297
318
|
"nullable": true
|
|
298
319
|
},
|
|
320
|
+
"microfunctionId": {
|
|
321
|
+
"type": "string",
|
|
322
|
+
"format": "uuid",
|
|
323
|
+
"nullable": true
|
|
324
|
+
},
|
|
299
325
|
"queryId": {
|
|
300
326
|
"type": "string",
|
|
301
327
|
"format": "uuid",
|
|
@@ -668,6 +694,20 @@
|
|
|
668
694
|
"automationCount": {
|
|
669
695
|
"type": "integer",
|
|
670
696
|
"format": "int32"
|
|
697
|
+
},
|
|
698
|
+
"version": {
|
|
699
|
+
"type": "integer",
|
|
700
|
+
"format": "int64"
|
|
701
|
+
},
|
|
702
|
+
"localizationEntityId": {
|
|
703
|
+
"type": "string",
|
|
704
|
+
"format": "uuid",
|
|
705
|
+
"nullable": true
|
|
706
|
+
},
|
|
707
|
+
"localizationParentId": {
|
|
708
|
+
"type": "string",
|
|
709
|
+
"format": "uuid",
|
|
710
|
+
"nullable": true
|
|
671
711
|
}
|
|
672
712
|
},
|
|
673
713
|
"additionalProperties": false
|
|
@@ -868,6 +908,9 @@
|
|
|
868
908
|
"order": {
|
|
869
909
|
"type": "integer",
|
|
870
910
|
"format": "int32"
|
|
911
|
+
},
|
|
912
|
+
"writeOn": {
|
|
913
|
+
"$ref": "#/components/schemas/NgApps.Domain.Contexts.Studio.Microservices.MicroserviceFieldWriteOn"
|
|
871
914
|
}
|
|
872
915
|
},
|
|
873
916
|
"additionalProperties": false
|
|
@@ -1012,7 +1055,8 @@
|
|
|
1012
1055
|
"enum": [
|
|
1013
1056
|
"normal",
|
|
1014
1057
|
"junction",
|
|
1015
|
-
"enum-values"
|
|
1058
|
+
"enum-values",
|
|
1059
|
+
"localization"
|
|
1016
1060
|
],
|
|
1017
1061
|
"type": "string",
|
|
1018
1062
|
"format": ""
|
|
@@ -1055,6 +1099,9 @@
|
|
|
1055
1099
|
"isSystemField": {
|
|
1056
1100
|
"type": "boolean"
|
|
1057
1101
|
},
|
|
1102
|
+
"isLocalized": {
|
|
1103
|
+
"type": "boolean"
|
|
1104
|
+
},
|
|
1058
1105
|
"order": {
|
|
1059
1106
|
"type": "integer",
|
|
1060
1107
|
"format": "int32",
|
|
@@ -1095,6 +1142,10 @@
|
|
|
1095
1142
|
"additionalProperties": false
|
|
1096
1143
|
},
|
|
1097
1144
|
"NgApps.Application.Contexts.Datastore.Entities.FieldDto": {
|
|
1145
|
+
"required": [
|
|
1146
|
+
"dbType",
|
|
1147
|
+
"slug"
|
|
1148
|
+
],
|
|
1098
1149
|
"type": "object",
|
|
1099
1150
|
"properties": {
|
|
1100
1151
|
"id": {
|
|
@@ -1102,20 +1153,23 @@
|
|
|
1102
1153
|
"format": "uuid"
|
|
1103
1154
|
},
|
|
1104
1155
|
"description": {
|
|
1156
|
+
"maxLength": 512,
|
|
1105
1157
|
"type": "string",
|
|
1106
1158
|
"nullable": true
|
|
1107
1159
|
},
|
|
1108
1160
|
"name": {
|
|
1161
|
+
"maxLength": 50,
|
|
1109
1162
|
"type": "string",
|
|
1110
1163
|
"nullable": true
|
|
1111
1164
|
},
|
|
1112
1165
|
"slug": {
|
|
1113
|
-
"
|
|
1114
|
-
"
|
|
1166
|
+
"minLength": 1,
|
|
1167
|
+
"type": "string"
|
|
1115
1168
|
},
|
|
1116
1169
|
"dbType": {
|
|
1117
|
-
"
|
|
1118
|
-
"
|
|
1170
|
+
"maxLength": 50,
|
|
1171
|
+
"minLength": 1,
|
|
1172
|
+
"type": "string"
|
|
1119
1173
|
},
|
|
1120
1174
|
"primaryKey": {
|
|
1121
1175
|
"type": "boolean"
|
|
@@ -1204,6 +1258,17 @@
|
|
|
1204
1258
|
},
|
|
1205
1259
|
"isSystemField": {
|
|
1206
1260
|
"type": "boolean"
|
|
1261
|
+
},
|
|
1262
|
+
"isLocalized": {
|
|
1263
|
+
"type": "boolean"
|
|
1264
|
+
},
|
|
1265
|
+
"nameTranslations": {
|
|
1266
|
+
"type": "object",
|
|
1267
|
+
"additionalProperties": {
|
|
1268
|
+
"type": "string",
|
|
1269
|
+
"nullable": true
|
|
1270
|
+
},
|
|
1271
|
+
"nullable": true
|
|
1207
1272
|
}
|
|
1208
1273
|
},
|
|
1209
1274
|
"additionalProperties": false
|
|
@@ -1255,6 +1320,10 @@
|
|
|
1255
1320
|
"additionalProperties": false
|
|
1256
1321
|
},
|
|
1257
1322
|
"NgApps.Application.Contexts.Datastore.Entities.EntityIndexDto": {
|
|
1323
|
+
"required": [
|
|
1324
|
+
"fieldIds",
|
|
1325
|
+
"name"
|
|
1326
|
+
],
|
|
1258
1327
|
"type": "object",
|
|
1259
1328
|
"properties": {
|
|
1260
1329
|
"id": {
|
|
@@ -1262,19 +1331,19 @@
|
|
|
1262
1331
|
"format": "uuid"
|
|
1263
1332
|
},
|
|
1264
1333
|
"name": {
|
|
1265
|
-
"
|
|
1266
|
-
"
|
|
1334
|
+
"minLength": 1,
|
|
1335
|
+
"type": "string"
|
|
1267
1336
|
},
|
|
1268
1337
|
"unique": {
|
|
1269
1338
|
"type": "boolean"
|
|
1270
1339
|
},
|
|
1271
1340
|
"fieldIds": {
|
|
1341
|
+
"minItems": 1,
|
|
1272
1342
|
"type": "array",
|
|
1273
1343
|
"items": {
|
|
1274
1344
|
"type": "string",
|
|
1275
1345
|
"format": "uuid"
|
|
1276
|
-
}
|
|
1277
|
-
"nullable": true
|
|
1346
|
+
}
|
|
1278
1347
|
}
|
|
1279
1348
|
},
|
|
1280
1349
|
"additionalProperties": false
|
|
@@ -1287,6 +1356,15 @@
|
|
|
1287
1356
|
"type": "string",
|
|
1288
1357
|
"format": ""
|
|
1289
1358
|
},
|
|
1359
|
+
"NgApps.Domain.Contexts.Studio.Microservices.MicroserviceFieldWriteOn": {
|
|
1360
|
+
"enum": [
|
|
1361
|
+
"always",
|
|
1362
|
+
"create",
|
|
1363
|
+
"update"
|
|
1364
|
+
],
|
|
1365
|
+
"type": "string",
|
|
1366
|
+
"format": ""
|
|
1367
|
+
},
|
|
1290
1368
|
"NgApps.Domain.Contexts.Datastore.Entities.OperatorType": {
|
|
1291
1369
|
"enum": [
|
|
1292
1370
|
"eq",
|
|
@@ -1302,7 +1380,9 @@
|
|
|
1302
1380
|
"startswith",
|
|
1303
1381
|
"endswith",
|
|
1304
1382
|
"istartswith",
|
|
1305
|
-
"iendswith"
|
|
1383
|
+
"iendswith",
|
|
1384
|
+
"isnull",
|
|
1385
|
+
"isnotnull"
|
|
1306
1386
|
],
|
|
1307
1387
|
"type": "string",
|
|
1308
1388
|
"format": ""
|
|
@@ -1378,6 +1458,18 @@
|
|
|
1378
1458
|
"icon": {
|
|
1379
1459
|
"type": "string",
|
|
1380
1460
|
"nullable": true
|
|
1461
|
+
},
|
|
1462
|
+
"order": {
|
|
1463
|
+
"type": "integer",
|
|
1464
|
+
"format": "int32"
|
|
1465
|
+
},
|
|
1466
|
+
"labels": {
|
|
1467
|
+
"type": "object",
|
|
1468
|
+
"additionalProperties": {
|
|
1469
|
+
"type": "string",
|
|
1470
|
+
"nullable": true
|
|
1471
|
+
},
|
|
1472
|
+
"nullable": true
|
|
1381
1473
|
}
|
|
1382
1474
|
},
|
|
1383
1475
|
"additionalProperties": false
|
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';
|
|
@@ -16,17 +17,24 @@ import { registerTranslationTools } from './tools/translations.js';
|
|
|
16
17
|
import { registerFlowTools } from './tools/flows.js';
|
|
17
18
|
import { registerKnowledgeResources } from './resources/knowledge.js';
|
|
18
19
|
import { registerSchemaResources } from './resources/schemas.js';
|
|
20
|
+
import { registerRuleResources } from './resources/rules.js';
|
|
19
21
|
import { instrumentServer } from './observability/trace.js';
|
|
20
22
|
import { registerProjectTools } from './tools/projects.js';
|
|
21
23
|
import { registerEntityTools } from './tools/entities.js';
|
|
22
24
|
import { registerDependencyTools } from './tools/dependencies.js';
|
|
23
25
|
import { registerVariableTools } from './tools/variables.js';
|
|
26
|
+
import { registerFunctionTools } from './tools/functions.js';
|
|
24
27
|
import { registerFolderTools } from './tools/folders.js';
|
|
25
28
|
import { registerQueryTools } from './tools/queries.js';
|
|
26
29
|
import { registerViewTools } from './tools/views.js';
|
|
27
30
|
import { registerPageTools } from './tools/pages.js';
|
|
28
31
|
import { registerFileTools } from './tools/files.js';
|
|
29
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';
|
|
30
38
|
import { registerDtoTools } from './tools/dtos.js';
|
|
31
39
|
const moduleRegistrations = {
|
|
32
40
|
platform: registerPlatformTools,
|
|
@@ -35,7 +43,9 @@ const moduleRegistrations = {
|
|
|
35
43
|
datasource: registerDatasourceTools,
|
|
36
44
|
entity: registerEntityTools,
|
|
37
45
|
row: registerRowTools,
|
|
46
|
+
import: registerImportTools,
|
|
38
47
|
microservice: registerMicroserviceTools,
|
|
48
|
+
microfunction: registerMicrofunctionTools,
|
|
39
49
|
query: registerQueryTools,
|
|
40
50
|
workflow: registerWorkflowTools,
|
|
41
51
|
automation: registerAutomationTools,
|
|
@@ -47,6 +57,7 @@ const moduleRegistrations = {
|
|
|
47
57
|
flow: registerFlowTools,
|
|
48
58
|
layout: registerLayoutTools,
|
|
49
59
|
variable: registerVariableTools,
|
|
60
|
+
function: registerFunctionTools,
|
|
50
61
|
folder: registerFolderTools,
|
|
51
62
|
file: registerFileTools,
|
|
52
63
|
access: registerAccessTools,
|
|
@@ -54,7 +65,11 @@ const moduleRegistrations = {
|
|
|
54
65
|
template: registerTemplateTools,
|
|
55
66
|
organization: registerOrganizationTools,
|
|
56
67
|
dependency: registerDependencyTools,
|
|
57
|
-
deployment: registerDeploymentTools
|
|
68
|
+
deployment: registerDeploymentTools,
|
|
69
|
+
environment: registerEnvironmentTools,
|
|
70
|
+
merge: registerMergeTools,
|
|
71
|
+
activity: registerActivityTools,
|
|
72
|
+
revision: registerRevisionTools
|
|
58
73
|
};
|
|
59
74
|
export function createGatewayServer(platform) {
|
|
60
75
|
const server = instrumentServer(new McpServer({ name: 'ngapps', version: '0.1.0' }), platform.config);
|
|
@@ -63,5 +78,6 @@ export function createGatewayServer(platform) {
|
|
|
63
78
|
}
|
|
64
79
|
registerSchemaResources(server);
|
|
65
80
|
registerKnowledgeResources(server);
|
|
81
|
+
registerRuleResources(server);
|
|
66
82
|
return server;
|
|
67
83
|
}
|
package/dist/tools/access.js
CHANGED
|
@@ -5,12 +5,12 @@ export function registerAccessTools(server, platform) {
|
|
|
5
5
|
const config = platform.config;
|
|
6
6
|
server.registerTool('role_list', {
|
|
7
7
|
title: 'Rolleri listele',
|
|
8
|
-
description: "Projenin rollerini listeler. page_create/page_update'in roleIds
|
|
8
|
+
description: "Projenin rollerini listeler. Uç YALNIZ id + name döner (backend RoleDto bu ikisini taşır) — SLUG BURADA YOKTUR ve iki anahtar farklıdır: page_create/page_update ve microservice_create'in roleIds alanı ID ister, buna karşılık Authorized(user.roles) ile middleware'in kurduğu user.roles SLUG karşılaştırır (platformun get-user sorgusu roles+user_roles join'inden slug dizisi üretir). Slug'ı built-in 'roles' entity'sinden okuyun (sabit id 01917ede-88a2-72ea-8397-2619e5d5dca0; row_list/microservice). ROL OLUŞTURAN BİR TOOL YOKTUR ve olmamalıdır: roller built-in datasource'taki sıradan bir entity'dir (kolonlar id · name UNIQUE · slug). Uygulamanın rol yönetmesi gerekiyorsa yol entity_get('roles') + kendi microservice ucun (uç + sayfa) ve rolü kullanıcıya bağlayan user_roles satırı — MCP'den doğrudan yazma değil; reçete platform_guide('entity') §'Hazır entity'ler'. Projeyle birlikte gelen roller çoğu senaryoya yeter; önce bu listeye bakın.",
|
|
9
9
|
inputSchema: { project: projectParam, environment: environmentParam },
|
|
10
10
|
annotations: readOnly
|
|
11
11
|
}, handle(config, async ({ project, environment }) => {
|
|
12
12
|
const payload = await platform.tenant('GET', project, '/roles', { environment });
|
|
13
|
-
return { roles: (payload?.data ?? []).map(role => ({ id: role.id, name: role.name
|
|
13
|
+
return { roles: (payload?.data ?? []).map(role => ({ id: role.id, name: role.name })) };
|
|
14
14
|
}));
|
|
15
15
|
server.registerTool('user_list', {
|
|
16
16
|
title: 'Kullanıcıları listele',
|
|
@@ -20,7 +20,7 @@ export function registerAccessTools(server, platform) {
|
|
|
20
20
|
}, handle(config, ({ project, environment, ...query }) => platform.tenant('GET', project, '/users', { environment, query })));
|
|
21
21
|
server.registerTool('org_role_list', {
|
|
22
22
|
title: 'Organizasyon rollerini listele',
|
|
23
|
-
description: 'Organization.API tarafındaki rolleri listeler (platform yönetimi); proje içi yetkilendirme için role_list kullanın.',
|
|
23
|
+
description: 'Organization.API tarafındaki rolleri listeler (platform yönetimi); proje içi yetkilendirme için role_list kullanın. Burada da oluşturma yoktur — organizasyon rolleri platform yönetimine aittir ve uygulamanın rol tablosuyla (built-in roles entity) ilgisi yoktur.',
|
|
24
24
|
inputSchema: {},
|
|
25
25
|
annotations: readOnly
|
|
26
26
|
}, handle(config, () => platform.org('GET', '/roles')));
|
|
@@ -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
|
+
}
|
|
@@ -29,7 +29,7 @@ export function registerApplicationTools(server, platform) {
|
|
|
29
29
|
name: z.string().min(1),
|
|
30
30
|
color: z.string().optional(),
|
|
31
31
|
dns: z.string().optional(),
|
|
32
|
-
type: z.
|
|
32
|
+
type: z.enum(['web', 'mobile']).optional().describe("ApplicationType; geçerli değerler: 'web', 'mobile'; varsayılan 'web'"),
|
|
33
33
|
properties: z.record(z.unknown()).optional(),
|
|
34
34
|
notFoundPageId: guid.optional()
|
|
35
35
|
},
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { guid, projectParam, environmentParam, definitionParam, pagingParams, readOnly, writes, updates, destructive } from './common.js';
|
|
1
|
+
import { guid, entityRef, resolveEntityId, withResolved, projectParam, environmentParam, definitionParam, pagingParams, readOnly, writes, updates, destructive, languageParam } from './common.js';
|
|
2
|
+
import { RefResolver } from '../platform/refs.js';
|
|
2
3
|
import { normalizeWorkflowDefinition, withNormalization } from '../knowledge/normalize.js';
|
|
3
4
|
import { evaluatePolicy, enforcePolicy, attachFindings } from '../knowledge/policy.js';
|
|
4
|
-
import { policyRules } from '../knowledge/rules.js';
|
|
5
|
+
import { policyRules, microfunctionStepFindings } from '../knowledge/rules.js';
|
|
6
|
+
import { languageHeader } from '../knowledge/languageCodes.js';
|
|
5
7
|
import { handle } from '../platform/responses.js';
|
|
6
8
|
import { z } from 'zod';
|
|
9
|
+
import { constraintSummary } from '../knowledge/backendConstraints.js';
|
|
7
10
|
const policyOverrideParam = z.boolean().optional()
|
|
8
11
|
.describe('true: politika block bulgularını warn\'a indirir (bilinçli istisna; yanıtta işaretlenir)');
|
|
9
12
|
export function registerAutomationTools(server, platform) {
|
|
@@ -11,93 +14,132 @@ export function registerAutomationTools(server, platform) {
|
|
|
11
14
|
server.registerTool('automation_list', {
|
|
12
15
|
title: 'Automation listele',
|
|
13
16
|
description: 'Entity\'ye bağlı automation\'ları listeler.',
|
|
14
|
-
inputSchema: { project: projectParam, environment: environmentParam, entityId:
|
|
17
|
+
inputSchema: { project: projectParam, environment: environmentParam, entityId: entityRef, searchTerm: z.string().optional(), ...pagingParams },
|
|
15
18
|
annotations: readOnly
|
|
16
|
-
}, handle(config, ({ project, environment, entityId, ...query }) =>
|
|
19
|
+
}, handle(config, async ({ project, environment, entityId, ...query }) => {
|
|
20
|
+
const resolver = new RefResolver(platform, project, environment);
|
|
21
|
+
const resolvedEntityId = await resolveEntityId(resolver, entityId);
|
|
22
|
+
return withResolved(await platform.tenant('GET', project, `/entities/${resolvedEntityId}/automation/list`, { environment, query }), resolver.resolved);
|
|
23
|
+
}));
|
|
17
24
|
server.registerTool('automation_get', {
|
|
18
25
|
title: 'Automation getir',
|
|
19
26
|
description: 'Tek automation\'ı step ağacıyla getirir.',
|
|
20
|
-
inputSchema: { project: projectParam, environment: environmentParam, entityId:
|
|
27
|
+
inputSchema: { project: projectParam, environment: environmentParam, entityId: entityRef, id: guid },
|
|
21
28
|
annotations: readOnly
|
|
22
|
-
}, handle(config, ({ project, environment, entityId, id }) =>
|
|
29
|
+
}, handle(config, async ({ project, environment, entityId, id }) => {
|
|
30
|
+
const resolver = new RefResolver(platform, project, environment);
|
|
31
|
+
const resolvedEntityId = await resolveEntityId(resolver, entityId);
|
|
32
|
+
return withResolved(await platform.tenant('GET', project, `/entities/${resolvedEntityId}/automation/${id}`, { environment }), resolver.resolved);
|
|
33
|
+
}));
|
|
23
34
|
server.registerTool('automation_create', {
|
|
24
35
|
title: 'Automation oluştur',
|
|
25
|
-
description: "Entity'ye automation bağlar. definition = CreateWorkflowCommand gövdesi ('automation' nesnesi içermeli; entityId route'tan set edilir). İlk kullanımdan önce platform_guide('workflow') okuyun; gövde politika kontrolünden geçer.",
|
|
26
|
-
inputSchema: { project: projectParam, environment: environmentParam, entityId:
|
|
36
|
+
description: "Entity'ye automation bağlar. definition = CreateWorkflowCommand gövdesi ('automation' nesnesi içermeli; entityId route'tan set edilir). İlk kullanımdan önce platform_guide('workflow') okuyun; gövde politika kontrolünden geçer. " + constraintSummary('CreateWorkflowCommand'),
|
|
37
|
+
inputSchema: { project: projectParam, environment: environmentParam, entityId: entityRef, definition: definitionParam, policyOverride: policyOverrideParam },
|
|
27
38
|
annotations: writes
|
|
28
39
|
}, handle(config, async ({ project, environment, entityId, definition, policyOverride }) => {
|
|
29
40
|
const normalized = normalizeWorkflowDefinition(definition);
|
|
30
|
-
const findings = enforcePolicy(
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
const findings = enforcePolicy([
|
|
42
|
+
...evaluatePolicy(config, policyRules, 'workflow', definition, { operation: 'create', workflowKind: 'automation' }, policyOverride),
|
|
43
|
+
...await microfunctionStepFindings(platform, project, environment, definition, 'automation', policyOverride)
|
|
44
|
+
]);
|
|
45
|
+
const resolver = new RefResolver(platform, project, environment);
|
|
46
|
+
const resolvedEntityId = await resolveEntityId(resolver, entityId);
|
|
47
|
+
const payload = await platform.tenant('POST', project, `/entities/${resolvedEntityId}/automation`, { environment, body: definition });
|
|
48
|
+
return attachFindings(withResolved(withNormalization(payload, normalized), resolver.resolved), findings);
|
|
33
49
|
}));
|
|
34
50
|
server.registerTool('automation_update', {
|
|
35
51
|
title: 'Automation güncelle',
|
|
36
|
-
description: "Automation tanımını günceller. definition = UpdateWorkflowCommand gövdesi ('automation' nesnesi içermeli); gövde politika kontrolünden geçer.",
|
|
37
|
-
inputSchema: { project: projectParam, environment: environmentParam, entityId:
|
|
52
|
+
description: "Automation tanımını günceller. definition = UpdateWorkflowCommand gövdesi ('automation' nesnesi içermeli); gövde politika kontrolünden geçer. " + constraintSummary('UpdateWorkflowCommand'),
|
|
53
|
+
inputSchema: { project: projectParam, environment: environmentParam, entityId: entityRef, id: guid, definition: definitionParam, policyOverride: policyOverrideParam },
|
|
38
54
|
annotations: updates
|
|
39
55
|
}, handle(config, async ({ project, environment, entityId, id, definition, policyOverride }) => {
|
|
40
56
|
const normalized = normalizeWorkflowDefinition(definition);
|
|
41
|
-
const findings = enforcePolicy(
|
|
42
|
-
|
|
43
|
-
|
|
57
|
+
const findings = enforcePolicy([
|
|
58
|
+
...evaluatePolicy(config, policyRules, 'workflow', definition, { operation: 'update', workflowKind: 'automation' }, policyOverride),
|
|
59
|
+
...await microfunctionStepFindings(platform, project, environment, definition, 'automation', policyOverride)
|
|
60
|
+
]);
|
|
61
|
+
const resolver = new RefResolver(platform, project, environment);
|
|
62
|
+
const resolvedEntityId = await resolveEntityId(resolver, entityId);
|
|
63
|
+
const payload = await platform.tenant('PUT', project, `/entities/${resolvedEntityId}/automation/${id}`, { environment, body: definition });
|
|
64
|
+
return attachFindings(withResolved(withNormalization(payload, normalized), resolver.resolved), findings);
|
|
44
65
|
}));
|
|
45
66
|
server.registerTool('automation_delete', {
|
|
46
67
|
title: 'Automation sil',
|
|
47
68
|
description: 'Automation\'ı siler.',
|
|
48
|
-
inputSchema: { project: projectParam, environment: environmentParam, entityId:
|
|
69
|
+
inputSchema: { project: projectParam, environment: environmentParam, entityId: entityRef, id: guid },
|
|
49
70
|
annotations: destructive
|
|
50
|
-
}, handle(config, ({ project, environment, entityId, id }) =>
|
|
71
|
+
}, handle(config, async ({ project, environment, entityId, id }) => {
|
|
72
|
+
const resolver = new RefResolver(platform, project, environment);
|
|
73
|
+
const resolvedEntityId = await resolveEntityId(resolver, entityId);
|
|
74
|
+
return withResolved(await platform.tenant('DELETE', project, `/entities/${resolvedEntityId}/automation/${id}`, { environment }), resolver.resolved);
|
|
75
|
+
}));
|
|
51
76
|
server.registerTool('automation_reorder', {
|
|
52
77
|
title: 'Automation sırasını değiştir',
|
|
53
78
|
description: "Entity'nin automation'larının çalışma sırasını toplu günceller; aynı operasyona bağlı birden çok automation'da sıra davranışı belirler.",
|
|
54
79
|
inputSchema: {
|
|
55
80
|
project: projectParam,
|
|
56
81
|
environment: environmentParam,
|
|
57
|
-
entityId:
|
|
82
|
+
entityId: entityRef,
|
|
58
83
|
automations: z.array(z.object({ id: guid, order: z.number().int().min(0) })).min(1)
|
|
59
84
|
.describe('Tüm automation\'lar için (id, order) çiftleri; listeyi automation_list ile kurun')
|
|
60
85
|
},
|
|
61
86
|
annotations: updates
|
|
62
|
-
}, handle(config, ({ project, environment, entityId, automations }) =>
|
|
87
|
+
}, handle(config, async ({ project, environment, entityId, automations }) => {
|
|
88
|
+
const resolver = new RefResolver(platform, project, environment);
|
|
89
|
+
const resolvedEntityId = await resolveEntityId(resolver, entityId);
|
|
90
|
+
return withResolved(await platform.tenant('PUT', project, `/entities/${resolvedEntityId}/automation/orders`, { environment, body: { automations } }), resolver.resolved);
|
|
91
|
+
}));
|
|
63
92
|
server.registerTool('automation_trigger', {
|
|
64
93
|
title: 'Automation tetikle',
|
|
65
|
-
description:
|
|
94
|
+
description: "Automation'ı elle tetikler — CANLI çalıştırır, gerçek satır yazar. Fire-and-forget: sonuç bu yanıtta dönmez, automation_histories + row_list ile izleyin. VERİ ÜRETMEK İÇİN KULLANMAYIN: rowContext almaz, bu yüzden yazdığı her zaman damgası UtcNow() olur — tarihsel bir tohumun üstünde tek bir doğrulama çağrısı huni ortalamasını bozar (B-52). Akışın ŞEKLİNİ sınamak istiyorsanız automation_preview kullanın: automation da bir workflow'dur, preview tek transaction'da koşar ve geri alınır, yani hiçbir satır kalmaz.",
|
|
66
95
|
inputSchema: {
|
|
67
96
|
project: projectParam,
|
|
68
97
|
environment: environmentParam,
|
|
69
|
-
entityId:
|
|
98
|
+
entityId: entityRef,
|
|
70
99
|
id: guid,
|
|
71
100
|
operation: z.string().optional(),
|
|
72
101
|
recordIds: z.array(z.union([z.string(), z.number()])).optional().describe('Tetiklenecek satır id\'leri')
|
|
73
102
|
},
|
|
74
103
|
annotations: writes
|
|
75
|
-
}, handle(config, ({ project, environment, entityId, id, operation, recordIds }) =>
|
|
76
|
-
environment
|
|
77
|
-
|
|
78
|
-
|
|
104
|
+
}, handle(config, async ({ project, environment, entityId, id, operation, recordIds }) => {
|
|
105
|
+
const resolver = new RefResolver(platform, project, environment);
|
|
106
|
+
const resolvedEntityId = await resolveEntityId(resolver, entityId);
|
|
107
|
+
return withResolved(await platform.tenant('POST', project, `/entities/${resolvedEntityId}/automation/${id}/trigger`, {
|
|
108
|
+
environment,
|
|
109
|
+
body: { operation, recordIds: recordIds ?? [] }
|
|
110
|
+
}), resolver.resolved);
|
|
111
|
+
}));
|
|
79
112
|
server.registerTool('automation_histories', {
|
|
80
113
|
title: 'Automation geçmişi',
|
|
81
114
|
description: 'Automation çalıştırma geçmişini listeler; automation_trigger sonrası sonucu buradan doğrulayın.',
|
|
82
115
|
inputSchema: {
|
|
83
116
|
project: projectParam,
|
|
84
117
|
environment: environmentParam,
|
|
85
|
-
entityId:
|
|
118
|
+
entityId: entityRef,
|
|
86
119
|
id: guid,
|
|
87
120
|
status: z.string().optional().describe('EventStatus filtresi'),
|
|
88
121
|
...pagingParams
|
|
89
122
|
},
|
|
90
123
|
annotations: readOnly
|
|
91
|
-
}, handle(config, ({ project, environment, entityId, id, ...query }) =>
|
|
124
|
+
}, handle(config, async ({ project, environment, entityId, id, ...query }) => {
|
|
125
|
+
const resolver = new RefResolver(platform, project, environment);
|
|
126
|
+
const resolvedEntityId = await resolveEntityId(resolver, entityId);
|
|
127
|
+
return withResolved(await platform.tenant('GET', project, `/entities/${resolvedEntityId}/automation/${id}/histories`, { environment, query }), resolver.resolved);
|
|
128
|
+
}));
|
|
92
129
|
server.registerTool('automation_preview', {
|
|
93
130
|
title: 'Automation önizle',
|
|
94
|
-
description:
|
|
95
|
-
inputSchema: { project: projectParam, environment: environmentParam, entityId:
|
|
131
|
+
description: "Kaydedilmemiş automation tanımını çalıştırır; kaydetmeden önce preview ile doğrulayın. definition = PreviewWorkflowCommand gövdesi. Preview tek transaction'da koşar ve sonunda ROLLBACK edilir — kalıcı satır yazmaz (ölçüldü, İK koşusu W-1); code step'teki dış HTTP çağrıları istisnadır. Davranış kuralları: platform_guide('workflow').",
|
|
132
|
+
inputSchema: { project: projectParam, environment: environmentParam, entityId: entityRef, definition: definitionParam, policyOverride: policyOverrideParam, language: languageParam, expectFailure: z.boolean().optional().describe("true: bu önizlemede bir adımın/dalın düşmesi BEKLENİYOR (kasıtlı negatif test — geçersiz gövde, iş kuralı reddi, revert). Yanıt yine executionSuccess:false/runtimeErrors taşır, ama ölçüm aracı bu satırı plansız hata saymaz (page_screenshot'taki expectFailure deseniyle aynı).") },
|
|
96
133
|
annotations: writes
|
|
97
|
-
}, handle(config, async ({ project, environment, entityId, definition, policyOverride }) => {
|
|
134
|
+
}, handle(config, async ({ project, environment, entityId, definition, policyOverride, language }) => {
|
|
98
135
|
const normalized = normalizeWorkflowDefinition(definition);
|
|
99
|
-
const findings = enforcePolicy(
|
|
100
|
-
|
|
101
|
-
|
|
136
|
+
const findings = enforcePolicy([
|
|
137
|
+
...evaluatePolicy(config, policyRules, 'workflow', definition, { operation: 'preview', workflowKind: 'automation' }, policyOverride),
|
|
138
|
+
...await microfunctionStepFindings(platform, project, environment, definition, 'automation', policyOverride)
|
|
139
|
+
]);
|
|
140
|
+
const resolver = new RefResolver(platform, project, environment);
|
|
141
|
+
const resolvedEntityId = await resolveEntityId(resolver, entityId);
|
|
142
|
+
const payload = await platform.tenant('POST', project, `/entities/${resolvedEntityId}/automation/preview`, { environment, body: definition, headers: languageHeader(language, normalized) });
|
|
143
|
+
return attachFindings(withResolved(withNormalization(payload, normalized), resolver.resolved), findings);
|
|
102
144
|
}));
|
|
103
145
|
}
|