Repository navigation
Drop the dead code.redrob.ai host; generate and gate the JSON Schemas - #111
Merged
Merged
Conversation
There is no host called code.redrob.ai (nor api./dev./bot@). Point every user-facing URL at the Console and remove the fake GitHub-App token exchange that depended on api.code.redrob.ai. - $schema URLs -> https://console.redrob.ai/code/{config,tui,theme}.json, centralised in packages/core/src/links.ts (CONFIG_SCHEMA_URL, TUI_SCHEMA_URL, THEME_SCHEMA_URL); JSON assets keep the literal. - GitHub action + `redrob github run/install`: PAT / GITHUB_TOKEN only. Removed use_github_token / oidc_base_url inputs, the OIDC exchange, the installation poll against api.code.redrob.ai and the github.com/apps/redrob-agent install step. Reactions are removed by id; share links come from the share service's own URL. - HTTP-Referer -> https://console.redrob.ai/code, X-Title "Redrob Code". - Docs/homepage links in prompts, TUI strings, SDK README, docs.json, skills, specs and the IME patch script -> console.redrob.ai. - CI bot email -> 44862514+savagemanage@users.noreply.github.com. - Tests and fixtures updated to the new values.
Give the $schema URLs a real document to serve. `bun run generate:schema`
(packages/redrob/script/schema.ts) now writes three committed files with
`$id` set to the Console URLs:
- schema/config.json from ConfigV1.Info (Effect JSON Schema)
- schema/tui.json from TuiConfig.Info; identical per-key keybind
schemas are hoisted into $defs (1.1MB -> 36KB)
- schema/theme.json hand-written in packages/tui/src/theme/schema.ts
because the theme format has no runtime schema;
the colour-key list is type-checked against Theme
and a tui test validates all 33 bundled themes
`check:generated` (packages/redrob) regenerates and `git diff
--exit-code -- schema`, wired into the core CI job next to the client
check. The legacy single-file invocation used by nix still works.
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
There is no host called
code.redrob.ai(norapi.,dev., orbot@). This PR removes every reference to it (git grep code\.redrob\.aiis now empty) and gives the JSON Schemas those URLs promised a real, generated home.1.
$schemaURLshttps://console.redrob.ai/code/config.json,.../code/tui.json,.../code/theme.json.packages/core/src/links.ts(CONFIG_SCHEMA_URL,TUI_SCHEMA_URL,THEME_SCHEMA_URL, plusCODE_HOME_URL/CODE_DOCS_URL/CODE_INSTALL_*).config.tsandtui-migrate.tswrite the constants; JSON assets (packages/redrob/config.json,.redrob/redrob.jsonc, 33 theme files) keep the literal since JSON cannot import.2. Generated schemas (
packages/redrob/schema/)bun run generate:schema→packages/redrob/script/schema.tswritesconfig.json(fromConfigV1.Info),tui.json(fromTuiConfig.Info) andtheme.json, each with$idset to the Console URL.tui.json: the Effect generator inlines the same ~1.7 KB keybind schema 185 times (1.1 MB). The script hoists identical description-stripped property schemas into$defs/KeybindsValue; the result is 36 KB and accepts the same documents.theme.jsonis hand-written (packages/tui/src/theme/schema.ts): the theme format has no zod/Effect schema, only theThemeJsonTS type andresolveTheme. The colour-key lists aresatisfies-checked againstThemeand an exhaustiveness type assertion failstypecheckif a key is added or removed.packages/tui/test/theme-schema.test.tschecks all 33 bundled themes against the schema's key set, hex pattern (#RGB/#RGBA/#RRGGBB/#RRGGBBAA), ref resolution and variants. I also validated the three documents and all 33 themes with a Draft 2020-12 validator locally.check:generatedinpackages/redrob(generate:schema && git diff --exit-code -- schema), added to thecorejob in.github/workflows/test.ymlnext to the client check.nix/redrob.nix's single-file invocation still works.3. GitHub Action fake door
github/index.ts,github/action.yml,github/README.md,redrob github run|install: the GitHub-App OIDC token exchange (api.code.redrob.ai/exchange_github_app_token*), the installation poll (get_github_app_installation) and thegithub.com/apps/redrob-agentinstall step are gone. The only credential is the token the workflow passes.action.yml:use_github_token/oidc_base_urlinputs removed; newtokeninput defaulting to${{ github.token }}, exported asGITHUB_TOKEN.resolveGithubToken()(--tokenorGITHUB_TOKEN) throws a plain "No GitHub token was provided … passtoken:…" error. The generated workflow asks forcontents/pull-requests/issues: writeinstead ofid-token: write. Reactions are removed by the id we created (no longer by guessing the bot login); commits are authored asgithub-actions[bot]. Share links come from the share service's own URL instead of a hard-coded base.4. Provider headers
HTTP-Referer→https://console.redrob.ai/codein corekilo/llmgateway/nvidia/openrouter/vercel/zenmuxandpackages/redrob/src/provider/provider.ts;X-Title→Redrob Code.5. Docs / homepage links
anthropic.txt,default.txt,meta.txt), TUI (app.tsx,dialog-provider.tsx,dialog-retry-action.tsx,en.ts/ko.tsshare tip),sdks/vscode/README.md,packages/docs/docs.json, skills,specs/tui-plugins.md,patches/install-korean-ime-fix.sh(curl -fsSL https://console.redrob.ai/code/install.sh | sh), MCP OAuthclient_uri,providers.tsCloudflare link. The legacy "Go" upsell links now point athttps://console.redrob.ai/billing//limits.6. CI bot email
bot@code.redrob.ai→44862514+savagemanage@users.noreply.github.com(5 places).7. Tests & fixtures
packages/sdk/js/src/gen/types.gen.tsis the legacy v1 gen folder (the generator emitssrc/v2/gen), so the two doc links were hand-edited.Tested
bun run typecheck(turbo, 18/18) plus directtsgo --noEmitinpackages/core,packages/redrob,packages/tui: clean.bun run check:generatedinpackages/redrobandpackages/client: clean.bun teston the 13 touched redrob test files (829 pass),packages/core/test/skill/skill-writer.test.ts,packages/redrob/test/tool,llm-native-recorded,gitlab-duo(410 pass),packages/tui/test/theme*.test.ts(11 pass).bun run lint: 0 errors.git grep -n 'code\.redrob\.ai': 0 hits.Notes
github/index.tshas 4 pre-existingtsgoerrors ondevelop(unrelated lines:isScheduleEvent,client.agent,session.chat); thegithub/package is not part of the workspace typecheck. Not touched here.redrob github runhas no test coverage; the token path was verified by typecheck only.