@appaflytech/zeyrek-ai-mcp 0.0.28 → 0.0.30

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 (201) hide show
  1. package/.env.example +15 -0
  2. package/README.md +5 -5
  3. package/dist/config.js +37 -0
  4. package/dist/index.js +2 -0
  5. package/dist/knowledge/access.js +802 -0
  6. package/dist/knowledge/backendConstraints.js +18 -1
  7. package/dist/knowledge/case.js +41 -0
  8. package/dist/knowledge/componentCatalog.js +494 -34
  9. package/dist/knowledge/componentEvents.js +132 -7
  10. package/dist/knowledge/connectDataBind.js +819 -0
  11. package/dist/knowledge/connectDataDefinition.js +341 -0
  12. package/dist/knowledge/connectDataExecute.js +93 -0
  13. package/dist/knowledge/connectDataRules.js +128 -0
  14. package/dist/knowledge/decision.js +121 -0
  15. package/dist/knowledge/expressionPrelude.js +59 -0
  16. package/dist/knowledge/layoutSummary.js +140 -2
  17. package/dist/knowledge/microserviceParameters.js +58 -0
  18. package/dist/knowledge/mining.js +94 -0
  19. package/dist/knowledge/mobileComponentCatalog.js +859 -0
  20. package/dist/knowledge/mobileComponentEvents.js +239 -0
  21. package/dist/knowledge/normalize.js +236 -67
  22. package/dist/knowledge/outlines.js +36 -0
  23. package/dist/knowledge/platform/lint.js +385 -0
  24. package/dist/knowledge/platform/mobile.js +142 -0
  25. package/dist/knowledge/platform/mobileLayoutLint.js +324 -0
  26. package/dist/knowledge/platform/mobileRules.js +231 -0
  27. package/dist/knowledge/platform/mobileSpacing.js +82 -0
  28. package/dist/knowledge/platform/mobileTabs.js +108 -0
  29. package/dist/knowledge/platform/nativeBoxModel.js +44 -0
  30. package/dist/knowledge/platform/profile.js +25 -0
  31. package/dist/knowledge/platform/resolve.js +122 -0
  32. package/dist/knowledge/platform/web.js +39 -0
  33. package/dist/knowledge/policy.js +18 -4
  34. package/dist/knowledge/process.js +510 -0
  35. package/dist/knowledge/reservedTables.js +79 -0
  36. package/dist/knowledge/rowFilter.js +43 -0
  37. package/dist/knowledge/rules.js +319 -21
  38. package/dist/knowledge/schemaGuard.js +11 -0
  39. package/dist/knowledge/styleResolve.js +50 -4
  40. package/dist/knowledge/styleResolveNative.js +527 -0
  41. package/dist/knowledge/themeResolve.js +3 -3
  42. package/dist/observability/trace.js +6 -3
  43. package/dist/platform/argumentAliases.js +128 -0
  44. package/dist/platform/bodyFile.js +103 -0
  45. package/dist/platform/capture/actions.js +333 -0
  46. package/dist/platform/capture/browser.js +1 -0
  47. package/dist/platform/{screenshot.js → capture/capture.js} +105 -519
  48. package/dist/platform/capture/console-log.js +122 -0
  49. package/dist/platform/capture/index.js +11 -0
  50. package/dist/platform/capture/readiness.js +103 -0
  51. package/dist/platform/capture/summary.js +77 -0
  52. package/dist/platform/capture/target.js +5 -0
  53. package/dist/platform/capture/targets/studio-mobile.js +15 -0
  54. package/dist/platform/capture/targets/studio-web.js +5 -0
  55. package/dist/platform/diagnostics.js +10 -4
  56. package/dist/platform/domSummary.js +1 -1
  57. package/dist/platform/errors.js +162 -10
  58. package/dist/platform/http.js +29 -8
  59. package/dist/platform/impersonation.js +45 -0
  60. package/dist/platform/jsonArray.js +24 -0
  61. package/dist/platform/responses.js +39 -5
  62. package/dist/platform/schemaReadMemory.js +60 -0
  63. package/dist/platform/secrets.js +17 -1
  64. package/dist/platform/strictArguments.js +68 -12
  65. package/dist/platform/tokenVault.js +187 -4
  66. package/dist/resources/examples/bpm-gorev-kontrol.json +294 -0
  67. package/dist/resources/examples/bpm-iso-dokuman.json +228 -0
  68. package/dist/resources/examples/bpm-satinalma.json +376 -0
  69. package/dist/resources/examples/connect-data-convert-verify.json +107 -0
  70. package/dist/resources/examples/connect-data-dropdown-roles.json +66 -0
  71. package/dist/resources/examples/connect-data-edit-m2m.json +73 -0
  72. package/dist/resources/examples/connect-data-query-params.json +50 -0
  73. package/dist/resources/examples/connect-data-table-entity.json +147 -0
  74. package/dist/resources/examples/connect-data-workflow-microservice.json +65 -0
  75. package/dist/resources/examples/mobile-app-shell-drawer.json +243 -0
  76. package/dist/resources/examples/mobile-app-shell-stack.json +157 -0
  77. package/dist/resources/examples/mobile-app-shell-tab.json +208 -0
  78. package/dist/resources/examples/mobile-form-screen.json +365 -0
  79. package/dist/resources/examples/mobile-list-detail-form.json +672 -0
  80. package/dist/resources/examples/page-detail-profile.json +2 -1
  81. package/dist/resources/examples/page-dynamic-form.json +3 -2
  82. package/dist/resources/examples/page-flex-sections.json +1 -1
  83. package/dist/resources/examples/page-html-embed.json +1 -1
  84. package/dist/resources/examples/workflow-basic.json +8 -2
  85. package/dist/resources/guides/access.md +796 -0
  86. package/dist/resources/guides/bpm.md +686 -0
  87. package/dist/resources/guides/case.md +153 -0
  88. package/dist/resources/guides/component.md +91 -4
  89. package/dist/resources/guides/decision.md +185 -0
  90. package/dist/resources/guides/entity.md +50 -8
  91. package/dist/resources/guides/expressions.md +14 -5
  92. package/dist/resources/guides/functions.md +1 -1
  93. package/dist/resources/guides/getting-started.md +38 -1
  94. package/dist/resources/guides/layout.md +11 -7
  95. package/dist/resources/guides/microservice.md +81 -2
  96. package/dist/resources/guides/middleware.md +44 -2
  97. package/dist/resources/guides/mobile-layout.md +193 -0
  98. package/dist/resources/guides/mobile.md +495 -0
  99. package/dist/resources/guides/page.md +454 -75
  100. package/dist/resources/guides/theme.md +8 -2
  101. package/dist/resources/guides/translation.md +1 -1
  102. package/dist/resources/guides/workflow.md +58 -1
  103. package/dist/resources/read.js +41 -0
  104. package/dist/resources/rules.js +11 -5
  105. package/dist/resources/schema-fingerprint.json +7 -5
  106. package/dist/resources/schemas/AccessExplanationDto.json +144 -0
  107. package/dist/resources/schemas/AccessMatrixDto.json +170 -0
  108. package/dist/resources/schemas/AccessPermissionDto.json +57 -0
  109. package/dist/resources/schemas/AccessPolicyDto.json +223 -0
  110. package/dist/resources/schemas/AccessResourceDto.json +86 -0
  111. package/dist/resources/schemas/AppSessionDto.json +53 -0
  112. package/dist/resources/schemas/ConnectDataDescribeDto.json +344 -0
  113. package/dist/resources/schemas/ConnectDataRequestModel.json +202 -0
  114. package/dist/resources/schemas/ConnectDataResultDto.json +421 -0
  115. package/dist/resources/schemas/ConnectorCredentialDto.json +70 -0
  116. package/dist/resources/schemas/ConvertConnectDataToMicroserviceCommand.json +37 -0
  117. package/dist/resources/schemas/CreateAccessPolicyCommand.json +209 -0
  118. package/dist/resources/schemas/CreateDecisionCommand.json +221 -0
  119. package/dist/resources/schemas/CreateEntityCommand.json +118 -0
  120. package/dist/resources/schemas/CreateMicroserviceCommand.json +13 -1
  121. package/dist/resources/schemas/CreateProcessDefinitionCommand.json +1337 -0
  122. package/dist/resources/schemas/CreateQueryCommand.json +4 -0
  123. package/dist/resources/schemas/CreateWorkflowCommand.json +143 -1
  124. package/dist/resources/schemas/DataJobDto.json +6 -1
  125. package/dist/resources/schemas/DecisionDto.json +302 -0
  126. package/dist/resources/schemas/DetachConnectDataMicroserviceCommand.json +28 -0
  127. package/dist/resources/schemas/ExplainAccessQuery.json +33 -0
  128. package/dist/resources/schemas/GenerateProcessDocumentCommand.json +116 -0
  129. package/dist/resources/schemas/GlobalFunctionUpdateResultDto.json +21 -1
  130. package/dist/resources/schemas/MicroserviceDto.json +15 -3
  131. package/dist/resources/schemas/OrganizationProjectDto.json +335 -0
  132. package/dist/resources/schemas/OrganizationSchemaDto.json +196 -0
  133. package/dist/resources/schemas/OrganizationSchemaVersionDto.json +207 -0
  134. package/dist/resources/schemas/PatchProcessDefinitionCommand.json +76 -0
  135. package/dist/resources/schemas/PreviewMicroserviceCommand.json +10 -1
  136. package/dist/resources/schemas/PreviewWorkflowCommand.json +22 -1
  137. package/dist/resources/schemas/ProcessDefinitionDto.json +1480 -0
  138. package/dist/resources/schemas/ProcessSimulationDto.json +96 -0
  139. package/dist/resources/schemas/SaveConnectorCredentialCommand.json +90 -0
  140. package/dist/resources/schemas/SaveProcessEventSourceCommand.json +61 -0
  141. package/dist/resources/schemas/SaveProcessMailSourceCommand.json +89 -0
  142. package/dist/resources/schemas/SignProcessTaskCommand.json +73 -0
  143. package/dist/resources/schemas/SimulateProcessDefinitionQuery.json +92 -0
  144. package/dist/resources/schemas/StepDto.json +22 -1
  145. package/dist/resources/schemas/UpdateAccessPolicyCommand.json +209 -0
  146. package/dist/resources/schemas/UpdateDecisionCommand.json +216 -0
  147. package/dist/resources/schemas/UpdateEntityCommand.json +118 -0
  148. package/dist/resources/schemas/UpdateMicroserviceCommand.json +13 -1
  149. package/dist/resources/schemas/UpdateProcessDefinitionCommand.json +1357 -0
  150. package/dist/resources/schemas/UpdateQueryCommand.json +4 -0
  151. package/dist/resources/schemas/UpdateViewCommand.json +0 -2
  152. package/dist/resources/schemas/UpdateWorkflowCommand.json +143 -1
  153. package/dist/resources/schemas/ValidateProcessDefinitionQuery.json +1339 -0
  154. package/dist/server.js +27 -1
  155. package/dist/tools/access.js +369 -2
  156. package/dist/tools/accessOperations.js +135 -0
  157. package/dist/tools/accessPolicies.js +170 -0
  158. package/dist/tools/accessRuntime.js +203 -0
  159. package/dist/tools/applications.js +60 -3
  160. package/dist/tools/bpm.js +343 -0
  161. package/dist/tools/bpmGovernance.js +266 -0
  162. package/dist/tools/bpmOperations.js +230 -0
  163. package/dist/tools/bpmReporting.js +154 -0
  164. package/dist/tools/bpmRouting.js +150 -0
  165. package/dist/tools/bpmRuntime.js +396 -0
  166. package/dist/tools/case.js +178 -0
  167. package/dist/tools/caseRuntime.js +89 -0
  168. package/dist/tools/common.js +7 -0
  169. package/dist/tools/components.js +118 -14
  170. package/dist/tools/connectData.js +449 -0
  171. package/dist/tools/connectors.js +193 -0
  172. package/dist/tools/datasources.js +3 -3
  173. package/dist/tools/decisions.js +206 -0
  174. package/dist/tools/dependencies.js +1 -1
  175. package/dist/tools/deployments.js +2 -2
  176. package/dist/tools/designSchemaPatch.js +34 -9
  177. package/dist/tools/dtos.js +36 -5
  178. package/dist/tools/entities.js +79 -12
  179. package/dist/tools/externalComponents.js +26 -5
  180. package/dist/tools/flows.js +122 -14
  181. package/dist/tools/folders.js +1 -1
  182. package/dist/tools/imports.js +5 -2
  183. package/dist/tools/layouts.js +50 -17
  184. package/dist/tools/merges.js +1 -1
  185. package/dist/tools/microservices.js +77 -25
  186. package/dist/tools/mobile.js +221 -0
  187. package/dist/tools/modules.js +48 -0
  188. package/dist/tools/organizationStructure.js +137 -0
  189. package/dist/tools/pages.js +465 -98
  190. package/dist/tools/platformInfo.js +27 -8
  191. package/dist/tools/profileWrite.js +92 -0
  192. package/dist/tools/projects.js +71 -9
  193. package/dist/tools/rows.js +69 -13
  194. package/dist/tools/schemaOps.js +61 -1
  195. package/dist/tools/screenWrite.js +37 -8
  196. package/dist/tools/screens.js +95 -5
  197. package/dist/tools/templates.js +26 -1
  198. package/dist/tools/translations.js +1 -1
  199. package/dist/tools/variables.js +11 -5
  200. package/dist/tools/workflows.js +10 -5
  201. package/package.json +2 -2
@@ -47,7 +47,10 @@ Değişkenlerin tam listesi ve o projedeki değerleri: `theme_get(view:'resolved
47
47
  sırası bellidir: projenin tamamı için tema token'ı (`theme_update`), tekrar eden bir kalıp için
48
48
  adlı preset (`presets` + `style.$preset`), yalnız o düğüme özgü karar için düğümün kendi
49
49
  `style`'ı. Sabit hex yazmak yerine `var(--ng-accent-primary)` yazmak, düğümü temaya BAĞLI
50
- tutar.
50
+ tutar. **Adı uydurmayın:** geçerli adlar temanın yaydığı değişkenlerdir (`theme_get({ view: 'resolved' })`'in `cssVars`'ı;
51
+ yüzeyler `--ng-background-surface`, `--ng-background-surface-alt`, `--ng-background-canvas`). Mobil
52
+ çizici yalnız bunları çözer; `var(--ng-surface)` gibi tanımsız bir ad cihazda saydam kalır ve iOS
53
+ gölgesi içeriğe düşer (THEME-012 uyarısı).
51
54
 
52
55
  **2. Marka rengi tek çağrıdır.** `theme_update({ palette: { accent: { primary, hover } } })`
53
56
  sayfadaki her butonu, odak halkasını, seçili satırı ve grafik serisini birden çevirir. Komponent
@@ -98,7 +101,10 @@ theme_update({ theme: {
98
101
  ```
99
102
 
100
103
  **Yazı tipi ve ölçek:** `fontFamily` panelin Google Fonts listesinden bir ad olmalı — runtime
101
- fontu ADIYLA Google'dan çeker, tanınmayan ad sessizce sans-serif'e düşer (THEME-008).
104
+ fontu ADIYLA Google'dan çeker, tanınmayan ad sessizce sans-serif'e düşer (THEME-008). Mobilde de
105
+ aynı kural geçerlidir: cihaz aynı adı Google Fonts'tan TTF olarak indirip `expo-font` ile yükler
106
+ (400 ve 700 kalınlık) — Android'de kalın yüz SENTETİKTİR (iOS gerçek kalın dosyayı çizer,
107
+ ZM-10, 2026-09-26).
102
108
 
103
109
  ```jsonc
104
110
  theme_update({ theme: {
@@ -208,7 +208,7 @@ gerekmez — `schema.ts`'e dokunulmaz, katalog yeniden yüklenmez.
208
208
  `translation_update` artık uygulamanın bütün sayfalarının önbellek satırlarını düşürüyor
209
209
  (`RefreshPageCacheWhenTranslationChangedCommand`), okuma yolu cache-aside olduğu için bir
210
210
  sonraki `page_runtime_get` taze değeri kurar. Yazmadan hemen sonra okuyabilirsin.
211
- - Mobil runtime (`apps/mobile`) bu özelliği henüz beslemiyor — yalnız web.
211
+ - Mobil uygulama runtime'ı (`@ng-apps/ui-native`, Expo) web ile aynı sözlüğü ve motoru kullanır (2026-09-25, plans/mobil-coklu-dil): `language-selector` mobil katalogda, cihazda dil sırası uygulama içi seçim → kayıtlı seçim → cihaz dili → varsayılan (`?lang` yalnız `/preview`'da), seçim uygulama çapında ve kalıcı, sekme etiketi `t:<anahtar>`, `X-Data-Language` sonraki isteklerle gider. Ayrıntı `platform_guide('mobile')` §Çok dil.
212
212
 
213
213
  ## Backend doğrulama sınırları (TR-001)
214
214
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  Buradaki kurallar gerçek projelerde (qm, hr) **deneyerek doğrulandı**.
4
4
 
5
+ **Süreç ≠ workflow.** Workflow tek istekte biter. İnsan kararı bekleyen, günlerce süren, SLA ve görev kutusu olan iş için süreç tanımı yazın (`platform_guide('bpm')`); süreç gerektiğinde bu workflow'u `service` düğümüyle çağırır.
6
+
5
7
  ## Her adım NE İŞE YARADIĞINI yazar (WF-024, block)
6
8
 
7
9
  Studio kanvası adımın **adını** gösterir, ne yaptığını göstermez. 11 satırlık bir `code` adımının
@@ -378,6 +380,20 @@ gidilir, hiçbiri tutmazsa `else` dalı yürür:
378
380
  | response | ✓ | – | ✓ |
379
381
  | convert | ✓ | – | – |
380
382
  | revert (Fail and Rollback) | – | ✓ | – |
383
+ | process (BPM süreci) | ✓ | ✓ | – |
384
+
385
+ > **`process` adımı süreci başlatır ya da ona sinyal/vekalet yazar, BEKLEMEZ (2026-09-18).**
386
+ > Kural alanları `processSlug`, `processOperation: start | signal | delegate` (boş = `start`) ve
387
+ > Jint `expression`'dır; nesne parantezle yazılır: `({ subjectRowId: String(row.id), vars: {} })`.
388
+ > Çıktı `start`'ta `{ instanceId, created, state }`, `signal`'de `{ instanceId, state }`,
389
+ > `delegate`'te `{ delegationId, source }`. Tanım `singleton: per-subject` ise ve satırın açık örneği
390
+ > zaten varsa `start` onu döndürür (`created: false`); değilse her çağrı yeni örnek açar. **Tuzak:**
391
+ > tanımın konu entity'si bu tablo ve ilk start düğümü `trigger: row-event` ile aynı olayı dinliyorsa,
392
+ > o tabloya bağlı automation'daki `start` adımı onunla AYNI ANDA koşar, `per-subject` bile olsa ikisi
393
+ > de açık örnek görmez ve satır için İKİ örnek açılır (ölçüldü: G-3, 135 ms arayla). Satır
394
+ > olayı başlatması için tanımın kendi tetikleyicisi yeter; adımı başka mantığın parçası olarak
395
+ > başlatırken kullanın — Studio adımı bu durumda uyarır. Önizlemede adım gerçekten başlatır ama
396
+ > transaction geri alınır: çıktıdaki `instanceId` sonra 404 döner.
381
397
 
382
398
  > **`revert`'in iki alanı JavaScript ifadesidir, düz metin değil.** `rule.revertType` ve
383
399
  > `rule.revertMessage` çalışma anında `Evaluate` edilir; Studio bu alanları kod editörüyle sunar ve
@@ -572,6 +588,10 @@ Tam örnek, ölçülen çıktı şekli ve `code` çocuğu tuzağının çıkış
572
588
  (Studio aynı form bileşenlerini kullanır): `joins[].path` = `<kökEntityId>.<ilişkiAlanı…>`,
573
589
  join'li `selectFields[].path` = kök id olmadan aynı zincir, kök alanlarda `path` yok.
574
590
  Join'in çıktısı sonraki adımlarda **iç içe** gelir: `step.data[0].course_id.code`.
591
+ - **`<adım>.data` bir JS dizisi DEĞİLDİR** (.NET listesi): `Array.isArray` `false`, `length` ve `Count` çalışır
592
+ ama dizi metotları (`slice()`, `sort()`…) `JavaScriptException: No public methods with the specified arguments
593
+ were found.` ile düşer ve mesaj metodu söylemez. Önce kopyalayın: `Array.from(<adım>.data).slice()` · `.map(…)`
594
+ (ölçüldü 2026-09-21, `workflow_preview`, 39/06; ilk görülme 36/S-15).
575
595
  - **`rule.sort` ve `rule.limit` her table step'te verilir** — yoksa Studio'da workflow sayfası
576
596
  `Cannot read properties of null (reading 'sortValue')` ile hiç açılmaz (**WF-013, block**).
577
597
  - Join path disiplini burada da **MS-007 (block)** ile aynıdır.
@@ -651,9 +671,15 @@ Tam örnek, ölçülen çıktı şekli ve `code` çocuğu tuzağının çıkış
651
671
 
652
672
  ```js
653
673
  // dizi (isSingle:false) · nesne (isSingle:true) · düz değer (yalnız pk dönen yazma)
654
- (Array.isArray(x.data) ? (x.data[0] && x.data[0].id) : (x.data && x.data.id !== undefined ? x.data.id : x.data))
674
+ (x.data && typeof x.data !== 'string' && typeof x.data.length === 'number' ? (x.data[0] && x.data[0].id) : (x.data && x.data.id !== undefined ? x.data.id : x.data))
655
675
  ```
656
676
 
677
+ Diziyi `Array.isArray` ile değil `.length` ile tanıyın: 2026-09-27'den önceki backend'de tablo
678
+ adımının listesi Jint'e sarılı bir CLR nesnesi olarak iniyordu ve `Array.isArray(x.data)` `false`
679
+ dönüyordu — koşuda (2026-09-24) giriş akışı bu yüzden her kullanıcıyı 401 ile reddetti
680
+ (`zeyrek-backend/docs/incident-log.md` #89). `.length`, `.map`, `.filter` o sürümde de çalışıyordu;
681
+ düzeltilmiş backend'de `Array.isArray` de doğrudur.
682
+
657
683
  Şekli bilmiyorsan bu yazımı kullan; `workflow_preview` çıktısında `steps[].output`'a bakarak
658
684
  hangi vakada olduğunu da görebilirsin.
659
685
 
@@ -813,6 +839,21 @@ zorunludur (`CreateWorkflowCommandValidator`: `When(ReturnDtoId.HasValue) → Re
813
839
  }
814
840
  ```
815
841
 
842
+ ## Kompleks projede özne ve runAs
843
+
844
+ Kompleks projede (`accessModel: 'complex'`):
845
+
846
+ - **`user` hazır gelir (uç yolunda):** `id`, `email`, `roles`, `roles_csv`, `positions`, `units` uygulama
847
+ oturumundan dolar. Bağlı middleware her modda koşar; set-user adımı ya da middleware yanıtındaki `user`
848
+ bu değeri ezer — kimlik için set-user'lı middleware yazma, bağlıysa uçtan/sayfadan çıkar (ACC-006).
849
+ - **`subject` nesnesi ve `Can(izin, anahtar)` henüz yok.** Yetkiyi JS ifadesinde yeniden kurma: uç ve
850
+ sayfa izni, satır kapsamı ve alan erişimi platformda uygulanır.
851
+ - **Table ve query adımının kimliği** `rule.runAs`: `inherit` (varsayılan) · `system` (kapsamı ve alan
852
+ erişimini atlar, denetim kaydı yazmaz — ACC-004 warn, gerekçeyi adımın `caution`'ına yaz) ·
853
+ `triggering-user` (şimdilik `inherit` gibi davranır). `workflow_step_schema` alanı göstermez.
854
+ - Kapsamlı ya da korumalı tabloya dokunan query adımı, sorgu `isUnrestricted` değilse
855
+ `403 AccessQueryNotScoped` alır (ACC-005). Ayrıntı: `platform_guide('access')`.
856
+
816
857
  ## Bilinen sınırlar ve kabul edilen kanıt
817
858
 
818
859
  Bunlar **platform sınırıdır**, gövdeyi değiştirerek aşılmaz — ama sınır doğrulamayı iptal etmez,
@@ -951,3 +992,19 @@ Kaydedilen sözleşme üç tüketim yolunda da aynı şekilde bağlanır:
951
992
  - `parameters` bildirilmemiş eski query'lerde belirteçler ham SQL'den okunur; güvenme (string
952
993
  literalindeki `@ad`'ı da parametre sanıyor, `query_get` boş `parameterScheme` gösteriyor). Böyle
953
994
  bir query'yi `parameters` vererek bir kez `query_update` et.
995
+
996
+ ## Connect Data kaynağı olarak workflow
997
+
998
+ Liste dönen workflow bir tablo/dropdown/grafik prop'una **akışsız** bağlanabilir (`connect_data_bind`,
999
+ `platform_guide('page')` §Kural 1c-3). Şartlar (ölçüldü 2026-09-21, koşu 38):
1000
+
1001
+ - **Dönüş DTO'su + `returnBehavior: 'array'`.** Alanlar dönüş DTO'sundan okunur; `connect_data_sources` yalnız çıktı
1002
+ DTO'lu workflow'ları listeler. Response adımı DTO şeklinde dizi döndürmeli.
1003
+ - **Parametreler** `parameterBehavior: 'object'` + girdi DTO'suyla tanımlanır; bağlantı onları `params` ile doldurur:
1004
+ sabit (`{ minFiyat: 5000 }`) ya da sayfa değişkeni (`{ minFiyat: '$minFiyat' }`). Adlar `connect_data_describe`
1005
+ `source.parameters`'tan (bilinmeyen ad CD-013 block).
1006
+ - Workflow **sunucuda sayfalamaz ve süzmez**: `pageMode: client` (ilk 1000 satır, süzme tarayıcıda — CD-007); tanıma
1007
+ `filter`, `sort`, `filterable`, `edit` yazılmaz (CD-013). Süzülen/sayfalanan liste gerekiyorsa entity ya da dinamik
1008
+ filtreli tablo ucu bağlayın.
1009
+ - Önizleme `connect_data_preview { request: { params } }` ile; `$ad`'ı önizleme doldurmaz (CD-014 warn).
1010
+ - Örnek: `ngapps://examples/connect-data-workflow-microservice`.
@@ -0,0 +1,41 @@
1
+ import { constraintCatalog } from '../knowledge/backendConstraints.js';
2
+ import { connectDataRuleCatalog } from '../knowledge/connectDataRules.js';
3
+ import { listKnowledgeFiles, readKnowledgeFile } from './knowledge.js';
4
+ /** `ngapps://rules/<ad>` kaynakları; docs-lint bu listeyle `ngapps://rules/…` referanslarını denetler. */
5
+ export const ruleResourceNames = ['backend-constraints', 'connect-data'];
6
+ export function ruleResourceBody(name) {
7
+ return name === 'backend-constraints' ? constraintCatalog() : { rules: connectDataRuleCatalog };
8
+ }
9
+ /**
10
+ * 38/M-14 (D-7): rehberler `ngapps://rules/…` ve `ngapps://examples/…` kaynaklarına yönlendiriyor, ama resource
11
+ * okuması olmayan MCP istemcisinde (ölçüldü: Claude Code oturumunun araç setinde okuma aracı yoktu) bu yönlendirme
12
+ * çıkmaz sokaktı. `platform_guide({ resource })` aynı içeriği araçla verir; kaynak kaydı (`resources/*.ts`) ile bu
13
+ * okuyucu aynı dosyaları ve aynı katalogları okur. Rehberler buradan verilmez (page ~120 KB, bölümlü okunur);
14
+ * şemalar da verilmez (tek dosya 54 KB'a çıkıyor — araç yanıt sınırı; gövde kısıtları `dto_scheme`/açıklamalarda).
15
+ */
16
+ export function readToolResource(uri) {
17
+ const examples = listKnowledgeFiles('examples').map(file => file.replace(/\.json$/, ''));
18
+ const readable = ['ngapps://examples/index', ...examples.map(name => `ngapps://examples/${name}`), 'ngapps://rules/index', ...ruleResourceNames.map(name => `ngapps://rules/${name}`)];
19
+ const match = /^ngapps:\/\/([a-z-]+)\/([A-Za-z0-9._-]+)$/.exec(uri.trim());
20
+ const json = (value) => ({ uri, mimeType: 'application/json', text: JSON.stringify(value, null, 2) });
21
+ if (match?.[1] === 'guides') {
22
+ return { error: `Rehberler bu alandan okunmaz: platform_guide({ guide: '${match[2]}' }) bölüm listesini, section ile tek bölümü döner.`, readable };
23
+ }
24
+ if (match?.[1] === 'schemas') {
25
+ return { error: 'Paketlenmiş şemalar araçla okunmaz (tek dosya 54 KB\'a çıkıyor). Gövde şablonu için ilgili *_get çıktısını, kısıtlar için aracın açıklamasındaki constraint özetini ya da ngapps://rules/backend-constraints kullanın.', readable };
26
+ }
27
+ if (match?.[1] === 'examples') {
28
+ if (match[2] === 'index')
29
+ return json({ examples: examples.map(name => `ngapps://examples/${name}`) });
30
+ if (examples.includes(match[2] ?? ''))
31
+ return { uri, mimeType: 'application/json', text: readKnowledgeFile('examples', `${match[2]}.json`) };
32
+ }
33
+ if (match?.[1] === 'rules') {
34
+ if (match[2] === 'index')
35
+ return json({ rules: ruleResourceNames.map(name => `ngapps://rules/${name}`) });
36
+ const name = ruleResourceNames.find(item => item === match[2]);
37
+ if (name)
38
+ return json(ruleResourceBody(name));
39
+ }
40
+ return { error: `'${uri}' okunabilir bir kaynak değil.`, readable };
41
+ }
@@ -1,6 +1,5 @@
1
- import { constraintCatalog } from '../knowledge/backendConstraints.js';
2
- /** `ngapps://rules/<ad>` kaynakları; docs-lint bu listeyle `ngapps://rules/…` referanslarını denetler. */
3
- export const ruleResourceNames = ['backend-constraints'];
1
+ import { ruleResourceBody, ruleResourceNames } from './read.js';
2
+ export { ruleResourceNames };
4
3
  /**
5
4
  * Backend doğrulayıcı kataloğu tek kaynak olarak koddan üretilir (`backendConstraints.ts`);
6
5
  * dosya olarak paketlenmez ki tool açıklaması, lint ve bu kaynak hiçbir zaman ayrışmasın.
@@ -8,7 +7,7 @@ export const ruleResourceNames = ['backend-constraints'];
8
7
  export function registerRuleResources(server) {
9
8
  server.registerResource('rules-index', 'ngapps://rules/index', {
10
9
  title: 'Kural kaynakları dizini',
11
- description: "Gateway'in koddan ürettiği kural katalogları; şu an backend doğrulayıcı aynası.",
10
+ description: "Gateway'in koddan ürettiği kural katalogları: backend doğrulayıcı aynası ve Connect Data (veri bağlama) kuralları.",
12
11
  mimeType: 'application/json'
13
12
  }, async (uri) => ({
14
13
  contents: [{
@@ -22,6 +21,13 @@ export function registerRuleResources(server) {
22
21
  description: "Platformun 422/409 ile reddedeceği gövde kuralları (uzunluk, zorunluluk, tek primaryKey, DTO/behavior eşleşmesi, dil kodları…) — kaynak referanslı; gateway aynı kuralı istek gitmeden block olarak uygular.",
23
22
  mimeType: 'application/json'
24
23
  }, async (uri) => ({
25
- contents: [{ uri: uri.href, mimeType: 'application/json', text: JSON.stringify(constraintCatalog(), null, 2) }]
24
+ contents: [{ uri: uri.href, mimeType: 'application/json', text: JSON.stringify(ruleResourceBody('backend-constraints'), null, 2) }]
25
+ }));
26
+ server.registerResource('rules-connect-data', 'ngapps://rules/connect-data', {
27
+ title: 'Connect Data kuralları (CD-001…018)',
28
+ description: "Prop'u veri kaynağına bağlamanın kuralları: kural, şiddet, gateway'de uygulandığı yer ve platform kaynağı. Rehber: platform_guide('page') §Kural 1c-3.",
29
+ mimeType: 'application/json'
30
+ }, async (uri) => ({
31
+ contents: [{ uri: uri.href, mimeType: 'application/json', text: JSON.stringify(ruleResourceBody('connect-data'), null, 2) }]
26
32
  }));
27
33
  }
@@ -1,10 +1,12 @@
1
1
  {
2
- "hash": "06f7d6b64937424fcbe7a9c8751e90a5224556e0c970199fb199cfa3a147c7d2",
3
- "generatedAt": "2026-09-28T09:04:34.182Z",
4
- "types": 186,
5
- "files": 108,
2
+ "hash": "824bc047e324388649db7bab9e15a2b6602fd6a8ef8a51c7b7a6e5ff58bac7fa",
3
+ "generatedAt": "2026-09-30T16:50:58.347Z",
4
+ "types": 324,
5
+ "files": 163,
6
6
  "note": "Şemaları üreten backend kaynaklarının parmak izi. Elle düzenlemeyin: 'npm run generate-schemas' yazar, 'npm run schema:check' denetler.",
7
7
  "missing": [
8
- "NgApps.Infrastructure.Models.IdNamePair`1[[System.Guid, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]"
8
+ "NgApps.Infrastructure.Models.IdNamePair`1[[System.Guid, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]",
9
+ "System.Text.Json.Nodes.JsonNode",
10
+ "System.Text.Json.Nodes.JsonNodeOptions"
9
11
  ]
10
12
  }
@@ -0,0 +1,144 @@
1
+ {
2
+ "schema": {
3
+ "type": "object",
4
+ "properties": {
5
+ "isAllowed": {
6
+ "type": "boolean"
7
+ },
8
+ "reason": {
9
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Access.Decisions.AccessDecisionReason"
10
+ },
11
+ "rowScope": {
12
+ "type": "string",
13
+ "nullable": true
14
+ },
15
+ "fieldAccess": {
16
+ "type": "array",
17
+ "items": {
18
+ "$ref": "#/components/schemas/NgApps.Application.Contexts.Access.Decisions.AccessFieldAccessDto"
19
+ },
20
+ "nullable": true
21
+ },
22
+ "trace": {
23
+ "type": "array",
24
+ "items": {
25
+ "$ref": "#/components/schemas/NgApps.Application.Contexts.Access.Decisions.AccessTraceEntryDto"
26
+ },
27
+ "nullable": true
28
+ },
29
+ "rowInScope": {
30
+ "type": "boolean",
31
+ "nullable": true
32
+ }
33
+ },
34
+ "additionalProperties": false
35
+ },
36
+ "components": {
37
+ "schemas": {
38
+ "NgApps.Domain.Contexts.Access.Decisions.AccessDecisionReason": {
39
+ "enum": [
40
+ "no-matching-grant",
41
+ "explicit-deny",
42
+ "allowed",
43
+ "system",
44
+ "allowed-by-override"
45
+ ],
46
+ "type": "string",
47
+ "format": ""
48
+ },
49
+ "NgApps.Application.Contexts.Access.Decisions.AccessFieldAccessDto": {
50
+ "type": "object",
51
+ "properties": {
52
+ "slug": {
53
+ "type": "string",
54
+ "nullable": true
55
+ },
56
+ "level": {
57
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Access.Policies.FieldAccess"
58
+ },
59
+ "canWrite": {
60
+ "type": "boolean"
61
+ },
62
+ "canFilter": {
63
+ "type": "boolean"
64
+ }
65
+ },
66
+ "additionalProperties": false
67
+ },
68
+ "NgApps.Application.Contexts.Access.Decisions.AccessTraceEntryDto": {
69
+ "type": "object",
70
+ "properties": {
71
+ "assignmentId": {
72
+ "type": "string",
73
+ "format": "uuid"
74
+ },
75
+ "policySlug": {
76
+ "type": "string",
77
+ "nullable": true
78
+ },
79
+ "grantId": {
80
+ "type": "string",
81
+ "format": "uuid"
82
+ },
83
+ "effect": {
84
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Access.Policies.AccessEffect"
85
+ },
86
+ "subjectType": {
87
+ "type": "string",
88
+ "nullable": true
89
+ },
90
+ "subjectId": {
91
+ "type": "string",
92
+ "format": "uuid"
93
+ },
94
+ "subjectName": {
95
+ "type": "string",
96
+ "nullable": true
97
+ },
98
+ "permission": {
99
+ "type": "string",
100
+ "nullable": true
101
+ },
102
+ "resourceKey": {
103
+ "type": "string",
104
+ "nullable": true
105
+ },
106
+ "scope": {
107
+ "type": "string",
108
+ "nullable": true
109
+ },
110
+ "outcome": {
111
+ "type": "string",
112
+ "nullable": true
113
+ },
114
+ "endsAt": {
115
+ "type": "string",
116
+ "format": "date-time",
117
+ "nullable": true
118
+ },
119
+ "overridesDeny": {
120
+ "type": "boolean"
121
+ }
122
+ },
123
+ "additionalProperties": false
124
+ },
125
+ "NgApps.Domain.Contexts.Access.Policies.FieldAccess": {
126
+ "enum": [
127
+ "hidden",
128
+ "masked",
129
+ "plain"
130
+ ],
131
+ "type": "string",
132
+ "format": ""
133
+ },
134
+ "NgApps.Domain.Contexts.Access.Policies.AccessEffect": {
135
+ "enum": [
136
+ "allow",
137
+ "deny"
138
+ ],
139
+ "type": "string",
140
+ "format": ""
141
+ }
142
+ }
143
+ }
144
+ }
@@ -0,0 +1,170 @@
1
+ {
2
+ "schema": {
3
+ "type": "object",
4
+ "properties": {
5
+ "policyId": {
6
+ "type": "string",
7
+ "format": "uuid"
8
+ },
9
+ "resourceType": {
10
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Access.Resources.AccessResourceType"
11
+ },
12
+ "actions": {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "#/components/schemas/NgApps.Application.Contexts.Access.Policies.AccessMatrixActionDto"
16
+ },
17
+ "nullable": true
18
+ },
19
+ "rows": {
20
+ "type": "array",
21
+ "items": {
22
+ "$ref": "#/components/schemas/NgApps.Application.Contexts.Access.Policies.AccessMatrixRowDto"
23
+ },
24
+ "nullable": true
25
+ }
26
+ },
27
+ "additionalProperties": false
28
+ },
29
+ "components": {
30
+ "schemas": {
31
+ "NgApps.Domain.Contexts.Access.Resources.AccessResourceType": {
32
+ "enum": [
33
+ "entity",
34
+ "field",
35
+ "row",
36
+ "microservice",
37
+ "page",
38
+ "workflow",
39
+ "automation",
40
+ "ui-flow",
41
+ "function",
42
+ "microfunction",
43
+ "query",
44
+ "view",
45
+ "file",
46
+ "folder",
47
+ "organization-unit",
48
+ "system",
49
+ "process",
50
+ "task"
51
+ ],
52
+ "type": "string",
53
+ "format": ""
54
+ },
55
+ "NgApps.Application.Contexts.Access.Policies.AccessMatrixActionDto": {
56
+ "type": "object",
57
+ "properties": {
58
+ "permission": {
59
+ "type": "string",
60
+ "nullable": true
61
+ },
62
+ "resourceType": {
63
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Access.Resources.AccessResourceType"
64
+ },
65
+ "supportsScope": {
66
+ "type": "boolean"
67
+ },
68
+ "supportsFieldAccess": {
69
+ "type": "boolean"
70
+ }
71
+ },
72
+ "additionalProperties": false
73
+ },
74
+ "NgApps.Application.Contexts.Access.Policies.AccessMatrixRowDto": {
75
+ "type": "object",
76
+ "properties": {
77
+ "resource": {
78
+ "$ref": "#/components/schemas/NgApps.Application.Contexts.Access.Policies.AccessMatrixResourceDto"
79
+ },
80
+ "cells": {
81
+ "type": "array",
82
+ "items": {
83
+ "$ref": "#/components/schemas/NgApps.Application.Contexts.Access.Policies.AccessMatrixCellDto"
84
+ },
85
+ "nullable": true
86
+ }
87
+ },
88
+ "additionalProperties": false
89
+ },
90
+ "NgApps.Application.Contexts.Access.Policies.AccessMatrixResourceDto": {
91
+ "type": "object",
92
+ "properties": {
93
+ "key": {
94
+ "type": "string",
95
+ "nullable": true
96
+ },
97
+ "name": {
98
+ "type": "string",
99
+ "nullable": true
100
+ },
101
+ "type": {
102
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Access.Resources.AccessResourceType"
103
+ },
104
+ "parentKey": {
105
+ "type": "string",
106
+ "nullable": true
107
+ }
108
+ },
109
+ "additionalProperties": false
110
+ },
111
+ "NgApps.Application.Contexts.Access.Policies.AccessMatrixCellDto": {
112
+ "type": "object",
113
+ "properties": {
114
+ "permission": {
115
+ "type": "string",
116
+ "nullable": true
117
+ },
118
+ "grantId": {
119
+ "type": "string",
120
+ "format": "uuid",
121
+ "nullable": true
122
+ },
123
+ "effect": {
124
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Access.Policies.AccessEffect"
125
+ },
126
+ "scope": {
127
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Access.Policies.AccessScope"
128
+ },
129
+ "fieldAccess": {
130
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Access.Policies.FieldAccess"
131
+ },
132
+ "hasCondition": {
133
+ "type": "boolean"
134
+ }
135
+ },
136
+ "additionalProperties": false
137
+ },
138
+ "NgApps.Domain.Contexts.Access.Policies.AccessEffect": {
139
+ "enum": [
140
+ "allow",
141
+ "deny"
142
+ ],
143
+ "type": "string",
144
+ "format": ""
145
+ },
146
+ "NgApps.Domain.Contexts.Access.Policies.AccessScope": {
147
+ "enum": [
148
+ "own",
149
+ "unit",
150
+ "unit-tree",
151
+ "subordinates",
152
+ "function",
153
+ "company",
154
+ "all"
155
+ ],
156
+ "type": "string",
157
+ "format": ""
158
+ },
159
+ "NgApps.Domain.Contexts.Access.Policies.FieldAccess": {
160
+ "enum": [
161
+ "hidden",
162
+ "masked",
163
+ "plain"
164
+ ],
165
+ "type": "string",
166
+ "format": ""
167
+ }
168
+ }
169
+ }
170
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "schema": {
3
+ "type": "object",
4
+ "properties": {
5
+ "slug": {
6
+ "type": "string",
7
+ "nullable": true
8
+ },
9
+ "resourceType": {
10
+ "$ref": "#/components/schemas/NgApps.Domain.Contexts.Access.Resources.AccessResourceType"
11
+ },
12
+ "action": {
13
+ "type": "string",
14
+ "nullable": true
15
+ },
16
+ "supportsScope": {
17
+ "type": "boolean"
18
+ },
19
+ "supportsFieldAccess": {
20
+ "type": "boolean"
21
+ },
22
+ "name": {
23
+ "type": "string",
24
+ "nullable": true
25
+ }
26
+ },
27
+ "additionalProperties": false
28
+ },
29
+ "components": {
30
+ "schemas": {
31
+ "NgApps.Domain.Contexts.Access.Resources.AccessResourceType": {
32
+ "enum": [
33
+ "entity",
34
+ "field",
35
+ "row",
36
+ "microservice",
37
+ "page",
38
+ "workflow",
39
+ "automation",
40
+ "ui-flow",
41
+ "function",
42
+ "microfunction",
43
+ "query",
44
+ "view",
45
+ "file",
46
+ "folder",
47
+ "organization-unit",
48
+ "system",
49
+ "process",
50
+ "task"
51
+ ],
52
+ "type": "string",
53
+ "format": ""
54
+ }
55
+ }
56
+ }
57
+ }