Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8188ee5
test(runtime): add sourceos-shell module contract scaffold
mdheller Apr 22, 2026
19b776b
feat(runtime): import sourceos-shell linux-dev profile scaffold
mdheller Apr 22, 2026
cb2313d
test(runtime): add sourceos-shell module contract check
mdheller Apr 22, 2026
7cda692
docs(runtime): add launcher bridge note for sourceos-shell rollout
mdheller Apr 22, 2026
b6667d8
feat(runtime): add sourceos-docd service scaffold
mdheller Apr 22, 2026
a26bd66
feat(runtime): add sourceos-docd systemd unit scaffold
mdheller Apr 22, 2026
c87a6de
test(runtime): extend sourceos-shell contract check for docd scaffold
mdheller Apr 22, 2026
09646f7
docs(runtime): mention docd derive service in shell integration note
mdheller Apr 22, 2026
6bfa0a7
feat(runtime): add sourceos-shell search-provider scaffold
mdheller Apr 22, 2026
bfbe0bb
feat(runtime): add sourceos-shell search-provider options and config
mdheller Apr 22, 2026
93acda1
test(runtime): extend shell contract check for search-provider scaffold
mdheller Apr 22, 2026
dc22214
docs(runtime): document search-provider scaffold paths
mdheller Apr 22, 2026
60919b0
feat(runtime): add sourceos-shell target scaffold
mdheller Apr 22, 2026
9de06b9
feat(runtime): add sourceos-shell systemd target scaffold
mdheller Apr 22, 2026
f75dc9e
test(runtime): extend shell contract check for service graph target
mdheller Apr 22, 2026
f4fd235
docs(runtime): add sourceos-shell service graph note
mdheller Apr 22, 2026
1baf3ba
runtime: switch staged sourceos-shell file provider to lampstand
mdheller Apr 23, 2026
be8b05d
runtime: align staged search-provider scaffold to lampstand
mdheller Apr 23, 2026
26deaad
runtime: rename staged search mode from launcher-bridge to command-bus
mdheller Apr 23, 2026
394b967
runtime: rename staged search-provider mode to command-bus
mdheller Apr 23, 2026
a25ec79
docs(shell): rewrite launcher-bridge note as command-bus/search routi…
mdheller Apr 23, 2026
a6aa011
Merge pull request #73 from SociOS-Linux/feat/sourceos-shell-linux-se…
mdheller Apr 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/sourceos-shell-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
30 changes: 30 additions & 0 deletions docs/sourceos-shell-launcher-bridge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# sourceos-shell command bus note

During the early shell rollout, launcher/search integration is tracked as temporary command-bus 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, the command bus must not perform a second file-search pass in parallel with the Linux-native provider.

Lampstand is the intended Linux-native file authority for this lane.

## 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, routing invariant, and the provider choice for the Linux-native file search lane.

## Lifecycle

This command-bus/search-provider surface exists only until the shell's own command/search runtime fully absorbs the routing behavior.
18 changes: 18 additions & 0 deletions docs/sourceos-shell-service-graph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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.

## 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 service-graph checks.
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
else pkgs.runCommand "stable-x86_64-smoke-skip" {} ''
mkdir -p $out
'';

sourceos-shell-module-contract = import ./tests/sourceos-shell-module-contract.nix { inherit pkgs; };
});

sourceos = {
Expand Down
15 changes: 15 additions & 0 deletions linux/desktop/sourceos-search-provider.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SourceOS shell search-provider scaffold
# This file records the intended command-bus/search routing policy during early shell rollout.

mode=command-bus
linux-file-provider=lampstand
invariant=no_redundant_file_search

# scopes
apps=launcher
files=linux-native-only
web=browser-agent

# notes
# - Lampstand is the Linux-native file authority for scope=files.
# - The command bus remains a frontend and must not perform a second file-search pass.
13 changes: 13 additions & 0 deletions linux/systemd/sourceos-docd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=SourceOS docd derive service
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/opt/sourceos-shell/bin/sourceos-docd
Restart=on-failure
RestartSec=2s

[Install]
WantedBy=multi-user.target
4 changes: 4 additions & 0 deletions linux/systemd/sourceos-shell.target
Original file line number Diff line number Diff line change
@@ -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
51 changes: 51 additions & 0 deletions modules/nixos/sourceos-shell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ in
default = 7073;
description = "Local port for the sourceos-shell derive/docd service.";
};

searchProvider = {
mode = lib.mkOption {
type = lib.types.enum [ "linux-native" "command-bus" "shell-native" ];
default = "command-bus";
description = "Search routing mode during shell rollout.";
};

linuxFileProvider = lib.mkOption {
type = lib.types.enum [ "lampstand" "fd" "locate" ];
default = "lampstand";
description = "Linux-native file search provider used when scope=files.";
};
};
};

config = lib.mkIf cfg.enable {
Expand All @@ -45,11 +59,36 @@ in
routerPort=${toString cfg.routerPort}
pdfSecurePort=${toString cfg.pdfSecurePort}
docdPort=${toString cfg.docdPort}
searchProvider.mode=${cfg.searchProvider.mode}
searchProvider.linuxFileProvider=${cfg.searchProvider.linuxFileProvider}
'';

environment.etc."sourceos-shell/search-provider.json".text = builtins.toJSON {
mode = cfg.searchProvider.mode;
linuxFileProvider = cfg.searchProvider.linuxFileProvider;
invariant = "no_redundant_file_search";
scopes = {
apps = "launcher";
files = "linux-native-only";
web = "browser-agent";
};
notes = [
"Lampstand is the Linux-native file authority for scope=files."
"The command bus remains a frontend and must not perform a second file-search pass."
];
};

systemd.targets.sourceos-shell = {
description = "SourceOS shell service graph";
wants = [ "sourceos-shell.service" "sourceos-router.service" "sourceos-pdf-secure.service" "sourceos-docd.service" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
};

systemd.services.sourceos-shell = {
description = "SourceOS shell runtime scaffold";
wantedBy = [ "multi-user.target" ];
partOf = [ "sourceos-shell.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.coreutils}/bin/echo sourceos-shell runtime placeholder root=${cfg.packageRoot} port=${toString cfg.shellPort}";
Expand All @@ -59,6 +98,7 @@ in
systemd.services.sourceos-router = {
description = "SourceOS shell router scaffold";
wantedBy = [ "multi-user.target" ];
partOf = [ "sourceos-shell.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.coreutils}/bin/echo sourceos-router placeholder port=${toString cfg.routerPort}";
Expand All @@ -68,10 +108,21 @@ in
systemd.services.sourceos-pdf-secure = {
description = "SourceOS shell pdf-secure scaffold";
wantedBy = [ "multi-user.target" ];
partOf = [ "sourceos-shell.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.coreutils}/bin/echo sourceos-pdf-secure placeholder port=${toString cfg.pdfSecurePort}";
};
};

systemd.services.sourceos-docd = {
description = "SourceOS shell docd scaffold";
wantedBy = [ "multi-user.target" ];
partOf = [ "sourceos-shell.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.coreutils}/bin/echo sourceos-docd placeholder port=${toString cfg.docdPort}";
};
};
};
}
1 change: 1 addition & 0 deletions profiles/linux-dev/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
imports = [
../../modules/build/default.nix
../../profiles/linux-dev/sourceos-shell.nix
];

sourceos.build = {
Expand Down
24 changes: 24 additions & 0 deletions tests/sourceos-shell-module-contract.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.runCommand "sourceos-shell-module-contract" {
nativeBuildInputs = [ pkgs.gnugrep ];
} ''
test -f ${../modules/nixos/sourceos-shell/default.nix}
test -f ${../profiles/linux-dev/sourceos-shell.nix}
test -f ${../linux/desktop/sourceos-shell.desktop}
test -f ${../linux/desktop/sourceos-search-provider.conf}
test -f ${../linux/systemd/sourceos-shell.service}
test -f ${../linux/systemd/sourceos-router.service}
test -f ${../linux/systemd/sourceos-pdf-secure.service}
test -f ${../linux/systemd/sourceos-docd.service}
test -f ${../linux/systemd/sourceos-shell.target}
grep -q '../../modules/nixos/sourceos-shell/default.nix' ${../profiles/linux-dev/sourceos-shell.nix}
grep -q 'sourceos.shell' ${../modules/nixos/sourceos-shell/default.nix}
grep -q 'sourceos-docd' ${../modules/nixos/sourceos-shell/default.nix}
grep -q 'searchProvider' ${../modules/nixos/sourceos-shell/default.nix}
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 'no_redundant_file_search' ${../linux/desktop/sourceos-search-provider.conf}
grep -q 'sourceos-shell.service sourceos-router.service sourceos-pdf-secure.service sourceos-docd.service' ${../linux/systemd/sourceos-shell.target}
mkdir -p $out
echo validated > $out/result.txt
''