@appaflytech/zeyrek-ai-mcp 0.0.31 → 0.0.32
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 +0 -15
- package/README.md +5 -5
- package/dist/config.js +0 -37
- package/dist/index.js +0 -2
- package/dist/knowledge/backendConstraints.js +1 -18
- package/dist/knowledge/boxSections.js +184 -0
- package/dist/knowledge/componentCatalog.js +233 -568
- package/dist/knowledge/componentEvents.js +21 -141
- package/dist/knowledge/layoutSummary.js +2 -140
- package/dist/knowledge/normalize.js +67 -236
- package/dist/knowledge/outlines.js +0 -36
- package/dist/knowledge/policy.js +4 -18
- package/dist/knowledge/reservedTables.js +0 -79
- package/dist/knowledge/rules.js +21 -366
- package/dist/knowledge/schemaGuard.js +0 -11
- package/dist/knowledge/styleResolve.js +38 -55
- package/dist/knowledge/themeResolve.js +3 -3
- package/dist/observability/trace.js +3 -6
- package/dist/platform/diagnostics.js +4 -10
- package/dist/platform/domSummary.js +1 -1
- package/dist/platform/errors.js +10 -162
- package/dist/platform/http.js +8 -29
- package/dist/platform/responses.js +5 -39
- package/dist/platform/{capture/capture.js → screenshot.js} +519 -105
- package/dist/platform/secrets.js +1 -17
- package/dist/platform/strictArguments.js +12 -68
- package/dist/platform/tokenVault.js +4 -187
- package/dist/resources/examples/layout-app-shell.json +707 -229
- package/dist/resources/examples/middleware-authenticate.json +1 -1
- package/dist/resources/examples/page-detail-profile.json +1 -2
- package/dist/resources/examples/page-dynamic-form.json +2 -3
- package/dist/resources/examples/page-flex-sections.json +1 -1
- package/dist/resources/examples/page-html-embed.json +1 -1
- package/dist/resources/examples/workflow-basic.json +2 -8
- package/dist/resources/guides/component.md +5 -92
- package/dist/resources/guides/entity.md +8 -50
- package/dist/resources/guides/expressions.md +5 -14
- package/dist/resources/guides/functions.md +1 -1
- package/dist/resources/guides/getting-started.md +1 -38
- package/dist/resources/guides/layout.md +58 -55
- package/dist/resources/guides/merge.md +3 -37
- package/dist/resources/guides/microservice.md +2 -87
- package/dist/resources/guides/middleware.md +4 -68
- package/dist/resources/guides/page.md +75 -456
- package/dist/resources/guides/theme.md +2 -8
- package/dist/resources/guides/translation.md +1 -1
- package/dist/resources/guides/workflow.md +1 -58
- package/dist/resources/rules.js +5 -11
- package/dist/resources/schema-fingerprint.json +5 -7
- package/dist/resources/schemas/CreateEntityCommand.json +0 -118
- package/dist/resources/schemas/CreateMicroserviceCommand.json +1 -13
- package/dist/resources/schemas/CreateQueryCommand.json +0 -4
- package/dist/resources/schemas/CreateWorkflowCommand.json +1 -146
- package/dist/resources/schemas/DataJobDto.json +1 -6
- package/dist/resources/schemas/GlobalFunctionUpdateResultDto.json +1 -21
- package/dist/resources/schemas/MicroserviceDto.json +3 -15
- package/dist/resources/schemas/PreviewMicroserviceCommand.json +1 -10
- package/dist/resources/schemas/PreviewWorkflowCommand.json +1 -25
- package/dist/resources/schemas/StepDto.json +1 -25
- package/dist/resources/schemas/UpdateEntityCommand.json +0 -118
- package/dist/resources/schemas/UpdateMicroserviceCommand.json +1 -13
- package/dist/resources/schemas/UpdateQueryCommand.json +0 -4
- package/dist/resources/schemas/UpdateViewCommand.json +2 -0
- package/dist/resources/schemas/UpdateWorkflowCommand.json +1 -146
- package/dist/server.js +1 -27
- package/dist/tools/access.js +2 -369
- package/dist/tools/applications.js +3 -60
- package/dist/tools/common.js +0 -7
- package/dist/tools/components.js +14 -118
- package/dist/tools/datasources.js +3 -3
- package/dist/tools/dependencies.js +1 -1
- package/dist/tools/deployments.js +3 -38
- package/dist/tools/designSchemaPatch.js +18 -34
- package/dist/tools/dtos.js +5 -36
- package/dist/tools/entities.js +12 -79
- package/dist/tools/externalComponents.js +5 -26
- package/dist/tools/flows.js +14 -122
- package/dist/tools/folders.js +1 -1
- package/dist/tools/imports.js +2 -5
- package/dist/tools/layouts.js +17 -50
- package/dist/tools/merges.js +2 -2
- package/dist/tools/microservices.js +25 -77
- package/dist/tools/pages.js +112 -465
- package/dist/tools/platformInfo.js +8 -27
- package/dist/tools/projects.js +9 -71
- package/dist/tools/rows.js +13 -69
- package/dist/tools/schemaOps.js +1 -61
- package/dist/tools/screenWrite.js +8 -37
- package/dist/tools/screens.js +5 -95
- package/dist/tools/templates.js +1 -26
- package/dist/tools/translations.js +1 -1
- package/dist/tools/variables.js +5 -11
- package/dist/tools/workflows.js +5 -10
- package/package.json +1 -1
- package/dist/knowledge/access.js +0 -802
- package/dist/knowledge/case.js +0 -41
- package/dist/knowledge/connectDataBind.js +0 -819
- package/dist/knowledge/connectDataDefinition.js +0 -341
- package/dist/knowledge/connectDataExecute.js +0 -93
- package/dist/knowledge/connectDataRules.js +0 -128
- package/dist/knowledge/decision.js +0 -121
- package/dist/knowledge/expressionPrelude.js +0 -59
- package/dist/knowledge/microserviceParameters.js +0 -58
- package/dist/knowledge/mining.js +0 -94
- package/dist/knowledge/mobileComponentCatalog.js +0 -859
- package/dist/knowledge/mobileComponentEvents.js +0 -239
- package/dist/knowledge/platform/lint.js +0 -385
- package/dist/knowledge/platform/mobile.js +0 -142
- package/dist/knowledge/platform/mobileLayoutLint.js +0 -324
- package/dist/knowledge/platform/mobileRules.js +0 -231
- package/dist/knowledge/platform/mobileSpacing.js +0 -82
- package/dist/knowledge/platform/mobileTabs.js +0 -108
- package/dist/knowledge/platform/nativeBoxModel.js +0 -44
- package/dist/knowledge/platform/profile.js +0 -25
- package/dist/knowledge/platform/resolve.js +0 -122
- package/dist/knowledge/platform/web.js +0 -39
- package/dist/knowledge/process.js +0 -510
- package/dist/knowledge/rowFilter.js +0 -43
- package/dist/knowledge/styleResolveNative.js +0 -527
- package/dist/platform/argumentAliases.js +0 -128
- package/dist/platform/bodyFile.js +0 -103
- package/dist/platform/capture/actions.js +0 -333
- package/dist/platform/capture/browser.js +0 -1
- package/dist/platform/capture/console-log.js +0 -122
- package/dist/platform/capture/index.js +0 -11
- package/dist/platform/capture/readiness.js +0 -103
- package/dist/platform/capture/summary.js +0 -77
- package/dist/platform/capture/target.js +0 -5
- package/dist/platform/capture/targets/studio-mobile.js +0 -15
- package/dist/platform/capture/targets/studio-web.js +0 -5
- package/dist/platform/impersonation.js +0 -45
- package/dist/platform/jsonArray.js +0 -24
- package/dist/platform/schemaReadMemory.js +0 -60
- package/dist/resources/examples/bpm-gorev-kontrol.json +0 -294
- package/dist/resources/examples/bpm-iso-dokuman.json +0 -228
- package/dist/resources/examples/bpm-satinalma.json +0 -376
- package/dist/resources/examples/connect-data-convert-verify.json +0 -107
- package/dist/resources/examples/connect-data-dropdown-roles.json +0 -66
- package/dist/resources/examples/connect-data-edit-m2m.json +0 -73
- package/dist/resources/examples/connect-data-query-params.json +0 -50
- package/dist/resources/examples/connect-data-table-entity.json +0 -147
- package/dist/resources/examples/connect-data-workflow-microservice.json +0 -65
- package/dist/resources/examples/mobile-app-shell-drawer.json +0 -243
- package/dist/resources/examples/mobile-app-shell-stack.json +0 -157
- package/dist/resources/examples/mobile-app-shell-tab.json +0 -208
- package/dist/resources/examples/mobile-form-screen.json +0 -365
- package/dist/resources/examples/mobile-list-detail-form.json +0 -672
- package/dist/resources/guides/access.md +0 -810
- package/dist/resources/guides/bpm.md +0 -691
- package/dist/resources/guides/case.md +0 -153
- package/dist/resources/guides/decision.md +0 -185
- package/dist/resources/guides/mobile-layout.md +0 -193
- package/dist/resources/guides/mobile.md +0 -495
- package/dist/resources/read.js +0 -41
- package/dist/resources/schemas/AccessExplanationDto.json +0 -144
- package/dist/resources/schemas/AccessMatrixDto.json +0 -170
- package/dist/resources/schemas/AccessPermissionDto.json +0 -57
- package/dist/resources/schemas/AccessPolicyDto.json +0 -223
- package/dist/resources/schemas/AccessResourceDto.json +0 -86
- package/dist/resources/schemas/AppSessionDto.json +0 -53
- package/dist/resources/schemas/ConnectDataDescribeDto.json +0 -344
- package/dist/resources/schemas/ConnectDataRequestModel.json +0 -202
- package/dist/resources/schemas/ConnectDataResultDto.json +0 -421
- package/dist/resources/schemas/ConnectorCredentialDto.json +0 -70
- package/dist/resources/schemas/ConvertConnectDataToMicroserviceCommand.json +0 -37
- package/dist/resources/schemas/CreateAccessPolicyCommand.json +0 -209
- package/dist/resources/schemas/CreateDecisionCommand.json +0 -221
- package/dist/resources/schemas/CreateProcessDefinitionCommand.json +0 -1337
- package/dist/resources/schemas/DecisionDto.json +0 -302
- package/dist/resources/schemas/DetachConnectDataMicroserviceCommand.json +0 -28
- package/dist/resources/schemas/ExplainAccessQuery.json +0 -33
- package/dist/resources/schemas/GenerateProcessDocumentCommand.json +0 -116
- package/dist/resources/schemas/OrganizationProjectDto.json +0 -335
- package/dist/resources/schemas/OrganizationSchemaDto.json +0 -196
- package/dist/resources/schemas/OrganizationSchemaVersionDto.json +0 -207
- package/dist/resources/schemas/PatchProcessDefinitionCommand.json +0 -76
- package/dist/resources/schemas/ProcessDefinitionDto.json +0 -1480
- package/dist/resources/schemas/ProcessSimulationDto.json +0 -96
- package/dist/resources/schemas/SaveConnectorCredentialCommand.json +0 -90
- package/dist/resources/schemas/SaveProcessEventSourceCommand.json +0 -61
- package/dist/resources/schemas/SaveProcessMailSourceCommand.json +0 -89
- package/dist/resources/schemas/SignProcessTaskCommand.json +0 -73
- package/dist/resources/schemas/SimulateProcessDefinitionQuery.json +0 -92
- package/dist/resources/schemas/UpdateAccessPolicyCommand.json +0 -209
- package/dist/resources/schemas/UpdateDecisionCommand.json +0 -216
- package/dist/resources/schemas/UpdateProcessDefinitionCommand.json +0 -1357
- package/dist/resources/schemas/ValidateProcessDefinitionQuery.json +0 -1339
- package/dist/tools/accessOperations.js +0 -135
- package/dist/tools/accessPolicies.js +0 -170
- package/dist/tools/accessRuntime.js +0 -203
- package/dist/tools/bpm.js +0 -343
- package/dist/tools/bpmGovernance.js +0 -266
- package/dist/tools/bpmOperations.js +0 -230
- package/dist/tools/bpmReporting.js +0 -154
- package/dist/tools/bpmRouting.js +0 -150
- package/dist/tools/bpmRuntime.js +0 -396
- package/dist/tools/case.js +0 -178
- package/dist/tools/caseRuntime.js +0 -89
- package/dist/tools/connectData.js +0 -449
- package/dist/tools/connectors.js +0 -193
- package/dist/tools/decisions.js +0 -206
- package/dist/tools/mobile.js +0 -221
- package/dist/tools/modules.js +0 -48
- package/dist/tools/organizationStructure.js +0 -137
- package/dist/tools/profileWrite.js +0 -92
|
@@ -154,24 +154,6 @@ const resolveShadow = (shadow) => {
|
|
|
154
154
|
return undefined;
|
|
155
155
|
return SHADOW_VALUES[shadow] ?? String(shadow);
|
|
156
156
|
};
|
|
157
|
-
/**
|
|
158
|
-
* Döndür / ölçekle / kaydır alanlarının kabul aralığı — frontend `style-groups/transform-fields.ts`
|
|
159
|
-
* `TRANSFORM_RANGES`'in kopyası (altın vakalar kilitler). Aralık dışı ve birimli değer yazılmaz.
|
|
160
|
-
*/
|
|
161
|
-
export const TRANSFORM_RANGES = {
|
|
162
|
-
rotate: [-360, 360],
|
|
163
|
-
scale: [10, 500],
|
|
164
|
-
translateX: [-1000, 1000],
|
|
165
|
-
translateY: [-1000, 1000]
|
|
166
|
-
};
|
|
167
|
-
/** Sayı ya da sayısal metin, aralığın içinde; aksi `undefined` — frontend `transformValue`. */
|
|
168
|
-
export const transformValue = (value, field) => {
|
|
169
|
-
if (typeof value !== 'number' && (typeof value !== 'string' || value.trim() === ''))
|
|
170
|
-
return undefined;
|
|
171
|
-
const parsed = Number(value);
|
|
172
|
-
const [min, max] = TRANSFORM_RANGES[field];
|
|
173
|
-
return Number.isFinite(parsed) && parsed >= min && parsed <= max ? parsed : undefined;
|
|
174
|
-
};
|
|
175
157
|
/**
|
|
176
158
|
* Grupların alan listeleri — frontend `style-groups/style-group-schemas.ts`
|
|
177
159
|
* `STYLE_GROUP_FIELDS`'in kopyası. Parite testi `components.json`'daki gerçek
|
|
@@ -188,11 +170,7 @@ export const STYLE_GROUP_FIELDS = {
|
|
|
188
170
|
'borderLeft',
|
|
189
171
|
'shadow',
|
|
190
172
|
'contentOverflow',
|
|
191
|
-
'opacity'
|
|
192
|
-
'rotate',
|
|
193
|
-
'scale',
|
|
194
|
-
'translateX',
|
|
195
|
-
'translateY'
|
|
173
|
+
'opacity'
|
|
196
174
|
],
|
|
197
175
|
typographyStyle: [
|
|
198
176
|
'textColor',
|
|
@@ -242,21 +220,6 @@ export function composeTypedStyle(input, ext) {
|
|
|
242
220
|
if (opacity !== undefined && opacity >= 0 && opacity < 100) {
|
|
243
221
|
groups.opacity = String(opacity / 100);
|
|
244
222
|
}
|
|
245
|
-
// Döndür / ölçekle / kaydır (ADR 0005): kaydır → döndür → ölçekle, köken merkez;
|
|
246
|
-
// ölçek yüzdedir, nötr değer ve aralık dışı yazılmaz — frontend `composeSurfaceTransform`.
|
|
247
|
-
const transform = [];
|
|
248
|
-
const x = transformValue(surface.translateX, 'translateX') ?? 0;
|
|
249
|
-
const y = transformValue(surface.translateY, 'translateY') ?? 0;
|
|
250
|
-
if (x !== 0 || y !== 0)
|
|
251
|
-
transform.push(`translate(${x}px, ${y}px)`);
|
|
252
|
-
const rotate = transformValue(surface.rotate, 'rotate');
|
|
253
|
-
if (rotate !== undefined && rotate !== 0)
|
|
254
|
-
transform.push(`rotate(${rotate}deg)`);
|
|
255
|
-
const scale = transformValue(surface.scale, 'scale');
|
|
256
|
-
if (scale !== undefined && scale !== 100)
|
|
257
|
-
transform.push(`scale(${scale / 100})`);
|
|
258
|
-
if (transform.length)
|
|
259
|
-
groups.transform = transform.join(' ');
|
|
260
223
|
// `ROOT_TARGET` (`&`) kökün kendisidir: kendi derleyicisi olmayan kaplarda
|
|
261
224
|
// yüzey düğüm kutusuna yazılır ve kaydırılan da odur.
|
|
262
225
|
if (isSet(surface.contentOverflow) && ext?.overflowTarget) {
|
|
@@ -288,10 +251,8 @@ export function composeTypedStyle(input, ext) {
|
|
|
288
251
|
assign(rules, 'borderColor', hover.borderColor);
|
|
289
252
|
assign(rules, 'boxShadow', resolveShadow(hover.shadow));
|
|
290
253
|
const lift = asDimension(hover.lift);
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
rules.transform = `translateY(calc(-1 * ${lift}))${typeof groups.transform === 'string' ? ` ${groups.transform}` : ''}`;
|
|
294
|
-
}
|
|
254
|
+
if (lift !== undefined)
|
|
255
|
+
rules.transform = `translateY(calc(-1 * ${lift}))`;
|
|
295
256
|
if (Object.keys(rules).length) {
|
|
296
257
|
const duration = asNumber(hover.transitionMs) ?? 160;
|
|
297
258
|
groups.transition = `background-color ${duration}ms ease, border-color ${duration}ms ease, box-shadow ${duration}ms ease, transform ${duration}ms ease`;
|
|
@@ -502,6 +463,39 @@ export const TYPED_STYLE_COMPONENTS = {
|
|
|
502
463
|
groups: ['surfaceStyle'],
|
|
503
464
|
ext: { overflowTarget: '&__body' }
|
|
504
465
|
},
|
|
466
|
+
layout: {
|
|
467
|
+
// Kabuk zeminini `.ng-layout` KÖKÜNDE çizer; düğüm kutusuna yazılan zemin
|
|
468
|
+
// onun altında kalıyordu (LAYOUT-006, 2026-09-29). Yüzey ve taşma köke.
|
|
469
|
+
// navigationStyle menüye gider, resolvedStyle'a girmez.
|
|
470
|
+
groups: ['surfaceStyle'],
|
|
471
|
+
ext: { overflowTarget: ROOT_TARGET }
|
|
472
|
+
},
|
|
473
|
+
'layout-shell': {
|
|
474
|
+
// Aynı kök: zemin `.ng-layout-shell` KÖKÜNDE (SHELL-006, 2026-09-29).
|
|
475
|
+
groups: ['surfaceStyle'],
|
|
476
|
+
ext: { overflowTarget: ROOT_TARGET }
|
|
477
|
+
},
|
|
478
|
+
'layout-region': {
|
|
479
|
+
// Zemin `.ng-layout-region` KÖKÜNDE, taşma kaydırılan gövdede (REG-002, 2026-09-29).
|
|
480
|
+
groups: ['surfaceStyle'],
|
|
481
|
+
ext: { overflowTarget: '&__body' }
|
|
482
|
+
},
|
|
483
|
+
'auth-layout': {
|
|
484
|
+
// Zemin `.ng-auth` KÖKÜNDE (AUTH-006, 2026-09-29); yüzey ve taşma köke.
|
|
485
|
+
groups: ['surfaceStyle'],
|
|
486
|
+
ext: { overflowTarget: ROOT_TARGET }
|
|
487
|
+
},
|
|
488
|
+
header: {
|
|
489
|
+
// Şeridin zemini ve alt çizgisi kökte (HDR-007, 2026-09-29).
|
|
490
|
+
groups: ['surfaceStyle'],
|
|
491
|
+
ext: { overflowTarget: ROOT_TARGET }
|
|
492
|
+
},
|
|
493
|
+
sidebar: {
|
|
494
|
+
// Yan menünün zemini ve sağ çizgisi kökte (SB-004, 2026-09-29).
|
|
495
|
+
// navigationStyle menüye gider, resolvedStyle'a girmez.
|
|
496
|
+
groups: ['surfaceStyle'],
|
|
497
|
+
ext: { overflowTarget: ROOT_TARGET }
|
|
498
|
+
},
|
|
505
499
|
icon: {
|
|
506
500
|
// Yalnız hover: surface çipin (chipShape/chipColor), typography da boyutun
|
|
507
501
|
// (size) ve rengin (color) çift kanalı olurdu — görsel kararlar semantik
|
|
@@ -532,20 +526,9 @@ export const NODE_SURFACE_TYPES = new Set([
|
|
|
532
526
|
'html',
|
|
533
527
|
'file-viewer',
|
|
534
528
|
'document-editor',
|
|
535
|
-
'layout',
|
|
536
|
-
'layout-region',
|
|
537
|
-
'layout-shell',
|
|
538
529
|
'qm-content',
|
|
539
|
-
'qm-sidebar'
|
|
540
|
-
'auth-layout'
|
|
530
|
+
'qm-sidebar'
|
|
541
531
|
]);
|
|
542
|
-
/**
|
|
543
|
-
* `style`'ı kendi içeriğinin CSS'i olarak alan tipler: `html`in `style`'ı uzun metindir ve yazarın
|
|
544
|
-
* işaretlemesine kapsamlı girer — web'de emotion sınıfı (`html.functions.ts` `resolveHtmlStyleClass`),
|
|
545
|
-
* mobilde korumalı belgenin stil bloğu (plans/mobil-plantcare-acigi f-20). "Düz CSS string style"
|
|
546
|
-
* (PAGE-014) ve "ham CSS çizilmez" (MOB-002) uyarıları bu tiplerde yanlıştır.
|
|
547
|
-
*/
|
|
548
|
-
export const DOCUMENT_STYLE_TYPES = new Set(['html']);
|
|
549
532
|
const NODE_SURFACE_EXTENSION = { overflowTarget: ROOT_TARGET };
|
|
550
533
|
/** Düğüm kutusuna inen yüzey; kap tipi değilse ya da grup boşsa yok. */
|
|
551
534
|
export function composeNodeSurfaceStyle(type, surfaceStyle) {
|
|
@@ -585,7 +568,7 @@ const unwrapProp = (value) => {
|
|
|
585
568
|
result[key] = unwrapProp(item);
|
|
586
569
|
return result;
|
|
587
570
|
};
|
|
588
|
-
|
|
571
|
+
const rawProp = (props, name) => {
|
|
589
572
|
const prop = props?.[name];
|
|
590
573
|
// İfadeye bağlı prop'un değeri çalışma anında oluşur, burada çözülemez.
|
|
591
574
|
return prop && typeof prop === 'object' && 'data' in prop ? unwrapProp(prop.data) : undefined;
|
|
@@ -332,8 +332,8 @@ export function buildSpacingScaleVars(scale) {
|
|
|
332
332
|
.join('\n\t');
|
|
333
333
|
}
|
|
334
334
|
/**
|
|
335
|
-
* Bir seviyenin
|
|
336
|
-
* Kullanıcı tek çarpan ayarlar,
|
|
335
|
+
* Bir seviyenin mobil karşılığının masaüstüne oranı — bugünkü breakpoint değerlerinden türer.
|
|
336
|
+
* Kullanıcı tek çarpan ayarlar, mobil ona orantılı hareket eder.
|
|
337
337
|
*/
|
|
338
338
|
const TYPE_SCALE_MOBILE_RATIO = {
|
|
339
339
|
h1: 1.7 / 2.25,
|
|
@@ -363,7 +363,7 @@ export function mergeTypeScale(overrides) {
|
|
|
363
363
|
}
|
|
364
364
|
return result;
|
|
365
365
|
}
|
|
366
|
-
/** Ölçekten `--ng-font-size-*` değişkenlerini üretir (masaüstü +
|
|
366
|
+
/** Ölçekten `--ng-font-size-*` değişkenlerini üretir (masaüstü + mobil). */
|
|
367
367
|
export function buildTypeScaleVars(scale) {
|
|
368
368
|
const lines = [];
|
|
369
369
|
for (const [level, factor] of Object.entries(scale)) {
|
|
@@ -204,12 +204,9 @@ function describeResult(result) {
|
|
|
204
204
|
const text = Array.isArray(call?.content)
|
|
205
205
|
? call.content.filter(entry => entry.type === 'text').map(entry => String(entry.text)).join(' ')
|
|
206
206
|
: '';
|
|
207
|
+
if (call?.isError)
|
|
208
|
+
return { ok: false, summary: clip(text, 400) };
|
|
207
209
|
const structured = call?.structuredContent;
|
|
208
|
-
if (call?.isError) {
|
|
209
|
-
return structured?.expectedFailure === true
|
|
210
|
-
? { ok: true, summary: `beklenen platform hatası (negatif test): ${clip(text, 400)}` }
|
|
211
|
-
: { ok: false, summary: clip(text, 400) };
|
|
212
|
-
}
|
|
213
210
|
const runtimeErrors = structured?.runtimeErrors;
|
|
214
211
|
if (Array.isArray(runtimeErrors) && runtimeErrors.length > 0) {
|
|
215
212
|
// Kasıtlı negatif test bir kusur değil bir KANIT: çağıran beklediğini söylediyse satır
|
|
@@ -354,7 +351,7 @@ export function logGatewayEvent(message) {
|
|
|
354
351
|
*/
|
|
355
352
|
export function logCapabilityGap(gap) {
|
|
356
353
|
const lines = [
|
|
357
|
-
`┌─ ${clockOf(new Date())} · KABİLİYET BOŞLUĞU · ${gap.severity}${gap.module ? ` · ${gap.module}` : ''}
|
|
354
|
+
`┌─ ${clockOf(new Date())} · KABİLİYET BOŞLUĞU · ${gap.severity}${gap.module ? ` · ${gap.module}` : ''}`,
|
|
358
355
|
`│ hedef : ${condense(gap.goal, maxBodyChars)}`,
|
|
359
356
|
`│ engel : ${condense(gap.blocker, maxBodyChars)}`
|
|
360
357
|
];
|
|
@@ -5,9 +5,8 @@ const MAX_NOTES = 8;
|
|
|
5
5
|
const MAX_NOTE_CHARS = 240;
|
|
6
6
|
const MAX_DROPS = 5;
|
|
7
7
|
export const diagnosticsParam = z.enum(['compact', 'full']).optional().describe("Yanıttaki gatewayNormalized / silentlyDropped listelerinin boyu. compact (varsayılan): aynı not tekilleşir, uzun not kısalır (en fazla 8); aynı yolun düşmeleri tek satırda sayıyla toplanır (en fazla 5 grup); droppedCount her zaman tam sayıdır. full: listelerin tamamı.");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return activeMode.run({ mode, adjustable }, run);
|
|
8
|
+
export function runWithDiagnostics(mode, run) {
|
|
9
|
+
return activeMode.run(mode, run);
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
13
12
|
* Tanılama listeleri her yazma çağrısında yanıta girer ve aynı gerekçe cümlesi çağrı başına tekrar
|
|
@@ -19,7 +18,7 @@ export function runWithDiagnostics(mode, run, adjustable = true) {
|
|
|
19
18
|
* listeyi görür; kısaltma yalnız `diagnostics` parametresini taşıyan yazma tool'larında devreye girer.
|
|
20
19
|
*/
|
|
21
20
|
export function compactDiagnostics(payload) {
|
|
22
|
-
if (activeMode.getStore()
|
|
21
|
+
if (activeMode.getStore() !== 'compact')
|
|
23
22
|
return payload;
|
|
24
23
|
if (!payload || typeof payload !== 'object' || Array.isArray(payload))
|
|
25
24
|
return payload;
|
|
@@ -59,12 +58,7 @@ export function compactDiagnostics(payload) {
|
|
|
59
58
|
}
|
|
60
59
|
if (hidden.length === 0)
|
|
61
60
|
return result;
|
|
62
|
-
return {
|
|
63
|
-
...result,
|
|
64
|
-
diagnosticsNote: activeMode.getStore()?.adjustable === false
|
|
65
|
-
? 'Kısaltıldı; tam liste gateway günlüğünde (bu tool diagnostics parametresi almaz).'
|
|
66
|
-
: "Kısaltıldı; yazmayı tekrarlamayın. Tam liste: sonraki çağrıda diagnostics:'full'."
|
|
67
|
-
};
|
|
61
|
+
return { ...result, diagnosticsNote: "Kısaltıldı; yazmayı tekrarlamayın. Tam liste: sonraki çağrıda diagnostics:'full'." };
|
|
68
62
|
}
|
|
69
63
|
/**
|
|
70
64
|
* Aynı yolun farklı öğelerindeki düşmeler (`selectFields[fieldId=a].path`, `selectFields[fieldId=b].path`, …)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* (card) · GİZLİ" 200 karakterdir.
|
|
8
8
|
*
|
|
9
9
|
* Katman saftır: tarayıcıdan gelen anlık görüntüyü doğrular ve biçimler. Toplama işi
|
|
10
|
-
* `
|
|
10
|
+
* `screenshot.ts` `domSummaryScript`'te, sunum `pages.ts`'te.
|
|
11
11
|
*/
|
|
12
12
|
function text(value) {
|
|
13
13
|
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
package/dist/platform/errors.js
CHANGED
|
@@ -7,11 +7,6 @@ export class PlatformApiError extends Error {
|
|
|
7
7
|
* için sayıya ihtiyaç duyar, çağıran hangi satırı düzelteceğini ancak öyle bilir.
|
|
8
8
|
*/
|
|
9
9
|
rowIndex;
|
|
10
|
-
/**
|
|
11
|
-
* Platformun ham `message`'ı (yalnız 403'te doldurulur). `message` gateway ipucunu da taşır ve ipucunda
|
|
12
|
-
* izin slug'ları geçer ('entity.reveal grant'i'); `accessDecision` izni ondan okursa yanlış izin yazar.
|
|
13
|
-
*/
|
|
14
|
-
apiMessage;
|
|
15
10
|
constructor(message, status, code) {
|
|
16
11
|
super(message);
|
|
17
12
|
this.status = status;
|
|
@@ -37,12 +32,9 @@ function collectValidationMessages(payload) {
|
|
|
37
32
|
continue;
|
|
38
33
|
const record = entry;
|
|
39
34
|
const isPageSchemaShape = 'rule' in record || 'componentId' in record || 'suggestions' in record;
|
|
40
|
-
const isDefinitionFindingShape = 'path' in record && 'message' in record && 'code' in record;
|
|
41
35
|
messages.push(isPageSchemaShape
|
|
42
36
|
? formatPageSchemaError(record)
|
|
43
|
-
:
|
|
44
|
-
? `${String(record.path)} [${String(record.code)}]: ${String(record.message)}`
|
|
45
|
-
: `${record.key ?? '?'}: ${record.value ?? ''}`);
|
|
37
|
+
: `${record.key ?? '?'}: ${record.value ?? ''}`);
|
|
46
38
|
}
|
|
47
39
|
}
|
|
48
40
|
else if (payload.errors && typeof payload.errors === 'object') {
|
|
@@ -114,39 +106,6 @@ function importHint(code, path) {
|
|
|
114
106
|
}
|
|
115
107
|
return '';
|
|
116
108
|
}
|
|
117
|
-
function processHint(code, path) {
|
|
118
|
-
if (code === 'DefinitionInvalid' && /\/bpm\/definitions\/[^/]+\/override(\/|$)/.test(path))
|
|
119
|
-
return " Uyarlama platform doğrulamasından geçmedi; yukarıdaki path [kod] satırlarına bakın. RegionLocked/ParamNotEditable: yol uyarlamaya kapalı — process_override_get yanıtındaki editableScopes'a göre kurun (bölge çocuğu '/nodes[id=<bölge>]/nodes[id=<adım>]/<alan>'); RoleUnknown/WorkflowUnknown: referans bu ortamda yok. Kurallar platform_guide('bpm') §Uyarlama.";
|
|
120
|
-
if (code === 'TaskAlreadyClaimed')
|
|
121
|
-
return ' Görev başkası tarafından üstlenildi ya da siz okuduktan sonra değişti. process_task_get ile yeniden okuyup güncel version değeriyle tekrar deneyin; görev başkasındaysa eylem sizin değildir.';
|
|
122
|
-
if (code === 'TaskStateTransitionNotAllowed')
|
|
123
|
-
return " Görevin durumu bu eylemi almıyor (ör. waiting-info iken approve, tamamlanmış görevde claim). process_task_get'teki state ve actions listesine bakın.";
|
|
124
|
-
if (code === 'TaskCommentRequired')
|
|
125
|
-
return " Bu karar yorum ister (düğümün commentRequired kuralı). Aynı çağrıyı 'comment' ile tekrarlayın.";
|
|
126
|
-
if (code === 'UndoWindowClosed')
|
|
127
|
-
return " Geri alma penceresi kapandı ya da karardan sonra başka bir insan görevi açıldı; geri alma yerine process_instance_update ya da yeni karar gerekir.";
|
|
128
|
-
if (code === 'InstanceStateTransitionNotAllowed')
|
|
129
|
-
return " Örnek bu durumda bu müdahaleyi almaz (ör. tamamlanmış örneği askıya alma). process_instance_get ile state'i okuyun.";
|
|
130
|
-
if (code === 'WithdrawNotAllowed')
|
|
131
|
-
return " Tanımın withdrawPolicy'si geri çekmeye izin vermiyor ya da ilk karar verilmiş.";
|
|
132
|
-
if (code === 'DefinitionInvalid')
|
|
133
|
-
return " Tanım platform doğrulamasından geçmedi; yukarıdaki path [kod] satırlarını düzeltip process_definition_preview ile yeniden doğrulayın.";
|
|
134
|
-
if (code === 'OpenTasksExist')
|
|
135
|
-
return " Kullanıcının ya da birimin açık süreç görevi var. process_handover_preview ile kalemleri görün, process_handover_create ile devredin; sonra işlemi tekrarlayın.";
|
|
136
|
-
if (code === 'HandoverIncomplete')
|
|
137
|
-
return " Kararı olmayan görev grupları mesajda. Her assigned-tasks / candidate-tasks kalemi için karar verin ya da force:true ile geri dönüşü kabul edin: assigned-tasks yöneticiye (yoksa admin-queue), candidate-tasks gruba (aday kalmazsa admin-queue).";
|
|
138
|
-
if (code === 'DelegationOverlap')
|
|
139
|
-
return " Aynı kişinin bu aralık ve süreç filtresiyle çakışan vekaleti var. process_delegation_list ile görüp bitirin ya da aralığı değiştirin.";
|
|
140
|
-
if (code === 'DelegationChainNotAllowed')
|
|
141
|
-
return " Vekalet zincirlenemez: ya vekil aynı aralıkta kendi görevlerini devretmiş ya da vekaleti veren kişi o aralıkta başkasının vekili. Başka vekil ya da aralık seçin.";
|
|
142
|
-
if (code === 'PublishApprovalRequired')
|
|
143
|
-
return " Tanım dört göz yayın politikasında (publishPolicy: four-eyes) ve ortamda process-publish süreci kurulu. Aynı çağrıyı process_definition_publish { reason } ile tekrarlayın: yayın isteği açılır, onaylanınca sürüm aktif olur.";
|
|
144
|
-
if (code === 'ScenarioFailed')
|
|
145
|
-
return " Tanım requireGreenScenarios: true ve adı geçen senaryo bu taslağın sağlamasında yeşil koşmadı. process_scenario_execute { definitionId } ile koşun, sapmaları giderin (ya da senaryoyu process_scenario_update ile güncelleyin), sonra yeniden yayınlayın.";
|
|
146
|
-
if (code === 'BatchOperationNotUndoable')
|
|
147
|
-
return " Yalnız tamamlanmış reassign / extend-due işlemleri bir kez geri alınır; start ve cancel geri alınamaz.";
|
|
148
|
-
return '';
|
|
149
|
-
}
|
|
150
109
|
function pageSchemaHint(code, path) {
|
|
151
110
|
if (code === 'PageSchemaVersionConflictException') {
|
|
152
111
|
return ' Sayfa siz okuduktan sonra değişti ve HİÇBİR op uygulanmadı. page_schema_get ile yeniden okuyup planı tazeleyin, yeni `version` değerini `baseVersion` olarak gönderin.';
|
|
@@ -183,20 +142,12 @@ function bulkRowHint(code) {
|
|
|
183
142
|
function versionConflictHint(code, path) {
|
|
184
143
|
if (code !== 'AggregateVersionConflictException')
|
|
185
144
|
return '';
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
const readTool = /\/bpm\/definitions(\/|$)/.test(path) ? 'process_definition_get'
|
|
193
|
-
: /\/bpm\/instances(\/|$)/.test(path) ? 'process_instance_get'
|
|
194
|
-
: /\/entities(\/|$)/.test(path) ? 'entity_get'
|
|
195
|
-
: /\/workflows(\/|$)/.test(path) ? 'workflow_get'
|
|
196
|
-
: /\/flows(\/|$)/.test(path) ? 'flow_get'
|
|
197
|
-
: /\/layouts(\/|$)/.test(path) ? 'layout_get'
|
|
198
|
-
: /\/microservices(\/|$)/.test(path) ? 'microservice_get'
|
|
199
|
-
: 'ilgili *_get';
|
|
145
|
+
const readTool = /\/entities(\/|$)/.test(path) ? 'entity_get'
|
|
146
|
+
: /\/workflows(\/|$)/.test(path) ? 'workflow_get'
|
|
147
|
+
: /\/flows(\/|$)/.test(path) ? 'flow_get'
|
|
148
|
+
: /\/layouts(\/|$)/.test(path) ? 'layout_get'
|
|
149
|
+
: /\/microservices(\/|$)/.test(path) ? 'microservice_get'
|
|
150
|
+
: 'ilgili *_get';
|
|
200
151
|
return ` Kayıt siz okuduktan sonra değişti ve HİÇBİR op uygulanmadı (mesajdaki beklenen/mevcut sürüm). ${readTool} ile yeniden okuyup patch'i güncel hâle göre kurun, yeni \`version\` değerini \`baseVersion\` olarak gönderin — aynı ops'u eski sürümle tekrar göndermek aradaki değişikliği ezer.`;
|
|
201
152
|
}
|
|
202
153
|
/**
|
|
@@ -226,69 +177,6 @@ function diagnoseKnownFailure(status, message, code, context) {
|
|
|
226
177
|
}
|
|
227
178
|
return '';
|
|
228
179
|
}
|
|
229
|
-
/**
|
|
230
|
-
* Erişim politikası ve alan koruması hataları `InvalidParameterException` kodu altında gelir ve
|
|
231
|
-
* ayırt edici anahtar MESAJDADIR (`AccessScopeNotSupported: entity.create`); koşul ve koruma
|
|
232
|
-
* hatalarının bir kısmı ise kendi exception adını `code`'da taşır. İkisi de burada tek sözlükle
|
|
233
|
-
* bir sonraki adıma çevrilir (rol yönetim şeması g-21).
|
|
234
|
-
*/
|
|
235
|
-
const accessErrorHints = [
|
|
236
|
-
['ConnectDataDefinitionInvalid', " Bağlantı tanımı platform şemasına uymuyor (bilinmeyen anahtar, bozuk enum ya da eksik alan) — mesajdaki yolu düzeltin; kural adları connect-data-* (PAGE-035 · CD-004). Tanım şekli: platform_guide('page') §Kural 1c-3."],
|
|
237
|
-
['ConnectDataPropNotConnected', " Bu prop veri kaynağına bağlı değil — önce connect_data_bind (ya da page_schema_patch set_connect_data) ile bağlayın; bir prop'un bağlantısını connect_data_get okur."],
|
|
238
|
-
['ConnectDataFilterNotAllowed', " Filtre, arama ya da sıralama bu bağlantıda izinli değil: alan tanımın behavior.filterable/searchable listesinde olmalı ve işleç connect_data_describe'daki operators içinde; korumalı alanda yalnız eq · neq · in · notin, korumalı alan sıralanmaz; tanım filtresindeki $parametre params ile verilmeli (CD-002)."],
|
|
239
|
-
['ConnectDataFieldNotEditable', " Alan tanımda seçili ama bağlantı ucundan yazılamaz: edit.editable listesinde değil ya da dosya alanı (dosya bu uçtan hiç yazılmaz). Yazılacaksa connect_data_bind { edit: { editable: [..., '<alan>'] } }; dosyayı file_upload ile yükleyip satırı row_update ile güncelleyin."],
|
|
240
|
-
['ConnectDataFieldNotSelected', " İstenen alan tanımın seçtiği alanlardan değil (fields/expand), lookup ilişki alanında değil ya da yazılan alan edit.editable listesinde değil (expand yolu hiç yazılamaz) — connect_data_get ile tanıma bakın; gerekirse connect_data_bind ile alanı ekleyin ya da edit.editable'a koyun."],
|
|
241
|
-
['ConnectDataWriteDisabled', " Tanımda bu yazma eylemi kapalı (behavior.edit) ya da edit.bulk kapalıyken birden çok satır/kimlik gönderildi — politika izin verse bile motor reddeder. Açmak için connect_data_bind { edit: { <op>: true } } (toplu için bulk: true)."],
|
|
242
|
-
['ConnectDataWriteModeNotAllowed', " Tanımın edit.writeMode'u atomic: satırların hepsi ya da hiçbiri yazılır. Kısmi yazma (satır başına errors[]) için connect_data_bind { edit: { writeMode: 'partial' } }, ya da isteği mode göndermeden atın."],
|
|
243
|
-
['yet: partial.', " Kısmi yazma (mode partial) yalnız built-in veritabanındaki entity'de çalışır — savepoint harici datasource bağlantısını kapsamaz. Bu kaynakta atomic yazın (mode göndermeyin, tanımda writeMode: 'atomic')."],
|
|
244
|
-
['yet: create.', " Bu kaynak türü YAZMAZ: create/update/delete yalnız entity kaynağında çalışır (query · view · workflow · microservice okur). Yazma gereken ekranı entity kaynağına bağlayın, ya da yazmayı bir flow adımına bırakın."],
|
|
245
|
-
['yet: update.', " Bu kaynak türü YAZMAZ: create/update/delete yalnız entity kaynağında çalışır (query · view · workflow · microservice okur). Yazma gereken ekranı entity kaynağına bağlayın, ya da yazmayı bir flow adımına bırakın."],
|
|
246
|
-
['yet: delete.', " Bu kaynak türü YAZMAZ: create/update/delete yalnız entity kaynağında çalışır (query · view · workflow · microservice okur). Yazma gereken ekranı entity kaynağına bağlayın, ya da yazmayı bir flow adımına bırakın."],
|
|
247
|
-
['yet: lookup.', " Lookup yalnız entity kaynağında çalışır: ilişki hücresinin hedef tablosu entity'dir. Query/view/workflow/microservice kaynağında ilişki seçimi yoktur."],
|
|
248
|
-
['yet: datasource.', " Harici datasource (REST) kaynağı motorda YOK (b-33 kapsam dışı): platformda kayıtlı yürütücüsü yoktur. entity · query · view · workflow · microservice türlerinden birini seçin."],
|
|
249
|
-
['ConnectDataSourceUnsupported', " Kaynak bağlanabilir değil. Başlıca nedenler: uca middleware bağlı, yazan tablo/sistem ucu, dönüş şeması yok (workflow'a dizi dönen çıktı DTO'su, query'ye çalıştırılmış örnek gerekir), sorgu salt-okunur tek SELECT değil ya da kaynak zaten connectData microservice'i (tanımı doğrudan bağlayın, connect_data_get ile okuyun). Mesajın sonundaki değer bir op adıysa (create/update/delete/lookup) neden kaynağın bağlanabilirliği değil o işlemi desteklememesidir. connect_data_describe kaynağın ne yapabildiğini söyler."],
|
|
250
|
-
['ConnectDataMicroserviceInUse', " Bu connectData microservice'i başka bir prop'ta, başka bir sayfada ya da bir flow'da kullanılıyor: connect_data_detach tanımı geri koyup microservice'i silmek ister. Kullanımları dependency_graph ile bulup kaldırın, sonra yeniden deneyin."],
|
|
251
|
-
['ConnectDataRelationTargetNotFound', " İlişki alanına yazılan hedef kimlik hedef tabloda yok ya da bu kullanıcı onu göremiyor — yanıtın field'ı düşen alanı söyler. Var olan bir kimliği alanın lookup'ıyla seçin (connect_data_execute op: 'lookup', field: '<alan>'); m2m listesinde her kimlik ayrı denetlenir."],
|
|
252
|
-
['ConnectDataSourceFailed', " Kaynak (query/view/workflow/microservice) çalışırken düştü — hata kaynağın kendisinden gelir: microservice_execute / query_preview / workflow_preview ile kaynağı tek başına koşturup gerçek nedeni görün."],
|
|
253
|
-
['ProtectionOperatorNotAllowed', " Korumalı alanda yalnız eq · neq · in · notin · isnull · isnotnull kullanılır; şifreli modda eşitlik için alanın protection.exactSearch'ü açık olmalı (PROT-001). Kısmi arama için türetilmiş alan — platform_guide('access') §'Arama ve sıralama'."],
|
|
254
|
-
['ProtectionSortNotAllowed', " Korumalı alana göre sıralanamaz (PROT-002); başka bir alana ya da türetilmiş alana göre sıralayın."],
|
|
255
|
-
['ProtectionFieldTypeNotSupported', " Koruma yalnız düz METİN alana konur — ilişki, sayı, çok dilli, birincil anahtar ve identity alanı korunamaz (PROT-003)."],
|
|
256
|
-
['ProtectionDisplayFieldNotAllowed', " Display alanı korunamaz: ilişkilerde görünen ad olarak her yerde düz dönerdi (PROT-003). Önce başka bir alanı display yapın."],
|
|
257
|
-
['ProtectionDerived', " Türetilmiş alan derivedFromFieldId + derivationRule ister; slice length > 0, regex pattern derlenmeli (PROT-004)."],
|
|
258
|
-
['ProtectionChangeNotAllowed', " Var olan alanın korumasını entity_update / entity_patch değiştiremez; dolu satırlar arka plan işiyle dönüştürülür — entity_protection_update (202 + jobId, ilerleme import_status)."],
|
|
259
|
-
['ProtectionMigrationInProgress', " Bu entity'de koruma işi sürüyor; ilerlemeyi GET /{proje}/DataJobs/{id} ile izleyin. İş hata verdiyse AYNI isteği aynı gövdeyle tekrar göndermek kaldığı yerden devam ettirir."],
|
|
260
|
-
['ProtectionKeyUnavailable', " Ortamda alan koruması anahtarı yapılandırılmamış — insan işi: docs/ortam.md §Alan koruması anahtarları."],
|
|
261
|
-
['AccessScopeRequiresOwnerFields', " Entity'de sys_owner_user_id / sys_owner_unit_id yok (ACC-003): owner-fields işi (POST /{proje}/DataJobs/owner-fields/{datasourceId}) ya da scope: 'all' + koşul."],
|
|
262
|
-
['AccessResourceUnknown', " Anahtar kaynak kataloğunda yok — access_resource_list ile 'key' değerini alın (K-31); katalog entity/sayfa yazıldıkça kendiliğinden eşitlenir."],
|
|
263
|
-
['AccessConditionInvalid', " Koşul alanı grant'in entity'sinin korumasız, kataloğa girmiş bir alanı olmalı ve değer işlece uymalı (ACC-001/ACC-002) — alanlar: access_resource_list { type: 'field' }."],
|
|
264
|
-
['AccessScopeNotSupported', " Kapsam yalnız entity.read/update/delete/export/reveal/reassign izinlerinde (ACC-001)."],
|
|
265
|
-
['AccessFieldAccessNotSupported', " fieldAccess yalnız 'field.read' izninde (ACC-001)."],
|
|
266
|
-
['AccessDenyFieldAccessNotSupported', " Reddet grant'i alan erişimi taşımaz; kapsam ve koşul taşıyabilir, o zaman yalnız satır süzer (ACC-001) — koşulsuz scope: 'all' hariç, o kapsamsız gibi keser (ACC-042)."],
|
|
267
|
-
['AccessOverrideRequiresUserWithEndDate', " overridesDeny yalnız subjectType 'user' ve dolu endsAt ile yazılır (ACC-009)."],
|
|
268
|
-
['OrganizationPositionSeatOccupied', " Tek koltuklu pozisyonda aynı dönemde başka bir kalıcı atama var; vekâlet için assignmentType 'acting', kalıcı ikinci kişi için pozisyonu isMultiSeat yapın (TB-96, ORG-003)."],
|
|
269
|
-
['OrganizationStructureNodeInUse', " Düğüm DOLU. BİRİM için: altında aktif alt birim ya da aktif pozisyon var. POZİSYON için ÜÇ sebepten biri: koltukta oturan kullanıcı, o pozisyona bağlı (idari ya da işlevsel) başka bir aktif pozisyon, ya da pozisyonu managerPositionId olarak gösteren bir birim — mesaj hangisi olduğunu söylemez. Sıra yapraktan köke: user_position_replace ile koltukları boşalt → yöneticiyi gösteren birimi organization_unit_update ile managerPositionId'siz yaz → ast pozisyonları organization_position_deactivate → alt birimler → organization_unit_deactivate. Durumu organization_tree_get (includeInactive: true) ve user_position_list gösterir."],
|
|
270
|
-
['UserPositionPeriodInvalid', " Atamanın endsAt'i startsAt'ten sonra olmalı (ORG-003)."],
|
|
271
|
-
['UserPositionPrimaryDuplicate', " Bir kullanıcının en çok bir birincil ataması olur (ORG-003)."],
|
|
272
|
-
['RevealReasonTooShort', " Gerekçe projenin asgari uzunluğunun altında; project_get → revealReasonMinLength (TB-98, ACC-010). Reddedilen deneme denetim defterine REVEAL-DENIED olarak düşer."],
|
|
273
|
-
['EnforcementOffRequiresConfirmation', " off'a geçiş korumalı alanları herkese açık yapar ve satır kapsamını kaldırır; bilinçliyseniz confirm: true (TB-99, ACC-007)."],
|
|
274
|
-
['AccessConditionRequiresScope', " Koşul yalnız kapsamla birlikte yazılır; saf koşul için scope: 'all' (K-11, ACC-001)."],
|
|
275
|
-
['AccessPermissionUnknown', " İzin slug'ı katalogda yok — access_permission_list (katalog yalnız kompleks projede dolu)."],
|
|
276
|
-
['AccessPolicySlugDuplicate', ' Politika slug\'ı projede tekildir; access_policy_list ile mevcut politikayı bulun.'],
|
|
277
|
-
['EntityHasNoOwnerFields', " Entity'de sahiplik alanı (sys_owner_user_id / sys_owner_unit_id) yok, devredilecek bir sahiplik de yok: owner-fields işi (POST /{proje}/DataJobs/owner-fields/{datasourceId}) alanları açar. Basit projede bu alanlar hiç kurulmaz."],
|
|
278
|
-
['OwnershipFieldNotWritable', " Sahiplik alanı satır güncellemesiyle yazılmaz (ORG-006): row_reassign kullanın, ya da uygulama kullanıcısının kapsamıyla devretmek için systemOperation 'entity.row.reassign' olan bir uç + microservice_execute { asUser }."],
|
|
279
|
-
['UserCannotTransferToSelf', " Silinen kullanıcının kayıtları yine kendisine devredilemez: transferToUserId başka bir kullanıcı olmalı, ya da hiç verilmemeli (o zaman sahiplik birime düşer)."],
|
|
280
|
-
['OrganizationStructureParentInactive', " Üst düğüm pasifken alt düğüm etkinleştirilemez: kökten yaprağa ilerleyin — önce üst birimi organization_unit_activate ile, pozisyonda ise önce birimi, sonra idari/işlevsel üst pozisyonu organization_position_activate ile açın."],
|
|
281
|
-
['OrganizationSchemaRootCount', " Şema taslağında TEK kök birim olur: parentId'siz ikinci birim reddedilir. organization_schema_get ile kökü bulup yeni birimi onun (ya da bir altının) parentId'si ile açın."],
|
|
282
|
-
['OrganizationSchemaCycle', " Taslakta döngü var: bir birim/pozisyon kendi atasını ebeveyn gösteriyor. organization_schema_get ile zinciri izleyin."],
|
|
283
|
-
['OrganizationSchemaDuplicate', " Taslakta aynı kod (birim/pozisyon) ya da aynı rol slug'ı iki kez geçiyor; kodlar şema genelinde tekildir."],
|
|
284
|
-
['OrganizationSchemaReference', " Taslakta çözülemeyen referans var: pozisyonun unitId/roleId'si ya da birimin managerPositionId'si taslakta olmayan bir düğümü gösteriyor. Önce hedefi ekleyin, sonra gösteren düğümü yazın."],
|
|
285
|
-
['SystemEntityWriteNotAllowed', " Organizasyon ve erişim tabloları genel satır yoluyla yazılmaz (ORG-001) — platform_guide('access') §'Organizasyon ağacı'."]
|
|
286
|
-
];
|
|
287
|
-
function accessHint(code, message) {
|
|
288
|
-
const text = `${code ?? ''} ${message ?? ''}`;
|
|
289
|
-
const found = accessErrorHints.find(([key]) => text.includes(key));
|
|
290
|
-
return found ? found[1] : '';
|
|
291
|
-
}
|
|
292
180
|
const MaxErrorCauseWalk = 32;
|
|
293
181
|
const MaxErrorPathShown = 6;
|
|
294
182
|
const MaxErrorTextLength = 400;
|
|
@@ -374,45 +262,16 @@ export function mapPlatformError(status, payload, context) {
|
|
|
374
262
|
if (validationMessages.length > 0) {
|
|
375
263
|
return new PlatformApiError(`Doğrulama hatası (${location}): ${validationMessages.join(' ; ')}. Gövde şeması için ilgili ngapps://schemas kaynağına ya da mevcut bir kaydın *_get çıktısına bakın.`, status, code);
|
|
376
264
|
}
|
|
377
|
-
return new PlatformApiError(`Geçersiz istek (${location}): ${apiMessage ?? 'API gövdeyi reddetti.'}${mergeRevertHint(code)}${importHint(code, context.path)}
|
|
265
|
+
return new PlatformApiError(`Geçersiz istek (${location}): ${apiMessage ?? 'API gövdeyi reddetti.'}${mergeRevertHint(code)}${importHint(code, context.path)}`, status, code);
|
|
378
266
|
}
|
|
379
267
|
if (status === 401) {
|
|
380
|
-
// Uygulama oturumu 401'i gateway kimliğinin değil uygulama kullanıcısının sorunudur; USERNAME/PASSWORD
|
|
381
|
-
// ipucu burada yanlış yere baktırırdı (g-31).
|
|
382
|
-
if (code === 'AppSessionRequiredException' || code === 'AppSessionInvalidException') {
|
|
383
|
-
return new PlatformApiError(`Uygulama oturumu ${code === 'AppSessionRequiredException' ? 'yok' : 'geçersiz ya da süresi dolmuş'} (${location}): ${apiMessage ?? ''} Kompleks proje + enforce ortamda oturumsuz her uç ve sayfa isteği 401 döner. Parolasız kullanıcı gözü için aynı çağrıyı asUserId: '<users satır id'si>' ile tekrarlayın (development/dal); oturum açılmış üye için access_session_create ile giriş yapıp tokenRefs'teki tok_… değerini asUser olarak verin.`, status, code);
|
|
384
|
-
}
|
|
385
|
-
// Yanlış e-posta/parola 2026-09-22'den beri kendi kodunu taşır (backend ADR 0004, K-3): oturum
|
|
386
|
-
// hatası değildir, yenileme ya da gateway parolası ipucu yanlış yere baktırırdı.
|
|
387
|
-
if (code === 'AppSignInFailedException') {
|
|
388
|
-
return new PlatformApiError(`Uygulama girişi reddedildi (${location}): e-posta ya da parola yanlış, ya da kullanıcı bu projenin 'users' tablosunda yok. ${apiMessage ?? ''} Yeni kompleks projede users boş gelir — platform_guide('getting-started') §'Kompleks projede ilk kullanıcı'. Hız sınırı 5 dk'da 10 denemedir; tekrar denemeden önce kimlik bilgisini doğrulayın.`, status, code);
|
|
389
|
-
}
|
|
390
|
-
if (code === 'ReauthenticationRequiredException') {
|
|
391
|
-
return new PlatformApiError(`İmza için yeniden kimlik doğrulaması reddedildi (${location}): password (verildiyse email de) görevi imzalayan kullanıcının gerçek parolası olmalı; gateway token'ı yenilemez, istek tekrarlanmadı (BPM-018).`, status, code);
|
|
392
|
-
}
|
|
393
268
|
const hint = context.authMode === 'local'
|
|
394
269
|
? 'Gateway konfigürasyonundaki USERNAME/PASSWORD doğru mu kontrol edin.'
|
|
395
270
|
: 'İstemciden geçirilen Authorization header süresi dolmuş olabilir; yeni token alıp MCP kaydını güncelleyin.';
|
|
396
271
|
return new PlatformApiError(`Kimlik doğrulanamadı (${location}). ${hint}`, status, code);
|
|
397
272
|
}
|
|
398
273
|
if (status === 403) {
|
|
399
|
-
|
|
400
|
-
return new PlatformApiError(`Yayın dört göz onayı istiyor (${location}) [PublishApprovalRequired].${processHint(code, context.path)}`, status, code);
|
|
401
|
-
}
|
|
402
|
-
const runtimeHint = code === 'CsrfTokenMismatchException'
|
|
403
|
-
? " Oturum çerezle geldi ve durum değiştiren istekte X-ZY-CSRF yok: asUser kullanın (Bearer'lı istek CSRF istemez)."
|
|
404
|
-
: code === 'AccessQueryNotScopedException'
|
|
405
|
-
? ' Sorgu kapsamlı/korumalı bir tabloya dokunuyor: kullanıcıya özel veri için table kaynağı, tüm veriyi özetleyen rapor için sorguda isUnrestricted (ACC-005).'
|
|
406
|
-
: code === 'AccessFieldWriteDeniedException' || code === 'AccessFilterDeniedException' || code === 'AccessRevealDeniedException'
|
|
407
|
-
? ' Alan erişimi reddetti: access_preview fieldAccess (canWrite · canFilter); reveal için kapsamlı entity.reveal grant\'i.'
|
|
408
|
-
: code === 'AccessOverridePermissionRequiredException'
|
|
409
|
-
? " Bu istek bir kullanıcı istisnasını yazıyor, genişletiyor ya da istisna taşıyan politikanın grant'lerine dokunuyor; access.override.manage izni gerekir (ACC-009)."
|
|
410
|
-
: context.api === 'tenant' && code === 'ForbiddenException'
|
|
411
|
-
? ' Karar motoru reddetti; mesaj HANGİ iznin reddettiğini bilinçli olarak söylemez. Nedenini access_preview { userId, permission, resourceKey } ile sorun.'
|
|
412
|
-
: '';
|
|
413
|
-
const forbidden = new PlatformApiError(`Yetki yok (${location}). Token'ın sahibi bu işlem için yetkili değil.${runtimeHint}${runtimeHint ? '' : accessHint(code, apiMessage)}`, status, code);
|
|
414
|
-
forbidden.apiMessage = apiMessage;
|
|
415
|
-
return forbidden;
|
|
274
|
+
return new PlatformApiError(`Yetki yok (${location}). Token'ın sahibi bu işlem için yetkili değil.`, status, code);
|
|
416
275
|
}
|
|
417
276
|
if (status === 404) {
|
|
418
277
|
const environmentHint = context.environment
|
|
@@ -421,17 +280,6 @@ export function mapPlatformError(status, payload, context) {
|
|
|
421
280
|
if (context.method !== 'GET' && /\/flows(\/|$)/.test(context.path)) {
|
|
422
281
|
return new PlatformApiError(`Adımda referans verilen kayıt çözümlenemedi (${location}). Bu uçta 404 akışın kendisini DEĞİL bir adım argümanını kastediyor: flow-trigger adımının args'ında ne flowId ne triggerElementId var (ya da triggerElementId sayfadaki hiçbir elementId ile eşleşmiyor), setter adımının iteratees[].element'i bulunamıyor, ya da bir adım silinmiş bir komponente bakıyor. Adım argümanlarını page_schema_get'teki elementId'lerle karşılaştırın; flow-trigger'ın iki geçerli şekli için platform_guide('page') Kural 1c.`, status, code);
|
|
423
282
|
}
|
|
424
|
-
// Yalnız ConnectData kodlarının ipucu bu dala girer: Access*/Protection* kodlarıyla gelen bir 404
|
|
425
|
-
// buradan geçerse environment/import ipuçlarını ve '*_list ile doğrulayın' yönlendirmesini kaybeder (S8 incelemesi M-10).
|
|
426
|
-
const connectDataHint = code?.startsWith('ConnectData') ? accessHint(code, apiMessage) : '';
|
|
427
|
-
if (connectDataHint || (context.method === 'POST' && /\/connect-data\/[^/]+\/[^/]+\//.test(context.path))) {
|
|
428
|
-
return new PlatformApiError(`Kayıt bulunamadı (${location}): ${apiMessage ?? ''}${connectDataHint || " Bağlantı ucunda 404: uygulama/sayfa slug'ı ya da elementId yolu çözmüyor, veya yazılan satır ya da ilişki hedefi bu öznenin kapsamında değil (K-16). Kapsamdaki satırları connect_data_execute op: 'list' (aynı asUser) ile görün; ilişki hedefini op: 'lookup' ile seçin."}`, status, code);
|
|
429
|
-
}
|
|
430
|
-
// İlişki hedefi yok (o2m RelationTargetRowNotFound, m2m ManyToManyTargetRowNotFound): kayıt/environment değil,
|
|
431
|
-
// gövdedeki bir ilişki kimliği düşüyor — mesaj alanın adını taşır (38/U-6).
|
|
432
|
-
if (code && /^(RelationTargetRowNotFound|ManyToManyTargetRowNotFound)(Exception)?$/.test(code)) {
|
|
433
|
-
return new PlatformApiError(`İlişki hedefi bulunamadı (${location}): ${apiMessage ?? ''} Gövdedeki ilişki alanına yazılan kimlik hedef tabloda yok; var olan kimlikleri hedef entity'de row_list ile alın (m2m alanı tam liste bekler: ['<id>', …]). Hiçbir satır yazılmadı.`, status, code);
|
|
434
|
-
}
|
|
435
283
|
return new PlatformApiError(`Kayıt bulunamadı (${location}).${environmentHint} id/slug değerini ilgili *_list tool'uyla doğrulayın.${importHint(code, context.path)}`, status, code);
|
|
436
284
|
}
|
|
437
285
|
if (status === 409 || status === 422) {
|
|
@@ -440,7 +288,7 @@ export function mapPlatformError(status, payload, context) {
|
|
|
440
288
|
: '';
|
|
441
289
|
const validationMessages = collectValidationMessages(body);
|
|
442
290
|
const detail = validationMessages.length > 0 ? ` → ${validationMessages.join(' ; ')}` : '';
|
|
443
|
-
const rejected = new PlatformApiError(`İş kuralı reddetti (${location}): ${apiMessage ?? 'çakışma'}${code ? ` [${code}]` : ''}${detail}${projectConflictHint}${pageSchemaHint(code, context.path)}${
|
|
291
|
+
const rejected = new PlatformApiError(`İş kuralı reddetti (${location}): ${apiMessage ?? 'çakışma'}${code ? ` [${code}]` : ''}${detail}${projectConflictHint}${pageSchemaHint(code, context.path)}${bulkRowHint(code)}${importHint(code, context.path)}${versionConflictHint(code, context.path)}${mergeHint(context.path)}`, status, code);
|
|
444
292
|
if (typeof body.rowIndex === 'number')
|
|
445
293
|
rejected.rowIndex = body.rowIndex;
|
|
446
294
|
return rejected;
|
package/dist/platform/http.js
CHANGED
|
@@ -6,20 +6,6 @@ import { randomUUID } from 'node:crypto';
|
|
|
6
6
|
import { request } from 'undici';
|
|
7
7
|
export const requestAuthStorage = new AsyncLocalStorage();
|
|
8
8
|
const hiddenResponseHeaders = new Set(['set-cookie', 'authorization', 'proxy-authorization']);
|
|
9
|
-
/**
|
|
10
|
-
* g-08: yürütme yanıtının varsayılan başlıkları — işin okuduğu olanlar. `total-count` sayfalı tablo
|
|
11
|
-
* akışlarının sözleşmesidir (İK koşusu M-8), `location` yönlendirmenin, `x-request-id`/`traceparent`
|
|
12
|
-
* platform günlüğünde aynı isteği bulmanın anahtarıdır. Cloudflare ve sunucu başlıkları (`cf-ray`,
|
|
13
|
-
* `server`, `alt-svc`, `date` …) ajan bağlamında yer kaplıyordu ve hiçbir karar onlara bakmıyordu.
|
|
14
|
-
*/
|
|
15
|
-
const essentialResponseHeaders = new Set(['content-type', 'content-length', 'content-disposition', 'location', 'total-count', 'x-request-id', 'traceparent']);
|
|
16
|
-
export function headersForMode(headers, mode) {
|
|
17
|
-
if (mode === 'none')
|
|
18
|
-
return undefined;
|
|
19
|
-
if (mode === 'all')
|
|
20
|
-
return headers;
|
|
21
|
-
return Object.fromEntries(Object.entries(headers).filter(([name]) => essentialResponseHeaders.has(name)));
|
|
22
|
-
}
|
|
23
9
|
/**
|
|
24
10
|
* Sayfalı tablo akışları `Total-Count` header'ına bağlı ama execute ailesi yalnız gövdeyi
|
|
25
11
|
* döndürüyordu; sözleşme hiçbir tool'dan doğrulanamıyordu (İK koşusu M-8). Gizli header'lar
|
|
@@ -167,15 +153,13 @@ export class Platform {
|
|
|
167
153
|
body = JSON.stringify(options.body);
|
|
168
154
|
}
|
|
169
155
|
const startedAt = Date.now();
|
|
170
|
-
logStep('istek →', `${method} ${url.href} · ${api} api${options.environment ? ` · env=${options.environment}` : ''}${options.anonymous ? ' · ANONİM (Authorization header YOK)' : ''}${isRetry ? ' · 401 sonrası tekrar' : ''}`, options.
|
|
171
|
-
? [
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
?
|
|
175
|
-
: options.
|
|
176
|
-
|
|
177
|
-
: options.body)}`]
|
|
178
|
-
: []);
|
|
156
|
+
logStep('istek →', `${method} ${url.href} · ${api} api${options.environment ? ` · env=${options.environment}` : ''}${options.anonymous ? ' · ANONİM (Authorization header YOK)' : ''}${isRetry ? ' · 401 sonrası tekrar' : ''}`, logsDetail() && (options.multipart || options.form || options.body !== undefined)
|
|
157
|
+
? [`gövde: ${renderJson(options.multipart
|
|
158
|
+
? describeMultipart(options.multipart)
|
|
159
|
+
: options.form
|
|
160
|
+
? Object.fromEntries(options.form)
|
|
161
|
+
: options.body)}`]
|
|
162
|
+
: []);
|
|
179
163
|
let statusCode;
|
|
180
164
|
let payload;
|
|
181
165
|
let responseBytes = 0;
|
|
@@ -212,12 +196,7 @@ export class Platform {
|
|
|
212
196
|
logStep('yanıt ←', `HTTP ${statusCode} · ${Date.now() - startedAt} ms · ${responseBytes} B`, statusCode >= 400 || logsDetail()
|
|
213
197
|
? [`gövde: ${options.expectBinary && statusCode < 400 ? `<ikili içerik · ${responseBytes} B>` : renderJson(payload)}`]
|
|
214
198
|
: []);
|
|
215
|
-
|
|
216
|
-
// parolası (AppSignInFailedException, access.session.create — 2026-09-22) 401'i gateway token'ının süresiyle
|
|
217
|
-
// ilgili değildir: tekrar aynı reddi alır, üstelik parola denemesi iki kez sayılır (Faz 8 incelemesi).
|
|
218
|
-
const retriesWithFreshToken = callerHeaders.authorization === undefined
|
|
219
|
-
&& !['ReauthenticationRequiredException', 'AppSignInFailedException'].includes(String(payload?.code));
|
|
220
|
-
if (statusCode === 401 && this.config.authMode === 'local' && !isRetry && !options.anonymous && retriesWithFreshToken) {
|
|
199
|
+
if (statusCode === 401 && this.config.authMode === 'local' && !isRetry && !options.anonymous) {
|
|
221
200
|
this.tokens.invalidate();
|
|
222
201
|
logStep('token ⟳', 'token reddedildi — önbellek boşaltıldı, istek yeni token ile bir kez daha denenecek');
|
|
223
202
|
return this.send(api, method, path, options, raw, true);
|