From 43342d510edc01e63c19ea27fbf9bd0eb6eed4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=BA=E6=BE=88?= Date: Thu, 25 Jun 2026 14:13:46 +0800 Subject: [PATCH] feat(cosh): add anolisa component contract MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ship a minimal component.toml for RPM adopt and status flows. - Install the contract under /usr/share/anolisa during RPM builds. - Expose anolisa-component(cosh) as a virtual RPM provide. Signed-off-by: 空澈 --- src/copilot-shell/component.toml | 28 +++++++++++++++++++++++++ src/copilot-shell/copilot-shell.spec.in | 4 ++++ 2 files changed, 32 insertions(+) create mode 100644 src/copilot-shell/component.toml diff --git a/src/copilot-shell/component.toml b/src/copilot-shell/component.toml new file mode 100644 index 000000000..a710c777b --- /dev/null +++ b/src/copilot-shell/component.toml @@ -0,0 +1,28 @@ +manifest_version = 2 +anolisa_min_version = "0.1.0" + +[component] +name = "cosh" +version = "2.5.0" +layer = "runtime" +domain = "tools" +description = "Copilot shell launcher and deterministic CLI gateway" +stability = "experimental" + +[install] +modes = ["system"] + +[backends.rpm] +package = "copilot-shell" + +[environment] +requires_os = "linux" +requires_arch = ["x86_64", "aarch64"] + +[dependencies] +runtime = ["node>=20"] + +[[health_checks]] +name = "launcher" +kind = "command" +command = "{bindir}/cosh --version" diff --git a/src/copilot-shell/copilot-shell.spec.in b/src/copilot-shell/copilot-shell.spec.in index c00cf2a46..a7289fede 100644 --- a/src/copilot-shell/copilot-shell.spec.in +++ b/src/copilot-shell/copilot-shell.spec.in @@ -15,6 +15,7 @@ Requires: nodejs >= 20 Requires(post): lua Requires(postun): lua Provides: %{_bindir}/co %{_bindir}/copilot %{_bindir}/cosh +Provides: anolisa-component(cosh) %description Copilot Shell - Entrance to AI-native OS. @@ -30,12 +31,15 @@ make build %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} PREFIX=%{_prefix} +install -d %{buildroot}%{_datadir}/anolisa/components/cosh +install -m 0644 component.toml %{buildroot}%{_datadir}/anolisa/components/cosh/component.toml %files %license %{_docdir}/%{name}/LICENSE %doc %{_docdir}/%{name}/README.md %{_prefix}/lib/%{name} %{_datadir}/%{name} +%{_datadir}/anolisa/components/cosh/component.toml %{_bindir}/co %{_bindir}/copilot %{_bindir}/cosh