Skip to content

feat: add DSH cloud bootstrap flow - #119

Merged
Mr-Lucky merged 3 commits into
mainfrom
feat/dsh-cloud-bootstrap
Aug 21, 2026
Merged

feat: add DSH cloud bootstrap flow#119
Mr-Lucky merged 3 commits into
mainfrom
feat/dsh-cloud-bootstrap

Conversation

@Mr-Lucky

Copy link
Copy Markdown
Contributor

Summary

Add DSH support to the AgentGuard initialization and Cloud connection flow.

  • Make bare agentguard init auto-detect supported agent hosts
  • Install AgentGuard into the default DSH web profile
  • Support DSH Agent JWT registration and Cloud activation
  • Persist DSH as a configured agent host
  • Use system cron for DSH threat-feed subscriptions
  • Update CLI guidance, documentation, and test coverage

Type

  • Bug fix
  • New feature / detection rule
  • Refactoring
  • Documentation

Testing

  • npm run build passes
  • npm test passes (544 tests)
  • Manually tested the change

Related Issues

Closes #

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

AgentGuard PR Review

The patch introduces a few concrete regressions and a security-sensitive gap.

  1. severity: high — src/cli.ts / withDetectedAgentJwtHost and connect flow

    • What can go wrong: DSH is now treated as an Agent JWT-capable host even when the user explicitly configured a different host in agentHost/agentHosts. Because isAgentJwtHostConfigured() now returns true for any saved DSH detection, agentguard connect can proceed without an API key on machines that merely have a DSH profile present, even if the active agent is actually an unsupported host. This can mis-bind Cloud registration to the wrong environment and weaken the “no API key” gating.
    • Concrete fix: Require an explicit, validated DSH initialization state before using Agent JWT registration. For example, only allow DSH when config.agentHost === 'dsh' or when DSH is the detected current runtime and no other saved host is already selected; otherwise fall back to API-key flow.
  2. severity: medium — scripts/cloud-install.sh / docs/cloud-native-api.md

    • What can go wrong: The hosted bootstrap template is now deleted, but the docs still describe /install.sh as a supported cloud bootstrap path. Any backend or CI that followed the previous contract will fail immediately, breaking cloud bootstrap deployments.
    • Concrete fix: Either restore the script or update the docs and server-side contract together. If the hosted install flow is intentionally removed, remove the endpoint documentation and any references to activation-link bootstrap.
  3. severity: medium — src/cli.ts and src/feed/cron.ts

    • What can go wrong: The new DSH support is added to the config types and error messages, but cron installation still only supports openclaw, qclaw, hermes, and system backends. agentguard init can now persist agentHost: 'dsh', while agentguard subscribe with backend=auto will later behave like a non-native host and may silently route users to the wrong cron backend or error with incomplete guidance.
    • Concrete fix: Add an explicit DSH cron backend path or reject DSH in cron auto-selection with a clear error before persisting it as a supported auto-init host. Ensure the supported-host messages and runtime behavior match.

@Mr-Lucky
Mr-Lucky merged commit f383d8d into main Aug 21, 2026
4 checks passed
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.

2 participants