Skip to content

Commit 50330ff

Browse files
authored
Add Network Door and Native Assistant Door CLI surfaces
Adds non-mutating sourceosctl network and native-assistant plan/probe surfaces with tests, docs, and README wiring.
1 parent ab956ca commit 50330ff

5 files changed

Lines changed: 506 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ It should contain:
1616
- lab/profile selection utilities;
1717
- local model-service client helpers;
1818
- model-router client utilities;
19+
- Network Door, Firewall Door, Mesh Door, BYOM provider, and Native Assistant Door plan/probe helpers;
1920
- guardrail/eval/evidence helpers;
2021
- agent sandbox/run helpers;
2122
- Local Model Door runtime detection and route planning helpers;
@@ -35,7 +36,10 @@ It should not contain:
3536
- model-router backend;
3637
- web control plane backend;
3738
- SourceOS image build state;
38-
- secrets, tokens, credentials, private keys, or device-specific enrollment secrets.
39+
- secrets, tokens, credentials, private keys, or device-specific enrollment secrets;
40+
- firewall mutation engines;
41+
- service mesh installers;
42+
- native assistant runtime adapters.
3943

4044
## sourceosctl CLI
4145

@@ -66,6 +70,11 @@ sourceosctl [--version] <command> [<subcommand>] [options]
6670
| `sourceosctl local-model plan --profile local-llama32-1b` | Render local model runtime plan without installing or running models |
6771
| `sourceosctl local-model route --task-class office-assist` | Render hash-only model route decision under local-first policy |
6872
| `sourceosctl local-model evidence inspect <path>` | Inspect local model route evidence JSON |
73+
| `sourceosctl network doctor` | Inspect Network Door contract posture without changing firewall, mesh, or provider state |
74+
| `sourceosctl network plan --destination <label>` | Render a hash-only Network Door route plan |
75+
| `sourceosctl network provider` | Render a BYOM / external model provider plan without contacting the provider |
76+
| `sourceosctl network evidence inspect <path>` | Inspect Network Door evidence JSON |
77+
| `sourceosctl native-assistant plan` | Render a native assistant bridge plan without invoking host assistant APIs |
6978
| `sourceosctl agent-machine mounts plan` | Render Agent Machine local mount plan for dev/docs/downloads roots (dry-run) |
7079
| `sourceosctl agent-machine mounts init --dry-run` | Render mount initialization plan; no directories or mounts are created |
7180
| `sourceosctl agent-machine mounts init --execute --policy-ok` | Create only scoped local output/download directories and emit AgentMachineMountEvidence |
@@ -99,6 +108,12 @@ python3 bin/sourceosctl local-model doctor
99108
python3 bin/sourceosctl local-model profiles
100109
python3 bin/sourceosctl local-model plan --profile local-llama32-1b
101110
python3 bin/sourceosctl local-model route --task-class office-assist --prompt "local prompt text is hashed only"
111+
python3 bin/sourceosctl network doctor
112+
python3 bin/sourceosctl network plan --destination models.enterprise.example
113+
python3 bin/sourceosctl network plan --enterprise --mesh --allow-listed --destination models.enterprise.example
114+
python3 bin/sourceosctl network provider --provider-class openai-compatible --owner user
115+
python3 bin/sourceosctl native-assistant plan --operation open-workroom
116+
python3 bin/sourceosctl native-assistant plan --operation create-office-artifact --prompt "local prompt text is hashed only"
102117
python3 bin/sourceosctl agent-machine mounts plan
103118
python3 bin/sourceosctl agent-machine mounts init --dry-run
104119
python3 bin/sourceosctl agent-machine mounts init --execute --policy-ok --evidence-out ./mount-evidence.json
@@ -132,6 +147,44 @@ Default profiles:
132147

133148
The Local Model Door does **not** pull model weights, start Ollama, run inference, send prompts off-device, or authorize tool use. `local-model route --prompt ...` emits only a SHA-256 prompt hash.
134149

150+
### Network Door, Mesh Door, BYOM, and Native Assistant Door defaults
151+
152+
The Network/Assistant Door slice aligns with `SourceOS-Linux/sourceos-spec`:
153+
154+
- `NetworkAccessProfile`
155+
- `FirewallBindingProfile`
156+
- `MeshBindingProfile`
157+
- `ExternalModelProviderProfile`
158+
- `NativeAssistantBridgeProfile`
159+
160+
Default refs:
161+
162+
| Purpose | Ref |
163+
| --- | --- |
164+
| Enterprise/user network stack | `urn:srcos:network-access-profile:enterprise-and-user-default` |
165+
| User firewall profile | `urn:srcos:firewall-binding-profile:macos-lulu-user-default` |
166+
| Enterprise firewall profile | `urn:srcos:firewall-binding-profile:enterprise-gateway-default` |
167+
| Istio/Admiral-style mesh profile | `urn:srcos:mesh-binding-profile:istio-egress-default` |
168+
| User BYOM OpenAI-compatible provider profile | `urn:srcos:external-model-provider-profile:user-openai-compatible` |
169+
| Apple App Intents native assistant bridge profile | `urn:srcos:native-assistant-bridge-profile:apple-app-intents-default` |
170+
171+
The Network Door does **not** mutate firewall rules, install mesh components, contact external model providers, store credentials, or send prompts. Destination labels are represented as SHA-256 hashes in route plans.
172+
173+
The Native Assistant Door does **not** invoke Siri, App Intents, Shortcuts, Android intents, Windows shell integrations, browser extensions, or MCP/native bridge transports. It renders a bridge plan with prompt text redacted to a SHA-256 hash when provided.
174+
175+
Default policy posture:
176+
177+
- default egress is denied;
178+
- BYOM provider auth must be a reference, never inline;
179+
- enterprise firewall denies have precedence over user allows;
180+
- user firewall profiles may be stricter than enterprise profiles;
181+
- mesh binding and firewall binding are complementary, not interchangeable;
182+
- prompt egress is denied by default;
183+
- native assistant side effects require user confirmation;
184+
- raw app database access is denied by default.
185+
186+
See `docs/integration/network-native-assistant-door.md`.
187+
135188
### Agent Machine local mount defaults
136189

137190
The first Agent Machine mount slice aligns with the SourceOS contracts in `SourceOS-Linux/sourceos-spec`:
@@ -229,4 +282,3 @@ The validation target runs the unit test suite and checks repository metadata. A
229282
```bash
230283
make test # run tests only
231284
```
232-

‎bin/sourceosctl‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ import os
66
# Allow running directly from the repo root without installing.
77
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
88

9+
# Lightweight plugin routing for newer command groups while keeping the core
10+
# argparse surface stable. These command groups are non-mutating plan/probe
11+
# surfaces and own their own subparsers.
12+
if len(sys.argv) > 1 and sys.argv[1] == "network":
13+
from sourceosctl.commands.network import network_main
14+
15+
sys.exit(network_main(sys.argv[2:]))
16+
17+
if len(sys.argv) > 1 and sys.argv[1] == "native-assistant":
18+
from sourceosctl.commands.network import native_assistant_main
19+
20+
sys.exit(native_assistant_main(sys.argv[2:]))
21+
922
from sourceosctl.cli import main
1023

1124
sys.exit(main())
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Network Door and Native Assistant Door CLI boundary
2+
3+
This slice adds non-mutating SourceOS operator surfaces for the contract family defined in `SourceOS-Linux/sourceos-spec`:
4+
5+
- `NetworkAccessProfile`
6+
- `FirewallBindingProfile`
7+
- `MeshBindingProfile`
8+
- `ExternalModelProviderProfile`
9+
- `NativeAssistantBridgeProfile`
10+
11+
The implementation is intentionally a plan/probe surface. It does not modify firewall state, install service mesh components, contact model providers, start model calls, invoke Siri/App Intents/native assistant APIs, or change host networking.
12+
13+
## Command surface
14+
15+
```bash
16+
sourceosctl network doctor
17+
sourceosctl network plan --destination models.enterprise.example
18+
sourceosctl network plan --enterprise --mesh --allow-listed --destination models.enterprise.example
19+
sourceosctl network provider --provider-class openai-compatible --owner user
20+
sourceosctl network evidence inspect ./network-evidence.json
21+
22+
sourceosctl native-assistant plan
23+
sourceosctl native-assistant plan --operation create-office-artifact --prompt 'draft a local report'
24+
sourceosctl native-assistant plan --platform cross-device --bridge-class mcp --operation handoff-to-agent-machine --allow-cross-device
25+
```
26+
27+
## Boundary
28+
29+
| Surface | Owns | Does not own |
30+
|---|---|---|
31+
| `sourceosctl network ...` | Local rendering of network/firewall/mesh/BYOM route plans and evidence-shaped summaries. | Firewall mutation, mesh installation, VPN/proxy configuration, model-provider calls, credential storage. |
32+
| `sourceosctl native-assistant ...` | Local rendering of native assistant bridge plans and evidence-shaped summaries. | Apple App Intents implementation, Siri invocation, Shortcuts execution, Android/Windows assistant APIs, cross-device transport. |
33+
34+
## Policy posture
35+
36+
- Default egress is `deny`.
37+
- Destination text is represented as a SHA-256 hash in route plans.
38+
- BYOM provider auth is always represented as a reference; credentials are never inlined.
39+
- Enterprise firewall rules have precedence over user allow rules.
40+
- User firewall profiles may be stricter than enterprise policy.
41+
- Mesh binding and firewall binding are complementary, not interchangeable.
42+
- Native assistant bridge calls are local-only by default.
43+
- Prompt egress is denied by default.
44+
- Cross-device handoff is disabled unless explicitly requested.
45+
- Raw app database access is denied.
46+
- Side effects require user confirmation in the bridge plan.
47+
48+
## Implementation owner split
49+
50+
| Repo | Role |
51+
|---|---|
52+
| `SourceOS-Linux/sourceos-spec` | Canonical Network/Mesh/BYOM/Native Assistant Door contracts. |
53+
| `SourceOS-Linux/sourceos-devtools` | Local non-mutating `sourceosctl` probe and plan surface. |
54+
| `SocioProphet/model-router` | Runtime route decisions for local, personal, hosted, enterprise, and BYOM model targets. |
55+
| `SocioProphet/agentplane` | Evidence records when network/provider/native bridge plans participate in governed runs. |
56+
| `SocioProphet/guardrail-fabric` | Policy decisions for prompt egress, hosted fallback, native assistant side effects, and external provider access. |
57+
| `SocioProphet/sociosphere` | Topology validation and cross-repo dependency direction. |
58+
59+
## Current non-goals
60+
61+
- Do not vendor Istio, Admiral, LuLu, Cilium, or enterprise firewalls here.
62+
- Do not modify host firewall state from this slice.
63+
- Do not install or configure mesh control planes from this slice.
64+
- Do not store or print provider credentials.
65+
- Do not invoke native assistant APIs.
66+
- Do not expose raw Apple Notes, Photos, mail stores, browser profiles, keychains, token stores, or security-material directories by default.
67+
68+
## Next implementation lanes
69+
70+
1. Add AgentPlane evidence schemas for `NetworkDoorPlanEvidence`, `ExternalModelProviderRouteEvidence`, and `NativeAssistantBridgeEvidence`.
71+
2. Add model-router BYOM profile consumption and policy checks against `ExternalModelProviderProfile`.
72+
3. Add AgentTerm `/network`, `/byom`, and `/native-assistant` event surfaces.
73+
4. Add Homebrew formula tests for `sourceosctl network doctor` and `sourceosctl native-assistant plan`.

0 commit comments

Comments
 (0)