Repository navigation
DietCode v0.4.0: rebrand, compress API fix, config sync + uninstall - #8
Merged
Merged
Conversation
…rce header
Critical fixes
- client: /compress/raw/ nests fields under `results`; reading them at the
top level returned undefined, which made NIAH prompt compression replace the
user's prompt with the literal string "undefined" and post-tool-use wipe tool
output to {}. Flatten the response and throw on the HTTP-200 `{detail}` error
shape so callers fail open instead of dropping content.
- post-tool-use: the compress endpoint rejects an empty prompt; pass a non-empty
instruction so tool-output compression works (and fails open on error).
- codex hook block regex left an orphaned old block on re-write; fixed in both
setup and reconcile so updates are idempotent.
Config sync on update
- reconcile: re-write managed config (Claude settings.json, Codex config.toml,
Cursor rules) only for harnesses already configured, resolving hook paths at
runtime so a Node-version change no longer breaks hooks. Preserves user keys.
- postinstall script runs reconcile after npm install; status line self-heals
once a day as a safety net when postinstall is skipped.
- new `scaledown-claude uninstall` command strips all managed config and
unregisters the MCP server while preserving user content.
Other
- add `x-source: kode` header to every Scaledown API call.
- test infra: npm test now excludes network tests; ".d.ts in dist" false
positive fixed; compress mocks updated to the real wire shape.
- README: install/update/uninstall sections per harness, full env-var table,
corrected status-line scope (Claude Code only; no IDE extension).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Scaledown <ai@scaledown.ai>
Product is now DietCode (backed by the Scaledown API).
- npm package: @scaledown/claude-plugin -> dietcode (v0.4.0)
- CLI bins: scaledown-claude* -> dietcode* (dietcode, dietcode-status,
dietcode-reconcile, ...)
- MCP server id: scaledown -> dietcode, with migration in setup/uninstall
(removes the old `scaledown` MCP registration).
- Config markers + filenames migrated, detecting both old and new so existing
users are upgraded in place on the next reconcile/setup:
- Claude: _scaledownVersion -> _dietcodeVersion; hook-entry detection
matches dietcode, scaledown, and our hook filenames
- Codex: `# Scaledown hooks` -> `# DietCode hooks` (regex matches both)
- Cursor: scaledown.mdc -> dietcode.mdc (old file removed)
- Agent: ~/.claude/agents/scaledown.md -> dietcode.md
- Auto-updater now polls/install `dietcode` on the npm registry.
- Branding updated across CLI output, intent hint label ([DietCode intent:]),
git trailer (Co-Authored-By: DietCode), templates, and README.
Kept as Scaledown (the backing API/company, not the product): SCALEDOWN_* env
vars, ~/.scaledown data dir, api.scaledown.xyz, ScaledownClient class.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
varchanaiyer
approved these changes
Jun 28, 2026
varchanaiyer
approved these changes
Jun 28, 2026
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
Validated every harness integration against the live Scaledown API and fixed two critical, user-facing bugs plus a Codex regex bug, then added config-sync-on-update, an uninstall command, and the
x-source: kodeheader.Critical bug fixes
/compress/raw/response was mis-parsed. The API nests fields underresults; the client read them at the top level →undefined. Effect was destructive:"undefined".{}.sd_compressreturnedundefined/NaNtoken counts.Fixed by flattening the response and throwing on the HTTP-200
{detail}error shape so callers fail open instead of dropping content.setup.ts). Fixed → idempotent.Config sync on update
Previously
npm installonly replaceddist/; harness configs written bysetupwere never refreshed, so new keys (status line) never reached existing users and absolute hook paths broke on Node-version changes.src/reconcile.ts— re-writes managed config for already-configured harnesses only, resolving hook paths at runtime, preserving user content.postinstallscript + once-a-day status-line self-heal.scaledown-claude uninstall— strips all managed config + unregisters MCP, preserving user content.Other
x-source: kodeheader on every API call.npm testnow excludes network tests;.d.tsfalse positive fixed; compress mocks updated to the real wire shape.Verification
npm run buildclean; 104 tests pass.Note: machine-specific
.claude/settings.jsonwas intentionally not included.🤖 Generated with Claude Code