تخطَّ إلى المحتوى
AggregaAggregaAggregaAggrega
اختر لغة: العربية
تُرجمت هذه الصفحة آليًا. اقرأ الأصل الإنجليزي.

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 catalog
directories, its provider bindings, which lint rules it relaxes. It is
committed, 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 the
directory the APPDATA environment variable names. It holds what belongs to the
machine rather than to any one project: the registries you pull from and the
signature trust policy for each, how large the compiled-module store may grow,
any command extension you have installed. It loads automatically when it is
there, and nothing breaks when it is not.
Your project's file wins over the global one, an environment variable wins
over both, and a flag wins over everything.
Secrets are not configuration. A registry password or a signing identity token
is never a field in either file; it is supplied by environment variable or flag
at 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 how
you find out which layer each setting came from. "aggrega config init" seeds a
working configuration, and "aggrega config capture" freezes the effective
build-critical settings into this workspace so a build does not depend on a
global file that is not committed.
Larger projects have more to work with. None of it is needed to start, and each
piece 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 workspace
config file, so the workspace builds identically without relying on the
machine's global configuration.
The build-critical subset is the configuration a build participates in: a set of
plugin socket attachments and the catalog directories. By default the captured
sockets are only those that determine the
rendered output — the provider bindings and the transform-role governance attachments — since only those must
travel with the project for byte-identical output. Pass --all-plugins to also
freeze the verdict-role governance, linter, and importer sockets, which otherwise stay free to
vary by environment. Each field is written at its effective value — the value
that resolves right now with the global configuration and the workspace tree
merged together — so a binding that today comes only from the global config is
materialized into the workspace and travels with the project.
Machine-wide tooling settings, such as a registry's trust policy, are not
captured: they stay in the global config by their nature. Capture always writes
this project's workspace config file. Running it again on an unchanged
configuration rewrites the same file byte-for-byte. Run in a folder that is not
inside a workspace, with no --workspace-root naming one, it writes nothing and
exits with an error saying so.

علامات aggrega config capture

العلامةالافتراضيالوصف
--all-pluginsfalseالتقاط جميع مقابس المكوِّنات الإضافية، بما فيها بوابات فحص الحوكمة بدور الحكم وبوابات فحص linter والمستورِد. من دونه لا يثبّت الالتقاط سوى المقابس التي تحدد الإخراج المُصيَّر (عمليات ربط الموفِّر وإرفاقات الحوكمة بدور التحويل).

وصف aggrega config init

Seed a working configuration by registering a registry and its signature trust
policy, so a fresh machine can pull and verify signed artifacts without editing
YAML by hand.
By default it registers the official hub (hub.aggrega.ai) with signatures
required and the official trusted identities. The registry's advertised trust
policy is fetched once from its own origin and pinned locally — trust-on-first-
use; when the hub is unreachable, advertises nothing, or the workspace is
offline, its built-in official baseline is written instead, so init still
produces 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 no
identities or key to pin by hand, so register it once while online, or add it
with "aggrega registry add --identity" or "--key".
The entry is written to the global config shared across every workspace by
default; pass --workspace to write it to this project's workspace config
instead. If the target config file already exists, init refuses rather than
overwrite it — pass --force to write anyway (the registry entry is merged into
the existing file, other settings preserved).
Before anything else, init says where things are: the configuration file it
created — or, under --force, the one already there that it wrote into — and
the directory the machine-wide caches are kept in. On Windows that directory is
aggrega\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 does
everything init does except write: it hands the content back, creating and
modifying nothing. The answer names the file the content is for — which matters
here, because the target is the global config unless --workspace selects this
project'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 registry
is still contacted for its advertised trust policy, because the policy in that
content is the policy a write would have pinned.
Because a dry run does everything else init does, it refuses an existing config
file exactly as a write refuses it, and for the same reason. So its exit code
predicts 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 stays
parseable. A registry seeded with no trust policy, because it advertises none,
still produces its notice, on standard error: read that stream too, or that
configuration arrives without the advice to pin identities by hand. A pinned
policy, whether advertised or the hub's built-in baseline, is in the content
itself and produces no notice.

علامات aggrega config init

العلامةالافتراضيالوصف
--dry-runfalseفعل كل شيء عدا الكتابة: يعيد التكوين المُهيَّأ بوصفه محتوى، مع ذكر الملف الذي يخصه، ولا ينشئ شيئًا ولا يعدّل شيئًا. كل سلوك آخر هو سلوك الكتابة، لذا يُرفض ملف التكوين الموجود تمامًا كما ترفضه الكتابة — مرّر —force معه للحصول على الدمج الذي كانت ستنتجه كتابة تستبدل الملف.
--forcefalseاستبدال ملف تكوين موجود. من دونه يرفض init التنفيذ عندما يكون الملف الهدف موجودًا.
--globalfalseكتابة الإدخال في التكوين العام المشترك بين كل مساحات العمل. هذا هو الافتراضي.
--registryhub.aggrega.aiمضيف registry المراد تهيئته مع سياسة الثقة الخاصة به. الافتراضي هو hub الرسمي.
--workspacefalseكتابة الإدخال في تكوين مساحة العمل لهذا المشروع بدلًا من التكوين العام.

وصف aggrega config show

Show the configuration that applies right now.
By default it leads with the cascade of config files and environment overrides
that contributed, lowest precedence first, then prints the effective merged
configuration — the global config, the workspace-tree cascade, and any
environment 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 it
says 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-in
defaults, highest precedence first. A flag is named as the reader typed it, so
a setting a flag decided reports that flag as its source. A setting is
attributed to the highest-precedence layer that sets it, whatever value that
layer writes: a file restating the default is the file named, not the built-in
defaults. List and map settings are attributed as a whole. The signing
requirement is the one exception: any layer may turn it on and none can turn it
off, so it names the first layer that turns it on.

علامات aggrega config show

العلامةالافتراضيالوصف
--globalfalseطباعة بايتات ملف التكوين العام نفسها كما هي، مع الحفاظ على تعليقاته وتنسيقه.
--originfalseتعليق كل إعداد فعّال بالطبقة التي جاء منها (علامة في سطر الأوامر، أو متغيّر بيئة، أو ملف تكوين، أو الإعدادات الافتراضية المضمّنة).
--workspacefalseطباعة بايتات ملف تكوين مساحة العمل لهذا المشروع نفسها كما هي، مع الحفاظ على تعليقاته وتنسيقه.

ما يفعله

تهيّئ الأوامر الفرعية 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.yaml
Machine-wide caches are kept in /home/you/.cache/aggrega

وجهاز Windows جديد بما يلي:

Created the global configuration file at C:\Users\you\AppData\Roaming\aggrega\config.yaml
Machine-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، ولماذا لا يجده البناء إذا كان فيه كيان لا يثبّته أي ملف قفل.