From 15b004065204dfd8367a3eda040a0aedd11c5fa0 Mon Sep 17 00:00:00 2001 From: ymote <151983+ymote@users.noreply.github.com> Date: Tue, 6 Oct 2026 16:52:09 -0700 Subject: [PATCH] Pin octos main 39e22d45 octos-core, octos-cli and octos-research move together from 056173e8 to octos main 39e22d45 (still 2.0.3-rc.13), the revision OctosCode now pins too (octoscode-app #4). Since 056173e8: - #2692: on a stdio connection, which never negotiates projection.envelope.v2, a turn's terminal now arrives after its queued envelopes. Before, a client saw a turn end ahead of its last words. - #2697 and #2695: a purge whose erase fails stops as peer_purge_incomplete and keeps the peer staged. app-peers already keeps the record on any error other than busy or not-found, so the account stays suspended and a later purge erases again. - #2677: option-like revisions refused in workspace history show/diff. - #2704 and #2709, keychain items released with a deleted profile or sub-account; #2666, a profile's open stores handed to its replacement runtime; #2667, the resolved model route exported to skills. - #2465: context/state_reported, opt-in (context.state.v1), which nothing here requests. AppCard's store and agent match every notification kind, so both now list it as one they never receive. octos's manifests did not change, so Cargo.lock moves only the 17 octos crates' source. The external turn allowlist (EXTERNAL_TURN_TOOLS) is the same at both revisions. The nix patch stays at 18fcd3f1: octos main no longer vendors it. The architecture guide's octos links read the new pin. Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 34 +++++++++---------- Cargo.toml | 17 +++++++--- apps/appcard/app/app/src/backend/octos_ui.rs | 2 ++ .../app/crates/octos-app-store/src/state.rs | 3 ++ crates/toolbox/README.md | 2 +- .../adr/0004-native-apps-hosting-and-peers.md | 2 +- docs/architecture.md | 10 +++--- docs/architecture.zh-CN.md | 10 +++--- 8 files changed, 46 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 59124b3a..49df163e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6925,7 +6925,7 @@ dependencies = [ [[package]] name = "octos-agent" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "async-trait", "base64 0.22.1", @@ -7055,7 +7055,7 @@ dependencies = [ [[package]] name = "octos-bus" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "aes 0.8.4", "async-trait", @@ -7084,7 +7084,7 @@ dependencies = [ [[package]] name = "octos-cli" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "agent-client-protocol", "argon2", @@ -7165,7 +7165,7 @@ dependencies = [ [[package]] name = "octos-core" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "chrono", "eyre", @@ -7179,7 +7179,7 @@ dependencies = [ [[package]] name = "octos-diagnostics" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "eyre", "octos-core", @@ -7191,7 +7191,7 @@ dependencies = [ [[package]] name = "octos-fleet" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "eyre", "octos-core", @@ -7207,7 +7207,7 @@ dependencies = [ [[package]] name = "octos-fleet-worker" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "async-trait", "eyre", @@ -7224,7 +7224,7 @@ dependencies = [ [[package]] name = "octos-llm" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "async-trait", "base64 0.22.1", @@ -7248,7 +7248,7 @@ dependencies = [ [[package]] name = "octos-memory" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "bincode", "chrono", @@ -7267,7 +7267,7 @@ dependencies = [ [[package]] name = "octos-pipeline" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "async-trait", "chrono", @@ -7289,7 +7289,7 @@ dependencies = [ [[package]] name = "octos-plugin" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "eyre", "metrics", @@ -7303,7 +7303,7 @@ dependencies = [ [[package]] name = "octos-research" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "base64 0.22.1", "chromiumoxide", @@ -7327,7 +7327,7 @@ dependencies = [ [[package]] name = "octos-sandbox" version = "0.1.0" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "clap", "eyre", @@ -7342,7 +7342,7 @@ dependencies = [ [[package]] name = "octos-services" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "chrono", "dirs", @@ -7364,7 +7364,7 @@ dependencies = [ [[package]] name = "octos-store" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "base64 0.22.1", "chrono", @@ -7384,7 +7384,7 @@ dependencies = [ [[package]] name = "octos-swarm" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "async-trait", "chrono", @@ -7403,7 +7403,7 @@ dependencies = [ [[package]] name = "octos-workflows" version = "2.0.3-rc.13" -source = "git+https://github.com/octos-org/octos.git?rev=056173e85b150e387805fc307fe231064ac1ed35#056173e85b150e387805fc307fe231064ac1ed35" +source = "git+https://github.com/octos-org/octos.git?rev=39e22d457c47df57d7c7c9fa64539979c9da93fd#39e22d457c47df57d7c7c9fa64539979c9da93fd" dependencies = [ "chrono", "eyre", diff --git a/Cargo.toml b/Cargo.toml index 1dc11f5d..a408d57a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -115,8 +115,15 @@ octosense-app-hub = { git = "https://github.com/OctoSense-org/OctoSense-App-Hub" # 1.x for the whole build (Cargo.lock pins the exact version OctoSense ships) # and App Hub and Rinx no longer need the same App Hub commit. octosense-app-contract = "1" -# --- octos: ONE source for every octos crate (octos-org/octos main at the -# merge of octos#2675, hydrate rows that name a tool row's call and tool; +# --- octos: ONE source for every octos crate (octos-org/octos main at +# 39e22d45, after #2709 and #2704, a deleted sub-account's or profile's +# keychain items released; #2697 and #2695, peer/purge residue kept on its +# tombstone; #2692, a stdio turn's terminal after its queued envelopes; +# #2677, option-like revisions refused in workspace history show/diff; +# #2666, a profile's open stores handed to its replacement runtime; #2667, +# the resolved model route exported to skills; and #2465, the opt-in +# context/state_reported. Before that the merge of octos#2675, hydrate rows +# that name a tool row's call and tool; # after #2672, the accepted client_commands echoed on session/open, #2671 # and #2669, docs, #2665, undeclared secrets kept from strict skills, #2664, # octos's own dev profile, and #2261, a credential store that keeps @@ -131,12 +138,12 @@ octosense-app-contract = "1" # keeps its peer/input, and #2645, Bing News's Chinese results). # 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 = "056173e85b150e387805fc307fe231064ac1ed35" } -octos-cli = { git = "https://github.com/octos-org/octos.git", rev = "056173e85b150e387805fc307fe231064ac1ed35", default-features = false } +octos-core = { git = "https://github.com/octos-org/octos.git", rev = "39e22d457c47df57d7c7c9fa64539979c9da93fd" } +octos-cli = { git = "https://github.com/octos-org/octos.git", rev = "39e22d457c47df57d7c7c9fa64539979c9da93fd", 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 = "056173e85b150e387805fc307fe231064ac1ed35", default-features = false } +octos-research = { git = "https://github.com/octos-org/octos.git", rev = "39e22d457c47df57d7c7c9fa64539979c9da93fd", default-features = false } # --- AppCard's inline renderers. streaming-markdown-kit = { git = "https://github.com/Project-Robius-China/streaming-markdown-kit.git", branch = "main" } makepad-diagram-kit = { git = "https://github.com/Project-Robius-China/makepad-diagram-kit.git", branch = "main" } diff --git a/apps/appcard/app/app/src/backend/octos_ui.rs b/apps/appcard/app/app/src/backend/octos_ui.rs index 58bfd22d..ff24e603 100644 --- a/apps/appcard/app/app/src/backend/octos_ui.rs +++ b/apps/appcard/app/app/src/backend/octos_ui.rs @@ -940,6 +940,8 @@ impl OctosUiAgent { | UiNotification::TurnSteerDropped(_) | UiNotification::BackgroundActivity(_) | UiNotification::ContextNormalizationReported(_) + // `context.state.v1` is not requested, so this never arrives. + | UiNotification::ContextStateReported(_) | UiNotification::SessionOrchestration(_) // 2026-07 protocol catch-up: no plan pane / voice surface here. | UiNotification::PlanUpdated(_) diff --git a/apps/appcard/app/crates/octos-app-store/src/state.rs b/apps/appcard/app/crates/octos-app-store/src/state.rs index 46f643ce..b83d18a5 100644 --- a/apps/appcard/app/crates/octos-app-store/src/state.rs +++ b/apps/appcard/app/crates/octos-app-store/src/state.rs @@ -490,6 +490,9 @@ fn apply_protocol(state: &mut AppState, cursor: Option, n: UiNotificat // the top-bar usage chip. state.context = Some(e.context_state); } + // Live context fullness mid-turn: octos sends it only to a client + // that asks for `context.state.v1`, which this one does not. + UiNotification::ContextStateReported(_) => {} // Voice sessions have no surface in octos-app yet (streamed TTS // audio included). UiNotification::VoiceExit(_) => {} diff --git a/crates/toolbox/README.md b/crates/toolbox/README.md index f9ec9826..f4bfb4bf 100644 --- a/crates/toolbox/README.md +++ b/crates/toolbox/README.md @@ -246,7 +246,7 @@ The wiring is in place behind `toolbox-peers` (`crates/ai-host/src/toolbox_peers ## Commands -The pinned octos (`056173e8`) includes `octos-research`, so no override is needed any more. On 2 Oct 2026 `cargo test --locked -p octosense-toolbox` passed at the pin (83 tests). The others below were run on 28 Sep 2026 against octos's merge of #2585 (7bec0918) through a local override, before the pin moved; at the pin `apps.yml` runs the plain, `live` and `octos-engine` tests and both clippy lines, and the live and real-model runs are **unverified** at the pin. +The pinned octos (`39e22d45`) includes `octos-research`, so no override is needed any more. On 6 Oct 2026 `cargo test --locked -p octosense-toolbox` passed at the pin (83 tests). The others below were run on 28 Sep 2026 against octos's merge of #2585 (7bec0918) through a local override, before the pin moved; at the pin `apps.yml` runs the plain, `live` and `octos-engine` tests and both clippy lines, and the live and real-model runs are **unverified** at the pin. ```sh cargo test --locked -p octosense-toolbox # 83 tests, fixtures only (the thin scope parser) diff --git a/docs/adr/0004-native-apps-hosting-and-peers.md b/docs/adr/0004-native-apps-hosting-and-peers.md index b9b84710..c33f0115 100644 --- a/docs/adr/0004-native-apps-hosting-and-peers.md +++ b/docs/adr/0004-native-apps-hosting-and-peers.md @@ -43,7 +43,7 @@ ### What octos provides (octos `main` e6223ef, verified) -Verified at e6223ef when this ADR was written. OctoSense now pins octos 056173e8 (the merge of octos#2675, `session/hydrate` rows that carry a tool row's `tool_call_id` and `tool_name` and an assistant row's `tool_calls`, so a reloaded transcript names its tool rows; after #2672, #2671, #2669, #2665, #2664 and #2261; before that ae230ce0, the merge of octos#2656, low fixes for host-owned app peers; after #2655, the unknown-outcome interlock kept across a kernel restart, and #2653, a bound workspace that no longer resolves to its recorded path is refused rather than re-rooted; before that 4a3ec9f9, the merge of octos#2648, a host session's durable exact tool list, `session/tool_list/set`; after #2649, `peer/purge`, #2647, `peer/context/open` `read_parent`, #2658, `peer/tools/unregister`, #2657, a host session's tools registered by the host's own connection without an app peer's token, #2654, host tool claims bounded per peer, #2652, a refused host `turn/start` no longer consumes its `peer/input`, #2651, the model cannot `peer_close` a host-owned app peer, and #2650; before that fe08d8e6, the merge of octos#2645, which holds #2644, a running turn shown in the other lane's shared history, and #2636, the parallel person context with shared history; after #2626, the shared peer conversation, #2630, `peer_gather` accepting the kernel's own `result.md`, #2621, `peer/input/reject`, and #2616, the #2567 follow-ups); the corrections dated 2026-09-29 below were checked against c608384d, the pin before it. +Verified at e6223ef when this ADR was written. OctoSense now pins octos 39e22d45 (octos main after #2709; since 056173e8 it adds #2692, a stdio turn's terminal delivered after its queued envelopes, #2697 and #2695, a purge whose erase fails stops as `peer_purge_incomplete` and keeps the peer staged, and #2677, option-like revisions refused in workspace history; before that 056173e8, the merge of octos#2675, `session/hydrate` rows that carry a tool row's `tool_call_id` and `tool_name` and an assistant row's `tool_calls`, so a reloaded transcript names its tool rows; after #2672, #2671, #2669, #2665, #2664 and #2261; before that ae230ce0, the merge of octos#2656, low fixes for host-owned app peers; after #2655, the unknown-outcome interlock kept across a kernel restart, and #2653, a bound workspace that no longer resolves to its recorded path is refused rather than re-rooted; before that 4a3ec9f9, the merge of octos#2648, a host session's durable exact tool list, `session/tool_list/set`; after #2649, `peer/purge`, #2647, `peer/context/open` `read_parent`, #2658, `peer/tools/unregister`, #2657, a host session's tools registered by the host's own connection without an app peer's token, #2654, host tool claims bounded per peer, #2652, a refused host `turn/start` no longer consumes its `peer/input`, #2651, the model cannot `peer_close` a host-owned app peer, and #2650; before that fe08d8e6, the merge of octos#2645, which holds #2644, a running turn shown in the other lane's shared history, and #2636, the parallel person context with shared history; after #2626, the shared peer conversation, #2630, `peer_gather` accepting the kernel's own `result.md`, #2621, `peer/input/reject`, and #2616, the #2567 follow-ups); the corrections dated 2026-09-29 below were checked against c608384d, the pin before it. - **Peers are sessions, not processes.** One kernel process per shell; every peer is a session in it (tokio tasks) with its own workspace, memory namespace, transcript and model lane. Tools such as the shell run as short child processes in the peer's workspace. - **No 8-peer ceiling.** `peer/prepare` stages 1–8 peers **per call** (`n`); the only total is a soft cap of 8192 live peer registrations. The model's `peer_handoff` tool is limited to 4 per turn; host-owned app peers are not created through it. OctoSense's broker prepares one peer per call. diff --git a/docs/architecture.md b/docs/architecture.md index df97852f..60f01511 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -221,15 +221,15 @@ flowchart LR ### OUP between the kernel and its clients -OUP is JSON-RPC 2.0, `octos-ui/v1alpha1` (octos [`api/OCTOS_UI_PROTOCOL_V1_SPEC_2026-04-24.md`](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/api/OCTOS_UI_PROTOCOL_V1_SPEC_2026-04-24.md)). By default it runs one frame per line over the child's stdin and stdout, and every consumer in the shell shares that stream. `crates/kernel/src/router.rs` gives each request a kernel-unique id, returns each reply to its own consumer, and sends each notification to the consumers that named its session. +OUP is JSON-RPC 2.0, `octos-ui/v1alpha1` (octos [`api/OCTOS_UI_PROTOCOL_V1_SPEC_2026-04-24.md`](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/api/OCTOS_UI_PROTOCOL_V1_SPEC_2026-04-24.md)). By default it runs one frame per line over the child's stdin and stdout, and every consumer in the shell shares that stream. `crates/kernel/src/router.rs` gives each request a kernel-unique id, returns each reply to its own consumer, and sends each notification to the consumers that named its session. -**Talk to Octos** ([ADR 0003](adr/0003-shared-octos-client-access.md); octos [`docs/HOST_MANAGED_SERVE.md`](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/docs/HOST_MANAGED_SERVE.md)) restarts the kernel, on the desktop and Android, as `serve --host 127.0.0.1 --host-managed`; on Unix the shell passes it a listener bound once. Two tokens reach the kernel on its stdin, never in its environment. +**Talk to Octos** ([ADR 0003](adr/0003-shared-octos-client-access.md); octos [`docs/HOST_MANAGED_SERVE.md`](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/docs/HOST_MANAGED_SERVE.md)) restarts the kernel, on the desktop and Android, as `serve --host 127.0.0.1 --host-managed`; on Unix the shell passes it a listener bound once. Two tokens reach the kernel on its stdin, never in its environment. The host token stays in the shell and reaches everything. The external token goes to a paired web client (by one-time code) or to a terminal client of the same user (`client-connection.json`, owner-only on Unix). It opens only `/api/ui-protocol/ws`, as `_main`, for the system conversation and the client's own turns: no `peer/*` method, no app peer, and only octos's fixed `EXTERNAL_TURN_TOOLS`. ### System and app agents inside the kernel -octos's peer tools ([`crates/octos-agent/src/tools/`](https://github.com/octos-org/octos/tree/056173e85b150e387805fc307fe231064ac1ed35/crates/octos-agent/src/tools)) work at depth 1: a peer cannot create, steer or close another peer. +octos's peer tools ([`crates/octos-agent/src/tools/`](https://github.com/octos-org/octos/tree/39e22d457c47df57d7c7c9fa64539979c9da93fd/crates/octos-agent/src/tools)) work at depth 1: a peer cannot create, steer or close another peer. - **To an app agent:** `peer_send_input`, at most 64 KiB, from the peer's originator only. octos hands that turn to the shell ([below](#how-the-shell-runs-the-system-agents-input)). - **Back:** the blackboard, the only channel between peers. Each peer turn writes `peers//result.md` and a line in `turns.txt`, which the system agent reads with `peer_gather` and `peer_list`. @@ -497,6 +497,6 @@ Code outside this repository, at the revisions `Cargo.toml` pins: | --- | --- | | Makepad: the `OctosPeer` client; each native app's agent code | [`libs/ai/services/src/peer.rs`](https://github.com/OctoSense-org/makepad/blob/68d1f4ecc111daa90c50530e77df3245f05fc2cf/libs/ai/services/src/peer.rs), `apps//src/view.rs` | | The Terminal's own-agent link (Makepad #100) | [`apps/terminal/src/module.rs`](https://github.com/OctoSense-org/makepad/blob/68d1f4ecc111daa90c50530e77df3245f05fc2cf/apps/terminal/src/module.rs) | -| octos: the lanes' shared history (20 rows, 16 KiB); `peer_send_input` (64 KiB) | [`crates/octos-cli/src/peers/shared_history.rs`](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/crates/octos-cli/src/peers/shared_history.rs), [`crates/octos-agent/src/tools/peer_send_input.rs`](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/crates/octos-agent/src/tools/peer_send_input.rs) | -| octos: host-managed serve, app peers, peer host tools | [`docs/HOST_MANAGED_SERVE.md`](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/docs/HOST_MANAGED_SERVE.md), [UPCR-2026-034](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_034_HOST_APP_PEERS.md), [UPCR-2026-035](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_035_PEER_HOST_TOOLS.md), [UPCR-2026-036](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_036_HOST_MANAGED_SERVE.md) | +| octos: the lanes' shared history (20 rows, 16 KiB); `peer_send_input` (64 KiB) | [`crates/octos-cli/src/peers/shared_history.rs`](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/crates/octos-cli/src/peers/shared_history.rs), [`crates/octos-agent/src/tools/peer_send_input.rs`](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/crates/octos-agent/src/tools/peer_send_input.rs) | +| octos: host-managed serve, app peers, peer host tools | [`docs/HOST_MANAGED_SERVE.md`](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/docs/HOST_MANAGED_SERVE.md), [UPCR-2026-034](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_034_HOST_APP_PEERS.md), [UPCR-2026-035](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_035_PEER_HOST_TOOLS.md), [UPCR-2026-036](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_036_HOST_MANAGED_SERVE.md) | | App Hub: the kernel tools a script app may keep (`KERNEL_TOOLS`) | [`crates/app-policy/src/policy.rs`](https://github.com/OctoSense-org/OctoSense-App-Hub/blob/0d5b47a2ae9eb98020feca26b7c895a3cf797dc1/crates/app-policy/src/policy.rs) | diff --git a/docs/architecture.zh-CN.md b/docs/architecture.zh-CN.md index 688ef106..c69f00e5 100644 --- a/docs/architecture.zh-CN.md +++ b/docs/architecture.zh-CN.md @@ -221,15 +221,15 @@ flowchart LR ### 内核与客户端之间的 OUP -OUP 是 JSON-RPC 2.0,`octos-ui/v1alpha1`(octos [`api/OCTOS_UI_PROTOCOL_V1_SPEC_2026-04-24.md`](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/api/OCTOS_UI_PROTOCOL_V1_SPEC_2026-04-24.md))。默认情况下,它在子进程的 stdin 和 stdout 上每行一帧,Shell 中所有使用方共用这条流。`crates/kernel/src/router.rs` 为每个请求分配内核内唯一的 id,把每个回复只交给发出请求的使用方,并把每条通知发给提到过该会话的使用方。 +OUP 是 JSON-RPC 2.0,`octos-ui/v1alpha1`(octos [`api/OCTOS_UI_PROTOCOL_V1_SPEC_2026-04-24.md`](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/api/OCTOS_UI_PROTOCOL_V1_SPEC_2026-04-24.md))。默认情况下,它在子进程的 stdin 和 stdout 上每行一帧,Shell 中所有使用方共用这条流。`crates/kernel/src/router.rs` 为每个请求分配内核内唯一的 id,把每个回复只交给发出请求的使用方,并把每条通知发给提到过该会话的使用方。 -**Talk to Octos**([ADR 0003](adr/0003-shared-octos-client-access.md),英文;octos [`docs/HOST_MANAGED_SERVE.md`](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/docs/HOST_MANAGED_SERVE.md))在桌面端和 Android 上把内核重启为 `serve --host 127.0.0.1 --host-managed`;在 Unix 上,Shell 把一个只绑定一次的监听套接字传给它。两个 token 都通过内核的 stdin 传入,从不放进环境变量。 +**Talk to Octos**([ADR 0003](adr/0003-shared-octos-client-access.md),英文;octos [`docs/HOST_MANAGED_SERVE.md`](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/docs/HOST_MANAGED_SERVE.md))在桌面端和 Android 上把内核重启为 `serve --host 127.0.0.1 --host-managed`;在 Unix 上,Shell 把一个只绑定一次的监听套接字传给它。两个 token 都通过内核的 stdin 传入,从不放进环境变量。 宿主 token 留在 Shell 中,可以访问一切。外部 token 交给已配对的网页客户端(凭一次性配对码),或同一用户的终端客户端(`client-connection.json`,在 Unix 上仅所有者可读写)。它只能打开 `/api/ui-protocol/ws`,以 `_main` 身份访问系统对话和客户端自己的回合:没有 `peer/*` 方法,碰不到应用 peer,只有 octos 固定的 `EXTERNAL_TURN_TOOLS`。 ### 内核中的系统 Agent 与应用 Agent -octos 的 peer 工具([`crates/octos-agent/src/tools/`](https://github.com/octos-org/octos/tree/056173e85b150e387805fc307fe231064ac1ed35/crates/octos-agent/src/tools))只有一层:peer 不能创建、操纵或关闭另一个 peer。 +octos 的 peer 工具([`crates/octos-agent/src/tools/`](https://github.com/octos-org/octos/tree/39e22d457c47df57d7c7c9fa64539979c9da93fd/crates/octos-agent/src/tools))只有一层:peer 不能创建、操纵或关闭另一个 peer。 - **发给应用 Agent:**`peer_send_input`,最多 64 KiB,只有 peer 的发起者能发。octos 把这一轮交给 Shell(见[下文](#shell-如何运行系统-agent-的输入))。 - **回传:**黑板,peer 之间唯一的通道。每个 peer 回合都会写入 `peers//result.md`,并在 `turns.txt` 中加一行,系统 Agent 用 `peer_gather` 和 `peer_list` 读取。 @@ -497,6 +497,6 @@ sequenceDiagram | --- | --- | | Makepad:`OctosPeer` 客户端;各原生应用的 Agent 代码 | [`libs/ai/services/src/peer.rs`](https://github.com/OctoSense-org/makepad/blob/68d1f4ecc111daa90c50530e77df3245f05fc2cf/libs/ai/services/src/peer.rs)、`apps//src/view.rs` | | Terminal 自己的 Agent 链接(Makepad #100) | [`apps/terminal/src/module.rs`](https://github.com/OctoSense-org/makepad/blob/68d1f4ecc111daa90c50530e77df3245f05fc2cf/apps/terminal/src/module.rs) | -| octos:两条通道的共享历史(20 条,16 KiB);`peer_send_input`(64 KiB) | [`crates/octos-cli/src/peers/shared_history.rs`](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/crates/octos-cli/src/peers/shared_history.rs)、[`crates/octos-agent/src/tools/peer_send_input.rs`](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/crates/octos-agent/src/tools/peer_send_input.rs) | -| octos:宿主管理的 serve、应用 peer、peer 宿主工具 | [`docs/HOST_MANAGED_SERVE.md`](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/docs/HOST_MANAGED_SERVE.md)、[UPCR-2026-034](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_034_HOST_APP_PEERS.md)、[UPCR-2026-035](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_035_PEER_HOST_TOOLS.md)、[UPCR-2026-036](https://github.com/octos-org/octos/blob/056173e85b150e387805fc307fe231064ac1ed35/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_036_HOST_MANAGED_SERVE.md) | +| octos:两条通道的共享历史(20 条,16 KiB);`peer_send_input`(64 KiB) | [`crates/octos-cli/src/peers/shared_history.rs`](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/crates/octos-cli/src/peers/shared_history.rs)、[`crates/octos-agent/src/tools/peer_send_input.rs`](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/crates/octos-agent/src/tools/peer_send_input.rs) | +| octos:宿主管理的 serve、应用 peer、peer 宿主工具 | [`docs/HOST_MANAGED_SERVE.md`](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/docs/HOST_MANAGED_SERVE.md)、[UPCR-2026-034](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_034_HOST_APP_PEERS.md)、[UPCR-2026-035](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_035_PEER_HOST_TOOLS.md)、[UPCR-2026-036](https://github.com/octos-org/octos/blob/39e22d457c47df57d7c7c9fa64539979c9da93fd/docs/OCTOS_UI_PROTOCOL_CHANGE_REQUEST_UPCR_2026_036_HOST_MANAGED_SERVE.md) | | App Hub:脚本应用可以保留的内核工具(`KERNEL_TOOLS`) | [`crates/app-policy/src/policy.rs`](https://github.com/OctoSense-org/OctoSense-App-Hub/blob/0d5b47a2ae9eb98020feca26b7c895a3cf797dc1/crates/app-policy/src/policy.rs) |