Skip to content

Commit 37b8671

Browse files
committed
Add Stacklok Enterprise platform documentation
Introduce a new docs/platform/ section documenting the Stacklok Enterprise distribution alongside the existing OSS ToolHive docs. New content areas: - Enterprise platform: deployment, identity config, registry server config, distributed and airgapped installs, artifact verification - Enterprise Manager: configuration, degraded mode, and policy reference (build env, CA certificate, desktop app, registry, telemetry, non-registry servers) - Stacklok Desktop: rollout, policy enforcement, and deep links - Enterprise Cloud UI: catalog browsing, administration, AI assistant, and configuration - Enterprise authorization: intro, namespace self-service, and an Entra ID quickstart - Enterprise CLI and a new AI gateway landing page Reference and tooling: - Add enterprise CRD reference pages and schemas (ClusterPlatformRole, ClusterPlatformRoleBinding, PlatformRoleBinding, ToolHiveAuthorizationPolicy) - Extend the CRD reference generator to support enterprise CRD sets - Update the homepage product grid, styles, and icons for the platform layout - Update sidebars, Docusaurus config, and Vercel redirects Also refresh several OSS reference and guide pages and the upstream-release docs tooling. Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
1 parent 7eb8749 commit 37b8671

142 files changed

Lines changed: 8513 additions & 738 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/agents/mcp-guide-writer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Your primary responsibilities:
2828

2929
3. **Ensure Technical Accuracy**: All configuration examples must be valid and tested. Reference the existing ToolHive documentation in the `docs/toolhive/` directory as the source of truth for:
3030
- Available `thv` CLI commands and their syntax (reference: `docs/toolhive/reference/cli/*.md` or run `thv --help`)
31-
- Kubernetes CRD specifications and fields (reference: `static/api-specs/toolhive-crd-api.md`)
31+
- Kubernetes CRD specifications and fields (reference: `static/api-specs/toolhive-crds/*.schema.json`)
3232
- UI configuration options and workflows (reference: `docs/toolhive/guides-ui/*`)
3333

3434
4. **Follow Documentation Standards**: Adhere to the project's writing style guide (`STYLE_GUIDE.md`) including:

.claude/skills/upstream-release-docs/SKILL.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -263,17 +263,18 @@ Apply the approved changes:
263263

264264
6. **CRD reference updates**: the Kubernetes CRD reference is partially auto-generated. If the release touches CRDs, know the split:
265265

266-
**Fully auto-generated** (do not hand-edit):
267-
- `static/api-specs/crds/*.schema.json` - extracted JSON Schema per CRD
268-
- `static/api-specs/crds/*.example.yaml` - minimal required-fields YAML example
269-
- `static/api-specs/crds/index.json` - metadata + cross-reference graph
270-
- `static/api-specs/crds/sidebar.json` - sidebar fragment consumed by `sidebars.ts`
271-
- `src/components/CRDReference/schemas.ts` - Kind -> schema index imported by the `<CRDFields>` component
272-
- `docs/toolhive/reference/crds/*.mdx` - per-CRD pages (including the landing `index.mdx`)
266+
**Fully auto-generated** (do not hand-edit): the exact paths depend on the project's `crds:` array in `.github/upstream-projects.yaml`. Each entry declares an `out` (static/ schema dir) and `pages` (docs/ MDX dir). For toolhive OSS these are `static/api-specs/toolhive-crds/` and `docs/toolhive/reference/crds/`; for enterprise or gateway CRDs they will differ. Within each pair, the generated files are:
267+
- `<out>/*.schema.json` - extracted JSON Schema per CRD
268+
- `<out>/*.example.yaml` - minimal required-fields YAML example
269+
- `<out>/index.json` - metadata + cross-reference graph
270+
- `<out>/sidebar.json` - sidebar fragment consumed by `sidebars.ts`
271+
- `<pages>/*.mdx` - per-CRD pages (including the landing `index.mdx`)
273272

274-
These come from `scripts/extract-crd-schemas.mjs` + `scripts/generate-crd-pages.mjs`, run by `scripts/update-toolhive-reference.sh`. Regenerating just means re-running the script; do not edit the MDX directly.
273+
Plus one repo-wide generated file spanning all sets: `src/components/CRDReference/all-schemas.ts`, the consolidated Kind -> schema barrel consumed by `<CRDFields>` (emitted by `scripts/generate-crd-barrel.mjs`). Do not hand-edit it.
275274

276-
**Hand-written overrides** (`scripts/lib/crd-intros.mjs`): every CRD in `index.json` publishes automatically using schema-derived defaults. Entries in this file override those defaults to polish a page. All fields are optional:
275+
These come from `scripts/extract-crd-schemas.mjs` + `scripts/generate-crd-pages.mjs` + `scripts/generate-crd-barrel.mjs`, all driven by `scripts/upstream-release/extract-crds.mjs`. Regenerating means re-running: `node scripts/upstream-release/extract-crds.mjs --id <project-id>`. Do not edit the MDX or schema files directly.
276+
277+
**Hand-written overrides** (`scripts/lib/crd-intros.mjs`): every CRD in any project's `index.json` publishes automatically using schema-derived defaults. Entries in this file override those defaults to polish a page. All fields are optional:
277278
- `slug`: URL segment and MDX filename. Default: `Kind.toLowerCase()`.
278279
- `group`: `'core'` or `'shared'`. Default: `'shared'`.
279280
- `summary`: one-sentence DocCard pitch. Default: first sentence of the cleaned upstream schema description.
@@ -282,7 +283,7 @@ Apply the approved changes:
282283

283284
**When the release adds a new CRD**:
284285
- The release PR auto-publishes the new CRD with schema-derived defaults and flags it in a `[!NOTE]` block. No blocker.
285-
- Review the generated page. If the upstream kubebuilder description is thin or the CRD should live in the `core` group or appear higher on the landing page, add an override entry for that Kind to `crd-intros.mjs` and re-run `node scripts/generate-crd-pages.mjs`. Overridden entries render before defaults-only entries within each group, in the order they are declared in the file.
286+
- Review the generated page. If the upstream kubebuilder description is thin or the CRD should live in the `core` group or appear higher on the landing page, add an override entry for that Kind to `crd-intros.mjs` and re-run `node scripts/upstream-release/extract-crds.mjs --id <project-id>`. Overridden entries render before defaults-only entries within each group, in the order they are declared in the file.
286287
- Commit the intros change plus the regenerated outputs. You can also land this as a follow-up PR after the release PR merges.
287288

288289
**When the release modifies an existing CRD**: the schema/example regenerate automatically. If the CRD has no override entry, the intro prose will track the upstream description automatically. If it does have an override entry, update the `intro` only if the CRD's role materially shifted.

.github/upstream-projects.yaml

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,20 @@
77
# reacts to those PRs, shallow-clones the upstream, and adds
88
# source-verified content edits via the upstream-release-docs skill.
99
#
10-
# For `stacklok/toolhive` specifically, most reference artifacts are
11-
# declared as `assets:` below (synced by sync-assets.mjs) — plus one
12-
# workflow-step in upstream-release-docs.yml that downloads the CRD
13-
# manifests tarball and runs extract-crd-schemas.mjs + generate-crd-
14-
# pages.mjs to produce our opinionated per-CRD MDX pages.
10+
# For projects that ship Kubernetes CRDs, declare a `crds:` array
11+
# alongside `assets:`. Each entry drives one run of extract-crd-schemas.mjs
12+
# + generate-crd-pages.mjs via scripts/upstream-release/extract-crds.mjs.
13+
# Source kinds: `release_asset:` (from the GitHub release tarball) or
14+
# `source:` (directory inside the upstream clone). Required per-entry
15+
# fields: `out` (static/ output dir), `pages` (docs/ MDX output dir).
16+
# Optional: `landing_title`, `landing_description`, `landing_intro` to
17+
# customize the generated landing page.
18+
# This array is the single source of truth for the CRD sets: the remark
19+
# plugin (docusaurus.config.ts), the sidebar fragments (sidebars.ts), and
20+
# the consolidated <CRDFields> schema barrel are all derived from it via
21+
# scripts/lib/crd-sets.mjs, so adding a set is a YAML edit plus a regen.
22+
# Multiple entries per project are supported for suites that ship more
23+
# than one CRD set (e.g. enterprise platform + AI gateway).
1524
#
1625
# You can also edit `version:` by hand (to backfill or reset) and
1726
# dispatch the upstream-release-docs workflow manually in bootstrap
@@ -66,6 +75,41 @@ projects:
6675
destination: static/api-specs/publisher-provided.schema.json
6776
- release_asset: skill.schema.json
6877
destination: static/api-specs/skill.schema.json
78+
crds:
79+
- release_asset: thv-crds.tar.gz
80+
out: static/api-specs/toolhive-crds
81+
pages: docs/toolhive/reference/crds
82+
landing_title: Kubernetes CRD reference
83+
landing_description: >-
84+
Reference for all ToolHive Kubernetes Operator custom resource
85+
definitions.
86+
landing_intro: >-
87+
The ToolHive operator manages MCP workloads using Kubernetes custom
88+
resources. Each page below documents one resource - its fields,
89+
defaults, validation rules, and a minimal example manifest - and
90+
links to the other resources it references.
91+
92+
- id: stacklok-enterprise-platform
93+
repo: stacklok/stacklok-enterprise-platform
94+
# version: intentionally omitted - no public release cadence yet.
95+
# CRDs are sourced from the local clone via --clone in development
96+
# and will use release_asset: once the platform ships releases.
97+
docs_paths:
98+
- docs/platform
99+
crds:
100+
- source: enterprise/toolhive-enterprise/helm/files/crds
101+
out: static/api-specs/enterprise-crds
102+
pages: docs/platform/reference/crds
103+
landing_title: Platform CRD reference
104+
landing_description: >-
105+
Reference for Stacklok Enterprise authorization custom resource
106+
definitions.
107+
landing_intro: >-
108+
The Stacklok Enterprise platform extends the Kubernetes API with
109+
custom resources for role-based access control and authorization
110+
policy enforcement. Each page below documents one resource - its
111+
fields, defaults, validation rules, and a minimal example manifest
112+
- and links to the other resources it references.
69113
70114
- id: toolhive-studio
71115
repo: stacklok/toolhive-studio

.github/workflows/upstream-release-docs.yml

Lines changed: 63 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ name: Upstream Release Docs
1111
# 3. Syncs declared upstream assets into static/ via sync-assets.mjs
1212
# (release-asset downloads, tarball extractions, file-from-clone
1313
# copies — see `assets:` in upstream-projects.yaml)
14-
# 4. For toolhive specifically, downloads the CRD manifests tarball
15-
# and runs extract-crd-schemas.mjs + generate-crd-pages.mjs +
16-
# bundle-upstream-schema.mjs to produce our opinionated reference
17-
# MDX (the CRD tarball and toolhive-core schemas are shipped as
18-
# release assets by stacklok/toolhive#4982)
14+
# 4. For any project that declares a `crds:` key in upstream-projects.yaml,
15+
# runs extract-crds.mjs to drive extract-crd-schemas.mjs +
16+
# generate-crd-pages.mjs for each declared CRD set. Each set writes
17+
# to its own out/pages dirs so multiple CRD sources (OSS operator,
18+
# enterprise platform, AI gateway, etc.) never clobber each other.
19+
# bundle-upstream-schema.mjs also runs here for toolhive specifically.
1920
# 5. Runs two Claude Opus sessions: a generation pass running the
2021
# upstream-release-docs skill, then a fresh-context editorial
2122
# pass running docs-review over the changed files. Both have
@@ -361,27 +362,28 @@ jobs:
361362
--repo "$REPO" \
362363
--tag "$NEW_TAG"
363364
364-
# toolhive ships CRD manifests as a release asset tarball (see
365-
# stacklok/toolhive#4982). We extract it to a temp dir and run our
366-
# opinionated transforms: extract per-CRD JSON schemas + examples,
367-
# generate MDX reference pages. Bundling the upstream-registry
368-
# schema (resolves the remote MCP-server $refs for our JSON-Schema
369-
# viewer) also runs here.
370-
- name: Extract CRDs + generate reference MDX (toolhive)
371-
if: steps.detect.outputs.id == 'toolhive'
365+
# For any project with a `crds:` key in upstream-projects.yaml, run
366+
# extract-crds.mjs to drive extract-crd-schemas.mjs +
367+
# generate-crd-pages.mjs for each declared CRD set. The script is a
368+
# no-op for projects with no crds: entries, so no `if:` guard is needed.
369+
- name: Extract CRDs + generate reference MDX
372370
env:
371+
PROJECT_ID: ${{ steps.detect.outputs.id }}
372+
CLONE_DIR: ${{ steps.clone.outputs.scratch_dir }}
373373
REPO: ${{ steps.detect.outputs.repo }}
374374
NEW_TAG: ${{ steps.detect.outputs.new_tag }}
375375
run: |
376-
TMP=$(mktemp -d)
377-
gh release download "$NEW_TAG" --repo "$REPO" \
378-
--pattern "thv-crds.tar.gz" --dir "$TMP"
379-
mkdir -p "$TMP/crds"
380-
tar -xzf "$TMP/thv-crds.tar.gz" -C "$TMP/crds"
381-
TOOLHIVE_CRD_DIR="$TMP/crds" node scripts/extract-crd-schemas.mjs
382-
node scripts/generate-crd-pages.mjs
383-
node scripts/bundle-upstream-schema.mjs
384-
rm -rf "$TMP"
376+
node scripts/upstream-release/extract-crds.mjs \
377+
--id "$PROJECT_ID" \
378+
--clone "$CLONE_DIR" \
379+
--repo "$REPO" \
380+
--tag "$NEW_TAG"
381+
382+
# toolhive-specific: bundle the upstream-registry schema to resolve
383+
# remote MCP-server $refs for the JSON-Schema viewer.
384+
- name: Bundle upstream schema (toolhive)
385+
if: steps.detect.outputs.id == 'toolhive'
386+
run: node scripts/bundle-upstream-schema.mjs
385387

386388
# Commit AND PUSH the refreshed reference assets (synced release-
387389
# asset files + regenerated toolhive CRD MDX if applicable) before
@@ -438,6 +440,22 @@ jobs:
438440
")
439441
echo "docs_paths=$HINTS" >> "$GITHUB_OUTPUT"
440442
443+
# Resolve the CRD pages dirs for this project so the autogen-detect
444+
# step and skill prompts can reference them without hardcoding paths.
445+
# Space-separated; empty string when the project declares no crds:.
446+
- name: Resolve CRD pages dirs
447+
id: crd_pages
448+
env:
449+
PROJECT_ID: ${{ steps.detect.outputs.id }}
450+
run: |
451+
DIRS=$(node -e "
452+
const yaml = require('yaml');
453+
const fs = require('fs');
454+
const p = yaml.parse(fs.readFileSync('.github/upstream-projects.yaml','utf8')).projects.find(x=>x.id===process.env.PROJECT_ID);
455+
console.log((p?.crds ?? []).map(c => c.pages).filter(Boolean).join(' '));
456+
" 2>/dev/null || true)
457+
echo "dirs=$DIRS" >> "$GITHUB_OUTPUT"
458+
441459
# claude-code-action@v1 rejects track_progress: true on
442460
# workflow_dispatch events with "track_progress is only
443461
# supported for events: pull_request, issue_comment, ...".
@@ -536,8 +554,8 @@ jobs:
536554
${{ steps.clone.outputs.scratch_dir }} instead of
537555
`gh api contents?ref=<tag>` -- it's already at the tag and
538556
doesn't consume API quota. Do not hand-edit auto-generated
539-
reference under docs/toolhive/reference/cli/,
540-
docs/toolhive/reference/crds/, or static/api-specs/ --
557+
reference under static/api-specs/, docs/toolhive/reference/cli/,
558+
or any CRD pages dirs (${{ steps.crd_pages.outputs.dirs }}) --
541559
earlier workflow steps sync those from release assets.
542560
543561
Project dependencies are already installed by an earlier
@@ -660,9 +678,9 @@ jobs:
660678
new claims; only refine what's already there.
661679
662680
Do NOT re-run /upstream-release-docs. Do NOT touch files
663-
under docs/toolhive/reference/cli/, static/api-specs/,
664-
or docs/toolhive/reference/crds/ — those are
665-
regenerated from release assets and aren't yours to edit.
681+
under static/api-specs/, docs/toolhive/reference/cli/,
682+
or any CRD pages dirs (${{ steps.crd_pages.outputs.dirs }}) --
683+
those are regenerated from release assets and aren't yours to edit.
666684
667685
Do NOT touch GAPS.md, NO_CHANGES.md, or SUMMARY.md at
668686
the repo root if they exist -- they're signal files
@@ -866,12 +884,20 @@ jobs:
866884
# the staged diff represents skill-introduced changes only.
867885
# The Augment step consumes `touched` directly and composes
868886
# the CAUTION alert itself -- no note block assembled here.
887+
env:
888+
PROJECT_ID: ${{ steps.detect.outputs.id }}
889+
CRD_PAGES_DIRS: ${{ steps.crd_pages.outputs.dirs }}
869890
run: |
870891
git add -A
871-
TOUCHED=$(git diff --cached --name-only -- \
872-
'docs/toolhive/reference/cli/' \
873-
'static/api-specs/' \
874-
'docs/toolhive/reference/crds/' | paste -sd, - || true)
892+
# Always watch: CLI reference (toolhive only) and all static/api-specs/.
893+
# Plus any CRD pages dirs declared in the project's crds: config.
894+
DIFF_ARGS=()
895+
[ "$PROJECT_ID" = "toolhive" ] && DIFF_ARGS+=('docs/toolhive/reference/cli/')
896+
DIFF_ARGS+=('static/api-specs/')
897+
for dir in $CRD_PAGES_DIRS; do
898+
DIFF_ARGS+=("${dir}/")
899+
done
900+
TOUCHED=$(git diff --cached --name-only -- "${DIFF_ARGS[@]}" | paste -sd, - || true)
875901
echo "touched=$TOUCHED" >> "$GITHUB_OUTPUT"
876902
877903
- name: Commit and push
@@ -997,6 +1023,7 @@ jobs:
9971023
GAPS_BLOCK: ${{ steps.signals.outputs.gaps_block }}
9981024
SUMMARY_BLOCK: ${{ steps.signals.outputs.summary_block }}
9991025
AUTOGEN_TOUCHED: ${{ steps.autogen.outputs.touched }}
1026+
CRD_PAGES_DIRS: ${{ steps.crd_pages.outputs.dirs }}
10001027
COMPARE_OK: ${{ steps.reviewers.outputs.compare_ok }}
10011028
MENTION_BLOCK: ${{ steps.reviewers.outputs.mention_block }}
10021029
ASSIGN_LIST: ${{ steps.reviewers.outputs.list }}
@@ -1235,9 +1262,12 @@ jobs:
12351262
echo "auto-fixes are applied after."
12361263
echo ""
12371264
echo "Auto-synced paths — do not hand-edit these in review:"
1238-
echo "- \`docs/toolhive/reference/cli/\`"
1239-
echo "- \`docs/toolhive/reference/crds/\`"
12401265
echo "- \`static/api-specs/\`"
1266+
echo "- \`docs/toolhive/reference/cli/\` (toolhive only)"
1267+
# Emit one bullet per CRD pages dir declared in the project config.
1268+
for dir in $CRD_PAGES_DIRS; do
1269+
echo "- \`${dir}/\`"
1270+
done
12411271
echo ""
12421272
echo "If a \"Gaps needing human context\" section is present above,"
12431273
echo "each entry includes a paste-ready **Helper prompt for local"

AGENTS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ ALWAYS use these exact terms and capitalizations. When editing documentation, re
231231
- large language model (LLM)
232232
- Visual Studio Code ("VS Code" after first use)
233233
- Virtual MCP Server (vMCP) - a feature of ToolHive that aggregates multiple MCP servers into a single endpoint; use "Virtual MCP Server (vMCP)" on first use, "vMCP" thereafter
234+
- Stacklok Enterprise - the commercial, enterprise-licensed distribution of ToolHive, adding turnkey IdP integration, centralized policy enforcement, hardened and signed releases, and SLA-backed support
235+
- Stacklok Desktop - the enterprise edition of the ToolHive desktop app, with enterprise lockdown policies controlled by the Enterprise Manager (not "Enterprise UI", "Enterprise Studio", or "Stacklok UI")
236+
- Enterprise Manager - the Stacklok Enterprise component that pushes policy configuration to Stacklok Desktop and the Stacklok CLI
237+
- Enterprise Cloud UI - the Stacklok Enterprise web console for browsing and managing the MCP server catalog
238+
- enterprise authorization - the Stacklok Enterprise capability that compiles RBAC-style custom resources (roles, bindings, and per-server attachment policies) into the Cedar policies ToolHive enforces. It is a feature, not a named component: write it lowercase, capitalizing only at the start of a sentence, heading, or title. Don't treat it as a proper noun like the Enterprise Manager.
234239

235240
If you encounter a term not listed here that appears frequently in the documentation, consider adding it to this list for consistency.
236241

@@ -299,7 +304,7 @@ Stacklok Enterprise includes turnkey integrations for common identity providers.
299304
```ts title="sidebars.ts"
300305
{
301306
type: 'doc',
302-
id: 'toolhive/guides-enterprise/config-server',
307+
id: 'toolhive/enterprise-manager/config-server',
303308
className: 'enterprise-only',
304309
}
305310
```

0 commit comments

Comments
 (0)