Skip to content

docs: architecture overview (processes, agents, protocols, approvals) [skip ci] - #124

Merged
ymote merged 1 commit into
mainfrom
docs/architecture
Sep 28, 2026
Merged

ymote merged 1 commit into
mainfrom
docs/architecture

Conversation

@ymote

@ymote ymote commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Adds docs/architecture.md and docs/architecture.zh-CN.md: how OctoSense fits together on main (ff40e9c), with every statement marked On main, In progress (open PR) or Planned (ADR step).

  1. Processes per platform: the shell; the octos kernel as a child (desktop OCTOS_APP_CORE_BIN, Android liboctos.so), in process on OpenHarmony, none on iOS; lazy start, restart on provider change, exit on stdin EOF / parent death; native apps in process vs their own process (native-apps.json, window-manager hosting over the hub, zero-copy frames); script apps in App Hub's Card runner.
  2. Agents: one kernel per shell; the system agent and app peers as sessions; per-peer workspace, memory namespace, transcript, model, tools, request contexts; what a kernel crash means.
  3. Communication: OUP over stdio and host-managed WebSocket (host and external tokens, what external clients may not do); peer_send_input, blackboard, peer_respond; peer/input (octos#2567, in progress); how each hosting kind reaches its agent; the Makepad AI bus vs app agents.
  4. Tools and grants, including the system agent's tool set (The system agent's defined tool set, no shell (ADR 0004 §12) #117).
  5. Approvals: the router order (ADR 0004 §8/§4: approval router, standing rules, shell sheets, first-use consent #120), rules, sheets, consent, audit, and what feeds the router today.
  6. Storage and secrets (App storage layout, host paths and secrets APIs, startup check (ADR 0004 §11) #115), 7. trust boundaries (Contain module panics at the in-process boundary (ADR 0004 step 9) #114; sandboxes planned), 8. a worked Calendar/Mail example with the status of each step.

It ends with a list of places where the code and the ADRs or docs disagree. None is fixed here.

Also: a short "How it fits together" section with a small diagram in README.md and README.zh-CN.md, and links from docs/adr/README*.md and docs/ai-services*.md. Existing anchors are unchanged.

Checks: every relative link and #anchor in the eight changed files resolves (local script), the octos and Rinx links return 200, cited paths and symbols were grepped on main, and rom/tests/test_no_local_paths.py passes. Docs only, so [skip ci].

🤖 Generated with Claude Code

… [skip ci]

docs/architecture.md and .zh-CN.md describe how OctoSense fits together on
main: processes per platform (the shell, the octos kernel child or in-process
core, in-process and process native apps, script apps in the Card runner),
agents as kernel sessions, OUP over stdio and host-managed WebSocket, the
peer blackboard and the planned peer/input path (octos#2567), tools and
grants, the approval router, storage and secrets, trust boundaries, and a
worked Calendar/Mail example with the status of every step. It ends with the
places where the code and the ADRs disagree.

The READMEs get a short "How it fits together" section; the ADR index and
ai-services link to the new page. Docs only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ymote
ymote merged commit e5ccc13 into main Sep 28, 2026
ymote added a commit that referenced this pull request Sep 29, 2026
… [skip ci]

- approvals/contacts.rs: ContactsSource (is_known for email addresses and
  Matrix IDs), ContactList/NoContacts test doubles, MailContacts reading
  Mail's host service data, and ContactsGate: off by default, on only by
  the person's Settings tap ("Use my contacts in approval rules"), kept
  owner-only in approvals/contacts.json. The router evaluates "recipients
  in contacts" through the gate.
- mail host service: contacts::known_addresses (own accounts, recorded
  send recipients, To/Cc of sent folders; never the secret store); the
  decoder keeps To/Cc; a removed account forgets its recipients.
- docs/ai-services(.zh-CN).md refreshed against main (#106, #113, #117,
  #118, #120, #124, #95, #86), linking architecture.md; architecture's
  contacts lines updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant