|
| 1 | +# SourceOS Portable AI Kit |
| 2 | + |
| 3 | +SourceOS Portable AI Kit is the pocketable local-AI appliance mode for SourceOS. |
| 4 | + |
| 5 | +The product promise is deliberately simple: prepare a USB drive or portable SSD once, carry a governed local AI workstation, and run it on a supported host without sending prompts or chat state off-device by default. |
| 6 | + |
| 7 | +This workstream absorbs the useful product pattern from simple portable Ollama/AnythingLLM USB projects, but raises the bar to SourceOS requirements: signed manifests, explicit model provenance, policy gates, host-write auditability, secret-free evidence, and integration with Agent Machine, Local Model Door, model-router, AgentPlane, Policy Fabric, TurtleTerm, AgentTerm, and BearBrowser. |
| 8 | + |
| 9 | +## Position |
| 10 | + |
| 11 | +Portable AI Kit is not a new agent brain, model registry, or governance authority. |
| 12 | + |
| 13 | +It is the installable workstation-side product surface for: |
| 14 | + |
| 15 | +- portable-root preflight checks; |
| 16 | +- portable model pack planning; |
| 17 | +- USB/SSD layout materialization; |
| 18 | +- runtime launch planning; |
| 19 | +- zero-trace and host-write audit posture; |
| 20 | +- local model route evidence; |
| 21 | +- TurtleTerm/AgentTerm/BearBrowser launch handoff; |
| 22 | +- Agent Machine runtime receipts. |
| 23 | + |
| 24 | +## User-facing command surface |
| 25 | + |
| 26 | +Initial commands: |
| 27 | + |
| 28 | +```text |
| 29 | +sourceosctl portable-ai preflight <target-root> [--benchmark] |
| 30 | +sourceosctl portable-ai profiles |
| 31 | +sourceosctl portable-ai prepare <target-root> --profile laptop-safe --dry-run |
| 32 | +sourceosctl portable-ai prepare <target-root> --profile laptop-safe --execute --policy-ok |
| 33 | +sourceosctl portable-ai start-plan <target-root> --surface turtleterm |
| 34 | +sourceosctl portable-ai inspect <target-root> |
| 35 | +sourceosctl portable-ai evidence inspect <path> |
| 36 | +``` |
| 37 | + |
| 38 | +All commands are read-only or dry-run by default. Materialization requires `--execute --policy-ok` and emits evidence. Runtime start remains a plan until Agent Machine activation gates are present. |
| 39 | + |
| 40 | +## Portable root layout |
| 41 | + |
| 42 | +```text |
| 43 | +SOURCEOS_AI/ |
| 44 | +├── manifests/ |
| 45 | +│ ├── portable-ai-root.json |
| 46 | +│ └── model-carry-pack.*.json |
| 47 | +├── runtimes/ |
| 48 | +│ ├── ollama/ |
| 49 | +│ ├── llama-cpp/ |
| 50 | +│ └── openai-compatible-local/ |
| 51 | +├── models/ |
| 52 | +│ ├── blobs/ |
| 53 | +│ └── modelfiles/ |
| 54 | +├── cache/ |
| 55 | +│ ├── embeddings/ |
| 56 | +│ ├── retrieval/ |
| 57 | +│ └── prompt-prefix/ |
| 58 | +├── state/ |
| 59 | +│ ├── chat/ |
| 60 | +│ ├── workrooms/ |
| 61 | +│ └── routes/ |
| 62 | +├── surfaces/ |
| 63 | +│ ├── turtleterm/ |
| 64 | +│ ├── agent-term/ |
| 65 | +│ └── bearbrowser/ |
| 66 | +├── evidence/ |
| 67 | +│ ├── preflight/ |
| 68 | +│ ├── materialization/ |
| 69 | +│ ├── activation/ |
| 70 | +│ └── wipe/ |
| 71 | +└── tmp/ |
| 72 | +``` |
| 73 | + |
| 74 | +The portable root must not contain inline credentials, private keys, cloud tokens, or user enrollment secrets. |
| 75 | + |
| 76 | +## Preflight requirements |
| 77 | + |
| 78 | +`preflight` must check: |
| 79 | + |
| 80 | +- target root exists or parent is writable; |
| 81 | +- filesystem large-file support is suitable for GGUF/model blobs; |
| 82 | +- free space meets selected model-pack class; |
| 83 | +- mount is not read-only; |
| 84 | +- optional read/write benchmark; |
| 85 | +- CPU architecture; |
| 86 | +- RAM class; |
| 87 | +- local runtime availability; |
| 88 | +- existing manifest validity; |
| 89 | +- evidence directory writability; |
| 90 | +- whether the target appears removable or explicitly user-approved. |
| 91 | + |
| 92 | +The command must return structured JSON so TurtleTerm, AgentTerm, BearBrowser, and the website can render the same decision. |
| 93 | + |
| 94 | +## Profiles |
| 95 | + |
| 96 | +Initial portable profiles: |
| 97 | + |
| 98 | +| Profile | Purpose | Minimum target | Default posture | |
| 99 | +| --- | --- | --- | --- | |
| 100 | +| `tiny-router` | local routing, triage, rewrite | 8 GB free | local-only, no tools | |
| 101 | +| `laptop-safe` | general offline fallback and Office assist | 16 GB free | local-only, no prompt egress | |
| 102 | +| `office-local` | Office Plane summarization and document assistance | 32 GB free | workroom-scoped | |
| 103 | +| `code-local` | local coding assistant and repo triage | 32 GB free | repo-scoped | |
| 104 | +| `field-kit` | portable SSD field/operator kit | 64 GB free | evidence-first | |
| 105 | +| `byom-gguf` | bring-your-own GGUF import | varies | manifest + hash required | |
| 106 | + |
| 107 | +## Security posture |
| 108 | + |
| 109 | +Default policy: |
| 110 | + |
| 111 | +- prompt egress denied; |
| 112 | +- model downloads require explicit operator action; |
| 113 | +- model blobs require signed or pinned-hash manifests; |
| 114 | +- host `$HOME` writes denied by default; |
| 115 | +- host cache writes denied by default; |
| 116 | +- runtime ports bind to loopback only unless policy grants otherwise; |
| 117 | +- tool use denied by default; |
| 118 | +- wipe receipts required for zero-trace mode; |
| 119 | +- evidence stores hashes and refs, not prompt bodies. |
| 120 | + |
| 121 | +## Launch posture |
| 122 | + |
| 123 | +A launch plan should describe what would start, not start it implicitly: |
| 124 | + |
| 125 | +- runtime provider: Ollama-compatible, llama.cpp, MLX/oMLX compatibility, or OpenAI-compatible local server; |
| 126 | +- model profile and local model reference; |
| 127 | +- portable state root; |
| 128 | +- localhost port binding; |
| 129 | +- selected surface: TurtleTerm, AgentTerm, BearBrowser, or local web fallback; |
| 130 | +- required Agent Machine activation decision; |
| 131 | +- expected evidence outputs. |
| 132 | + |
| 133 | +## Capability parity target |
| 134 | + |
| 135 | +The first parity target is to match simple portable USB projects at the product surface while exceeding them on governance. |
| 136 | + |
| 137 | +| Capability | Required SourceOS answer | |
| 138 | +| --- | --- | |
| 139 | +| USB/SSD preflight | `portable-ai preflight` with JSON evidence | |
| 140 | +| Model menu | signed `ModelCarryPack` profiles | |
| 141 | +| Custom GGUF | BYOM import plan with hash/license/provenance checks | |
| 142 | +| Local chat UI | TurtleTerm plus local web fallback; optional AnythingLLM adapter | |
| 143 | +| Ollama support | runtime profile, not sole authority | |
| 144 | +| Offline mode | prompt egress denied and model route local-only by default | |
| 145 | +| Zero trace | portable state root plus host-write audit and wipe receipt | |
| 146 | +| Multi-platform | Linux-first, macOS/Windows compatibility as adapters | |
| 147 | +| Safe shutdown | Agent Machine activation/teardown receipts | |
| 148 | +| User clarity | one prepare path, one inspect path, one start plan | |
| 149 | + |
| 150 | +## Acceptance criteria |
| 151 | + |
| 152 | +M1 is complete when: |
| 153 | + |
| 154 | +1. `sourceosctl portable-ai preflight` renders structured JSON without mutating the target. |
| 155 | +2. `sourceosctl portable-ai profiles` lists built-in portable profiles. |
| 156 | +3. `sourceosctl portable-ai prepare --dry-run` renders a portable-root materialization plan. |
| 157 | +4. `sourceosctl portable-ai prepare --execute --policy-ok` creates only declared directories and writes evidence. |
| 158 | +5. `sourceosctl portable-ai start-plan` renders a launch plan without starting daemons. |
| 159 | +6. `sourceos-model-carry` owns the portable model-pack schema and examples. |
| 160 | +7. `agent-machine` owns runtime activation and teardown evidence semantics. |
| 161 | +8. README documents the one-command demo path. |
| 162 | + |
| 163 | +M2 is complete when: |
| 164 | + |
| 165 | +1. model-pack manifests include pinned hashes and license/provenance fields; |
| 166 | +2. BYOM GGUF import validates file presence and hash before route eligibility; |
| 167 | +3. TurtleTerm can consume `start-plan` output; |
| 168 | +4. Agent Machine emits portable runtime receipts; |
| 169 | +5. website/product docs present the portable kit as a first-class SourceOS capability. |
| 170 | + |
| 171 | +## Integration homes |
| 172 | + |
| 173 | +| Repo | Responsibility | |
| 174 | +| --- | --- | |
| 175 | +| `SourceOS-Linux/sourceos-devtools` | CLI, preflight, prepare, inspect, launch-plan surface | |
| 176 | +| `SourceOS-Linux/sourceos-model-carry` | portable model-pack schemas, examples, provenance expectations | |
| 177 | +| `SourceOS-Linux/agent-machine` | provider activation, teardown, cache/model residency receipts | |
| 178 | +| `SourceOS-Linux/sourceos-spec` | promoted stable contracts | |
| 179 | +| `SourceOS-Linux/TurtleTerm` | first-class terminal UI surface | |
| 180 | +| `SourceOS-Linux/agent-term` | ChatOps/operator event surface | |
| 181 | +| `SocioProphet/model-router` | governed local/hosted routing | |
| 182 | +| `SocioProphet/policy-fabric` | side-effect and prompt-egress policy | |
| 183 | +| `SocioProphet/agentplane` | run/evidence submission and replay | |
| 184 | +| `SocioProphet/prophet-workspace` | workroom and artifact semantics | |
0 commit comments