fa_hub_client
DAP/1 hub 客户端 for flutter_agent_harness:通过签名 WebSocket 的 MessagingRepository,FahPlugin 通过 Agent.externalSteeringSource 进行消息传递。
DAP/1 hub 客户端 for flutter_agent_harness:通过签名 WebSocket 的 MessagingRepository,FahPlugin 通过 Agent.externalSteeringSource 进行消息传递。
以下为英文项目原文快照,最新内容请访问 GitHub。
DAP/1 hub client for flutter_agent_harness:
a MessagingRepository over a signed WebSocket, delivered into the agent loop
via Agent.externalSteeringSource.
dart pub add fa_hub_client
or in pubspec.yaml:
dependencies:
fa_hub_client: ^0.2.0
import 'package:fa_hub_client/fa_hub_client.dart';
final plugin = HubPlugin();
plugin.register(context); // reads context.config['hub']
await plugin.start(); // loads identity, connects, starts inbox delivery
agent.externalSteeringSource = plugin.externalSteeringSource;
// later
await plugin.inviteTo('peer-name'); // dap_invite
await plugin.connectTo('hub.example.com'); // dap_connect
await plugin.status(); // dap_status snapshot
await plugin.peers(); // dap_peers list
Zero-config by default; resolution order is environment > ~/.dap/config.json
built-in defaults (
ws://127.0.0.1:8787/ws, identity~/.dap/keys/fah/<name>.key, channels~/.dap/channels.json).
| Env var | Purpose |
|---|---|
DAP_HUB_URL |
Hub WebSocket URL |
DAP_AGENT_NAME |
Display name / identity |
DAP_KEY_PATH |
Signing key file |
DAP_CHANNELS_FILE |
Channel store location |
DAP_CONFIG_FILE |
Config file location (default ~/.dap/config.json) |
DAP_MASTER_SECRET |
Hub master secret — first-connect enrollment |
DAP_CLIENT_SECRET |
Hub-issued client secret (or enrolled once via master; also clientSecret in config) |
First connect to a new hub needs DAP_MASTER_SECRET set (enrolls once, then
the issued client secret is stored in ~/.dap/config.json).
DAP protocol documentation lives in the dap repo.
依赖清单 3 项
^2.7.0^1.15.1^1.31.0先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗