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
1 change: 0 additions & 1 deletion Cargo.lock

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

64 changes: 3 additions & 61 deletions docs/architecture/detached-task-dispatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@ the target's validated submit acknowledgement. Preparation, retry, and recovery
for the same job are serialized by one per-job run lock, so an expired-entry
recovery cannot race a live attempt.

For automatic SSH CLI setup, audit progress is a fallible durable write rather
than an in-memory callback. The `cli-install-started` transition is persisted
before the first remote installer mutation, subsequent success or failure is
persisted before setup returns, and any audit write failure stops submission.
Keeping the journal until acknowledgement lets a retry recover setup actions
that completed remotely even if the controller exited before submit finished.

Before creating the baseline claim, preparation records the stable project
workspace path that owns the worktree registry rather than relying on a linked
worktree path that may disappear. An expired preparation lease is necessary but
Expand Down Expand Up @@ -193,9 +186,7 @@ durable store; `DISPATCH_PROTOCOL_VERSION` in
source, and the Web UI pins its copy against that file. Version 4 introduced
Git worktree delivery and is intentionally incompatible with targets that do
not implement it; version 5 adds the target-owned reasoning catalog and
per-turn preset selection (`reasoning_presets`). SSH submission can repair that mismatch
through signed release installation; an account device must be upgraded as a
OpenBitFun device.
per-turn preset selection (`reasoning_presets`). Each target must have a compatible runner before accepting a job.

Public job verbs are:

Expand Down Expand Up @@ -260,53 +251,7 @@ original binding and policy revision for a capable target to restore, while an
older reader cannot turn the new account fields into its default OAuth login.


`probe` is read-only and never installs software. Immediately before SSH
provisioning, submission probes again and automatically installs or upgrades a
compatible latest prebuilt `openbitfun` release when needed. Release resolution
stays bound to the expected OS and architecture. GitHub is the default byte
source; when its measured transfer rate is below 512 KiB/s, OpenBitFun is tried
first and GitHub remains the fallback. The same policy applies whether the SSH
target downloads directly or the controller has to push the archive. The
controller verifies the
checksum sidecar, its publisher signature when present, and the mandatory
archive signature, pins the SHA-256 passed to the installer, waits with a
bounded deadline, and probes the installed binary again before continuing.

The signed prebuilt release is the only install path. The controller never
compiles OpenBitFun on a target, and exposes no command to do so: when no published
binary can run there — an unsupported platform, a libc floor, a missing `tar`,
an unreachable release, or a release that predates a required capability — the
probe reports why and the target cannot be selected.

### One-click SSH target bootstrap

The Desktop readiness dialog may run the same signed installer before submit.
After the post-install protocol probe succeeds, it optionally turns the SSH
host into an account device:

1. The target CLI returns its stable, non-secret machine identity through a
hidden capability-gated daemon command.
2. If the controller has a finalized account login, its full device token calls
the Relay's authenticated device-provisioning endpoint. The Relay creates a
distinct target device and a full device token; a delegated control token
cannot call this endpoint. If the controller is signed out, this entire
account/daemon phase is skipped.
3. The controller stages the target token, account master key, relay URL, and
target device id in a fresh owner-only file over SFTP. Secrets never enter a
shell argument or the renderer. The target verifies file ownership/mode and
its device id, consumes the file, and encrypts the session with its own
machine-bound key.
4. The target installs and starts the existing CLI daemon through its user
service manager (systemd user service with linger on Linux, LaunchAgent on
macOS). The controller does not report success until the new device is
visible online through the Relay.

Any failure after credential issuance removes the target service/session and
deletes the Relay device best-effort. Stale rollback commands are bound to the
expected user and device id, so they cannot log out a session that appeared on
the target later. A signed-out controller installs only the CLI: detached SSH
job workers already persist independently and an idle account daemon would
provide no routing capability.
The manual target picker lists local execution and saved SSH hosts. Both the picker and submission probe the existing CLI. Install or upgrade the CLI on the target before dispatching. Agent tools can also submit to a same-account device.

Account-device transport wraps target verbs in names reserved for detached
dispatch, such as `dispatch_target_submit`. They are handled before the
Expand Down Expand Up @@ -428,10 +373,7 @@ supervision alone is not evidence of that capability.
- A missing or offline target fails submit; the Relay does not queue jobs.
- A target missing a required behavioral capability fails preflight before a
durable job is created, even when its CLI package version matches.
- A signed prebuilt SSH release may be installed automatically. Missing
platform support, failed signature or digest verification, installer timeout,
or an incompatible post-install probe fails closed before workspace
provisioning.
- A missing or incompatible target CLI fails the probe before workspace provisioning.
- A lost submit response leaves `submission_unknown`; status or an idempotent
retry reconciles the target's durable truth.
- A live PID that no longer matches the exact worker command is never signaled
Expand Down
16 changes: 8 additions & 8 deletions docs/interactive-capabilities/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- generated by scripts/generate-interactive-capabilities.mjs; do not edit -->
# OpenBitFun 功能与设置目录 / OpenBitFun Features & Settings

OpenBitFun Playbook 当前包含 **24 个功能**和 **23 个设置页**,共 **47 个**用户可理解的条目、**369 项**有源码证据的子能力。每个条目有独立 Markdown,并直接服务于说明书网站、OpenBitFun 全局搜索和 `OpenBitFunControl` 智能体工具。
OpenBitFun Playbook 当前包含 **24 个功能**和 **23 个设置页**,共 **47 个**用户可理解的条目、**368 项**有源码证据的子能力。每个条目有独立 Markdown,并直接服务于说明书网站、OpenBitFun 全局搜索和 `OpenBitFunControl` 智能体工具。

OpenBitFun Playbook currently contains **24 features**, **23 settings pages**, and **369** source-backed sub-capabilities across **47** user-facing entries. Every entry has its own Markdown page and directly powers the website, in-app global search, and the `OpenBitFunControl` agent tool.
OpenBitFun Playbook currently contains **24 features**, **23 settings pages**, and **368** source-backed sub-capabilities across **47** user-facing entries. Every entry has its own Markdown page and directly powers the website, in-app global search, and the `OpenBitFunControl` agent tool.

## 唯一事实源 / Single source of truth

Expand All @@ -27,20 +27,20 @@ OpenBitFun Playbook currently contains **24 features**, **23 settings pages**, a
- Generated per-item interaction audit: `docs/interactive-capabilities/technical/product-control-open-audit.json`
- Generated low-level audit map: `docs/interactive-capabilities/technical/tauri-command-map.json`

说明书、网站、搜索和智能体只看“功能 + 设置 + 子能力”。每项子能力都必须引用已注册 Tauri Command 或可解析的源码标记;这些证据不会进入公开目录。当前 **705** 个 Tauri 命令只用于实现覆盖审计。产品 UI 交互源码会在生成和检查时扫描并校验,但不会保存成随普通 UI 改动频繁变化的版本化快照。
说明书、网站、搜索和智能体只看“功能 + 设置 + 子能力”。每项子能力都必须引用已注册 Tauri Command 或可解析的源码标记;这些证据不会进入公开目录。当前 **701** 个 Tauri 命令只用于实现覆盖审计。产品 UI 交互源码会在生成和检查时扫描并校验,但不会保存成随普通 UI 改动频繁变化的版本化快照。

Docs, website, search, and agents see only features, settings, and documented sub-capabilities. Every sub-capability must reference a registered Tauri command or a resolvable source marker; evidence is stripped from public projections. The **705** Tauri commands remain implementation-audit evidence only. Product UI interaction sources are scanned and validated during generation and checks, but are not stored as a versioned snapshot that churns with ordinary UI changes.
Docs, website, search, and agents see only features, settings, and documented sub-capabilities. Every sub-capability must reference a registered Tauri command or a resolvable source marker; evidence is stripped from public projections. The **701** Tauri commands remain implementation-audit evidence only. Product UI interaction sources are scanned and validated during generation and checks, but are not stored as a versioned snapshot that churns with ordinary UI changes.

## 控制边界 / Control boundary

- 每个子能力都明确标记为直接控制、委托给专用智能体工具、需交互打开或不支持;“打开页面”不会再被统计成“智能体已控制”。当前覆盖:直接 **64**、委托 **74**、需交互 **231**、不支持 **0**。
- 每个子能力都明确标记为直接控制、委托给专用智能体工具、需交互打开或不支持;“打开页面”不会再被统计成“智能体已控制”。当前覆盖:直接 **64**、委托 **74**、需交互 **230**、不支持 **0**。
- 稳定行为声明为带 JSON 输入契约的 `operations` 或 `options`,并绑定原生产品控制 Provider;智能体不接触原始 Tauri Command。
- `OpenBitFunControl list` 和 `search` 都返回带 `nextCursor` 的精简分页结果;目录可持续增长,不靠固定总量上限。完整目录和 369 项子能力都不会写入 system prompt。
- `OpenBitFunControl list` 和 `search` 都返回带 `nextCursor` 的精简分页结果;目录可持续增长,不靠固定总量上限。完整目录和 368 项子能力都不会写入 system prompt。
- 目录发现与契约读取不依赖 React 或可见窗口。普通配置型 option 统一由 Product Assembly 的共享 ConfigService 执行器读、写并回读,因此 Desktop、CLI 与 Headless 表面走同一份实现;只有宿主原生 operation/provider option 和界面导航按表面注册适配器,缺失时必须明确返回不可用,禁止静默回退本机。只读智能体只能发现和读取目录。

- Every documented item is classified as direct control, delegated Agent control, interactive opening, or unsupported; opening a page is never counted as direct control. Current coverage is **64 direct**, **74 delegated**, **231 interactive**, and **0 unsupported**.
- Every documented item is classified as direct control, delegated Agent control, interactive opening, or unsupported; opening a page is never counted as direct control. Current coverage is **64 direct**, **74 delegated**, **230 interactive**, and **0 unsupported**.
- Stable behavior becomes a typed `operation` or `option` with a JSON input contract and a native product-control provider. Agents never receive raw Tauri commands.
- `OpenBitFunControl list` and `search` return compact pages with a `nextCursor`; the catalog can grow without a fixed total-size ceiling. Neither the full catalog nor its 369 documented items enters the system prompt.
- `OpenBitFunControl list` and `search` return compact pages with a `nextCursor`; the catalog can grow without a fixed total-size ceiling. Neither the full catalog nor its 368 documented items enters the system prompt.
- Discovery and contract lookup do not depend on React or a visible window. Ordinary config-backed options are read, written, and read back by one Product Assembly ConfigService executor shared by Desktop, CLI, and headless surfaces. Only host-native operations/provider options and presentation routes install surface adapters; missing adapters return explicit unavailability without local fallback. Read-only agents may only discover and inspect entries.

## 防腐化门禁 / Anti-drift gates
Expand Down
Loading
Loading