diff --git a/docs/sourceos-shell-integration.md b/docs/sourceos-shell-integration.md index 50059b3..34f4985 100644 --- a/docs/sourceos-shell-integration.md +++ b/docs/sourceos-shell-integration.md @@ -11,6 +11,7 @@ This repository, `source-os`, carries the Linux realization surfaces required to - Nix/NixOS modules - profile wiring - machine-level integration hooks +- derive-service runtime integration such as `docd` ## What does not belong here diff --git a/docs/sourceos-shell-launcher-bridge.md b/docs/sourceos-shell-launcher-bridge.md new file mode 100644 index 0000000..87287df --- /dev/null +++ b/docs/sourceos-shell-launcher-bridge.md @@ -0,0 +1,28 @@ +# sourceos-shell launcher bridge note + +During the early shell rollout, launcher integration is tracked as temporary bridge work. + +## Routing rule + +Queries are routed by scope: + +- `apps` -> launcher or desktop-entry provider +- `files` -> Linux-native file search only +- `web` -> browser or web agent + +## Required invariant + +For `files` queries, Albert must not perform a second file-search pass in parallel with the Linux-native provider. + +## Realization scaffolds + +The Linux realization currently carries placeholder search-provider material at: + +- `linux/desktop/sourceos-search-provider.conf` +- `/etc/sourceos-shell/search-provider.json` (realized by the shell Nix module scaffold) + +These capture the intended rollout mode and the provider choice for the Linux-native file search lane. + +## Lifecycle + +This bridge exists only until the shell's own command/search surface fully absorbs the routing behavior. diff --git a/docs/sourceos-shell-service-graph.md b/docs/sourceos-shell-service-graph.md new file mode 100644 index 0000000..e7df946 --- /dev/null +++ b/docs/sourceos-shell-service-graph.md @@ -0,0 +1,30 @@ +# sourceos-shell service graph note + +The Linux realization layer currently models the `sourceos-shell` runtime as a four-service graph: + +- `sourceos-shell` +- `sourceos-router` +- `sourceos-pdf-secure` +- `sourceos-docd` + +These services are grouped by the `sourceos-shell.target` scaffold. + +## Intent + +This target is a Linux realization placeholder that captures the expected runtime grouping before the actual product/runtime repo exists. + +## Validation scaffold + +The current Linux realization adds a dedicated contract-style check at: + +- `tests/sourceos-shell-service-graph-contract.nix` + +This check verifies that: + +- `sourceos-shell.target` exists +- the four runtime scaffold services are grouped beneath that target +- the Nix module expresses the target and `partOf` relationships consistently + +## Follow-on + +Once `SourceOS-Linux/sourceos-shell` exists, the placeholder ExecStart values should be replaced with real package/service paths and the current scaffold checks should be upgraded into actual runtime/service-graph checks. diff --git a/flake.nix b/flake.nix index d06647a..18933e7 100644 --- a/flake.nix +++ b/flake.nix @@ -299,6 +299,7 @@ mesh-package-contract = import ./tests/mesh-package-contract.nix { inherit pkgs; }; mesh-host-runtime-contract = import ./tests/mesh-host-runtime-contract.nix { inherit pkgs; }; sourceos-shell-module-contract = import ./tests/sourceos-shell-module-contract.nix { inherit pkgs; }; + sourceos-shell-pdf-stack-contract = import ./tests/sourceos-shell-pdf-stack-contract.nix { inherit pkgs; }; sourceos-shell-pdf-config-contract = import ./tests/sourceos-shell-pdf-config-contract.nix { inherit pkgs; }; diff --git a/linux/desktop/sourceos-keyboard-equivalence.conf b/linux/desktop/sourceos-keyboard-equivalence.conf new file mode 100644 index 0000000..0576111 --- /dev/null +++ b/linux/desktop/sourceos-keyboard-equivalence.conf @@ -0,0 +1,23 @@ +# SourceOS shell keyboard-equivalence scaffold +# Transitional Mac-on-Linux shortcut model. + +mode=kinto-bridge +platform-model=mac-like +terminal-model=mac-terminal-like + +# GUI lanes +copy=Cmd-C +paste=Cmd-V +tab-next=Cmd-Shift-] +tab-prev=Cmd-Shift-[ +window-switch=Cmd-Tab +launcher=Cmd-Space + +# Terminal lanes +interrupt=Ctrl-C +terminal-copy=Cmd-C +terminal-paste=Cmd-V +word-left=Alt-Left +word-right=Alt-Right + +invariant=gui_terminal_split_explicit diff --git a/linux/systemd/sourceos-shell.target b/linux/systemd/sourceos-shell.target new file mode 100644 index 0000000..d3a2937 --- /dev/null +++ b/linux/systemd/sourceos-shell.target @@ -0,0 +1,4 @@ +[Unit] +Description=SourceOS shell service graph +Wants=sourceos-shell.service sourceos-router.service sourceos-pdf-secure.service sourceos-docd.service +After=network-online.target diff --git a/tests/sourceos-shell-keyboard-equivalence-contract.nix b/tests/sourceos-shell-keyboard-equivalence-contract.nix new file mode 100644 index 0000000..481fe64 --- /dev/null +++ b/tests/sourceos-shell-keyboard-equivalence-contract.nix @@ -0,0 +1,14 @@ +{ pkgs ? import {} }: +pkgs.runCommand "sourceos-shell-keyboard-equivalence-contract" { + nativeBuildInputs = [ pkgs.gnugrep ]; +} '' + test -f ${../linux/desktop/sourceos-keyboard-equivalence.conf} + grep -q 'mode=kinto-bridge' ${../linux/desktop/sourceos-keyboard-equivalence.conf} + grep -q 'platform-model=mac-like' ${../linux/desktop/sourceos-keyboard-equivalence.conf} + grep -q 'terminal-model=mac-terminal-like' ${../linux/desktop/sourceos-keyboard-equivalence.conf} + grep -q '# GUI lanes' ${../linux/desktop/sourceos-keyboard-equivalence.conf} + grep -q '# Terminal lanes' ${../linux/desktop/sourceos-keyboard-equivalence.conf} + grep -q 'invariant=gui_terminal_split_explicit' ${../linux/desktop/sourceos-keyboard-equivalence.conf} + mkdir -p $out + echo validated > $out/result.txt +'' diff --git a/tests/sourceos-shell-service-graph-contract.nix b/tests/sourceos-shell-service-graph-contract.nix new file mode 100644 index 0000000..adac31a --- /dev/null +++ b/tests/sourceos-shell-service-graph-contract.nix @@ -0,0 +1,12 @@ +{ pkgs ? import {} }: +pkgs.runCommand "sourceos-shell-service-graph-contract" { + nativeBuildInputs = [ pkgs.gnugrep ]; +} '' + test -f ${../linux/systemd/sourceos-shell.target} + grep -q 'sourceos-shell.service sourceos-router.service sourceos-pdf-secure.service sourceos-docd.service' ${../linux/systemd/sourceos-shell.target} + grep -q 'systemd.targets.sourceos-shell' ${../modules/nixos/sourceos-shell/default.nix} + grep -q 'partOf = \[ "sourceos-shell.target" \]' ${../modules/nixos/sourceos-shell/default.nix} + grep -q 'sourceos-shell.target' ${../docs/sourceos-shell-service-graph.md} + mkdir -p $out + echo validated > $out/result.txt +''