@appaflytech/zeyrek-ai-mcp 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +2 -2
- package/.env.production.example +8 -0
- package/README.md +9 -8
- package/dist/config.js +18 -3
- package/dist/knowledge/backendConstraints.js +88 -0
- package/dist/knowledge/componentCatalog.js +415 -68
- package/dist/knowledge/componentEvents.js +120 -25
- package/dist/knowledge/functionGuards.js +134 -0
- package/dist/knowledge/normalize.js +512 -25
- package/dist/knowledge/outlines.js +31 -0
- package/dist/knowledge/policy.js +14 -5
- package/dist/knowledge/propTypes.js +5 -4
- package/dist/knowledge/rules.js +453 -6
- package/dist/knowledge/styleResolve.js +6 -1
- package/dist/platform/csv.js +123 -0
- package/dist/platform/errors.js +62 -3
- package/dist/platform/http.js +11 -2
- package/dist/platform/responses.js +16 -4
- package/dist/platform/screenshot.js +98 -9
- package/dist/platform/strictArguments.js +32 -0
- package/dist/platform/writeDiff.js +6 -3
- package/dist/resources/examples/flow-call-function.json +66 -0
- package/dist/resources/examples/function-total.json +70 -0
- package/dist/resources/examples/microfunction-node-sum.json +56 -0
- package/dist/resources/examples/page-dynamic-form.json +1 -1
- package/dist/resources/examples/page-sign-in.json +2 -2
- package/dist/resources/guides/component.md +14 -2
- package/dist/resources/guides/entity.md +321 -17
- package/dist/resources/guides/expressions.md +9 -0
- package/dist/resources/guides/functions.md +262 -0
- package/dist/resources/guides/getting-started.md +7 -0
- package/dist/resources/guides/layout.md +6 -0
- package/dist/resources/guides/merge.md +231 -0
- package/dist/resources/guides/microfunction.md +166 -0
- package/dist/resources/guides/microservice.md +166 -7
- package/dist/resources/guides/modify-existing.md +23 -0
- package/dist/resources/guides/page.md +101 -22
- package/dist/resources/guides/translation.md +35 -10
- package/dist/resources/guides/workflow.md +51 -2
- package/dist/resources/schema-fingerprint.json +4 -4
- package/dist/resources/schemas/AnalyzeImportQuery.json +51 -0
- package/dist/resources/schemas/ApplyMergePlanCommand.json +19 -0
- package/dist/resources/schemas/CreateBulkRowCommand.json +3 -0
- package/dist/resources/schemas/CreateEnvironmentCommand.json +31 -0
- package/dist/resources/schemas/CreateGlobalFunctionCommand.json +95 -0
- package/dist/resources/schemas/CreateImportPlanCommand.json +278 -0
- package/dist/resources/schemas/CreateMergePlanCommand.json +34 -0
- package/dist/resources/schemas/CreateMicrofunctionCommand.json +117 -0
- package/dist/resources/schemas/CreateMicrofunctionRuntimeCommand.json +51 -0
- package/dist/resources/schemas/CreateMicroserviceCommand.json +123 -2
- package/dist/resources/schemas/CreateWorkflowCommand.json +17 -3
- package/dist/resources/schemas/DataJobDto.json +267 -0
- package/dist/resources/schemas/ExportRowsCommand.json +172 -0
- package/dist/resources/schemas/Filter.json +3 -1
- package/dist/resources/schemas/GetRowsQuery.json +3 -1
- package/dist/resources/schemas/GlobalFunctionDto.json +89 -0
- package/dist/resources/schemas/GlobalFunctionUpdateResultDto.json +249 -0
- package/dist/resources/schemas/ImportAnalysisDto.json +401 -0
- package/dist/resources/schemas/ImportPlanDto.json +260 -0
- package/dist/resources/schemas/ImportSampleDto.json +90 -0
- package/dist/resources/schemas/InvokeMicrofunctionCommand.json +25 -0
- package/dist/resources/schemas/PreviewMicroserviceCommand.json +123 -2
- package/dist/resources/schemas/PreviewWorkflowCommand.json +17 -3
- package/dist/resources/schemas/ResolveMergeConflictsCommand.json +58 -0
- package/dist/resources/schemas/RevertMergePlanCommand.json +19 -0
- package/dist/resources/schemas/RunImportCommand.json +62 -0
- package/dist/resources/schemas/StepDto.json +17 -3
- package/dist/resources/schemas/UpdateBulkRowCommand.json +3 -0
- package/dist/resources/schemas/UpdateEntityCommand.json +3 -1
- package/dist/resources/schemas/UpdateGlobalFunctionCommand.json +66 -0
- package/dist/resources/schemas/UpdateMicrofunctionCommand.json +121 -0
- package/dist/resources/schemas/UpdateMicrofunctionRuntimeCommand.json +54 -0
- package/dist/resources/schemas/UpdateMicroserviceCommand.json +123 -2
- package/dist/resources/schemas/UpdateWorkflowCommand.json +17 -3
- package/dist/server.js +17 -4
- package/dist/tools/activities.js +40 -0
- package/dist/tools/automations.js +14 -5
- package/dist/tools/common.js +16 -0
- package/dist/tools/dependencies.js +1 -1
- package/dist/tools/environments.js +52 -0
- package/dist/tools/files.js +51 -50
- package/dist/tools/flows.js +104 -5
- package/dist/tools/functions.js +331 -0
- package/dist/tools/importSchemas.js +79 -0
- package/dist/tools/imports.js +241 -0
- package/dist/tools/layouts.js +4 -4
- package/dist/tools/merges.js +113 -0
- package/dist/tools/microfunctions.js +155 -0
- package/dist/tools/microservices.js +112 -9
- package/dist/tools/pages.js +188 -66
- package/dist/tools/platformInfo.js +4 -1
- package/dist/tools/queries.js +72 -6
- package/dist/tools/revisions.js +94 -0
- package/dist/tools/rows.js +342 -22
- package/dist/tools/screenWrite.js +11 -2
- package/dist/tools/templates.js +32 -5
- package/dist/tools/workflows.js +28 -6
- package/package.json +3 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { functionSignature } from './functionGuards.js';
|
|
1
2
|
function asArray(value) {
|
|
2
3
|
return Array.isArray(value) ? value.filter((entry) => Boolean(entry) && typeof entry === 'object') : [];
|
|
3
4
|
}
|
|
@@ -296,3 +297,33 @@ export function resolvePatchOperations(document, operations, readTool = 'workflo
|
|
|
296
297
|
});
|
|
297
298
|
return { operations: resolved, notes, targets };
|
|
298
299
|
}
|
|
300
|
+
/**
|
|
301
|
+
* Fonksiyon özeti (G-07): kaynak, ad, kapsam, imza, parametre listesi, gövde satır sayısı —
|
|
302
|
+
* gövdenin kendisi TAŞINMAZ (liste yanıtı MAX_RESPONSE_BYTES'ı şişirmesin). `function_patch`
|
|
303
|
+
* AÇILMADI: fonksiyonda tek büyük alan gövdedir ve gövde bütün olarak yazılır; kısmi güncellemeyi
|
|
304
|
+
* `function_update` mevcut kaydı okuyup eksik alanları doldurarak sağlar.
|
|
305
|
+
*/
|
|
306
|
+
export function functionOutline(definition) {
|
|
307
|
+
const parameters = asArray(definition.parameters);
|
|
308
|
+
const source = definition.source === 'workflow' ? 'workflow' : 'studio';
|
|
309
|
+
return {
|
|
310
|
+
id: definition.id,
|
|
311
|
+
source,
|
|
312
|
+
name: definition.name,
|
|
313
|
+
applicationId: definition.applicationId ?? null,
|
|
314
|
+
scope: source === 'workflow' ? null : (definition.scope ?? 'application'),
|
|
315
|
+
pageId: definition.pageId ?? null,
|
|
316
|
+
isAsync: definition.isAsync === true,
|
|
317
|
+
signature: functionSignature(definition),
|
|
318
|
+
parameters: parameters.map(parameter => ({
|
|
319
|
+
name: parameter.name,
|
|
320
|
+
type: parameter.type ?? 'any',
|
|
321
|
+
required: parameter.required === true,
|
|
322
|
+
defaultValue: parameter.defaultValue ?? null,
|
|
323
|
+
description: parameter.description ?? null
|
|
324
|
+
})),
|
|
325
|
+
description: definition.description ?? null,
|
|
326
|
+
bodyLines: typeof definition.body === 'string' && definition.body.length > 0 ? definition.body.split('\n').length : 0,
|
|
327
|
+
view: 'outline'
|
|
328
|
+
};
|
|
329
|
+
}
|
package/dist/knowledge/policy.js
CHANGED
|
@@ -11,6 +11,19 @@ export class PolicyBlockError extends Error {
|
|
|
11
11
|
this.name = 'PolicyBlockError';
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* `POLICY=warn` ve `policyOverride` kaçışları kuralın nereden geldiğine bakmaz: senkron
|
|
16
|
+
* `check`'lerden gelen bulgular da, platformdan okunarak üretilen bulgular da (WF-MF-001'in
|
|
17
|
+
* yayın durumu ön-denetimi) aynı kapıdan geçer. İki yerde iki farklı indirgeme olursa bir
|
|
18
|
+
* bulgu `policyOverride: true` ile de isteği durdurur ve kaçış yalanı çıkar.
|
|
19
|
+
*/
|
|
20
|
+
export function applyPolicyMode(config, findings, policyOverride = false) {
|
|
21
|
+
if (config.policyMode !== 'warn' && !policyOverride)
|
|
22
|
+
return findings;
|
|
23
|
+
return findings.map(finding => finding.severity === 'block'
|
|
24
|
+
? { ...finding, severity: 'warn', message: `${finding.message} [block → warn: ${policyOverride ? 'policyOverride' : 'POLICY=warn'}]` }
|
|
25
|
+
: finding);
|
|
26
|
+
}
|
|
14
27
|
export function evaluatePolicy(config, rules, module, definition, context, policyOverride = false) {
|
|
15
28
|
if (config.policyMode === 'off') {
|
|
16
29
|
logStep('politika', `${module}/${context.operation} · POLICY=off — lint çalıştırılmadı`);
|
|
@@ -18,11 +31,7 @@ export function evaluatePolicy(config, rules, module, definition, context, polic
|
|
|
18
31
|
}
|
|
19
32
|
const applicable = rules.filter(rule => rule.module === module && rule.appliesTo.includes(context.operation));
|
|
20
33
|
const raw = applicable.flatMap(rule => rule.check(definition, context));
|
|
21
|
-
const findings = config
|
|
22
|
-
? raw.map(finding => finding.severity === 'block'
|
|
23
|
-
? { ...finding, severity: 'warn', message: `${finding.message} [block → warn: ${policyOverride ? 'policyOverride' : 'POLICY=warn'}]` }
|
|
24
|
-
: finding)
|
|
25
|
-
: raw;
|
|
34
|
+
const findings = applyPolicyMode(config, raw, policyOverride);
|
|
26
35
|
logStep('politika', `${module}/${context.operation}${context.workflowKind ? ` (${context.workflowKind})` : ''} · ${applicable.length} kural denendi · ${findings.length === 0 ? 'bulgu yok' : `${findings.length} bulgu`}${policyOverride ? ' · policyOverride açık' : ''}`, findings.map(finding => `[${finding.ruleId}] ${finding.severity}: ${finding.message}`));
|
|
27
36
|
return findings;
|
|
28
37
|
}
|
|
@@ -2,10 +2,11 @@ import { findNode } from '../tools/screens.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Prop değerinin `type` alanı üç değer alır ve her biri taşıyıcısı farklıdır.
|
|
4
4
|
*
|
|
5
|
-
* Platformun kendi micro-op applier'ı `replace_prop`'ta gönderilen ham değeri
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* şemayı
|
|
5
|
+
* Platformun kendi micro-op applier'ı `replace_prop`'ta gönderilen ham değeri `Static` Prop'una
|
|
6
|
+
* sarar, `{type:'code'|'translation', ref}` sarmalını tipiyle korur (`PageSchemaMicroOpApplier`
|
|
7
|
+
* `ApplyOne`); gateway bu sarmalları 2026-09-15'ten beri olduğu gibi geçirir (G-04). Bu op aynı
|
|
8
|
+
* işi şemayı okuyarak yapar: prop'un TİPİNİ yerinde değiştirir, mevcut `data`'yı tasarım yedeği
|
|
9
|
+
* olarak taşır ve gövdeyi tam yazar — layout ağacında micro-op hattı olmadığı için orada tek yoldur.
|
|
9
10
|
*
|
|
10
11
|
* Alternatifi `remove_component` + `add_component`'tı ve pahalıydı: 2026-09-06 koşusunda on bir
|
|
11
12
|
* etiket o yolla yeniden kuruldu, o düğümlere yazan DOKUZ setter iteratee'si platform tarafından
|