mcp-workflow-core 0.3.0__py3-none-any.whl

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.
@@ -0,0 +1,187 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-workflow-core
3
+ Version: 0.3.0
4
+ Summary: MCP sunucularının iş akışı belgeleri için tek motor: listeleme, arama, doğrulama, yazma, kaynak tanımları.
5
+ License-Expression: Apache-2.0
6
+ Requires-Python: >=3.11
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Provides-Extra: dev
10
+ Requires-Dist: pytest<10,>=9; extra == "dev"
11
+ Requires-Dist: ruff<0.16,>=0.15; extra == "dev"
12
+ Dynamic: license-file
13
+
14
+ # workflow-core
15
+
16
+ MCP sunucularının iş akışı belgelerini okuyan, arayan, doğrulayan ve MCP kaynağı olarak
17
+ yayımlayan Python kütüphanesi. Sunucu değildir: port dinlemez, araç yayımlamaz. Sunucular
18
+ onu içe aktarır ve üç ayarla yapılandırır.
19
+
20
+ **Durum (2026-09-01):** dört tüketici sunucu motora bağlı ve kopyasız; yol haritasının
21
+ beş fazından dördü geçti. Motor 0.3.0 (230 test, ruff temiz); dağıtım adı
22
+ `mcp-workflow-core`, lisans Apache 2.0, PyPI yayımı onay sahibinin elinde.
23
+
24
+ **Hangi sürümdeyim:** paket sürümü **0.3.0**. Kaynak `pyproject.toml` (`[project]
25
+ version`); `tests/test_surum.py` bu satırı ona bağlar, çalışma anında
26
+ `workflow_core.__version__` aynı numarayı verir. Kuralların sürümü ayrıdır:
27
+ [anayasa](.sdd/CONSTITUTION.md) 1.4.0.
28
+
29
+ ## Ne yapar
30
+
31
+ Bir sunucunun belge klasöründeki Markdown iş akışı belgelerini yönetir. Her
32
+ belge bir üst bilgi bloğu (frontmatter) ve zorunlu bölümler taşır; motor bunları:
33
+
34
+ - listeler ve okur,
35
+ - arar (Türkçe harfleri katlayarak: büyük `İ`, aksanlı ve aksansız yazım aynı sonucu
36
+ verir),
37
+ - doğrular (zorunlu alanlar, zorunlu bölümler, gövdede anılan araç adlarının çalışma
38
+ anındaki kayıtta var olup olmadığı, bayatlık),
39
+ - yazar, günceller ve siler (kuru çalıştırma ve arşivle),
40
+ - MCP kaynağı olarak yayımlar.
41
+
42
+ Motor belgeleri çalıştırmaz, okutur. Belge "makinenin yürüteceği kod" değil, "akıllı bir
43
+ asistanın okuyacağı yönerge"dir; koşul, döngü ve karar asistanın işidir.
44
+
45
+ Kullanım, tüketici sunucuda:
46
+
47
+ ```python
48
+ from workflow_core import Config, Library
49
+
50
+ library = Library(Config.from_file("workflow.yaml")) # docs_dir, tool_prefix, categories
51
+ library.search("devreye alma") # Türkçe katlamalı arama
52
+ library.validate(registered_tools=canli_arac_listesi, today="2026-08-22")
53
+ library.write("42-yeni-belge", icerik, dry_run=True) # plan döner, disk değişmez
54
+ library.dispatch("get", {"id": "42-yeni-belge"}) # tek giriş: action + params
55
+ ```
56
+
57
+ MCP kaynağı olarak yayın çerçeveye göre tek satır: `workflow_core.adapters.gofastmcp`
58
+ ya da `workflow_core.adapters.official_sdk` içinden `register(server, library)`. Onay
59
+ kapısı motorda değil tüketici aracındadır; motor `dry_run` planını ve yıkıcı eylem
60
+ işaretini (`ACTIONS`) verir.
61
+
62
+ ## Neden var
63
+
64
+ Aynı motor daha önce üç sunucuya kopyalanmıştı: toplam 1720 satır, paylaşılan satır
65
+ sıfır. Düzeltmeler iki yönde de akmadı; bir kopyada yapılan iyileştirme ötekilere
66
+ gitmedi, orijinaldeki düzeltme kopyalara gitmedi. Faz 0 ölçümü hiçbir kopyanın "en
67
+ zengin" olmadığını gösterdi: doğru davranışlar üçüne dağılmıştı ve arama üçünde de
68
+ Türkçe-güvenli değildi. Birleştirme tek kopyayı seçerek yapılamaz; bu yüzden motor tek
69
+ yerde yazılıyor ve sunucular onu kütüphane olarak alıyor.
70
+
71
+ ## Tasarım ilkeleri
72
+
73
+ - **Motor tek, yapılandırma çok.** Sunucuya özel üç şey var: belge klasörünün yolu,
74
+ araç-adı öneki, geçerli kategori listesi. Dördüncüsü gerektiğinde önce "bu gerçekten
75
+ sunucuya mı özel" diye sorulur. Tanınmayan yapılandırma alanı reddedilir.
76
+ - **Alan-özel `if` yok.** Sunucuya özel davranış yapılandırma alanıyla çözülür; alan
77
+ eklemek diff'te görünür, `if` görünmez.
78
+ - **Hiçbir MCP çerçevesine bağlanmaz.** Tüketiciler iki farklı çerçevede çalışıyor; motor
79
+ ikisini de içe aktarmaz, kaynak kaydı çerçeveden bağımsız bir arayüzle sunulur.
80
+ - **Sessiz düşüş yok.** Yedek yola düşüş, kırpma ve yok sayma en az bir uyarı loglar.
81
+ - **Yazma güvenlik zinciriyle.** Kuru çalıştırma motorda, onay tüketici aracında; eski
82
+ sürüm arşivlenir, yazma atomiktir, sonuç geri okunur. `success: true` kanıt değildir.
83
+ - **Kopyalanmaz.** Tüketiciler paketi düzenlenebilir kurulumla (`pip install -e`) alır.
84
+ Düzeltme diske anında akar; çalışan sunucuya yeniden başlatmayla gelir.
85
+
86
+ ## Yapılandırma sözleşmesi (taslak)
87
+
88
+ Faz 1'de kesinleşir. Bugünkü niyet:
89
+
90
+ | Alan | Ne | Örnek |
91
+ |---|---|---|
92
+ | belge klasörü | iş akışı belgelerinin dizini | `docs/workflows` |
93
+ | araç-adı öneki | doğrulamanın gövdede arayacağı araç adı deseni | `acme_` |
94
+ | kategori listesi | belgelerin alabileceği geçerli kategoriler | `temel, kalite, yasam-dongusu` |
95
+
96
+ Bu üçünün dışındaki her şey ortak koddur.
97
+
98
+ ## Tüketici kılavuzu
99
+
100
+ Bir sunucuyu motora bağlamak beş adımdır; her adımın kanıtı yanında yazılı.
101
+
102
+ 1. **Kur.** Dağıtım adı `mcp-workflow-core` (PyPI'daki `workflow-core` başka bir
103
+ paketin; içe aktarma adı `workflow_core` aynı): `pip install mcp-workflow-core`, ya da
104
+ aynı makinede kaynaktan düzenlenebilir kurulum `pip install -e <workflow-core dizini>`.
105
+ Düzenlenebilir kurulum diske anında akar, çalışan sunucuya yeniden başlatmayla gelir
106
+ (anayasa, bilinen tuzaklar). Bağımlılık satırına üst sınır yazın (`<0.4`).
107
+ 2. **Yapılandır.** Sunucu köküne `workflow.yaml`: `docs_dir`, `tool_prefix`,
108
+ `categories`. Dördüncü alan yazılırsa motor yüklenmez; kategori listesi boş olamaz.
109
+ 3. **Sar.** Tek araç + `action`: `library.dispatch(action, params)`. Araç açıklamasını ve
110
+ yıkıcılık işaretini `ACTIONS` tablosundan üret. Onay kapısı sunucunun işidir:
111
+ `confirm` verilmemişse `write` ve `delete` `dry_run=True` ile çağrılır ve plan döner,
112
+ `confirm=True` ile gerçek yazma. Araç listesi canlı kayıttan `registered_tools`,
113
+ kaynağı `tool_source` olarak verilir. Hata zarfı (`ok`, `type`) sarmalayıcıda; motor
114
+ istisna fırlatır.
115
+ 4. **Yayımla.** `from workflow_core.adapters.<çerçeve> import register`;
116
+ `register(server, library)` somut listeyi ve `workflow://{id}` şablonunu birlikte
117
+ kaydeder. Somut liste kayıt anının anlık görüntüsüdür: sonradan eklenen belge şablon
118
+ adresle okunur, listeye sunucu yeniden başlatılınca girer. Bu bedel bilinçli (tasarım
119
+ kılavuzu §4); yalnız somut liste kurulursa yeni belge hiç okunamaz.
120
+ 5. **Doğrula.** Yeniden başlat, sonra canlı: büyük `İ`'li Türkçe sorgu sonuç döndürüyor
121
+ mu, `validate` notunda araç listesinin kaynağı yazıyor mu, `workflow://<kimlik>`
122
+ okunuyor mu, `dry_run` diske dokunmuyor mu. `success: true` kanıt değildir.
123
+
124
+ **Ret bir karardır, hata değil.** Motor yazmayı ya da silmeyi reddettiğinde istisna
125
+ fırlatmaz; `allowed`, `blocked_by`, `written` / `deleted` taşıyan planı döndürür ve
126
+ sonuca kendi hükmünü koyar. `ok` yalnız "diske yapıldı" demektir: kuru çalıştırmada ve
127
+ rette daima `false`, gerçek koşuda geri okuma doğrulayınca `true`; planın geçip
128
+ geçmeyeceği `allowed` alanında. Zarfı motorun alanlarından türetin, `ok`'u koşulsuz
129
+ yazmayın; hangi sırayla yazarsanız yazın motorun değeri onaysız planı "yapıldı"
130
+ göstermez. İlk bağlantıda reddedilen bir silme koşulsuz `ok` yüzünden başarılı
131
+ görünmüştü (2026-08-25); 0.1.1 kuru çalıştırmada "yapılabilir" anlamında `true` yazınca
132
+ üç sunucuda onaysız plan yapılmış göründü (2026-08-26), 0.2.0 bunu kapattı.
133
+
134
+ Eski motor dosyası bağlantıdan sonra silinir; kopya kalırsa çatallanma geri gelir. İlk
135
+ doğrulamada yeni kurallar uyarı üretir (`missing_verified_on`, frontmatter içi yorum
136
+ satırı); belge uyumu sunucunun işidir, sayılar Faz 1 planının SC-006 tablosunda.
137
+
138
+ ## Depo düzeni
139
+
140
+ ```text
141
+ workflow_core/ motor paketi: yapılandırma, belge modeli, arama, doğrulama, yazma, kaynak, dağıtıcı
142
+ adapters/ çerçeveye dokunan tek yer; çerçeve başına bir dosya
143
+ tests/ pytest: modül başına test + kapanış, sessizlik, adsız çıktı testleri
144
+ korpus/, golden/ deneme belgeleri ve sorgu-beklenti seti
145
+ .sdd/ süreç belgeleri: anayasa, yol haritası, görevler, şartnameler
146
+ features/00N-*/ Faz 0 fark tablosu; Faz 1 şartname, plan, yetenek envanteri
147
+ _olcumler/ gerçek korpus ölçümleri (sürüm kontrolü dışında)
148
+ pyproject.toml paket tanımı, sürümün tek kaynağı, ruff ayarı
149
+ .test-komutu push öncesi kapının koştuğu test komutu
150
+ ```
151
+
152
+ ## Geliştirme
153
+
154
+ Python 3.11 gerekir. Sanal ortam aç, paketi düzenlenebilir kur (tüketici sunucular da
155
+ aynı komutla, kendi sanal ortamlarına kurar):
156
+
157
+ ```powershell
158
+ python -m venv .venv
159
+ .venv\Scripts\python.exe -m pip install -e ".[dev]" # motor + pytest + ruff
160
+ ```
161
+
162
+ ```powershell
163
+ python -m pytest tests -q # testler (kaynak ağacından da koşar)
164
+ ruff check . ; ruff format --check . # linter ve biçim
165
+ python .sdd/scripts/sdd.py durum # aktif özellik, kapılar, sıradaki adım
166
+ python .sdd/scripts/sdd.py denetle # belge düzeni denetimi
167
+ python .sdd/scripts/sdd.py sizinti # ortama bağlı iz taraması
168
+ ```
169
+
170
+ Push öncesi kapı (`pre-push`) testleri ve düzen denetimini kendisi koşar; kırmızı testle
171
+ push yapılamaz.
172
+
173
+ İş akışı şartname odaklıdır: bir iş önce `.sdd/ROADMAP.md`'de durur, `sdd yeni` ile
174
+ şartnamesi açılır, onaylanır, planı yazılır, `sdd kontrol` sıfır dönünce görevleri
175
+ `.sdd/TODO.md`'ye düşer. Onay sohbette değil dosyada verilir.
176
+
177
+ ## Belgeler
178
+
179
+ | Dosya | Ne için |
180
+ |---|---|
181
+ | [.sdd/CONSTITUTION.md](.sdd/CONSTITUTION.md) | kural gövdesi, tek nüsha |
182
+ | [.sdd/ROADMAP.md](.sdd/ROADMAP.md) | yön, aşamalar, bilinçli olarak girilmeyen yollar |
183
+ | [.sdd/ARCHITECTURE.md](.sdd/ARCHITECTURE.md) | tarihli mimari kararlar ve reddedilen alternatifler |
184
+ | [.sdd/TODO.md](.sdd/TODO.md) | açık işler |
185
+ | [.sdd/CHANGELOG.md](.sdd/CHANGELOG.md) | tamamlanan dalgalar ve nedenleri |
186
+ | [.sdd/features/001-faz0-davranis-farki/fark-tablosu.md](.sdd/features/001-faz0-davranis-farki/fark-tablosu.md) | Faz 0 çıktısı: kopyaların davranış farkı, hükümler, kusur listesi |
187
+ | [.sdd/features/002-faz1-motor-paketi/plan.md](.sdd/features/002-faz1-motor-paketi/plan.md) | Faz 1 planı: tasarım kararları, yetenek envanteri, kapanış testleri, gerçek korpus ölçümleri |
@@ -0,0 +1,22 @@
1
+ mcp_workflow_core-0.3.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
2
+ workflow_core/__init__.py,sha256=ygvn9apKK2JYNj-IskrIQiPKKQPCOQwHkq_6tdktc7M,1891
3
+ workflow_core/_version.py,sha256=Ds2Dur9ARiWs8cfiEBmSxb38-vQYms0GHWZCkMMrVx4,2189
4
+ workflow_core/config.py,sha256=SAZbnwdbmJrOi8ev59uQ4IpguCvYfcX7ZbF0C2GE2Po,4789
5
+ workflow_core/dispatch.py,sha256=71sSR8dGM2c-jiPc2uvzRepW-mLEenmFGFIZM9HQT60,4244
6
+ workflow_core/documents.py,sha256=VkiFFgbGnuM5BZgkyJEWOHF-RQLm9GyjgSK5Uf2zLDs,11244
7
+ workflow_core/errors.py,sha256=Vax1om4LYIDCMOoiXpDtvIe9eTUCydnsIdSrM5RKY70,870
8
+ workflow_core/fold.py,sha256=KY8-YrrwYXWgtO2hfIu5rJ7me0cLxk_E-1wodScCzpA,1149
9
+ workflow_core/frontmatter.py,sha256=KYXsvzf67rvmz2c9CXlEbfrcTyj9Irj8Wevs2flQeI8,4650
10
+ workflow_core/library.py,sha256=PgXwkQ7_LtsRNFEkKvM72JPos7TcW7Pixo-EcU_LDE8,2494
11
+ workflow_core/resources.py,sha256=Yyy1quU1NcWoUnqCJdMkW27VB5uygQ9LkhKLs33u7l4,4303
12
+ workflow_core/search.py,sha256=R3TFl5B3TG6aJ8vzr2MG-ElKqqTArNTYd3TLiV37Xck,4019
13
+ workflow_core/store.py,sha256=rFkiIaovmsUcIfKWNRBrCuowK9imgeoZ8P0K8NGJnF0,7942
14
+ workflow_core/validate.py,sha256=rz7fsqeLWPNJwlrY4Ut8BFWFL2LDioiYapwNxFQN5CA,19965
15
+ workflow_core/adapters/__init__.py,sha256=qi5XuonUpB2NgEMnLDaXRoaGz7wGLR9SD90TkmDHUBU,683
16
+ workflow_core/adapters/_base.py,sha256=FgUEctI6FSe43p7P-nNsvV2Qx27iFZDukZVhafbsQtE,5280
17
+ workflow_core/adapters/gofastmcp.py,sha256=v-6TUSnOAJgF108i4Lf3Gj4chxohTl3xix33ig0NyUY,1411
18
+ workflow_core/adapters/official_sdk.py,sha256=izV3qA2AEbf8A6Gls12Ly3M8xeP8THEIpcBloCJlT6Q,1490
19
+ mcp_workflow_core-0.3.0.dist-info/METADATA,sha256=20MBxo8jRP9p4rHNEUKCiNluLLKa-GWStuac1IlL1oQ,10738
20
+ mcp_workflow_core-0.3.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
21
+ mcp_workflow_core-0.3.0.dist-info/top_level.txt,sha256=W3_AhG4sEG03FlHVq9te4KHW2-x1LRrwCKFPzhCEvC0,14
22
+ mcp_workflow_core-0.3.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1 @@
1
+ workflow_core
@@ -0,0 +1,53 @@
1
+ """workflow_core: MCP sunucularının iş akışı belgeleri için tek motor.
2
+
3
+ Sunucu değildir: port dinlemez, araç yayımlamaz, hiçbir MCP çerçevesini içe aktarmaz.
4
+ Tüketici üç ayar verir (belge klasörü, araç-adı öneki, kategori listesi) ve ``Library``
5
+ üzerinden yedi işlemi kullanır: liste, oku, ara, doğrula, yaz, sil, kaynak tanımları.
6
+ Aynı işlemler ``dispatch`` ile tek girişten de erişilir. Çerçeveye dokunan kısım
7
+ ``workflow_core.adapters`` altında, çekirdeğin dışındadır.
8
+
9
+ Sürümün tek kaynağı ``pyproject.toml``; buradaki ``__version__`` kaynak ağacı varsa
10
+ doğrudan oradan, yoksa kurulum üstverisinden okunur (005: düzenlenebilir kurulumda
11
+ üstveri yeniden kurulmadan tazelenmez, kaynak kazanır ve ayrışma uyarı loglar).
12
+ """
13
+
14
+ from importlib.metadata import PackageNotFoundError, version
15
+ from pathlib import Path
16
+
17
+ from ._version import read_source_version, resolve
18
+ from .config import FIELDS, Config
19
+ from .dispatch import ACTIONS, dispatch
20
+ from .errors import (
21
+ AdapterError,
22
+ ConfigError,
23
+ ParameterError,
24
+ WorkflowError,
25
+ WorkflowIdError,
26
+ WorkflowNotFoundError,
27
+ )
28
+ from .library import Library
29
+ from .resources import ResourceCatalog, ResourceDefinition
30
+
31
+ try:
32
+ _installed: str | None = version("mcp-workflow-core") # dağıtım adı (006); modül adı değil
33
+ except PackageNotFoundError: # kaynak ağacından, kurulmadan içe aktarıldı
34
+ _installed = None
35
+ _pyproject = Path(__file__).resolve().parent.parent / "pyproject.toml"
36
+ __version__ = resolve(read_source_version(_pyproject, "mcp-workflow-core"), _installed)
37
+
38
+ __all__ = [
39
+ "ACTIONS",
40
+ "FIELDS",
41
+ "AdapterError",
42
+ "Config",
43
+ "ConfigError",
44
+ "Library",
45
+ "ParameterError",
46
+ "ResourceCatalog",
47
+ "ResourceDefinition",
48
+ "WorkflowError",
49
+ "WorkflowIdError",
50
+ "WorkflowNotFoundError",
51
+ "__version__",
52
+ "dispatch",
53
+ ]
@@ -0,0 +1,58 @@
1
+ """Sürüm etiketi: kaynak ağacı varsa oradan, yoksa kurulum üstverisinden (005).
2
+
3
+ Düzenlenebilir kurulumda kod diskten anında güncel, üstveri (dist-info) yeniden
4
+ kurulmadan bayat kalır; etiket üstveriden okunursa yalan söyler. Ölçüldü 2026-08-28:
5
+ üç kardeş ortam 0.1.0 / 0.1.1 derken hepsi 0.2.0 kodunu koşuyordu. Kaynak kazanır;
6
+ ayrışma ve okunamayan dosya sessiz kalmaz, uyarı loglar.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import logging
12
+ import tomllib
13
+ from pathlib import Path
14
+
15
+ log = logging.getLogger(__name__)
16
+
17
+ UNINSTALLED = "0.0.0+kurulmamis"
18
+
19
+
20
+ def read_source_version(pyproject: Path, package: str) -> str | None:
21
+ """Kaynak ağacındaki ``pyproject.toml``'dan sürümü okur; dosya yoksa None.
22
+
23
+ Okunamayan dosya ya da başka paketin dosyası da None döndürür, ama uyarıyla; çağıran
24
+ üstveriye düşer (FR-004).
25
+ """
26
+ if not pyproject.is_file():
27
+ return None
28
+ try:
29
+ project = tomllib.loads(pyproject.read_text(encoding="utf-8"))["project"]
30
+ name, found = project["name"], project["version"]
31
+ except (OSError, tomllib.TOMLDecodeError, KeyError, TypeError) as exc:
32
+ log.warning("kaynak pyproject okunamadı, üstveriye düşülüyor: %s (%s)", pyproject, exc)
33
+ return None
34
+ if name != package:
35
+ log.warning(
36
+ "yanındaki pyproject başka paketin (%s), üstveriye düşülüyor: %s", name, pyproject
37
+ )
38
+ return None
39
+ return str(found)
40
+
41
+
42
+ def resolve(source: str | None, installed: str | None) -> str:
43
+ """Etiketi seçer: kaynak > üstveri > kurulmamış; ayrışma ve yokluk uyarı loglar."""
44
+ if source is not None:
45
+ if installed is not None and installed != source:
46
+ log.warning(
47
+ "kurulum üstverisi bayat: %s, kaynak %s; etiket kaynaktan alındı, üstveri "
48
+ "`pip install -e <workflow-core dizini>` ile yenilenir",
49
+ installed,
50
+ source,
51
+ )
52
+ return source
53
+ if installed is not None:
54
+ return installed
55
+ log.warning(
56
+ "mcp-workflow-core paket olarak kurulu değil; sürüm okunamadı (pip install -e .)"
57
+ )
58
+ return UNINSTALLED
@@ -0,0 +1,12 @@
1
+ """Uyarlayıcılar: çekirdeğin kaynak tanımlarını bir MCP çerçevesine kaydeden tek yer.
2
+
3
+ Çerçeve başına bir dosya (ARCHITECTURE 2026-08-22): ``gofastmcp`` (bağımsız ``fastmcp``
4
+ paketi) ve ``official_sdk`` (resmî ``mcp`` paketinin gömülü FastMCP'si). Her biri
5
+ çerçeveyi ``try`` içinde içe aktarır ve bulamazsa açık hata verir; sessiz boş liste
6
+ yoktur (fark tablosu 4.10). Tüketici yalnız kendi çerçevesinin uyarlayıcısını içe aktarır;
7
+ çatı kuralı "aynı repoda karışık import yasak" böylece tüketiciye de taşınır.
8
+ """
9
+
10
+ from ._base import RegistrationReport, register_definitions
11
+
12
+ __all__ = ["RegistrationReport", "register_definitions"]