@appaflytech/zeyrek-ai-mcp 0.0.1

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 (88) hide show
  1. package/.env.example +46 -0
  2. package/README.md +260 -0
  3. package/dist/config.js +128 -0
  4. package/dist/index.js +88 -0
  5. package/dist/knowledge/componentCatalog.js +438 -0
  6. package/dist/knowledge/componentEvents.js +164 -0
  7. package/dist/knowledge/coverage.js +60 -0
  8. package/dist/knowledge/normalize.js +1309 -0
  9. package/dist/knowledge/outlines.js +167 -0
  10. package/dist/knowledge/policy.js +44 -0
  11. package/dist/knowledge/reservedTables.js +75 -0
  12. package/dist/knowledge/rules.js +1725 -0
  13. package/dist/observability/trace.js +337 -0
  14. package/dist/platform/errors.js +132 -0
  15. package/dist/platform/http.js +169 -0
  16. package/dist/platform/responses.js +94 -0
  17. package/dist/platform/token.js +79 -0
  18. package/dist/resources/examples/entity-pair-m2m.json +105 -0
  19. package/dist/resources/examples/flow-list-to-form.json +65 -0
  20. package/dist/resources/examples/flow-load-table.json +178 -0
  21. package/dist/resources/examples/microservice-table-list.json +49 -0
  22. package/dist/resources/examples/middleware-authenticate.json +194 -0
  23. package/dist/resources/examples/page-detail-profile.json +95 -0
  24. package/dist/resources/examples/page-dynamic-form.json +221 -0
  25. package/dist/resources/examples/page-form-upsert.json +279 -0
  26. package/dist/resources/examples/page-html-embed.json +106 -0
  27. package/dist/resources/examples/page-sign-in.json +194 -0
  28. package/dist/resources/examples/workflow-basic.json +94 -0
  29. package/dist/resources/guides/component.md +108 -0
  30. package/dist/resources/guides/entity.md +348 -0
  31. package/dist/resources/guides/expressions.md +139 -0
  32. package/dist/resources/guides/getting-started.md +109 -0
  33. package/dist/resources/guides/html.md +106 -0
  34. package/dist/resources/guides/microservice.md +313 -0
  35. package/dist/resources/guides/middleware.md +271 -0
  36. package/dist/resources/guides/modify-existing.md +35 -0
  37. package/dist/resources/guides/page.md +1574 -0
  38. package/dist/resources/guides/view.md +89 -0
  39. package/dist/resources/guides/workflow.md +359 -0
  40. package/dist/resources/knowledge.js +44 -0
  41. package/dist/resources/schemas/CreateDatasourceCommand.json +54 -0
  42. package/dist/resources/schemas/CreateDiscoveredEntitiesCommand.json +133 -0
  43. package/dist/resources/schemas/CreateEntityCommand.json +387 -0
  44. package/dist/resources/schemas/CreateMicroserviceCommand.json +528 -0
  45. package/dist/resources/schemas/CreateQueryCommand.json +43 -0
  46. package/dist/resources/schemas/CreateViewCommand.json +158 -0
  47. package/dist/resources/schemas/CreateWorkflowCommand.json +1719 -0
  48. package/dist/resources/schemas/Filter.json +124 -0
  49. package/dist/resources/schemas/GetRowsQuery.json +122 -0
  50. package/dist/resources/schemas/PreviewMicroserviceCommand.json +565 -0
  51. package/dist/resources/schemas/PreviewQueryCommand.json +74 -0
  52. package/dist/resources/schemas/PreviewWorkflowCommand.json +981 -0
  53. package/dist/resources/schemas/StepDto.json +900 -0
  54. package/dist/resources/schemas/UpdateDatasourceCommand.json +58 -0
  55. package/dist/resources/schemas/UpdateEntityCommand.json +679 -0
  56. package/dist/resources/schemas/UpdateMicroserviceCommand.json +512 -0
  57. package/dist/resources/schemas/UpdateQueryCommand.json +86 -0
  58. package/dist/resources/schemas/UpdateViewCommand.json +153 -0
  59. package/dist/resources/schemas/UpdateWorkflowCommand.json +1719 -0
  60. package/dist/resources/schemas.js +40 -0
  61. package/dist/server.js +63 -0
  62. package/dist/tools/access.js +27 -0
  63. package/dist/tools/applications.js +59 -0
  64. package/dist/tools/automations.js +103 -0
  65. package/dist/tools/common.js +18 -0
  66. package/dist/tools/components.js +280 -0
  67. package/dist/tools/datasources.js +82 -0
  68. package/dist/tools/dependencies.js +17 -0
  69. package/dist/tools/deployments.js +17 -0
  70. package/dist/tools/dtos.js +54 -0
  71. package/dist/tools/entities.js +166 -0
  72. package/dist/tools/files.js +138 -0
  73. package/dist/tools/flows.js +226 -0
  74. package/dist/tools/folders.js +51 -0
  75. package/dist/tools/layouts.js +105 -0
  76. package/dist/tools/microservices.js +198 -0
  77. package/dist/tools/organizations.js +65 -0
  78. package/dist/tools/pages.js +597 -0
  79. package/dist/tools/platformInfo.js +44 -0
  80. package/dist/tools/projects.js +152 -0
  81. package/dist/tools/queries.js +48 -0
  82. package/dist/tools/rows.js +115 -0
  83. package/dist/tools/screens.js +97 -0
  84. package/dist/tools/templates.js +65 -0
  85. package/dist/tools/variables.js +94 -0
  86. package/dist/tools/views.js +58 -0
  87. package/dist/tools/workflows.js +196 -0
  88. package/package.json +49 -0
@@ -0,0 +1,65 @@
1
+ import { guid, writes, updates } from './common.js';
2
+ import { handle } from '../platform/responses.js';
3
+ import { z } from 'zod';
4
+ const componentInput = z.object({
5
+ applicationId: guid,
6
+ name: z.string().min(1),
7
+ slug: z.string().min(1),
8
+ type: z.enum(['web', 'mobile']).optional(),
9
+ kind: z.enum(['component', 'widget']).optional(),
10
+ description: z.string().optional(),
11
+ icon: z.string().optional(),
12
+ categories: z.array(z.string()).optional(),
13
+ definition: z.record(z.unknown()).optional(),
14
+ isHide: z.boolean().optional(),
15
+ isDroppable: z.boolean().optional(),
16
+ isSticky: z.boolean().optional(),
17
+ isDeletable: z.boolean().optional(),
18
+ isDefaultAutoHeight: z.boolean().optional()
19
+ });
20
+ export function registerOrganizationTools(server, platform) {
21
+ const config = platform.config;
22
+ server.registerTool('organization_create', {
23
+ title: 'Organizasyon oluştur',
24
+ description: 'Yeni organizasyon ve ilk süper yönetici kullanıcısını açar. Platform kurulumu işidir; gündelik proje işlerinde gerekmez.',
25
+ inputSchema: {
26
+ name: z.string().min(1),
27
+ slug: z.string().min(1).describe('Host çözümlemesinde kullanılır: {slug}.{hostSuffix}'),
28
+ user: z.object({
29
+ email: z.string().email(),
30
+ password: z.string().min(1),
31
+ firstName: z.string().optional(),
32
+ lastName: z.string().optional()
33
+ })
34
+ },
35
+ annotations: writes
36
+ }, handle(config, ({ name, slug, user }) => platform.org('POST', '/organizations', { body: { name, slug, user } })));
37
+ server.registerTool('organization_component_create', {
38
+ title: 'Organizasyon komponenti kaydet',
39
+ description: "Organizasyon genelindeki tasarım komponent kayıt defterine yeni komponent ekler; projelerin komponent sözlüğü buradan beslenir. Tek proje için component_create kullanın.",
40
+ inputSchema: componentInput.shape,
41
+ annotations: writes
42
+ }, handle(config, body => platform.org('POST', '/organizations/components', {
43
+ body: { type: 'web', kind: 'component', categories: [], definition: {}, ...Object.fromEntries(Object.entries(body).filter(([, value]) => value !== undefined)) }
44
+ })));
45
+ server.registerTool('organization_component_update', {
46
+ title: 'Organizasyon komponentini güncelle',
47
+ description: "Kayıt defterindeki komponenti SLUG ile günceller. Gövde replace'tir; okuma ucu olmadığı için tam gövdeyi siz verirsiniz (bilinen sınır: platformda org komponentleri için GET yok).",
48
+ inputSchema: componentInput.shape,
49
+ annotations: updates
50
+ }, handle(config, ({ slug, ...body }) => platform.org('PUT', `/organizations/components/${slug}`, {
51
+ body: { slug, type: 'web', categories: [], definition: {}, ...Object.fromEntries(Object.entries(body).filter(([, value]) => value !== undefined)) }
52
+ })));
53
+ server.registerTool('organization_component_upsert', {
54
+ title: 'Organizasyon komponentlerini toplu yaz',
55
+ description: 'Komponent listesini tek çağrıda ekler/günceller (kayıt defterini senkronlamak için).',
56
+ inputSchema: { components: z.array(componentInput).min(1) },
57
+ annotations: updates
58
+ }, handle(config, ({ components }) => platform.org('POST', '/organizations/components/upsert', { body: components })));
59
+ server.registerTool('organization_sync_users', {
60
+ title: 'Kullanıcıları tenant şemalarına kopyala',
61
+ description: 'Organizasyon kullanıcılarını, eksik oldukları üretim-dışı environment şemalarına süper yönetici rolüyle kopyalar. Yeni proje/environment kurulumundan sonra çalıştırılır.',
62
+ inputSchema: {},
63
+ annotations: writes
64
+ }, handle(config, () => platform.org('POST', '/organizations/sync-users')));
65
+ }