Conversation
Parallels PR #102 which fixed the same enum in workers/src/index.ts. The local tool registry at src/core/tool-registry.js drives the local MCP server (src/mcp/server.js) and CLI (src/cli.js) and had the same 3-mode enum, creating a contract divergence between the deployment surfaces for the same logical API. Two sites in src/core/tool-registry.js: - Line 47-55 (unified oddkit tool) - Line 113-121 (dedicated oddkit_challenge tool) Both expanded to the full 9-mode enum with description text matching PR #102's style. Mode families explained, voice-dump suppression called out in the dedicated tool description. Sweep verified: grep across src/ and workers/ for the 3-mode string returns only the first line of each 9-mode block now — zero stale enums. Caught by bugbot on PR #103 (the promotion PR for #102). Flagged appropriately as Low severity (the CF Worker surface is the primary production path; the local surface is used for dev/CLI). Fixing in a separate PR so #103 can promote cleanly without rebase. Verification: - npm run typecheck: clean - tests/smoke.sh: 6/6 pass Longer-term (same as #102 flagged): drop enum entirely and let canon be the validator. Hardcoding mode vocabulary in schema is the same Vodka anti-pattern shape challenge stop words used to be.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
oddkit | 9c79926 | Commit Preview URL Branch Preview URL |
Apr 17 2026, 04:46 PM |
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.
Parallel fix to PR #102 for the local MCP server / CLI surface
Bugbot on PR #103 (Low severity) correctly flagged that PR #102's schema fix only updated the Cloudflare Worker surface. The local tool registry at
src/core/tool-registry.jsdrives:src/mcp/server.js)src/cli.js)…and had the same 3-mode enum hardcoded at two sites. This PR ports the same expansion to those two sites, with description text matching PR #102's style.
What changes
src/core/tool-registry.jsline 47-55: unifiedoddkittool mode enumsrc/core/tool-registry.jsline 113-121: dedicatedoddkit_challengetool mode enumBoth expand from
["exploration", "planning", "execution"]to the full 9-mode enum. Mode families explained, voice-dump suppression called out in the dedicated-tool description.Sweep verified
All 4 hits are the first line of a multi-line 9-mode block. Zero stale 3-mode-only enums remain.
Verification
npm run typecheck: cleantests/smoke.sh: 6/6 passWhy a separate PR
Keeping this isolated so PR #103 can promote cleanly without rebase. Merge order doesn't matter between #103 and this one — they touch independent files (workers surface vs local surface).
Longer-term direction (same as #102 flagged)
Drop the enum entirely and let canon be the validator. Hardcoding mode vocabulary in schema is the same Vodka anti-pattern shape that PR #100 fixed for challenge-detection stop words. Tracked as a follow-up.
Note
Low Risk
Schema/metadata-only change that mainly affects input validation and help text for local MCP/CLI surfaces; low risk aside from potential downstream assumptions about the old 3-value enum.
Overview
Expands the
modeinput schema in the local tool registry (src/core/tool-registry.js) fromexploration/planning/executionto a 9-value enum that also includes writing-lifecycle modes (voice-dumpthroughpublished-essay).Updates the
modefield descriptions for both the orchestrator tool (oddkit) and the dedicatedoddkit_challengetool to document the two mode families, and notes thatvoice-dumpsuppresses all challenge output.Reviewed by Cursor Bugbot for commit 9c79926. Bugbot is set up for automated code reviews on this repo. Configure here.