Skip to content

feat(hosts): add a partial BitFun host adapter - #217

Open
neoLsH wants to merge 1 commit into
QoderAI:mainfrom
neoLsH:feat/bitfun-host-adapter
Open

neoLsH wants to merge 1 commit into
QoderAI:mainfrom
neoLsH:feat/bitfun-host-adapter

Conversation

@neoLsH

@neoLsH neoLsH commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds BitFun (OpenBitFun) as a partial, source-local host. The adapter covers two slices of #204: configured-asset inventory and workspace-matched session evidence, both emitted through the existing contracts and the existing portable HTML + Markdown report path. There is no install shell, plugin manifest, or lifecycle profile.

Why

Traceability and Scope

  • Spec/ADR: docs/specs/2026-11-23-bitfun-host-adapter.md
  • Acceptance criteria addressed: AC1-AC5
  • Canonical owners changed: scripts/agent-customize/providers/bitfun.mjs, scripts/session-analysis/platforms/bitfun.mjs, scripts/host-support/index.mjs, the agent-customize CLI and its help text, the adapter matrix (English + zh-Hans), and the platform reference notes
  • Explicit non-goals: install shell/discovery, plugin lifecycle, Asset Practices, Checkup, Harness report preparation, Evidence Bundle, any write to BitFun state, remote SSH workspaces, the SQLite stores, cron/miniapp data

BitFun stores three things in three places, and the adapter keeps them apart: the product home (~/.openbitfun or OPENBITFUN_HOME) for sessions, the platform user root for config/, agents/, and skills, and <workspace>/.openbitfun for project assets. Session discovery scans projects/<runtime-key>/sessions/*/metadata.json and trusts the workspace fields recorded there, because the runtime key is a host-owned hash; sessions with a non-localhost hostname are skipped, and item shapes the adapter does not recognize stay visible as metadata events.

Only session analysis, configured assets, and portable HTML rendering are claimed in the host descriptor, so lifecycle, checkup, and evidence-bundle targets keep rejecting bitfun with UNKNOWN_HOST, the same way Kimi Code, Grok, and DSH behave.

Change Type

  • Feature

Test and Review Evidence

Check Result
npx vitest run test/sessions/session-analysis-providers.test.mjs pass
npx vitest run test/agents/agent-customize.test.mjs pass
npx vitest run test/skills-docs test/governance 271 passed
npm test 1799 passed, 7 skipped, 2 unrelated failures (below)
npm run pack:verify pass (npm 752 entries, runtime zip 1013 entries)
node scripts/doc-link-graph/cli.mjs skills/better-harness 39 files, 56 links
git diff --check clean

The two failures in the full run are unrelated to this change: test/plugins/antigravity-plugin-artifact.test.mjs fails on local dependency drift (yaml 2.9.1 declared in package.json, 2.9.0 installed), and the DSH skill-watcher timing test fails under full-suite load but passes when run on its own.

Manual or visual evidence: none. I did not smoke-test a native BitFun install, so the adapter is verified against synthetic fixtures that follow the v1.0.12 layout only, and the matrix lists BitFun as a partial adapter with no install, lifecycle, or Quickstart claim. The tests pass explicit --bitfun-home and --bitfun-user-root overrides so a real OpenBitFun home is never read.

Refs #204

BitFun (OpenBitFun) keeps three storage families apart: sessions under
the product home, user configuration under the platform user root, and
project assets under .openbitfun. Issue QoderAI#204 asked for a first slice that
reads that evidence through the existing contracts instead of building a
parallel path.

Add a configured-asset provider over the user and project roots,
including app.json MCP servers and the shared .agents/skills root, and a
session analyzer over projects/<runtime-key>/sessions. The analyzer
trusts each session's metadata.json workspace fields because the runtime
key is a host-owned hash, skips non-local hosts, and keeps unknown item
shapes as metadata events instead of dropping them.

Both slices register through the shared host descriptor with only session
analysis, configured assets, and portable HTML rendering, so lifecycle,
checkup, and evidence-bundle targets keep rejecting bitfun with
UNKNOWN_HOST. Help snapshots and the frozen CLI hashes move with the new
--bitfun-home option.

Spec: docs/specs/2026-11-23-bitfun-host-adapter.md (issue QoderAI#204).
Test: npm test - 1799 passed, 7 skipped. Two unrelated failures remain:
the Antigravity artifact build trips over local dependency drift (yaml
2.9.1 declared, 2.9.0 installed) and the DSH skill-watcher timing test
passes when run alone. npm run pack:verify passed; the doc-link graph
resolves 39 files and 56 links.

Co-authored-by: Qoder <noreply@qoder.com>

This branch has not been deployed

No deployments
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