aggrega config
فحص تكوين مساحة العمل وإدارته
الصيغة العامة
aggrega configالوصف
Inspect and manage the configuration Aggrega reads.
Most projects need two files.
One .aggrega-config.yaml at your project root, carrying a "workspace:" block —that block is what marks the root — holds how this project builds: its catalogdirectories, its provider bindings, which lint rules it relaxes. It iscommitted, so a teammate who clones the project builds it the same way.
One global file is shared across every workspace on this machine:~/.config/aggrega/config.yaml, or on Windows aggrega\config.yaml inside thedirectory the APPDATA environment variable names. It holds what belongs to themachine rather than to any one project: the registries you pull from and thesignature trust policy for each, how large the compiled-module store may grow,any command extension you have installed. It loads automatically when it isthere, and nothing breaks when it is not.
Your project's file wins over the global one, an environment variable winsover both, and a flag wins over everything.
Secrets are not configuration. A registry password or a signing identity tokenis never a field in either file; it is supplied by environment variable or flagat the moment it is needed.
Because the effective configuration is assembled rather than written anywhere,"aggrega config show" is how you see what actually applies, and --origin is howyou find out which layer each setting came from. "aggrega config init" seeds aworking configuration, and "aggrega config capture" freezes the effectivebuild-critical settings into this workspace so a build does not depend on aglobal file that is not committed.
Larger projects have more to work with. None of it is needed to start, and eachpiece exists for the shape it solves:
More than one file inside a project. Every .aggrega-config.yaml from the project root down to the directory you run in contributes, a nearer file overriding a farther one. Only a file carrying "workspace:" marks the root; one without it contributes settings without anchoring anything.
Extending a list instead of replacing it. A nearer file's list replaces the farther one's. The companions catalog_dirs_append, governance_append, linter_append, importer_append and providers_append concatenate onto the resolved list at each layer instead of shadowing it.
A file your pipeline owns. .aggrega-config-append-ci.yaml may sit beside the hand-authored file in any of those directories, so automation can overwrite it wholesale without touching what a person wrote. It is additive only: it removes nothing and overrides no scalar, and a scalar key written in it is ignored and named in a warning. It never marks a root.
A relative path anchors to the file that declared it. A catalog directory, a local plugin path, or an entry under a plugin's with.sources resolves against the directory of the config file it was written in — not the project root, and not the directory you ran the command from. So the same "./catalog" names a different directory depending on which file carries it. Two settings sit outside this rule: artifact_cache_dir is interpreted relative to the project root wherever you run from, and AGGREGA_CATALOG_DIRS has no declaring file at all, so supply absolute paths in it.
The other root markers. A "workspace:" block wins outright at whatever depth it sits. Failing one, the nearest .aggrega/ directory or aggregate*.yaml, release*.yaml or manifest*.yaml file anchors the root, in that order within a directory; failing everything, your working directory is used. --workspace-root skips discovery entirely.
Naming the global file. --config <path> wins over the AGGREGA_CONFIG environment variable, which wins over the default location. Both name a file deliberately, so a path either gives that does not exist is a loud error rather than a silent fallback. Whichever file resolves is also the one a config-writing command writes when it writes globally.الأوامر الفرعية
| الأمر | الوصف |
|---|---|
aggrega config capture | تثبيت التكوين الفعّال الحاسم للبناء في مساحة العمل هذه |
aggrega config init | تهيئة تكوين عامل مع registry وسياسة الثقة الخاصة به |
aggrega config show | عرض التكوين الفعّال ومصدر كل إعداد |
وصف aggrega config capture
Write the effective build-critical configuration into this project's workspaceconfig file, so the workspace builds identically without relying on themachine's global configuration.
The build-critical subset is the configuration a build participates in: a set ofplugin socket attachments and the catalog directories. By default the capturedsockets are only those that determine therendered output — the provider bindings and the transform-role governance attachments — since only those musttravel with the project for byte-identical output. Pass --all-plugins to alsofreeze the verdict-role governance, linter, and importer sockets, which otherwise stay free tovary by environment. Each field is written at its effective value — the valuethat resolves right now with the global configuration and the workspace treemerged together — so a binding that today comes only from the global config ismaterialized into the workspace and travels with the project.
Machine-wide tooling settings, such as a registry's trust policy, are notcaptured: they stay in the global config by their nature. Capture always writesthis project's workspace config file. Running it again on an unchangedconfiguration rewrites the same file byte-for-byte. Run in a folder that is notinside a workspace, with no --workspace-root naming one, it writes nothing andexits with an error saying so.علامات aggrega config capture
| العلامة | الافتراضي | الوصف |
|---|---|---|
--all-plugins | false | التقاط جميع مقابس المكوِّنات الإضافية، بما فيها بوابات فحص الحوكمة بدور الحكم وبوابات فحص linter والمستورِد. من دونه لا يثبّت الالتقاط سوى المقابس التي تحدد الإخراج المُصيَّر (عمليات ربط الموفِّر وإرفاقات الحوكمة بدور التحويل). |
وصف aggrega config init
Seed a working configuration by registering a registry and its signature trustpolicy, so a fresh machine can pull and verify signed artifacts without editingYAML by hand.
By default it registers the official hub (hub.aggrega.ai) with signaturesrequired and the official trusted identities. The registry's advertised trustpolicy is fetched once from its own origin and pinned locally — trust-on-first-use; when the hub is unreachable, advertises nothing, or the workspace isoffline, its built-in official baseline is written instead, so init stillproduces a usable config offline. Pass --registry to seed a different registry(for an air-gapped or private hub). Such a registry has no built-in baseline,so seeding it while the workspace is offline is refused: init takes noidentities or key to pin by hand, so register it once while online, or add itwith "aggrega registry add --identity" or "--key".
The entry is written to the global config shared across every workspace bydefault; pass --workspace to write it to this project's workspace configinstead. If the target config file already exists, init refuses rather thanoverwrite it — pass --force to write anyway (the registry entry is merged intothe existing file, other settings preserved).
Before anything else, init says where things are: the configuration file itcreated — or, under --force, the one already there that it wrote into — andthe directory the machine-wide caches are kept in. On Windows that directory isaggrega\cache inside the directory the LOCALAPPDATA environment variable names;elsewhere it is a directory named aggrega under the per-user cache directory:~/.cache/aggrega on Linux unless XDG_CACHE_HOME names another, and~/Library/Caches/aggrega on macOS.
A seeded configuration is a document you own and go on editing, so --dry-run doeseverything init does except write: it hands the content back, creating andmodifying nothing. The answer names the file the content is for — which mattershere, because the target is the global config unless --workspace selects thisproject's own. A caller that keeps its own document model puts the content there,where it is visible before it is saved and can be amended or undone. The registryis still contacted for its advertised trust policy, because the policy in thatcontent is the policy a write would have pinned.
Because a dry run does everything else init does, it refuses an existing configfile exactly as a write refuses it, and for the same reason. So its exit codepredicts the write's: if the dry run refuses, init would have refused. Pass--force alongside it to see the merge an overwriting write would produce.
Under --dry-run standard output carries that content and nothing else, so it staysparseable. A registry seeded with no trust policy, because it advertises none,still produces its notice, on standard error: read that stream too, or thatconfiguration arrives without the advice to pin identities by hand. A pinnedpolicy, whether advertised or the hub's built-in baseline, is in the contentitself and produces no notice.علامات aggrega config init
| العلامة | الافتراضي | الوصف |
|---|---|---|
--dry-run | false | فعل كل شيء عدا الكتابة: يعيد التكوين المُهيَّأ بوصفه محتوى، مع ذكر الملف الذي يخصه، ولا ينشئ شيئًا ولا يعدّل شيئًا. كل سلوك آخر هو سلوك الكتابة، لذا يُرفض ملف التكوين الموجود تمامًا كما ترفضه الكتابة — مرّر —force معه للحصول على الدمج الذي كانت ستنتجه كتابة تستبدل الملف. |
--force | false | استبدال ملف تكوين موجود. من دونه يرفض init التنفيذ عندما يكون الملف الهدف موجودًا. |
--global | false | كتابة الإدخال في التكوين العام المشترك بين كل مساحات العمل. هذا هو الافتراضي. |
--registry | hub.aggrega.ai | مضيف registry المراد تهيئته مع سياسة الثقة الخاصة به. الافتراضي هو hub الرسمي. |
--workspace | false | كتابة الإدخال في تكوين مساحة العمل لهذا المشروع بدلًا من التكوين العام. |
وصف aggrega config show
Show the configuration that applies right now.
By default it leads with the cascade of config files and environment overridesthat contributed, lowest precedence first, then prints the effective mergedconfiguration — the global config, the workspace-tree cascade, and anyenvironment override combined into what applies right now.
Pass --global or --workspace to print a single layer's own file bytes verbatim,preserving its comments and formatting; when that layer's file does not exist itsays so rather than failing. The two are mutually exclusive.
Pass --origin to annotate each effective setting with the layer it came from —a command-line flag, an environment variable, a config file, or the built-indefaults, highest precedence first. A flag is named as the reader typed it, soa setting a flag decided reports that flag as its source. A setting isattributed to the highest-precedence layer that sets it, whatever value thatlayer writes: a file restating the default is the file named, not the built-indefaults. List and map settings are attributed as a whole. The signingrequirement is the one exception: any layer may turn it on and none can turn itoff, so it names the first layer that turns it on.علامات aggrega config show
| العلامة | الافتراضي | الوصف |
|---|---|---|
--global | false | طباعة بايتات ملف التكوين العام نفسها كما هي، مع الحفاظ على تعليقاته وتنسيقه. |
--origin | false | تعليق كل إعداد فعّال بالطبقة التي جاء منها (علامة في سطر الأوامر، أو متغيّر بيئة، أو ملف تكوين، أو الإعدادات الافتراضية المضمّنة). |
--workspace | false | طباعة بايتات ملف تكوين مساحة العمل لهذا المشروع نفسها كما هي، مع الحفاظ على تعليقاته وتنسيقه. |
ما يفعله
تهيّئ الأوامر الفرعية config التكوين الذي يحكم البناء وتفحصه وتثبّته. لمعرفة الملف الذي ينتمي إليه الإعداد وكيف تتحد الطبقات، راجع التكوين — فهو يبدأ بالملفين اللذين يحتاج إليهما معظم المشاريع ويُبقي الباقي خلفهما.
config init — تهيئة تكوين عامل
يهيّئ aggrega config init تكوينًا على جهاز جديد بتسجيل registry وسياسة ثقة التوقيع الخاصة به، فيجري pull للمُخرَجات الموقَّعة ويُتحقق منها دون تحرير YAML يدويًا. افتراضيًا يسجّل hub الرسمي (hub.aggrega.ai) مع اشتراط التوقيعات وهويات الثقة الرسمية الخاصة به. تُجلب سياسة الثقة التي يعلنها registry مرة واحدة من أصله نفسه وتُثبَّت محليًا (الثقة عند أول استخدام)؛ وعندما يتعذر الوصول إلى hub أو لا يعلن شيئًا أو تكون مساحة العمل غير متصلة، يُكتب بدلًا منها خط الأساس الرسمي المضمّن فيه، فيُنتج init تكوينًا صالحًا للاستخدام حتى دون اتصال.
قبل أي شيء آخر يذكر init أين توجد الأشياء. تبدأ تهيئة جهاز Linux جديد بما يلي:
Created the global configuration file at /home/you/.config/aggrega/config.yamlMachine-wide caches are kept in /home/you/.cache/aggregaوجهاز Windows جديد بما يلي:
Created the global configuration file at C:\Users\you\AppData\Roaming\aggrega\config.yamlMachine-wide caches are kept in C:\Users\you\AppData\Local\aggrega\cacheيسمّي السطر الأول ملف التكوين الذي كتبه init: Created عندما لم يكن الملف موجودًا، و Using عندما كان موجودًا وأتاح --force أن يكتب init فيه؛ وتحت --workspace يسمّي ملف تكوين مساحة العمل بدلًا من الملف العام. ويسمّي السطر الثاني الدليل الذي تُحفظ فيه ذاكرات التخزين المؤقت على مستوى الجهاز — المكوِّنات الإضافية المحوَّلة برمجيًا وأوصافها — وهو المكان الذي تحفظ فيه كل منصة ذاكرات المستخدم المؤقتة؛ ويعطي أي ذاكرات تخزين مؤقت تخص هذا المشروع وأيها تخص الجهاز القاعدة لكل منصة. ينتهي كل سطر بمساره دون أي شيء بعده، فيمكن نسخ المسار كما هو. أما الأسطر التالية فهي من التسجيل نفسه: ما وجده جلب سياسة الثقة، وأي ملف سُجّل فيه registry. التهيئة المرفوضة لا تطبع أيًا من السطرين لأنها لم تنشئ شيئًا، وكذلك لا يطبعهما --dry-run الذي لا يحمل إخراجه القياسي سوى المحتوى الذي يعيده.
- يهيّئ
--registry <host>registry مختلفًا — hub معزولًا عن الشبكة أو خاصًا — بدلًا من الرسمي. لا يحمل هذا registry خط أساس مضمّنًا، فحيث لا يعلن شيئًا يُكتب الإدخال بلا سياسة، وفي مساحة عمل غير متصلة تُرفض التهيئة (الرمز القصيرE0310): إذ لا يمكن جلب السياسة، ولا يقبلinitالخيارين--identityأو--keyلتثبيت واحدة يدويًا. هيّئه مرة واحدة وأنت متصل، أو أضفه باستخدامaggrega registry addمع سياسة تقدمها أنت. - إذا كان الملف الهدف موجودًا يرفض
initالكتابة فوقه؛ أما--forceفيكتب على أي حال، فيدمج إدخال registry في الملف الموجود ويحافظ على الإعدادات الأخرى. - يفعل
--dry-runكل ما يفعلهinitعدا الكتابة. يعيد التكوين المُهيَّأ بوصفه محتوى دون إنشاء أي شيء أو تعديله، وتسمّي الإجابة الملف الذي يخصه المحتوى — وهذا مهم هنا لأن الهدف هو التكوين العام ما لم يحدد--workspaceتكوين هذا المشروع نفسه. ويضع المستدعي الذي يحتفظ بنموذج المستند الخاص به، مثل المحرر، المحتوى هناك، حيث يكون مرئيًا قبل حفظه ويمكن تعديله أو التراجع عنه. - ولأن التشغيل التجريبي يفعل كل ما يفعله
initعدا الكتابة، فإن رمز الخروج الخاص به يتنبأ برمز الكتابة. يرفض ملف التكوين الموجود تمامًا كما ترفضه الكتابة ولسبب نفسه، فيمكنك استخدامه لتسأل هل سينجحinitقبل الالتزام بالتغيير. ولرؤية المستند الذي كانت ستنتجه كتابة تستبدل الملف، مرّر--forceمعه: يبلغ--force --dry-runعن الدمج ولا يكتب شيئًا مع ذلك. - يجري الاتصال مع ذلك مع registry لجلب سياسة الثقة التي يعلنها، لأن السياسة الواردة في المحتوى المُبلَّغ عنه هي السياسة التي كانت الكتابة ستثبّتها. ويرسل التشغيل التجريبي الطلب الوحيد نفسه غير المصادَق إلى أصل registry ذاته الذي ترسله الكتابة.
- تحت
--dry-runلا يحمل الإخراج القياسي سوى ذلك المحتوى، فيبقى قابلًا للتحليل. والشيء الوحيد الذي لا يستطيع المحتوى التعبير عنه هو الغياب: فعندما لا يعلن registry أي سياسة ثقة ويُهيَّأ دون سياسة، يذهب الإشعار الذي يبيّن ذلك — ويطلب منك تثبيت الهويات باستخدام--identityأو--key— إلى الخطأ القياسي. ويبدو مستند تكوين بلا هويات موثوقة مطابقًا سواء ثُبّتت سياسة وكانت فارغة أم لم تُعلن أي سياسة أصلًا، لذا اقرأ التدفقين معًا؛ فالبرنامج الذي يتجاهل الخطأ القياسي لا يُخبَر بشيء عن ذلك. وعندما يعلن registry سياسة، أو يُثبَّت خط الأساس المضمّن في hub الرسمي بدلًا منها، تكون السياسة المثبّتة في المحتوى المُبلَّغ عنه نفسه ولا يصدر إشعار منفصل.
التكوين المُهيَّأ مستند تملكه وتواصل تحريره، ولهذا يمكن إعادته بدلًا من كتابته. أما تثبيت التكوين الفعّال، أدناه، فينتج سجلًّا بما انتهى إليه التكوين — حالة يحتفظ بها المحوِّل البرمجي عن نفسه لا محتوى يؤلفه أحد — لذا يكتب دائمًا ولا يوفّر --dry-run.
config show — فحص ما ينطبق الآن
يبلغ aggrega config show عن التكوين الذي ينطبق الآن. في عرضه الافتراضي يبدأ بتتابع ملفات التكوين وتجاوزات البيئة التي أسهمت فيه، من الأدنى أولوية أولًا، ثم يطبع التكوين الفعّال المدمج — التكوين العام وتتابع شجرة مساحة العمل وأي تراكب للبيئة مجتمعةً في نتيجة واحدة. وفي تتابع الملفات المحمّلة هذا تتأكد من الملفات وتجاوزات البيئة التي شكّلت التكوين الحالي.
يضيّق عرضان مركّزان الإخراج:
- يطبع
--globalأو--workspaceبايتات ملف طبقة واحدة كما هي، مع الحفاظ على التعليقات والتنسيق؛ وعندما لا يكون ملف تلك الطبقة موجودًا يذكر ذلك بدلًا من أن يفشل. والخياران متنافيان. - يعلّق
--originكل إعداد فعّال بالطبقة التي جاء منها — علامة في سطر الأوامر، أو متغيّر بيئة، أو ملف تكوين، أو الإعدادات الافتراضية المضمّنة، من الأعلى أولوية أولًا. تُسمّى العلامة كما كتبتها، فالإعداد الذي حسمه--offlineفي هذا التشغيل يبلّغ عن--offlineمصدرًا له؛ ويُسمّى متغيّر البيئة بعد البادئةenv:وملف التكوين بمساره المطلق.
تحت --origin يُنسب الإعداد إلى الطبقة الأعلى أولوية التي تحدده، أيًّا كانت القيمة التي تكتبها تلك الطبقة. فملف المشروع الذي يكتب default_registry: hub.aggrega.ai يُسمّى لذلك الإعداد حتى لو كان الافتراضي المضمّن هو registry نفسه، وملف المشروع الذي يعيد ذكر قيمة يحددها الملف العام أصلًا يُسمّى بدلًا من الملف العام: وفي الحالتين هو الملف الذي يحمل القيمة فعليًا، والذي يغيّر حذفه الجواب يوم يتحرك الافتراضي أو الملف الذي تحته. أما الإعداد الذي لا تحدده أي طبقة فيبلّغ عن الإعدادات الافتراضية المضمّنة.
- ما الذي يُعدّ تحديدًا للإعداد. يحدد ملف التكوين الإعداد عندما يحمل مفتاحه، ويحدد إعداد القائمة أيضًا عندما يحمل الرفيق
_appendللقائمة. ويحدد متغيّر البيئة إعداده عندما يُصدَّر بقيمة غير فارغة، وتحدده العلامة عندما تكتبها — فالخيار--offline=falseيحدد وضع الاتصال بقدر ما يفعل--offline. - ملف التكوين الذي يملكه خط المعالجة لديك لا يُسمّى إلا للمفاتيح التي يُقرأ من أجلها، وهي إضافات القوائم وسياسة التوقيع. أما المفتاح الذي يتجاهله ويحذّر منه فلا يُبلَّغ عنه أبدًا بوصفه مصدر قيمة.
- تُنسب إعدادات القوائم والخرائط ككل، إلى الطبقة الأعلى أولوية التي تحددها؛ ولا يُبلَّغ عن الطبقة التي أسهمت بكل إدخال من إدخالات القائمة.
- اشتراط التوقيع هو الاستثناء الوحيد. يمكن لأي طبقة تفعيله ولا تستطيع أي طبقة إيقافه، لذا يسمّي أول طبقة تفعّله. والطبقة التي تكتب
required: falseلا تفعّل شيئًا، فحيث لا تفعّله أي طبقة يبلّغ الإعداد عن الإعدادات الافتراضية المضمّنة.
config capture — تثبيت الإعدادات الحاسمة للبناء
يكتب aggrega config capture التكوين الفعّال الحاسم للبناء في ملف تكوين مساحة العمل لهذا المشروع، فتُبنى مساحة العمل بصورة مطابقة دون الاعتماد على التكوين العام للجهاز. أما إعدادات الأدوات على مستوى الجهاز، مثل سياسة الثقة التي يحملها registry، فلا تُلتقط؛ إذ تبقى في التكوين العام بحكم طبيعتها. وتشغيله مرة أخرى على تكوين لم يتغير يعيد كتابة الملف نفسه بايتًا ببايت.
المجموعة الجزئية الملتقطة هي مجموعة من إرفاقات مقابس المكوِّنات الإضافية ودلائل الكتالوج:
- افتراضيًا يثبّت الالتقاط المقابس التي تحدد الإخراج المُصيَّر فقط — عمليات ربط الموفِّر وإرفاقات الحوكمة بدور التحويل — لأن هذه وحدها يجب أن ترافق المشروع للحصول على بناءات متطابقة بايتًا ببايت. أما دلائل الكتالوج فتُلتقط دائمًا.
- يوسّع
--all-pluginsالمقابس الملتقطة لتشمل مقابس الحوكمة بدور الحكم، ومقابس linter، ومقابس المستورِد أيضًا. ومن دونه تبقى هذه الثلاثة حرة في أن تختلف بحسب البيئة.
يكتب الالتقاط دائمًا، ولا يوفّر طريقة لتسليم المحتوى بدلًا من ذلك. فما ينتجه سجل بما انتهى إليه التكوين، لا مستند يؤلفه أحد، فلا شيء ليراجعه المؤلف ويعدّله — وإعادته ستدعو إلى تحرير لقطة لنتيجة حل.
يكتب الالتقاط داخل مساحة عمل فقط. وعند تشغيله في مجلد ليس داخل واحدة، ودون أن يسمّي --workspace-root أو AGGREGA_WORKSPACE_ROOT واحدة، لا يكتب شيئًا — فملف تكوين يُكتب هناك سيحوّل المجلد إلى مساحة عمل — وينتهي بخطأ يذكر ذلك. أما aggrega config init --workspace فيجعل المجلد مساحة عمل أولًا.
انظر أيضًا
- configuration.md — الملف الذي ينتمي إليه الإعداد، وسلّم الأولوية، والآليات التي يلجأ إليها المشروع الأكبر.
- global-flags.md — العلامتان
--configو--workspace-root. - environment-variables.md — متغيّرات
AGGREGA_*التي تتجاوز التكوين وقت التشغيل. - aggrega-registry.md — إدارة registries وسياسة الثقة الخاصة بها مباشرة.
- aggrega-cache.md — ما يحتويه فعليًا الدليل الذي يسمّيه
artifact_cache_dir، ولماذا لا يجده البناء إذا كان فيه كيان لا يثبّته أي ملف قفل.