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
33 changes: 18 additions & 15 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,19 @@ patch around it here.
answers `no service answers "…" on this device`. `llm` is for system apps
only. Never put a model key in an app. Read
[docs/AI-SERVICES.md](docs/AI-SERVICES.md) before adding one, and report
such a feature as not verified on a device. An app's own agent
(`"agent": {…, "tools": ["ask_user_question"]}`) is checked here only by
`hub check`. In the shells the person talks to it directly in the
"Ask <app>" panel the shell draws for every app with an agent, so the app
need not draw a chat of its own (desktop; the phone has no entry to the
panel yet). A store app's `tools.json` tools do not run in any shell yet,
so no screen may depend on its agent calling them. L0 cards that use
`sys.chat`, `sys.digest` or `model-copy` text need a newer runtime than
this repository pins: report them as not verified here.
each AI feature as unverified until exercised on its actual host. On the
connected-services OctoSense branch, an ordinary app can map its own
`tools.json` names to the reviewed shared-service `host_method` allowlist;
the target capability, risk, private-data rules and account checks still
apply. `implemented_by: "app"` does not gain an executable handler from
this mapping. The shell loads admitted `AGENT.md` and skill text as trusted
turn guidance, not as arbitrary executable kernel skills. Older shells and
standalone `card-host` do not gain these integrations from a gate pass.
Match OctoSense `feat/app-hub-connected-samples` with App Hub
`eaaffffd695caf7ebf6205c455377c1f8567b906` (or its compatible pinned successor).
See [connected samples](examples/connected-apps/README.md); retain manual
workflows and explicit missing-service states. Match L0 features to the
actual consumer runtime and record what was run.
- **Only needed capabilities.** Each capability maps to something a screen
does ([docs/CAPABILITIES.md](docs/CAPABILITIES.md)). Remove what is unused.
- **No dummy screenshots.** Screenshots are captures of the real app in a real
Expand All @@ -81,12 +85,11 @@ patch around it here.
for you; after signing, any edit needs stamp and sign again (human).
- **Keep the bundle clean.** Only `manifest.json`, `listing.json`, the entry,
artwork and screenshots go in `bundle/` (plus `tools.json`, `AGENT.md` and
`skills/` for an app that declares its own agent; the shells give it a peer,
`ask_user_question` and read access to its account folder, and register
its tools (which run only for system apps today), but do not install
`AGENT.md` or skills yet:
[docs/AI-SERVICES.md](docs/AI-SERVICES.md#an-apps-own-agent)). Notes, keys, logs, review packets
and `.local-state/` stay out.
`skills/` for an app that declares its own agent, and admitted UI template
assets). Guidance and mapped host tools require the matching shell described
above; declarations never create a service implementation by themselves.
[AI service details](docs/AI-SERVICES.md#an-apps-own-agent).
Notes, keys, logs, review packets and `.local-state/` stay out.
- **Run headless.** Start apps with `tools/octo run … --hidden` (Makepad's
headless mode: the window is never shown or focused, the remote bridge and
screenshots work as usual), so you never take over the person's screen.
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ the first-party apps moved to OctoSense-System-Apps and, since 2026-09-27,
live in [OctoSense `apps/`](https://github.com/OctoSense-org/OctoSense/tree/main/apps)
(OctoSense-System-Apps is archived and no longer public).

## Connected apps: GitHub, Gmail and Google Calendar

[Three development samples](examples/connected-apps/README.md) use shared
provider login without creating an OctoSense account: Rinx-backed GitHub Notes,
Inbox Assistant and Google Calendar. Their guide gives exact app IDs, matching
host/tool revisions and native evidence. Provider services require the new
connected-services OctoSense build; standalone `card-host` is insufficient for
live login, and it lacks the native Markdown editor. Live provider/model and
phone acceptance remain pending; Android Google login needs its native adapter.

## Code walkthrough

[docs/CODE-WALKTHROUGH.md](docs/CODE-WALKTHROUGH.md) follows the Python CLI
Expand Down
9 changes: 9 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ Agent)从一个想法(一段文字需求、一张生成的 UX 图)走到
自 2026-09-27 起位于 [OctoSense `apps/`](https://github.com/OctoSense-org/OctoSense/tree/main/apps)
(OctoSense-System-Apps 已归档,不再公开)。

## 连接 GitHub、Gmail 和 Google Calendar

[三个开发示例](examples/connected-apps/README.zh-CN.md) 复用共享提供商登录,不创建
OctoSense 账户:Rinx GitHub Notes 编辑器、Inbox Assistant 和 Google Calendar。
指南列出准确应用 ID、匹配的主机/工具版本及原生测试证据。真实提供商服务需要
新增连接服务的 OctoSense 构建;独立 `card-host` 不能完成真实登录,也没有原生
Markdown 编辑器。真实提供商、模型和手机验收仍待完成;Android Google 登录
还需要原生授权适配器。

## 代码导读

[代码导读(英文)](docs/CODE-WALKTHROUGH.md) 沿着 Python CLI,从脚本模板走到运行中的
Expand Down
73 changes: 63 additions & 10 deletions docs/AI-SERVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,51 @@ on the glance screen through their own tools (Mail, Calendar). OctoSense's
and [ADR 0004](https://github.com/OctoSense-org/OctoSense/blob/main/docs/adr/0004-native-apps-hosting-and-peers.md)
describe the shell side.

## Connected sample support — 2026-10-06

The [connected samples](../examples/connected-apps/README.md) target OctoSense
`feat/app-hub-connected-samples` with App Hub
`eaaffffd695caf7ebf6205c455377c1f8567b906`. This is a newer, scoped implementation;
**the dated baseline tables below do not describe these additions, and older
installed shells do not acquire them from a bundle gate pass.** See the
[shared OAuth/service guide](https://github.com/OctoSense-org/OctoSense/blob/feat/app-hub-connected-samples/crates/oauth-service/README.md) for setup and platform status.

- An ordinary app keeps its own namespace: `inbox.message` can declare
`implemented_by: "host-service"` and `host_method: "gmail.message"`.
App Hub admits only reviewed method mappings, with the target capability,
minimum risk and private-data rules. The shell routes the call under the
owner's active account and rejects foreign or stale connection arguments.
Generic `implemented_by: "app"` tools still need a script executor; this
change does not create one or authorize arbitrary remote writes.
- The shell loads the admitted, digest-checked `AGENT.md` and skill text into
account-bound turn guidance. That is not executable kernel skill installation.
The consented peer uses its real host tools; a one-shot `model.complete` call
is not an app-agent event or a durable conversation.
- The connected Gmail collector supports `<app namespace>.new_message`, such
as `inbox.new_message`, for an active account with admitted Gmail/auth grants,
background permission and agent consent. It establishes a forward baseline,
then routes new message IDs to the app peer. The peer decides importance;
only a durable quiet decision or host-verified persisted Glance card, together
with a successful turn, acknowledges the event. Failed work remains retryable.
- `glance.publish` can resolve an admitted Splash `template` and JSON `initial`
data from the app's own installed bundle. The host binds its connection and
supplies the original UI; the Inbox agent supplies relevance and summary.
Editing, Chat and native review share one revisioned reply. No tool mapping,
model text or instrument click can approve Gmail sending.

Provider consent creates an app-bound GitHub/Google connection, not an
OctoSense cloud account. Account access and app-agent/model consent remain
separate. The three samples keep private read tools non-shareable. Do not infer
cross-app calendar booking, system-memory promotion, generic cron delivery or
support on an older shell. Native local fixtures and connector tests have run;
real OAuth/model/provider effects, integrated Glance journeys and the OnePlus 6
remain unverified. Android Google login is unsupported until its native adapter
is implemented.

The remaining historical sections retain their dated evidence. Where they say
store tools or guidance were unavailable, use the scoped update above for this
new branch rather than treating those statements as a current global limit.

The later sections cover what is being built on top: an app's own agent
declared in its bundle, the tools it exposes, the system toolbox, publishing
to the glance screen, `sys.digest` cards, AI-written text and in-card chat,
Expand All @@ -46,6 +91,7 @@ The deep version, for shell and native-module developers:

## Contents

- [Connected sample support](#connected-sample-support--2026-10-06)
- [The short answer](#the-short-answer)
- [How the assistant is built](#how-the-assistant-is-built)
- [The system agent and app agents](#the-system-agent-and-app-agents)
Expand Down Expand Up @@ -519,9 +565,10 @@ from App Hub's News example
agent (or `octos.*`, or ships `tools.json`) its own peer once the person
allows it, registers the bundle's tools with it, and lets the person talk to
it in the "Ask <app>" panel; the system agent can hand it work
([The system agent and app agents](#the-system-agent-and-app-agents)). No
shell installs `AGENT.md` or skills into the peer, selects a model or fires a
trigger yet (ADR 0002, Implementation step 2).
([The system agent and app agents](#the-system-agent-and-app-agents)). That 2026-10-01 baseline did not load guidance or fire triggers. The
[connected-services update](#connected-sample-support--2026-10-06) loads admitted
guidance and implements the bounded Gmail event route; it does not establish
generic trigger delivery or automatic model selection from every manifest need.

The contract is App Hub's
[PUBLISHING § The app's agent and tools](https://github.com/OctoSense-org/OctoSense-App-Hub/blob/main/docs/PUBLISHING.md#the-apps-agent-and-tools);
Expand All @@ -544,9 +591,10 @@ OctoSense `crates/shell/src/host_tools/` at `f52620c` (read, not run):
| System toolbox tools | the `research` / `crawl` capabilities | **coming** | with `toolbox-peers` ([below](#the-system-toolbox)); no system app declares `research` yet |
| `dev.run` (a shell command) | developer mode, for the apps it covers | development builds only | the same |

So a store app's agent can talk with the person and the system agent, ask
the person questions, and read what the app keeps in its account folder; it
cannot act through tools of its own yet. The relay also caps every agent at
In the recorded baseline a store app’s agent could chat, ask questions and
read its account workspace. The connected-services branch additionally runs
reviewed `host_method` aliases under the owner’s active connection; arbitrary
script tools remain unavailable. The relay also caps every agent at
32 tool calls a turn and 1000 a day by default
(`crates/shell/src/host_tools/relay.rs`).

Expand Down Expand Up @@ -802,8 +850,11 @@ by the App Hub gate (`crates/app-policy/src/agent.rs`):
(`os.calendar` → `calendar`); otherwise it answers `<app> was not granted
the <family> service`. It refuses an `app` tool for now (`<tool> runs in
the app's own script; open the app to use it`; OctoSense
`crates/shell/src/host_tools/script_apps.rs`). A store app has no host
service of its own, so neither kind runs for it yet.
`crates/shell/src/host_tools/script_apps.rs`). On the connected-services
branch, an optional `host_method` maps an ordinary app’s namespaced tool to
a reviewed shared-service operation. The target capability, risk and private
data checks still apply; auth mutation, review approval and remote sends are
excluded. Omitting the mapping retains the namespace-based behavior above.
- `background`, `shareable`, `private_data`, `confirm`, `outward`,
`auto_approvable`: see
[An app's own agent](#approvals-risk-and-confirm).
Expand Down Expand Up @@ -981,8 +1032,10 @@ The service is **available** on OctoSense `main`
(`apps/mail/host-service/resources/notice.card`,
`apps/calendar/host-service/resources/event.card`, `agenda.card`) and
publish it as the app ([OctoSense#267](https://github.com/OctoSense-org/OctoSense/pull/267)).
A store app's agent has no such tool yet: its app publishes from its own
script.
In the recorded baseline a store app published from its script. The
connected-services branch admits its own tool alias to `glance.publish`
with the `glance` grant and can resolve an admitted template; see the
[scoped update](#connected-sample-support--2026-10-06).
- The shell's demo publishes sample cards: `OCTOSENSE_GLANCE_DEMO=mail` two
Mail cards (fake data), any other value but `0` a News digest.

Expand Down
34 changes: 34 additions & 0 deletions docs/AI-SERVICES.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,40 @@ glance 屏幕上(Mail、Calendar)。Shell 一侧的说明见 OctoSense 的
[`docs/architecture.zh-CN.md`](https://github.com/OctoSense-org/OctoSense/blob/main/docs/architecture.zh-CN.md)
和 [ADR 0004](https://github.com/OctoSense-org/OctoSense/blob/main/docs/adr/0004-native-apps-hosting-and-peers.md)。

## 连接服务示例更新 — 2026-10-06

[连接应用示例](../examples/connected-apps/README.zh-CN.md) 面向 OctoSense
`feat/app-hub-connected-samples` 及 App Hub
`eaaffffd695caf7ebf6205c455377c1f8567b906`。这是范围明确的较新实现;**下方旧版
状态表不包含这些新增功能,旧主机也不会因为应用包准入通过就自动获得服务。**
配置及平台限制见[共享 OAuth/服务指南](https://github.com/OctoSense-org/OctoSense/blob/feat/app-hub-connected-samples/crates/oauth-service/README.zh-CN.md)。

- 普通应用保留自己的命名空间,例如 `inbox.message` 通过
`implemented_by: "host-service"` 和 `host_method: "gmail.message"` 映射到共享
服务。App Hub 只允许经过审查的方法,并检查目标能力、最低风险及私人数据
声明。主机按所属应用的当前账户执行,拒绝过期或其他账户参数。此改动没有
实现任意 `implemented_by: "app"` 脚本工具,也没有开放任意远程写入。
- 主机从摘要检查通过的应用包中读取 `AGENT.md` 和技能文本,作为绑定账户的
轮次指导;这不等于安装可执行的内核技能。应用代理调用真实工具,而一次
`model.complete` 调用不能冒充应用代理事件或持久会话。
- Gmail 收集器支持 `<应用命名空间>.new_message`,例如 `inbox.new_message`。
需要活动账户、Gmail/auth 能力、后台声明及代理同意。先建立后续增量基线,
再把新邮件 ID 交给应用代理。模型决定是否重要;只有成功轮次加持久化静默
决定或主机验证过的持久化 Glance 卡片才能确认处理完成。失败仍可重试。
- `glance.publish` 可从已安装应用包解析已接纳的 Splash `template` 与 JSON
`initial`。主机绑定连接并提供原交互界面,Inbox 代理负责相关性和摘要。
编辑、聊天及原生审核共用一份带版本的回复。工具映射、模型文字和自动化
点击都不能批准 Gmail 发送。

提供商同意创建的是绑定应用的 GitHub/Google 连接,不是 OctoSense 云账户。
账户授权与代理/模型同意分开控制;三个示例的私人读取工具默认不可分享。
不能据此推断跨应用预约、系统记忆提升、通用 cron 调度或旧主机支持。已经
执行本地原生测试和连接器测试,但真实 OAuth/模型/提供商结果、完整主机
Glance 流程及 OnePlus 6 尚未验证。Android Google 登录在原生适配器完成前不受支持。

以下历史章节保留原日期证据。旧文中“普通应用工具或指导尚不可用”的描述
只对应旧基线;此分支应以本节的限定更新为准,而不能将旧描述当作当前全局限制。

后面几节介绍正在其上构建的内容:在应用包中声明应用自己的 Agent、它提供的工具、系统工具箱、
发布到 glance 屏幕、`sys.digest` 卡片、AI 撰写的文字与卡片内对话,以及 News 的端到端流程。那里的每项功能都标为
**可用**(已合入所列仓库的 `main`,可按描述使用)或**即将推出**(在所列的未合并 PR 中,
Expand Down
Loading
Loading