Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 38 additions & 0 deletions .github/workflows/apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,44 @@ jobs:
cargo clippy --locked -p octosense-toolbox --all-targets --no-deps -- -D warnings
cargo clippy --locked -p octosense-toolbox --all-targets --features live,octos-engine --no-deps -- -D warnings

kernel-security:
# The Talk to Octos security checks against a REAL octos: the kernel's
# real-kernel tests (what the external token must not reach, pairing,
# revoke, a SIGKILLed host) and the app-peer real-kernel tests. The octos
# binary is built at the revision Cargo.lock pins and cached by it.
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- uses: dtolnay/rust-toolchain@stable
- run: python3 tools/setup.py
- name: The pinned octos revision
id: octos
run: echo "rev=$(python3 -c 'import importlib.util as u; s=u.spec_from_file_location("k","tools/kernel-artifact.py"); m=u.module_from_spec(s); s.loader.exec_module(m); print(m.octos_revision())')" >> "$GITHUB_OUTPUT"
# Outside target/: rust-cache restores and prunes target/.
- uses: actions/cache@v4
with:
path: ${{ runner.temp }}/octos-kernel/target/release/octos
key: octos-kernel-${{ runner.os }}-${{ steps.octos.outputs.rev }}
- name: Build octos (unless cached)
run: |
if [ ! -x "$RUNNER_TEMP/octos-kernel/target/release/octos" ]; then
python3 tools/kernel-artifact.py --host --work "$RUNNER_TEMP/octos-kernel"
fi
- uses: Swatinem/rust-cache@v2
with:
shared-key: kernel-security
- name: Real-kernel tests
env:
OCTOS_CORE_TEST_KERNEL: ${{ runner.temp }}/octos-kernel/target/release/octos
OCTOS_APP_PEERS_TEST_KERNEL: ${{ runner.temp }}/octos-kernel/target/release/octos
run: |
cargo test --locked -p octosense-kernel --test real_kernel -- --test-threads=1 --nocapture
cargo test --locked -p octosense-app-peers --features octos-core --test real_kernel

apps:
# macOS: the host services and AppCard link App Hub and Makepad, whose
# host system-dependency set is verified on macOS (what the dev machines run).
Expand Down
40 changes: 23 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,15 @@ octoscript-node = { git = "https://github.com/OctoSense-org/Octoscript-Makepad.g
octosense-app-hub-app = { git = "https://github.com/OctoSense-org/OctoSense-App-Hub", rev = "e8601b80ce104db2e48208094714bdcffdce6b5a" }
octosense-appstore = { git = "https://github.com/OctoSense-org/OctoSense-App-Hub", rev = "e8601b80ce104db2e48208094714bdcffdce6b5a" }
# --- octos: ONE source for every octos crate (octos-org/octos main at the
# merge of octos#2594). Move octos-core and octos-cli together; the Android
# kernel artifact (liboctos.so) is built from this same revision.
octos-core = { git = "https://github.com/octos-org/octos.git", rev = "3b5d17a435da8ba9d1fcccbfedce46c357819a3a" }
octos-cli = { git = "https://github.com/octos-org/octos.git", rev = "3b5d17a435da8ba9d1fcccbfedce46c357819a3a", default-features = false }
# merge of octos#2591, `serve --host-managed`). Move octos-core, octos-cli
# and octos-research together; the Android kernel artifact (liboctos.so) is
# built from this same revision.
octos-core = { git = "https://github.com/octos-org/octos.git", rev = "e6223efcaa23daa22b876eb734ae98aa400c6240" }
octos-cli = { git = "https://github.com/octos-org/octos.git", rev = "e6223efcaa23daa22b876eb734ae98aa400c6240", default-features = false }
# The research engine (the metasearch, the SSRF-safe polite reader and the
# toolbox scope) for the toolbox's `octos-engine` feature. Same source and
# revision as above.
octos-research = { git = "https://github.com/octos-org/octos.git", rev = "3b5d17a435da8ba9d1fcccbfedce46c357819a3a", default-features = false }
octos-research = { git = "https://github.com/octos-org/octos.git", rev = "e6223efcaa23daa22b876eb734ae98aa400c6240", default-features = false }
# --- Rinx (Matrix chats, Moments, articles, mini apps) as a hosted module:
# the library only, never its standalone entry or its own kernel (Rinx ADR 0007).
rinx = { git = "https://github.com/hagency-org/Rinx.git", rev = "68afcf796d303aaf646eeb832d65c450a56c92b5", default-features = false, features = ["octosense-module"] }
Expand Down
6 changes: 4 additions & 2 deletions apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ after every change, so the running kernel picks up the new providers. The
method table and registration are in its
[README](ai-providers/host-service/README.md).

**Talk to Octos** (off by default): **AI providers → Talk to Octos** turns on a loopback server so a web client or a terminal UI can talk to this device's assistant. While it is on, the kernel runs as `octos serve --host-managed` instead of `--stdio` and native apps keep working over its WebSocket; external clients get a separate token that opens the UI Protocol socket and nothing else. A web client pairs with a one-time code or the QR of its link; a terminal client of this user reads the private connection file. The server stays up when native apps close, until it is turned off or the shell exits. See [ADR 0003](../docs/adr/0003-shared-octos-client-access.md) and the [kernel guide](../crates/kernel/README.md).

## The octos kernel

The octos agent kernel is a **shell service**, not part of any app.
Expand Down Expand Up @@ -341,7 +343,7 @@ octos UI Protocol v1.
kernel, a WebSocket or REST) and `octos-app-render` (streaming-markdown
renderer).
- **octos**: every octos crate comes from git `octos-org/octos` at the one
rev in the root `Cargo.toml` `[workspace.dependencies]` (today `3b5d17a4`,
rev in the root `Cargo.toml` `[workspace.dependencies]` (today `e6223efc`,
octos `main`), shared with `crates/kernel` and the shells. AppCard starts no kernel of its
own: it connects to the shell's ([The octos kernel](#the-octos-kernel)).
- **Makepad**: not vendored. Makepad, Octoscript and Octoscript-Makepad are
Expand Down Expand Up @@ -425,7 +427,7 @@ plus an entry in each shell's `system-apps.json`.
| [OctoScript-App-Design-Flow](https://github.com/OctoSense-org/OctoScript-App-Design-Flow) | how to design, build, check and publish an app |
| [OctoScript](https://github.com/OctoSense-org/OctoScript), [OctoScript-Makepad](https://github.com/OctoSense-org/OctoScript-Makepad), [makepad](https://github.com/OctoSense-org/makepad) | the language and runtime |
| [Rinx](https://github.com/hagency-org/Rinx) | Matrix chats and mini apps, a native module; reaches the assistant through `crates/app-peers` |
| [octos](https://github.com/octos-org/octos) | the agent kernel: run as a shell service by `crates/kernel`, configured by AI providers, used by AppCard and other consumers (one rev, `3b5d17a4`) |
| [octos](https://github.com/octos-org/octos) | the agent kernel: run as a shell service by `crates/kernel`, configured by AI providers, used by AppCard and other consumers (one rev, `e6223efc`) |

## Contributing

Expand Down
6 changes: 4 additions & 2 deletions apps/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ MAKEPAD_APP_CONFIG='{"mail_demo":true}' cargo run --release -p octosense-home --
`octosense_kernel::restart()`,让正在运行的内核读取新的服务商。方法列表与注册
方式见其 [README(英文)](ai-providers/host-service/README.md)。

**Talk to Octos**(默认关闭):在 **AI providers → Talk to Octos** 中打开后,本机会启动一个仅监听回环地址的服务,让 Web 客户端或终端界面与本设备的助手对话。开启期间内核以 `octos serve --host-managed` 代替 `--stdio` 运行,原生应用继续通过其 WebSocket 工作;外部客户端使用单独的令牌,只能打开 UI Protocol 套接字。Web 客户端通过一次性配对码或其链接的二维码配对;本用户的终端客户端读取私有连接文件。原生应用关闭后服务仍保持运行,直到关闭该功能或 Shell 退出。见 [ADR 0003(英文)](../docs/adr/0003-shared-octos-client-access.md) 和[内核指南](../crates/kernel/README.zh-CN.md)。

## octos 内核

octos Agent 内核是 **Shell 服务**,不属于任何应用。
Expand Down Expand Up @@ -303,7 +305,7 @@ octos UI Protocol v1 与 octos 通信。
`octos-app-render`(流式 markdown 渲染)。
- **octos**:所有 octos crate 都来自 git `octos-org/octos`,版本为根目录
`Cargo.toml` 的 `[workspace.dependencies]` 中唯一的 rev(目前是 octos `main` 上的
`3b5d17a4`),与 `crates/kernel` 和 Shell 共用。AppCard 不再自己启动内核,而是连接 Shell 的内核
`e6223efc`),与 `crates/kernel` 和 Shell 共用。AppCard 不再自己启动内核,而是连接 Shell 的内核
(见 [octos 内核](#octos-内核))。
- **Makepad**:不内置。Makepad、Octoscript 和 Octoscript-Makepad 是仓库根目录下
`.sources/` 中由 `tools/setup.py` 准备的检出,版本由 `native-runtime.lock.json`
Expand Down Expand Up @@ -376,7 +378,7 @@ Shell 的 `system-apps.json` 中加入它。
| [OctoScript-App-Design-Flow](https://github.com/OctoSense-org/OctoScript-App-Design-Flow) | 如何设计、构建、检查和发布应用 |
| [OctoScript](https://github.com/OctoSense-org/OctoScript)、[OctoScript-Makepad](https://github.com/OctoSense-org/OctoScript-Makepad)、[makepad](https://github.com/OctoSense-org/makepad) | 语言与运行时 |
| [Rinx](https://github.com/hagency-org/Rinx) | Matrix 聊天与小程序,原生模块;通过 `crates/app-peers` 访问助手 |
| [octos](https://github.com/octos-org/octos) | Agent 内核:由 `crates/kernel` 作为 Shell 服务运行,由 AI providers 配置,供 AppCard 等使用方使用(只用一个版本 `3b5d17a4`) |
| [octos](https://github.com/octos-org/octos) | Agent 内核:由 `crates/kernel` 作为 Shell 服务运行,由 AI providers 配置,供 AppCard 等使用方使用(只用一个版本 `e6223efc`) |

## 参与贡献

Expand Down
3 changes: 3 additions & 0 deletions apps/ai-providers/bundle/main.splash
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ SolidView{width: Fill height: Fill flow: Down draw_bg.color: page
draw_text.color: secondary draw_text.text_style.font_size: 13}
}
Big{text: "Add model" on_click: || add_model()}
Quiet{text: "Talk to Octos" on_click: || {
host.request("llm.connect_client", {}, fn(r){ if !r.is_ok { status(r.error) } })
}}
View{width: Fill height: Fit flow: Right align: Align{y: 1.0} padding: Inset{top: 4}
Section{text: "SAVED MODELS"}
View{width: Fill height: 1}
Expand Down
Loading
Loading