Skip to content

feat: create_site takes a kind for redirect hosts - #39

Merged
gp42-ops merged 3 commits into
mainfrom
redirect-hosts
Nov 12, 2026
Merged

gp42-ops merged 3 commits into
mainfrom
redirect-hosts

Conversation

@gp42-ops

@gp42-ops gp42-ops commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

create_site takes kind. With kind: "redirect" it creates a redirect host: a hostname on one of the organization's own custom domains that serves only its redirect rules, set afterwards with set_redirects or add_redirect. A redirect host takes no files and doesn't count toward the plan's site limit; an organization can have up to 50.

  • Instructions: a new "Redirect hosts" section, one bullet, tells agents to create a redirect host to forward a hostname with no content of its own, such as a retired domain or a campaign link, rather than deploy a placeholder page. The rules and errors stay in create_site's description, to keep the instructions short.
  • Descriptions: create_site explains the kind, the custom-domain rule and the bare apex through www; list_sites names kind; deploy_files and deploy_create_upload say a redirect host answers RedirectHostHasNoFiles.
  • Errors pass through unchanged, as before: CustomDomainRequired (409) on a shared domain, RedirectHostLimitReached (403) at the cap, and RedirectHostHasNoFiles (409) from the deploy tools.
  • README: the tools table and a paragraph on redirect hosts.

New tests in test/redirectHosts.test.ts cover the kind schema, the request body with and without kind, and both refusals passing through.

Dependency. Requires @hostsmith/sdk 1.6.0, released from hostsmith/js-sdk#17, for kind on sites.create. The API side is hostsmith/hostsmith#335, deployed to dev.

Instructions length. npm run smoke reports the instructions at 5,033 characters against its 4,000 target. Main is already at about 4,750, and this adds about 280. CI doesn't run the smoke script.

Type of change

  • fix: bug fix
  • feat: new feature
  • feat!: / BREAKING CHANGE: breaking change
  • docs: / chore: / refactor: / test: / perf: non-shipping

Checklist

  • npm run typecheck passes
  • npm run build passes
  • Smoke-tested against an MCP client for behavior changes. Through the deployed dev MCP server, which passes errors through unchanged as before: deploy_files to a redirect host answered API error 409 (RedirectHostHasNoFiles), and get_site showed kind: "redirect". create_site with kind needs this release.
  • No access tokens, secrets, or internal hostnames in the diff
  • Commit messages follow Conventional Commits

The instructions and the site and deploy tool descriptions cover redirect hosts, and the deploy tools pass RedirectHostHasNoFiles through. Needs the SDK release with kind on sites.create.
create_site's description already gives the custom-domain rule, the cap and the errors.
@gp42-ops
gp42-ops marked this pull request as ready for review November 12, 2026 07:52
@gp42-ops
gp42-ops merged commit be37cc8 into main Nov 12, 2026
1 check passed
@gp42-ops
gp42-ops deleted the redirect-hosts branch November 12, 2026 07:52
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