Skip to content

feat: multi-tenant client configuration and CLI#23

Merged
PAMulligan merged 8 commits intomainfrom
2-multi-tenant-client-configuration-and-white-label-packaging
Mar 21, 2026
Merged

feat: multi-tenant client configuration and CLI#23
PAMulligan merged 8 commits intomainfrom
2-multi-tenant-client-configuration-and-white-label-packaging

Conversation

@PAMulligan
Copy link
Copy Markdown
Contributor

Summary

  • Add per-client JSON config files in clients/ with JSON Schema validation and IDE autocomplete
  • Add CLI (pnpm claudius) with init, validate, and snippet commands for managing client deployments
  • Generate both embed snippet formats: window.ClaudiusConfig script method and <claudius-chat> web component
  • No changes to widget or worker source code -- all client config is runtime via existing props

New files

  • clients/_schema.json -- JSON Schema for client configs
  • clients/example.json + example-system-prompt.md -- reference template
  • scripts/cli.ts -- CLI entry point (init/validate/snippet)
  • scripts/lib/config.ts -- Config loader and validator
  • scripts/lib/snippet.ts -- Embed snippet generator
  • scripts/lib/__tests__/ -- 48 tests (config, snippet, integration)

Test plan

  • pnpm test:scripts -- 48 tests passing (config validation, snippet generation, integration)
  • pnpm claudius init test-client -- scaffolds config + system prompt
  • pnpm claudius validate example -- validates example config
  • pnpm claudius snippet example -- generates both embed snippets
  • Widget tests still pass (29 tests)

🤖 Generated with Claude Code

Paul Mulligan and others added 8 commits March 21, 2026 14:10
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@PAMulligan PAMulligan linked an issue Mar 21, 2026 that may be closed by this pull request
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying chat-widget with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9048721
Status: ✅  Deploy successful!
Preview URL: https://a39f2486.chat-widget-ejc.pages.dev
Branch Preview URL: https://2-multi-tenant-client-config.chat-widget-ejc.pages.dev

View logs

@PAMulligan PAMulligan self-assigned this Mar 21, 2026
@PAMulligan PAMulligan added the enhancement New feature or request label Mar 21, 2026
@PAMulligan PAMulligan added this to the v1.0.0 milestone Mar 21, 2026
@PAMulligan PAMulligan merged commit 4086327 into main Mar 21, 2026
2 checks passed
@PAMulligan PAMulligan deleted the 2-multi-tenant-client-configuration-and-white-label-packaging branch March 30, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

Multi-tenant client configuration and white-label packaging

1 participant