中文 | English
This file applies to src/crates/assembly/core. Use the top-level AGENTS.md for
repository-wide rules and the nearest narrower guide when one exists.
openbitfun-core is the shared product runtime facade. It still owns compatibility
paths and the product-full assembly boundary, but new decomposition work should
prefer the owner crates described in docs/architecture/product-architecture.md
and docs/architecture/agent-runtime-services-design.md.
Main areas:
src/agentic/: agents, prompts, tools, sessions, execution, persistencesrc/service/: config, filesystem, terminal, git, MCP, remote connect, AI memorysrc/infrastructure/: AI clients, app paths, event system, storage, debug log serversrc/product_runtime/: Core Agent Runtime compatibility adapters and runtime service provider wiring
Agent runtime mental model:
SessionManager -> Session -> DialogTurn -> ModelRound
- Keep shared core platform-agnostic. Avoid host-specific APIs such as
tauri::AppHandle; use shared abstractions such asopenbitfun_events::EventEmitter. - Desktop-only host adapters belong in
src/apps/desktop, then flow through typed capability interfaces; use the production transport adapter when event delivery is needed. - Do not add new cross-layer references from
servicetoagenticwithout a narrow port/interface boundary. - Do not move platform-specific logic, build-script behavior, product capability selection, or provider-specific AI serialization into shared core.
- When moving ownership out of core, preserve old import paths with facade or re-export code until downstream call sites are intentionally migrated.
- Treat
openbitfun-coreas a compatibility facade plus full product assembly point, not as the preferred home for new stable contracts. - Put stable DTOs, facts, ports, and pure decisions in the matching owner crate where a clear owner exists. Keep concrete managers, IO, platform adapters, and product execution in core until a reviewed port/adapter/service design and behavior equivalence tests exist.
- Tool changes must preserve expanded/collapsed exposure, prompt-visible
manifests,
GetToolSpec, permission behavior,ToolUseContextsemantics, and desktop/MCP/ACP catalog behavior. - Workspace file tools select IO through
ToolUseContext::file_system_for_path. Read/Write/Edit/Delete/LS must not add per-tool SSH branches. Shared algorithms belong intool-execution; concrete filesystem/stream handling belongs in Services providers. Session artifacts stay host-local. A missing remote provider must fail without falling back to the controller filesystem. - Snapshot preparation/completion may fail independently of the file tool. Never replay a mutation to repair tracking. A recorded operation is not proof of complete Session coverage; remote Session Undo retains its coverage gate.
- Runtime-owner migrations must keep concrete lifecycle, IO, event delivery, permission orchestration, and remote/platform implementations in core until the target owner has a reviewed port/adapter/service design plus behavior-equivalence tests.
- Product-domain changes may move pure product-domain plans with equivalence coverage, but filesystem writes, worker/host side effects, Git/AI concrete calls, marker IO, and path-manager integration stay in core unless a reviewed owner design says otherwise.
plugin_sourcemay inject product-owned paths and keep compatibility exports; concrete managed-package discovery and trust persistence stay inservices-integrations, while ecosystem parsing and PluginRuntimeClient behavior remain in their adapter and execution owners.plugin_runtime,external_sources, andinstruction_sourcesare the reviewed owner-feature composition files allowed to select ecosystem adapters for their respective capability contracts. Product surfaces consume product-level views and must not import adapter or raw plugin runtime client types.- The managed OpenCode Plugin Host is an adapter/service resource. Core may
assemble its launch, retain opaque logical instance and PTY scope bindings,
and bridge matched requests to existing product owners. OpenCode route
matching, wire DTOs, serialization/error mapping, and physical process-tree
supervision stay in
opencode-plugin-hostandservices-core; Core route projections must not invent provider connectivity, VCS, permission, or other owner state. - External-source Desktop, TUI, Peer, and Server surfaces share the versioned product-domain control DTO and closed generic actions. Capability-specific approvals and conflict choices remain typed owner operations; do not add a second surface-specific lifecycle model or arbitrary control payload.
native_hooksis the product wiring for the portable hook engine inopenbitfun_agent_runtime::native_hooks. It ownshooks.jsondiscovery, theapp.hooksgates, the process-wideRuntimeHookRegistry, and typed per-event dispatch helpers; dispatch sites call those helpers instead of executing hooks inline. Built-in, user, project, imported, skill, and plugin hooks register through aRuntimeHookRegistryand run throughAgentHookEnginewhile keeping distinct trust, configuration, contract, and execution-policy semantics. A remote workspace gets a separate registry that holds only the project hooks read from the target and runs them in the target workspace shell; user, imported, and skill command hooks never run there.external_hooksis the read-only catalog of other AI applications' hooks and must not enter the executable registry: inspecting it must not load code, and an entry becomes executable only as the reviewed snapshot written by the explicitexternal_hook_importplan/apply, never by reading the source live. Contract reference and deviations:docs/features/agent-hooks.md.- Remote/service changes must keep external protocol lifecycle, workspace projection, scheduler/session restore, terminal pre-warm, and product execution boundaries explicit.
- Feature work must keep
product-fullas the compatibility product assembly boundary unless a separate product matrix review changes default capability selection. agent-runtimeowns the Core Agent lifecycle baseline, native Hook runtime, basic filesystem/process tools, and Agent-control tools, including scheduled job execution. Concrete network and product capabilities stay explicitly selectable:model-catalog,mcp-runtime,remote-connect,workspace-search,browser-control,web-tools,deep-research, andscript-tool-runtime.model-catalogcomposes runtime services for catalog update events;mcp-runtimelayers the Core MCP tool bridge on the Agent lifecycle; andremote-connectlayers its phone relay on the Agent lifecycle and model catalog. None of these relationships may be hidden in theagent-runtimebaseline.scheduled-jobs,document-read, andsubscription-authare additive dependency/source modifiers, not standalone runtime profiles. The latter two use Cargo weak dependency forwarding so they refine an already selected tool or adapter owner without activating that owner by themselves. Product-owned managed worktree lifecycle is available only when the Agent lifecycle and Git service owners are both selected; it is not a tool-pack owner. Function Agent adapters use the independentfunction-agentsowner; MiniApp domain/runtime/market dependencies belong only totools-miniapp. Tool implementation groups use the matchingtools-*owner feature.tools-image-analysisowns only image inspection;tools-image-generationseparately selects the generation tool and its AI adapter client.tools-office-documentsownsGenOfficeFileand its portable OOXML engine (openbitfun-office-documents); the tool moves bytes only through the session's workspace file system, so remote workspaces need no extra owner. Product Assembly supplies the exactProductToolPlan; Core materialization validates that requested owners were compiled and must not infer product capability from Cargo's feature union. The Agent Runtime baseline plan is exactlyBasicplusAgentControl, not a hidden delivery profile.external-sourcesadds third-party discovery/import adapters,plugin-runtimeadds executable plugin-client wiring,opencode-plugin-hostcomposes the managed Host and its reviewed route owners. None may enableproduct-full.- CLI/ACP closure checks keep Cargo resolver-v2 normal and host
(build/proc-macro) feature contexts separate, while treating all
target-specific declarations within each context as one reviewed architecture
boundary. Split a package/module owner when platforms genuinely differ; do
not hide an unreviewed Core capability behind mutually exclusive Cargo
cfgbranches. - Keep the light compatibility features independently compilable. Local service
profiles are
dispatch-store,terminal,workspace-runtime, andworkspace-watch;remote-workspaceadds only the remote workspace facade, whilessh-remoteadds concrete SSH transport. Integration facadesfile-watch,git, andreview-platformremain independent, withservice-integrationsonly their compatibility aggregate. None of these narrow features may enableproduct-fulldirectly or transitively. product-fullmust explicitly compose every capability it consumes, including product-onlyservices-corefeatures such aspermission,session-git, andruntime-ownership, every concrete service owner, and everytools-*group. Do not put those features on the dependency declaration, because Cargo feature union would force them into every core consumer.- Core's default feature set is empty.
product-fullis an explicit compatibility assembly selected by real product entrypoints, never the library's implicit default. Capability-local utility dependencies remain optional and are activated by their owner features; in particular,base64,futures,regex,tokio-util, andopenbitfun-agent-toolsbelong to the Agent Runtime, local-storage, or dispatch-store closures that use them. Core's direct feature-free Tokio edge keeps only filesystem and synchronization support required by config and app-path state; the selected Services Corejson-ioowner separately carries the runtime/time capabilities required for bounded atomic JSON writes. - Backend Fluent bundles and mutable translation state are owned by
i18n-runtime; locale ids, aliases, fallback facts, metadata, and model-facing language copy remain feature-free contracts. Hosts that callI18nServicemust selecti18n-runtimeexplicitly. - Reusable diagnostic redaction and local Diff implementations remain
compatibility facades under the exact
diagnosticsanddifffeatures. Agent Runtime selectsopenbitfun-services-core/workspace-text-runtimefor bounded asynchronous workspace reads; synchronous path normalization stays available to contract-only consumers without Tokio. - Platform transport emitters are host adapters. Desktop imports
openbitfun_transport::TransportEmitterdirectly; Core exposes only the stableopenbitfun_events::EventEmittercontract and must not re-export a host adapter. - Keep
cargo check -p openbitfun-core --no-default-featuresviable. Gate product-only modules at their owner feature; if a light facade operation cannot safely complete without a product owner, fail closed and preserve any durable recovery state instead of enablingproduct-fullimplicitly.
Use these files for ownership details instead of expanding this guide:
docs/architecture/product-architecture.mddocs/architecture/agent-runtime-services-design.mdsrc/crates/execution/agent-runtime/AGENTS.mdsrc/crates/execution/tool-contracts/AGENTS.mdsrc/crates/execution/agent-workflows/AGENTS.mdsrc/crates/contracts/product-domains/AGENTS.mdsrc/crates/contracts/runtime-ports/andsrc/crates/execution/runtime-services/source docssrc/crates/services/services-core/AGENTS.mdsrc/crates/services/services-integrations/AGENTS.mdsrc/crates/execution/tool-provider-groups/AGENTS.md
Narrower local guides already exist for some subtrees:
src/crates/adapters/ai-adapters/AGENTS.mdsrc/crates/assembly/core/src/agentic/execution/AGENTS.mdsrc/crates/assembly/core/src/agentic/deep_review/AGENTS.md
For desktop card admission, per-turn Peer origin, recovery context and subagent propagation:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib -- desktop_cardThese tests use a stub card host and simulated remote contexts; they do not exercise native card windows or live Peer/mobile/SSH connections. The Desktop guide owns the HostInvoke compatibility and native host checks.
For Creative frontend customization origin admission and fresh approval policy:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-creation --lib frontend_workbenchThese tests simulate Peer/mobile and remote-workspace origins; they do not exercise native recovery controls or live remote connections.
For opt-in category/system-prompt previews and session-storage isolation:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib -- system_prompt_preview usage_context_previewThis fixture verifies default report privacy and resolved host storage with a simulated SSH workspace identity; it does not exercise live remote connections.
For Agent name references, enabled-catalog admission, and prompt catalog names:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib agentic::tools::implementations::task::testsThese fixtures cover prompt name mappings and simulated workspace policies; they do not establish live SSH, relay, Peer, or Detached Dispatch behavior.
For ordinary subagent shared concurrency, permit release, and cancelled/timed-out waits:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib subagent_concurrency_For smart routing, unchanged subagent model policy and resumed subagent choices:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib subagent_model
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib round_model_routing
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib coordinator::tests::reused_subagentThese fixtures cover host-owned configuration, nested delegation and Router protocol behavior with mocks. They do not establish connectivity to a deployed Router or a live SSH, relay, Peer or detached-dispatch host.
Smart routing applies only to main sessions. Subagents use their independent model or pool configuration. Restoring an older smart child retains its saved target and legacy strategy fields without enabling routing; an explicit model replacement atomically returns that child to manual selection.
For tool catalog feature gates, loaded-spec collection, and native/PTC presentation, check both the native baseline and the optional PTC owner:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib agentic::tools::product_runtime::
cargo test --locked -p openbitfun-core --no-default-features --features ptc-runtime --lib agentic::tools::product_runtime::For config-backed product-control option defaults, typed binding, and persisted readback:
cargo test -p openbitfun-core --no-default-features --features agent-runtime,git --lib every_catalog_config_optionAI client construction and subscription credential compatibility:
cargo test -p openbitfun-core --no-default-features --features ai-adapter-runtime,subscription-auth --lib infrastructure::ai::client_factory::testsFor image-service selection and compatibility with saved subscription configurations:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-image-generation,subscription-auth --lib agentic::image_generation::tests
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-image-generation --lib agentic::tools::implementations::generate_image_tool::tests
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-image-generation --lib agentic::tools::product_runtime::materialization::tests::image_tools_follow_independent_compiled_owners
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-image-analysis --lib agentic::tools::product_runtime::materialization::tests::image_tools_follow_independent_compiled_ownersFor Office file generation (GenOfficeFile); the engine itself is covered by
cargo test -p openbitfun-office-documents:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-office-documents --lib agentic::tools::implementations::gen_office_file_tool::testsThese fixtures do not call a provider or exercise live remote hosts. Image wire protocol and opt-in live probes belong to the AI adapters guide.
This guide owns Core verification. Select one command pattern that matches the change; do not run every feature variant:
cargo check -p openbitfun-core --no-default-features
cargo check -p openbitfun-core --no-default-features --features <touched-owner-feature>
cargo test -p openbitfun-core --no-default-features --features <minimal-features> --lib <module>::<test>Use the first command when the feature-free facade changed, the second when one
feature boundary changed, and the third for behavior. Run
pnpm run check:core-boundaries only for Cargo features, dependency direction,
or test-target layout. Workspace checks and product-wide tests are CI-backed and
are not the default Core precheck. For documentation-only changes, run
git diff --check.
For assistant discovery, opened-state persistence, and reopening by workspace ID:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib service::workspace::service::tests::assistant_.
For local/SSH workspace identity collisions, SSH connection rebinding, committed session storage, legacy path compatibility, and queue admission, use the matching owner filter:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,remote-workspace --lib service::workspace::
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,remote-workspace --lib agentic::session::
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,remote-workspace --lib agentic::coordination::The coordination filter includes the scheduler admission tests. These catalog and
storage fixtures do not require or validate a live SSH connection. CI also runs
them under product-full. PathManager::with_user_root_for_tests derives product
home from the user root's parent, so a fixture that relocates managed paths must
place its user root below the directory it means to exercise.
For durable per-turn token usage, client checkpoint reconciliation, and recovery:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib turn_usage.
The fixtures cover host-ledger isolation and client-free completion, not live SSH,
Relay, Peer Device, or Detached Dispatch connections.
For model-round order when completion fills sparse client checkpoints:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib generation_round_orderThese fixtures cover suffix/scattered checkpoints, legacy record round trips, idempotent merge, prior interrupted generations, additive metadata, and headless completion/reload. They do not establish live SSH, Relay, Peer Device, or Detached Dispatch behavior.
For cold dialog startup and the production-feature scheduler stack regression:
cargo test --locked -p openbitfun-core --features product-full --lib agentic::coordination::scheduler::tests::idle_background_result_uses_the_session_logical_agent_route -- --exactRun this filter alone with RUST_MIN_STACK unset so prior skill discovery cannot
warm the cold-start path. The shared coordinator keeps startup state behind one
allocation boundary for every admission surface.
For direct user follow-ups to reusable subagent sessions, legacy route defaults, source binding, and FreshOnly admission:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib subagent_conversation_These fixtures cover local turn admission and SSH-workspace agent resolution; they do not exercise live SSH, relay, peer, or dispatch connections.
For child-Agent lifecycle operations, mode-switch continuation, current-turn listing (including reserved IDs), parent-scoped resolution, and persisted deletion/cancellation lineage (ordinary subagents and Swarm):
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib -- agent_lifecycle_ agentic::coordination::coordination_store::tests agentic::tools::implementations::agent_list_tool::testsThese fixtures cover local execution and persistence, not live remote transports.
For disk-backed history paging and legacy sessions without a catalog:
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect,git --lib history_page_.
Also run the staged_revert_catalog_projection and load_relay_session_turns_
filters for the same target when changing visibility. Paging must not parse
unrelated turn bodies or rewrite history. To compare real-file first-page work
against full materialization locally, use the same target with
history_page_benchmark -- --ignored --nocapture; it checks content equivalence
and reports timings without asserting a machine-dependent latency in CI.
For opening a staged-revert Session at its last complete visible Turn, run
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib restore_session_view_tail_with_staged_revert.
This exercises local workspace resolution and the host-storage entry used by
Peer callers, sparse legacy histories, complete payloads and untouched hidden
files; it does not establish live remote behavior. The same target with
staged_revert_tail_benchmark -- --ignored --nocapture compares real-file full
materialization with the bounded visible-tail read without a CI timing assertion.
For workspace metadata catalog paging, cache reuse and cross-process invalidation:
cargo test --locked -p openbitfun-core --no-default-features --features external-sources,git,product-search --lib -- catalog_snapshot_ catalog_query_pages_.
For host-stream history reads and abandoned execution after a runtime restart:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib load_relay_session_turns_.
The observer must preserve terminal history and another process's writer lease;
absence from one coordinator's memory alone never proves execution stopped.
For built-in provider overlay, trusted endpoint validation, and reasoning catalog changes:
cargo test -p openbitfun-core --no-default-features --features ai-adapter-runtime --lib infrastructure::ai::For model-pool image admission, compatibility filtering, and image projection:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib -- model_pool::tests image_input input_model_testsThese fixtures exercise both pool strategies, inherited bindings, read-only previews, Agent tool restrictions, and native/tool-assisted image paths. They do not contact providers or exercise live SSH, relay, peer, or dispatch connections.
For built-in MiniApp image-tool parity and five-image native/tool-assisted input, include the concrete image-tool owner in the same focused fixture:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-image-analysis --lib -- image_input input_model_testsFor model selector latency, run the catalog and session owner fixtures:
cargo test --locked -p openbitfun-core --no-default-features --features model-catalog --lib infrastructure::ai::reasoning_catalog::tests
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib session_model_update
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib session_model_read
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib -- session_permission_read session_permission_mode active_turn_permission_mode
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect,git --lib remote_attach_and_mutation_paths_preserve_workspace_ownership_factsCatalog snapshots remain usable during background refresh. Selector reads use live session facts or a persisted header, without reading Turns/context, acquiring the running Turn's mutation permit, or marking a cold runtime as loaded. Desktop and CLI Peer adapters preserve storage scope and internal-session visibility. Permission reads preserve the optional session override; only the live runtime can supply an active Turn and its temporary override. Selector mutations must not restore cold transcripts or reserve active-session capacity; preserve writer ownership, unknown persisted fields, legacy metadata-only sessions, and both state/metadata projections on failure. These fixtures cover local storage and remote routing contracts, not live SSH/relay/peer/dispatch connections.
Remote session host rollback port wiring:
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect --lib remote_session_host_registers_targeted_rollback_port.
For mobile/bot model-selection eligibility, legacy child records, and unknown
session failures:
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect,git --lib remote_model_strategy.
These owner fixtures preserve the unsupported child-editing boundary; they do not
exercise a live relay or bot connection.
Configuration persistence, account settings import, backup restore, legacy field/deletion compatibility, local-change notifications, and save/reload/model concurrency regressions have feature-free fixtures:
cargo test -p openbitfun-core --no-default-features --lib service::config::The account sync adapter requires remote-connect, which also covers
Agent-profile canonicalization in the focused configuration suite:
cargo test -p openbitfun-core --no-default-features --features remote-connect --lib service::config::
cargo test -p openbitfun-core --no-default-features --features remote-connect --lib service::remote_connect::settings_sync::tests
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect --lib service::remote_connect::permission_publication::tests
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect --lib service_agent_runtime::tests::local_workspace_marker_is_not_remote_routing_authority
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect --lib service_agent_runtime::tests::remote_workspace_catalog_tracks_opened_rows_and_assistant_identityFor explicit mobile file preview/download outside the selected workspace:
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect,git --lib service_agent_runtime::tests::controller_file_reads_support_absolute_and_relative_paths_outside_workspace.
Provider isolation and automatic delivery confinement are covered by
cargo test --locked -p openbitfun-services-integrations --no-default-features --features remote-connect --lib remote_connect::file_projection::tests.
These fixtures cover local IO and a simulated remote filesystem, not live SSH,
relay, Peer Device, or Detached Dispatch connections.
Focused workspace-IO and snapshot regression entry points (use the matching filter rather than a product-wide build):
cargo test -p openbitfun-core --no-default-features --features agent-runtime,git,document-read --lib file_read_tool::tests
cargo test -p openbitfun-core --no-default-features --features agent-runtime,git --lib file_write_tool::tests
cargo test -p openbitfun-core --no-default-features --features agent-runtime,git --lib file_edit_tool::tests
cargo test -p openbitfun-core --no-default-features --features agent-runtime,git --lib classified_edit
cargo test -p openbitfun-core --no-default-features --features agent-runtime,git --lib delete_file_tool::tests
cargo test -p openbitfun-core --no-default-features --features agent-runtime,remote-workspace,git --lib service::snapshot::MCP chat discovery and deferred-tool manifest contracts (Git is needed by the existing Agent tool test assembly):
cargo test --locked -p openbitfun-core --no-default-features --features mcp-runtime,git --lib agentic::tools::product_runtime::For MCP ProductControl discovery, prompt budget, shared GUI/Agent persistence, runtime failures, and headless/remote-path refusal:
cargo test --locked -p openbitfun-core --no-default-features --features mcp-runtime,git --lib mcp_control_
cargo test --locked -p openbitfun-core --no-default-features --features mcp-runtime,git --lib agentic::tools::implementations::openbitfun_control_tool::testsThese fixtures use temporary storage and local lifecycle state; they do not exercise live SSH, relay, Peer, or Detached Dispatch connections.
User Agent directory watching and registry regressions (omit file-watch to
exercise query-time discovery fallback):
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,file-watch --lib agentic::agents::registry::For visual-skin Skill authoring helpers and canonical example packaging (Node, prepared Web UI dependencies; no Rust build required):
node --test src/crates/assembly/core/builtin_skills/openbitfun-skin-designer/scripts/visual-skin.test.mjsThese exercise the real frontend parser and authoring CLI, not native rendering or remote-host behavior.
Skill discovery, installation provenance, and local/remote registry regressions:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,file-watch --lib agentic::tools::implementations::skills::SessionControl workspace selection, remote routing, and session-targeted actions:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib session_control_tool::tests
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib list_workspacesFor MiniAppBrowser action routing, element-position capability negotiation, and opened-app guidance:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-browser-web,tools-miniapp --lib miniapp_browserThis covers platform-neutral tool dispatch and legacy-host refusals, not native WebView input or live remote scenarios. The Web UI MiniApp agent fixtures cover actual app source and frame input.
MiniApp Agent appdata workspace registration and pre-ID session compatibility:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-miniapp --lib miniapp::agent_workspace::testsWorkspace history upgrade compatibility and MiniApp record preservation:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib legacy_miniapp_historySkill hook activation, session cleanup, and tool preflight/permission ordering:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib native_hooks
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib agentic::tools::pipeline::tool_pipeline::testsFor configured OpenCode discovery and explicit skill loading, include their owner feature and tool tests:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,external-sources --lib agentic::tools::implementations::skillFor native/Codex user-instruction selection, source catalog consistency, and local versus remote instruction composition:
cargo test --locked -p openbitfun-core --no-default-features --features external-sources,git --lib instruction_For external session indexing, immutable source views, viewed-version forks, legacy materialization, workspace ownership and cancellation (including the full-text search build):
cargo test -p openbitfun-core --no-default-features --features external-sources,git,product-search --lib external_session_import::
cargo test -p openbitfun-core --no-default-features --features external-sources,git,product-search --lib agentic::persistence::manager::tests
cargo test -p openbitfun-core --no-default-features --features external-sources,git,product-search --lib session_fork_
cargo test -p openbitfun-core --no-default-features --features external-sources,git,product-search --lib agentic::persistence::session_branch::tests
cargo test -p openbitfun-core --no-default-features --features external-sources,git,product-search --lib agentic::session::session_manager::tests::restore_session_For installed-source acceptance, set OPENBITFUN_TEST_SESSION_ECOSYSTEM and
OPENBITFUN_TEST_SESSION_ID to a real source session, then run the same target
with filter inspect_installed_external_session_follow_and_fork -- --ignored --nocapture.
The source is read-only; native records are written only to a temporary user root.
Set TEMP / TMP to the validation drive when testing a large local history.
Optional read-only Zcode-to-temporary-native-store verification uses the same
target with inspect_installed_zcode_native_import -- --ignored --nocapture.
It reads the installed source and writes only inside a temporary test directory.
For immutable external-history cache/window reads, byte-budget eviction, v1
snapshot compatibility and viewed-version isolation, use the same target with
history_cache_. The fixtures count real-file snapshot reads, derived catalog
builds and copied turns; they do not measure native WebView or remote latency.
The same target also supports inspect_installed_codex_history_repair -- --ignored --nocapture.
Set OPENBITFUN_TEST_NATIVE_SESSIONS_ROOT and OPENBITFUN_TEST_NATIVE_SESSION_ID
to an existing answerless Codex import. It reads the installed native copy and
Codex source, exercises the repair in a temporary copy, and verifies the original
native history is unchanged.
External-subagent model inheritance uses the same owner feature:
cargo test -p openbitfun-core --no-default-features --features agent-runtime,git,external-sources --lib external_subagents::tests::omitted_external_modelDetached Dispatch model sync must use the protected config export and negotiate explicit-account binding/pool runtime capabilities before remote writes. Do not copy OAuth credentials or downgrade an unsupported binding to a generic model readiness failure. API-key and legacy-default sync retain their existing path.
Detached Dispatch controller, target query compatibility, and managed-baseline checks:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,dispatch-store,ssh-remote,git --lib service::dispatch::IM bot reply routing, account-device observation, and interaction delivery:
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect --lib service::remote_connect::bot::
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect --lib service::remote_connect::bot::weixin::testsPages account management and tool gates (including remote directory rejection):
cargo test -p openbitfun-core --no-default-features --features remote-connect,tools-pages,git,ssh-remote --lib page_tools-pages selects only the Pages tool group. Account host wiring additionally
requires remote-connect; CLI and Desktop select both explicitly. Pages does
not select MiniApp runtime or market dependencies.
PageManage is the default Pages Agent tool. PagePublish and PageDeploy
remain registered only for legacy explicit tool selections and existing calls;
do not add them back to mode defaults. List/version reads have no mutation
permission intent; writes retain fresh, account-scoped Ask-mode approval.
The focused fixtures cover loopback Relay requests, old Relay payloads, account
switches, and simulated remote workspace rejection, not live remote connections.
Scheduled-job workspace identity and the temporary 1.0.0 target upgrade boundary:
cargo test -p openbitfun-core --no-default-features --features agent-runtime,scheduled-jobs,git --lib service::cron::service::tests
cargo test -p openbitfun-core --no-default-features --features agent-runtime,scheduled-jobs,git --lib cron_100_target_upgrades_onceFor workspace-ID fork ownership and pre-ID session-directory upgrade coverage:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib session_fork_For remote search ID binding without a live SSH connection:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,ssh-remote --lib service::search::remote::identity_testsFor host-owned user queue admission, cancellation, steering receipts and client disconnects:
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect,git --lib host_queue_For Computer Use control host admission, cancellation leases, control entrypoints, permission projection and provider-neutral tool contracts:
cargo test -p openbitfun-core --no-default-features --features agent-runtime,git,tools-computer-use --lib computer_use_tool::testsThese mock-host tests do not validate native capture, background input or remote GUI behavior; native fixtures remain owned by the shared Computer Use service guide.
For plain-prompt goal activation and remote goal storage routing:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,remote-workspace --lib thread_goal_Assistant naming, concurrent host allocation, and user-title protection:
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib service::workspace::service::tests::assistant_
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib title_For HTML preview workspace identity and shared resource-service wiring:
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect --lib service::filesystem::html_preview::testsFor host-owned workspace icon persistence, legacy metadata round trips, worktree inheritance, concurrent-controller revisions and failed-write preservation:
cargo test -p openbitfun-core --no-default-features --features workspace-icons --lib service::workspace::service::iconsThese are local fixtures, including an offline SSH workspace record; they do not establish
live SSH, Relay or Detached Dispatch behavior. workspace-icons selects only workspace
catalog and image service owners; headless task execution need not select it.
For Remote Connect bot restore eligibility and listener shutdown/status:
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect --lib -- service::remote_connect::control:: listener_lifecycle_testsThe lifecycle fixtures cover account/config replacement, explicit disablement, and task release; real provider message delivery requires a signed-in host.