Repository navigation
feat(web): API docs section and agent skill zip on the Developers page - #226
Merged
Merged
Conversation
A dependency-free ZIP writer (deflate or store, UTF-8 names) for the skill archive, and publicApiUrl: the API address a customer can reach, read at runtime from PUBLIC_API_URL, never a cluster-internal API_URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
Generated from formConfigSchema with zod-to-json-schema (zod 3), every sub-schema inlined, minus the fields the editor has no control for. ajv (dev only) checks it is a valid draft-07 schema that accepts the recipe configs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
SKILL.md with its rules, the endpoint and error references, the config schema, five recipes and INSTALL.md for Claude Code, Codex and Cursor. The API and dashboard URLs are parameters, injected per request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
GET /api/developers/skill confirms the session with the API (401 without one), then builds the zip with this environment's public API address and dashboard origin. PUBLIC_API_URL is documented in .env.example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
DeveloperDocs shows the runtime API URL, Bearer auth, the create, edit, publish and revert flow, the traps, and the skill download, in English and Spanish from its own catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
- The skill route refreshes an expired access token once before answering
401, like hostFetch, so a download clicked long after the page loaded
works for a member who is still signed in. A 403 from the API (workspace
no longer theirs) answers 403 instead of a 502.
- DeveloperDocs takes the optional locale prop the Developers page already
passes (<DeveloperDocs locale={locale} />), so the two branches merge
without a type error.
- publicApiUrl treats private and link-local addresses as internal, so a
Docker or VPC API_URL is never printed to customers.
- The skill docs name every role gate a member's key hits (notifications,
brand kit apply and revert, webhook test) and list forms in the order
the API returns them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Josue Hernandez <josue@daptatech.com>
…I_URL When API_URL is cluster-internal, fall back to NEXT_PUBLIC_API_URL read from the runtime environment instead of reporting the address as unconfigured. Deployments that already set it per environment need no new variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
# Conflicts: # apps/web/app/admin/developers/developer-docs.tsx
The "How to use the API" section read its copy from a local catalog next to the component. All UI copy belongs in the shared catalog, so it now lives in admin.developerDocs, replacing the placeholder keys from the Developers page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Josue Hernandez <josue@daptatech.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the API docs section to the Developers page and a downloadable agent skill (zip) so members can point an AI agent at the dForms public API. The zip is served only to signed-in members and has the workspace's public API address injected into its files.
Changes
PUBLIC_API_URL); internal and private hosts are never exposed.stepsrequired./api/developers/skillthat serves the zip (401 without session, 403 when the workspace is not accessible, 503 when the API URL is not configured).How it was tested
pnpm typecheck,pnpm lint,pnpm testall green.PUBLISH_GATE_LOCAL=1 pnpm run publish-gatepassed.unzip -treports 10 files OK and it unpacks todforms-api/with the injected URLs.Review notes (fixed by independent review)
DeveloperDocsaccepts an optionallocaleprop so it composes with the Developers page shell.GET /v1/forms.Coordination
apps/web/app/admin/developers/developer-docs.tsx: resolve to this branch. It accepts thelocaleprop, sopage.tsxneeds no change.admin.developerDocskeys from that PR become unused; follow-up to move this section's strings into the shared catalog.PUBLIC_API_URLmust be set in each environment's web config. Until then the page shows the "not configured" notice and the zip route returns 503.UNSUPPORTED_FIELD/EMPTY_QUESTIONissue codes.🤖 Generated with Claude Code