Skip to content

[codex] add AgentHiFive integration#3144

Open
supersantux wants to merge 11 commits into
HKUDS:nightlyfrom
supersantux:codex/agenthifive-nanobot-integration
Open

[codex] add AgentHiFive integration#3144
supersantux wants to merge 11 commits into
HKUDS:nightlyfrom
supersantux:codex/agenthifive-nanobot-integration

Conversation

@supersantux
Copy link
Copy Markdown

@supersantux supersantux commented Apr 14, 2026

What changed

This PR adds the initial AgentHiFive integration for NanoBot.

It wires AgentHiFive into NanoBot as a protected MCP-backed backend, adds adapter-owned approval tracking and exact replay, introduces vault-managed Telegram and Slack channels, and extends the setup flow so users can bootstrap AgentHiFive, reconnect it, and toggle supported channels from a dedicated AgentHiFive setup path.

It also includes several integration hardening improvements that came out of end-to-end testing and review:

  • privacy-safe message and tool-call logging for sensitive provider traffic
  • Slack pacing and channel discovery caching to reduce Vault pressure
  • graceful text fallback when a downloaded attachment cannot yet be uploaded back through an AgentHiFive chat channel
  • task-local approval routing and captured tool-call state so concurrent sessions cannot cross-wire approvals
  • protocol-safe handling when Vault returns malformed or unexpected JSON

Why

The goal is to let NanoBot use AgentHiFive-managed connections and approval gates without pushing that complexity onto the user or the model.

This addresses a few concrete issues along the way:

  • approval-required tool calls now replay automatically after approval instead of relying on the agent to retry them correctly
  • Telegram polling no longer times out prematurely because the local HTTP client now outlives the long-poll window
  • Slack discovery now degrades gracefully when a connection is missing scopes for some conversation types instead of failing the whole poll loop
  • downloaded attachments no longer fail noisily when AgentHiFive chat channels cannot upload them back out yet
  • approval tracking is now isolated per task, which avoids cross-session routing bugs in shared workspaces
  • malformed Vault protocol responses fail closed instead of degrading silently into empty results

User impact

Users can:

  • bootstrap or reconnect AgentHiFive from nanobot setup-agenthifive
  • enable AgentHiFive-managed Telegram and Slack inbound channels from the same setup flow
  • keep AgentHiFive as the source of truth for access control while preserving existing local NanoBot config when needed
  • receive approval outcomes back through the running NanoBot flow more naturally
  • get a local-path fallback message for downloaded attachments on AgentHiFive chat channels until true outbound upload support lands
  • use the new integration with focused skill and test coverage

Validation

Focused local checks run during preparation:

  • pytest -q tests/agent/test_runner.py
  • pytest -q tests/channels/test_agenthifive_channel.py
  • pytest -q tests/agent/test_agenthifive_auth.py tests/agent/test_agenthifive_hook.py
  • pytest -q tests/cli/test_commands.py -k 'gateway_health_endpoint_binds_and_serves_expected_responses or serve_uses_api_config_defaults_and_workspace_override or setup_agenthifive or setup_channels_command_runs_channel_setup'

Those focused checks passed locally.

@supersantux supersantux changed the title [codex] Add optional AgentHiFive integration spike [codex] add AgentHiFive nanobot integration Apr 15, 2026
@supersantux supersantux changed the title [codex] add AgentHiFive nanobot integration [codex] add AgentHiFive integration Apr 15, 2026
@supersantux supersantux changed the base branch from main to nightly April 15, 2026 23:36
@supersantux supersantux force-pushed the codex/agenthifive-nanobot-integration branch from 89c5a79 to d83b59b Compare April 15, 2026 23:36
@supersantux supersantux marked this pull request as ready for review April 18, 2026 00:27
@Re-bin Re-bin deleted the branch HKUDS:nightly April 19, 2026 16:21
@Re-bin Re-bin closed this Apr 19, 2026
@Re-bin Re-bin reopened this Apr 21, 2026
@supersantux supersantux force-pushed the codex/agenthifive-nanobot-integration branch 2 times, most recently from 91d9fe9 to 53005b9 Compare April 21, 2026 23:14
chengyongru and others added 11 commits April 27, 2026 10:33
Add a skill that lets a running nanobot agent create new bot instances
through a helper script. The agent collects instance name, channel type,
and optional model from the user, then runs the script which:
- Calls nanobot onboard to create config + workspace skeleton
- Enables the target channel and sets workspace/model in config
- Auto-assigns gateway/API ports if defaults are occupied
- Validates config via Pydantic before saving
- Reports required fields the user needs to fill in (e.g. bot token)
…el reference

- Make SKILL.md platform-agnostic (remove Windows-only path rules)
- Add 14-channel quick-reference table with required fields
- Create references/channels.md with detailed per-channel config
- Inherit model from parent config when not explicitly specified
- Consolidate duplicate file reads in _patch_config
- Add email channel consent_granted field documentation
- Fix auto_reply_enabled default value (true, not false)
- Add troubleshooting section to SKILL.md
- Revert unrelated docs change (default provider description)
- Move olostep import from global scope to lazy import inside method
- Revert formatting-only changes (__init__ signature, or "brave" defaults)
- Update tests to mock via sys.modules instead of module-level globals
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.

5 participants